Hello,
I am taking pictures of what are called nodules (phosphate bearing ore that has been calcined). The pictures are taken above a moving conveyor (see example image below). We are interested in getting a relative measurement of the particle size distribution of this material. My strategy involves using either the Red slice or the Brightness slice of the color image and then thresholding the slice to isolate individual nodules. The thresholded image is smoothed (by subtracting background), then converted to a binary image. One the binary image is prepared, we perform some math on the pixels that fall "under" vertical lines that are sequentially drawn across the image (20 to 30 individual lines) from left to right. The math records the number of black pixels in each vertical line as well as the number of transitions from black to white for each line. These numbers result in an average "black pixels/nodule" found in each vertical line. This is all automated in a macro. Problem: On some images, thresholding isolates the background (mostly the shadows between the nodules) and on others it isolates the foreground (the nodules) - which is the desired result (see examples below). I think this is partly due to the lighting of the original image (which is not entirely controllable). Any suggestions on how to manipulate the image to consistently achieve the desired binary image (with black nodules) would be greatly appreciated. Thanks in advance Rick Simmons Here is a "good" thresholding result: Here is a "bad" thresholding result (the same original image is used for simplicity): --------------------------------------------------------------------------------------------------------- This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. --------------------------------------------------------------------------------------------------------- image002.jpg (80K) Download Attachment image008.jpg (88K) Download Attachment image009.jpg (88K) Download Attachment |
On Thursday 03 June 2010, you wrote:
> Problem: On some images, thresholding isolates the background (mostly > the shadows between the nodules) and on others it isolates the > foreground (the nodules) Maybe you are using an old version of IJ? For some time there has been a "Dark Background" checkbox. If you check that box (or add the switch to the macro) you should be able to make all the images get the same phase of the threshold. G. |
G.
I have the checkbox and have used it manually and in the macro. But it does not seem to perform consistently from image to image. I don't know if the images are different or if the switch is buggy. Rick -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini Sent: Thursday, June 03, 2010 12:34 PM To: [hidden email] Subject: Re: Another Rookie Question (thresholding) On Thursday 03 June 2010, you wrote: > Problem: On some images, thresholding isolates the background (mostly > the shadows between the nodules) and on others it isolates the > foreground (the nodules) Maybe you are using an old version of IJ? For some time there has been a "Dark Background" checkbox. If you check that box (or add the switch to the macro) you should be able to make all the images get the same phase of the threshold. G. --------------------------------------------------------------------------------------------------------- This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. --------------------------------------------------------------------------------------------------------- |
On Thursday 03 June 2010, you wrote:
> I have the checkbox and have used it manually and in the macro. But it > does not seem to perform consistently from image to image. I don't know > if the images are different or if the switch is buggy. Can you upload somewhere 2 images that behave differently and the macro that you are trying to run? Cheers G. |
In reply to this post by Rick Simmons
Hi Wyane et al.,
I understand that ImageJ can display 48 bit color images and that it does this by essentially creating a stack of three 16-bit images. We are interested in supporting 48 bit color cameras directly and would like to know how difficult it would be to write an ImageProcessor specialized for 48 bit color images. Has anyone tried to do that? Karl Hoover (micromanager project) |
Karl,
What is it you are looking to do with the 48bit colour images? Is it just a matter of having convenient control over the colour balance, brightness and contrast? I'm working on Plugin to do just this for composite images ( 8 and 16 bit per channel). It's incomplete but it provides a dialogue with a histogram control for each of the composite image channels that allows you to set the min and max levels and a checkbox to enable/disable each plane. As said there is a lot more work to be done including being able to set the colour ramp for each channel. Is this what you are after? Regards -- Michael Ellis (picture of dialogue below but not sure if this will make it through the list server) Regards -- Michael Ellis On 3 Jun 2010, at 22:11, Hoover, Karl wrote: > Hi Wyane et al., > > > > I understand that ImageJ can display 48 bit color images and that it > does this by essentially creating a stack of three 16-bit images. > > > > We are interested in supporting 48 bit color cameras directly and > would like to know how difficult it would be to write an > ImageProcessor specialized for 48 bit color images. Has anyone tried > to do that? > > > > Karl Hoover > > (micromanager project) Managing Director Digital Scientific UK Ltd. http://www.digitalscientific.co.uk [hidden email] tel: +44(0)1223 329993 fax: +44(0)1223 370040 Sheraton House Castle Park Cambridge CB3 0AX The contents of this e-mail may be privileged and are confidential. It may not be disclosed to or used by anyone other than the addressee(s), nor copied in any way. If received in error, please advise the sender and delete it from your system. pastedGraphic.tiff (52K) Download Attachment |
In reply to this post by Hoover, Karl
Hi Karl,
I would second Michael's question: why do you want a single 48-bit image processor subclass, rather than using CompositeImage of type ShortProcessor with three channels? We use the latter approach in Bio-Formats and it works very well. -Curtis On Thu, Jun 3, 2010 at 4:11 PM, Hoover, Karl <[hidden email]> wrote: > Hi Wyane et al., > > > > I understand that ImageJ can display 48 bit color images and that it does > this by essentially creating a stack of three 16-bit images. > > > > We are interested in supporting 48 bit color cameras directly and would > like to know how difficult it would be to write an ImageProcessor > specialized for 48 bit color images. Has anyone tried to do that? > > > > Karl Hoover > > (micromanager project) > |
Free forum by Nabble | Edit this page |