Hello!
I will be doing UV image capture with a digital camera and would like to then automatically discriminate and count pixels in the image based on least squared distance of RGB values (0-255). Is the ImageJ software capable of doing this? If so, is there already an existing plug-in or would I have to create a new one? I am doing this for my masters thesis research and was discouraged when the recommended OTS software was $4-5k. A helpful contact mentioned ImageJ but was not sure if it would work for my needs. If anyone has any advice it would be much appreciated. Thanks! Kitt -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Kitt,
It is possible one of the plugins for segmentation of color images could be used. If that approach does not work directly, you should be able build a macro or plugin to do this with ImageJ or FIJI after spending a little time with a text book and one of the on-line tutorials. Run some of the example macros and look at the code. The Macro Recorder will be very useful as you figure out the sequence of steps to automate. In the Process pull-down menu you will find math functions to do squares and square roots, and Image Calculator and Calculator Plus functions. There are many ways to count pixels. Note that you may have to split color channels, do some analysis with 32-bit images, then merge channels. Have fun. Charles -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Kitt Stevens Sent: Thursday, December 06, 2012 7:33 PM To: [hidden email] Subject: Pixel discrimination via RGB Hello! I will be doing UV image capture with a digital camera and would like to then automatically discriminate and count pixels in the image based on least squared distance of RGB values (0-255). Is the ImageJ software capable of doing this? If so, is there already an existing plug-in or would I have to create a new one? I am doing this for my masters thesis research and was discouraged when the recommended OTS software was $4-5k. A helpful contact mentioned ImageJ but was not sure if it would work for my needs. If anyone has any advice it would be much appreciated. Thanks! Kitt -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by ksteve9
Hi Kitt,
you can try the Versatile Wand for this, thereafter Analyze>Measure with 'area' checked in 'Analyze>Set Measurements' Procedure: Set the foreground color (eydropper tool color) to the the color you want to select. In a macro, use setForegroundColor(r, g, b); In Edit>Options>Conversions, make sure that 'Weighted RGB conversions" is disabled. In the Versatile Wand Options, leave 'Color' and 'Gradient' at 0, select 'Eyedropper Color' and Connectedness=non-contiguous. Then the wand will select pixels where 0.33333*(R-R_eyedropper)^2 + 0.33333*(B-B_eyedropper)^2 + 0.33333*(G-G_eyedropper)^2 < Tolerance^2 Here, 'Tolerance' is the input of the 'Value Tolerance' field. The weights of the colors can be changed, in a macro via setRGBWeights(redWeight, greenWeight, blueWeight). You can make the Note that you need today's version of the Versatile Wand; it partly fixes a bug with incorrect tolerance for RGB images (it's ok for color sensitivity=0; for color sensitivity >0, there is still an inconsistency; I'll try to this soon). http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start -- One word of caution: Consumer digital cameras are problematic; they are highly nonlinear (if possible, use fixed exposure and f/number) and you must also make sure that the color balance is not set automatically, otherwise colors are not reproducible at all. Michael ________________________________________________________________ On Dec 7, 2012, at 02:33, Kitt Stevens wrote: > Hello! > > I will be doing UV image capture with a digital camera and would like to > then automatically discriminate and count pixels in the image based on > least squared distance of RGB values (0-255). Is the ImageJ software > capable of doing this? If so, is there already an existing plug-in or > would I have to create a new one? I am doing this for my masters thesis > research and was discouraged when the recommended OTS software was $4-5k. > A helpful contact mentioned ImageJ but was not sure if it would work for > my needs. If anyone has any advice it would be much appreciated. Thanks! > > Kitt -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by ksteve9
Thank you! I'm sure I will have more questions when I get closer to the data collection. Also thanks for pointing that out about the auto color balance. I'll have to look into it more. I will be using either a Canon or Nikon DSLR. Ideally I will
set the camera once manually and not change it for all the subjects. Also, I will be using a color chart for standardization. Would that overcome the auto color balance issue? I have never done photo imaging analysis so I am learning as I go... -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |