Estimation of the "pixelization" error introduced when using the digital image processing toolbox

Hello dear Matlab users,
I am using the digital image processing toolbox in order to obtain the equivalent diameter of objects located in an image. The objects will be roundish, most of the time; so using the regionprops function works fine for me. However, I know that Matlab estimates the equivalent diameter based on the area of each one of the objects contained in the image. My question is about the estimation of the error incurred by Matlab in rounding the empty/filled pixels. I do not know how to assess this situation due to the fact that I do not know the exact diameter of the objects, so I have no point of comparison to determine the deviation from the exact value and the Matlab value.
Also, the original objects have no jagged edges but after processing the images with Matlab, most of the objects will have jagged edges.
I hope that my situation is explained in a clear manner.
Thanks for any kind of help, info or feedback, all of them will be gladly received.
Regards,
-- MB

1 commentaire

http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

Connectez-vous pour commenter.

Réponses (1)

This is just a stab in the dark, but I gather that after processing you get an image with logical (0 or 1) pixels, and you obtain a centre point and diameter for your round objects.
Could you not simply count the number of pixels inside your shape (discrete area), and then compare that to the area of the circle that you have detected?

4 commentaires

Miguel indicates that he does not know the exact diameter of the objects. That would imply that he does not know the actual area.
Hi Geoff,
As you said, I do get a logical image and from that image I can get quite a few interesting values. To obtain the diameter and centre points of the objects contained in the image I am using regionprops. But from the definition of it you see that the area and the diameter are connected definitions (taken from the Matlab help file for regionprops):
'Area' — Scalar; the actual number of pixels in the region. (This value might differ slightly from the value returned by bwarea, which weights different patterns of pixels differently.).
'EquivDiameter' — Scalar that specifies the diameter of a circle with the same area as the region. Computed as sqrt(4*Area/pi). This property is supported only for 2-D input label matrices.
I am using either of those functions to obtain the diameter of my objects, but then I realized that during the process of analysing the image, there are errors associated and I do not know how to properly assess them when using Matlab.
Thanks for your prompt reply.
Regards,
-- MB
@ Walter: Exactly! If I knew the diameter beforehand it would be a simple task. But the question derives from the fact that I am using Matlab to estimate the diameter of the objects in the image; and I was wondering how accurate is this estimation.
Oh yep, my mistake... In that case I would probably go back to the original image and sum up the pixels at the edge of the processed object. First I'd extract the 'edge' by taking all pixels where in any 2x2 square there are both 0 and 1 values. Then I'd look at the intensity values for those pixels in the squares matched with their on/off processed counterpart.... You're wanting to measure how much aliasing was introduced by the processing. Might not be practical depending on background etc....

Connectez-vous pour commenter.

Question posée :

le 22 Mai 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by