Dear Wayne,
In binary images, ImageJ can deal with both white or black particles, thanks to some black background chexboxes in Binary/Options, after thresholding etc. However, I would find also convenient to have a black background option in Analyse Particles, to analyse white (255) particles. Simon |
On Wednesday 21 May 2008 11:57:46 Simon Roussel wrote:
> Dear Wayne, > In binary images, ImageJ can deal with both white or black particles, > thanks to some black background chexboxes in Binary/Options, after > thresholding etc. However, I would find also convenient to have a black > background option in Analyse Particles, to analyse white (255) particles. > Simon I do not think that this is a good idea. It would be very confusing. Which will take precedence? The Binary Options or the particle analyser? One could end up doing erosion/dilation on one setting and particle analysis with another. G. |
In reply to this post by Simon Roussel
Dear Gabriel,
Your answer suggest that the particle analyser does take into account the black background option in Process/Binary, which is not the case. Analyse Particles always considers objects as black(=0). Otherwise, I would not have given this suggestion. Or, did I miss something ? (I just verified again ...) Thanks simon PS: of course I can continue to invert my objects before analysing ... On Wed, 21 May 2008 14:51:46 +0100, Gabriel Landini <[hidden email]> wrote: >On Wednesday 21 May 2008 11:57:46 Simon Roussel wrote: >> Dear Wayne, >> In binary images, ImageJ can deal with both white or black particles, >> thanks to some black background chexboxes in Binary/Options, after >> thresholding etc. However, I would find also convenient to have a black >> background option in Analyse Particles, to analyse white (255) particles. >> Simon > >I do not think that this is a good idea. It would be very confusing. > >Which will take precedence? The Binary Options or the particle analyser? >One could end up doing erosion/dilation on one setting and particle analysis >with another. > >G. >========================================================================= |
In reply to this post by Simon Roussel
On May 21, 2008, at 6:57 AM, Simon Roussel wrote:
> Dear Wayne, > In binary images, ImageJ can deal with both white or black particles, > thanks > to some black background chexboxes in Binary/Options, after > thresholding etc. > However, I would find also convenient to have a black background > option in > Analyse Particles, to analyse white (255) particles. You can analyze white particles by setting a 255-255 threshold. Here is an example: w=512; h=512; newImage("Test", "8-bit Black", w, h, 1); setColor(255); for (i=0; i<200; i++) { makeOval(random*w, random*h, 10, 10); fill; } run("Select None"); setThreshold(255, 255); run("Analyze Particles...", "show=Nothing display clear"); -wayne |
In reply to this post by Simon Roussel
On Wednesday 21 May 2008 15:28:55 Simon Roussel wrote:
> Your answer suggest that the particle analyser does take into account the > black background option in Process/Binary, which is not the case. > Analyse Particles always considers objects as black(=0). > Otherwise, I would not have given this suggestion. You are right that the particle analyser does not consider the background setting. It does depend on the threshold setting. If one wants the default to detect white particles, this should be a Threshold (or better auto threshold) dialog setting, not a particle analysis one. That way the detection is on the correct part of the greyscale. Does this make sense? Some programs do have a settings that define how all routines behave (so dilation and erosion are consistent with the rest of thresholding and masking operations). ImageJ is quite flexible on this, the thresholding is not, it is hard wired to detect black blobs in autothreshold mode. I do not think it is logical that the autothreshold will detect black objects by default, but analyse white particles according to another setting. This would work only if the image was thresholded (or made binary). I think it would be better to have a threshold checkbox that controls what is being segmented. I hope this clarifies. Cheers, G. |
In reply to this post by Simon Roussel
Dear Wayne and Gabriel,
Thanks for your answers. In summary there are several easy ways to analyse white particles: setThreshold(255, 255); or run("Invert", "stack"); I do not observe that the autothreshold on binary images always selects black areas. If I invert such a binary image I can get the white areas as selected with autothreshold . So, I still would find logical that, if binary operations can consider objects as white (=255), analyse particles should also be able to have the same definition of "objects". Anyway, the high flexibility of ImageJ is well enough. Thanks Simon |
On Wednesday 21 May 2008 16:35:40 Simon Roussel wrote:
> I do not observe that the autothreshold on binary images always selects > black areas. If I invert such a binary image I can get the white areas as > selected with autothreshold . Ah, yes, you are right, sorry, I was convinced that this was hard wired to the algorithm... I have an Otsu threhsold plugin where I have set what to threshold (white things), and thererfore my confusion. > So, I still would find logical that, if binary operations can consider > objects as white (=255), analyse particles should also be able to have the > same definition of "objects". Yes, but ideally this should be defined elsewhere globally so all the other operations follow that convention. Note that this gets more confusing when one uses the Inverted LUT. By the way, I wonder if this is a bug. If I enlarge/resize an image canvas, the option that says Zero fill, fills with black, regardless of the check status, if I have the foreground as white and the background as black in the colour picker. Regards, G |
Free forum by Nabble | Edit this page |