Dear users,
I would like to open an RGB image with 255 colors. I would like to segment the image e.g. like this 0-50 (1st color) 51-120 (2nd color), 121-190 (3rd color) 191-255 (4th color). Now I would like to define the complete image as 100 % and find out which percentage each of the segmented areas has. And I would like to get a histogram for each segmented area. Does anybody have a plug-in for this kind of segmentation? Anneliese |
Anneliese,
An RGB image has three 8-bit channels, each with a 0-255 range of pixel intensities. The color is what you call any of these channels: the first red, the second green, the third blue. So honestly I don't understand your question! If the image had a single channel, then I can easily see how to go about it. Or, do you want to use the three channels as if they where one channel only? Then convert the image to 8-bit first, then retrieve the pixels and count the ammount that fall within each range, and divide by the total -you can do that with a macro as well. Albert |
In reply to this post by Klughammer GmbH
Anneliese,
If you already have some predefined (R, G, B) values that represent each of your 256 colors, I'm not sure how you would go about that. Otherwise, you might want to convert the RGB to HSV and use the 256 Hue values 0-50, 51-120, etc. as a proxy for "colors". The gist of the macro would look something like this: setThreshold(0, 50); run("Threshold", "thresholded remaining black"); run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Nothing clear record"); totalArea = 0; for (k = 0; k < nResults; k++) totalArea = totalArea + getResult('Area', k); print("Total area for colors 0-50: "+totalArea); setThreshold(51, 120); run("Threshold", "thresholded remaining black"); run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Nothing clear record"); totalArea = 0; for (k = 0; k < nResults; k++) totalArea = totalArea + getResult('Area', k); print("Total area for colors 51-120: "+totalArea); etc... Of course, you could do this in a loop... M At 10:26 AM 4/3/2006, you wrote: >Dear users, > >I would like to open an RGB image with 255 colors. I would like to >segment the image e.g. like this 0-50 (1st color) 51-120 (2nd >color), 121-190 (3rd color) 191-255 (4th color). > >Now I would like to define the complete image as 100 % and find out >which percentage each of the segmented areas has. And I would like >to get a histogram for each segmented area. > >Does anybody have a plug-in for this kind of segmentation? > >Anneliese |
The Info output for dcm files from ImageJ 1.37b contains a <nul>
character between tag and its name which did not exist in Info output from previous versions of ImageJ. I am running ImageJ on FC4 Linux with jdk1.6.0. Can this be fixed, please? Thanks, Michal |
In reply to this post by Martin du Saire
If I understand correctly then what you're trying to do is measure the
area of the pixels with colours where all R values are 0-50 AND all G values are 0-50 AND all B values are 0-50, then measure the area of all pixels where all R, G and B values are 51-120, etc? Difficult to envisage what this means in terms of selection in the image. Isn't what you need the Threshold Colour Plugin, by Gabriel Landini http://www.dentistry.bham.ac.uk/landinig/software/software.html ? You can set the threshold for the three different channels (though that does not seem to be recorded in the macro recorder, unfortunately). Then convert the image to 8-bit, do another threshold, and measure (with limit to threshold ticked under Set Measurements). Bo > Dear users, >> >> I would like to open an RGB image with 255 colors. I would like to >> segment the image e.g. like this 0-50 (1st color) 51-120 (2nd color), >> 121-190 (3rd color) 191-255 (4th color). >> >> Now I would like to define the complete image as 100 % and find out >> which percentage each of the segmented areas has. And I would like to >> get a histogram for each segmented area. >> >> Does anybody have a plug-in for this kind of segmentation? >> >> Anneliese -- R.P.J. de Lange, PhD Rudolf Magnus Institute of Neurosciences P.O. box 80040 3508 TA Utrecht The Netherlands visiting address: Stratenum, room 4.241 Universiteitsweg 100 3584 CG Utrecht tel: +31-30-253 8924 +31-30-253 8837 (lab) fax: +31-30-253 9032 |
In reply to this post by Michal Lijowski
> The Info output for dcm files from ImageJ 1.37b contains a
> <nul> character between tag and its name which did not exist > in Info output from previous versions of ImageJ. I am > running ImageJ on FC4 Linux with jdk1.6.0. Can this be > fixed, please? This bug is fixed in ImageJ 1.37d. It was an unattended consequence of this 1.37b bug fix: v1.37b, 24 March 2006 Tabs written to the "Log" window are no longer converted to spaces -wayne |
In reply to this post by Bo de Lange
On Wednesday 05 April 2006 08:47, Bo de Lange wrote:
> you need the Threshold Colour Plugin, by Gabriel Landini > http://www.dentistry.bham.ac.uk/landinig/software/software.html ? You > can set the threshold for the three different channels (though that does > not seem to be recorded in the macro recorder, unfortunately). To tell the truth, I never thought about this. Because this plugin runs in a different thread, I have no idea how to make the macro recorder to capture the settings. Any ideas? Cheers, Gabriel |
Free forum by Nabble | Edit this page |