Hi all,
I am a newbie trying to navigate through ImageJ waters. I have a question and I'm hoping someone could help with that. I'm trying to calculate 1) the area occupied by yellow coloured pixels and 2) quantify the intensity of yellow colour in the wings. After some struggle, I figured out how to do 1 but I have had no luck with 2. I looked into some examples but I don't quite get it. Herewith, I have attached two images that show a difference in the intensity (one is yellow and the other one is pale), for your reference. Please, let me know how I should go about this, any help would be appreciated. Let me know if you need more details from my side. Thanks. Regards, Ram -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello,
I am using Fiji, so I'm not sure if these options are all present in ImageJ. You can use color threshold (Image>Adjust>Color Threshold...) to select the yellow pixels using the Hue slider. Once you have your pixels selected you can save the selection in the ROI manager. After your selection is saved, you can convert the image to an HSB stack (Image>Type>HSB Stack). The middle slice of the HSB stack is saturation. If you take the integrated density of your selection in this slice, that will provide you with a number for the overall saturation. (Analyze>Set Measurements, Analyze>Measure) I hope this helps. -Bryan On Tue, Aug 18, 2015 at 7:56 AM, ram prasad <[hidden email]> wrote: > Hi all, > > I am a newbie trying to navigate through ImageJ waters. I have a question > and I'm hoping someone could help with that. > > I'm trying to calculate 1) the area occupied by yellow coloured pixels and > 2) quantify the intensity of yellow colour in the wings. > > After some struggle, I figured out how to do 1 but I have had no luck with > 2. I looked into some examples but I don't quite get it. > > Herewith, I have attached two images that show a difference in the > intensity (one is yellow and the other one is pale), for your reference. > > Please, let me know how I should go about this, any help would be > appreciated. > > Let me know if you need more details from my side. > > Thanks. > > Regards, > Ram > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you very much for your reply, Bryan. I really appreciate it.
The options are available in ImageJ and I managed to do this for one image. Another question, I have hundreds of images that require this analyses so, I tried to record these steps in a macro (using Plugins -> Macros -> Record). ##################################### open("/home/ramprasad/Pictures/temp_single_wing/ed_10-1-1.jpg"); //run("Threshold..."); // Color Thresholder 1.48v // Autogenerated macro, single images only! min=newArray(3); max=newArray(3); filter=newArray(3); a=getTitle(); run("HSB Stack"); run("Convert Stack to Images"); selectWindow("Hue"); rename("0"); selectWindow("Saturation"); rename("1"); selectWindow("Brightness"); rename("2"); min[0]=0; max[0]=100; filter[0]="pass"; min[1]=0; max[1]=255; filter[1]="pass"; min[2]=157; max[2]=255; filter[2]="pass"; for (i=0;i<3;i++){ selectWindow(""+i); setThreshold(min[i], max[i]); run("Convert to Mask"); if (filter[i]=="stop") run("Invert"); } imageCalculator("AND create", "0","1"); imageCalculator("AND create", "Result of 0","2"); for (i=0;i<3;i++){ selectWindow(""+i); close(); } selectWindow("Result of 0"); close(); selectWindow("Result of Result of 0"); rename(a); // Colour Thresholding------------- run("Close"); run("HSB Stack"); run("ROI Manager..."); roiManager("Add"); roiManager("Measure"); ############################# This records every step in the analysis but not the one where I select pixels to be saved in ROI manager. As a result, I'm not able to apply this as a macro to do a batch analysis. Any idea how to go about this? Thanks again. Regards, Ram On Tue, Aug 18, 2015 at 4:25 PM, Bryan Sibert <[hidden email]> wrote: > Hello, > > I am using Fiji, so I'm not sure if these options are all present in > ImageJ. > > You can use color threshold (Image>Adjust>Color Threshold...) to select the > yellow pixels using the Hue slider. Once you have your pixels selected you > can save the selection in the ROI manager. > > After your selection is saved, you can convert the image to an HSB stack > (Image>Type>HSB Stack). The middle slice of the HSB stack is saturation. > > If you take the integrated density of your selection in this slice, that > will provide you with a number for the overall saturation. (Analyze>Set > Measurements, Analyze>Measure) > > I hope this helps. > > -Bryan > > On Tue, Aug 18, 2015 at 7:56 AM, ram prasad <[hidden email]> wrote: > > > Hi all, > > > > I am a newbie trying to navigate through ImageJ waters. I have a question > > and I'm hoping someone could help with that. > > > > I'm trying to calculate 1) the area occupied by yellow coloured pixels > and > > 2) quantify the intensity of yellow colour in the wings. > > > > After some struggle, I figured out how to do 1 but I have had no luck > with > > 2. I looked into some examples but I don't quite get it. > > > > Herewith, I have attached two images that show a difference in the > > intensity (one is yellow and the other one is pale), for your reference. > > > > Please, let me know how I should go about this, any help would be > > appreciated. > > > > Let me know if you need more details from my side. > > > > Thanks. > > > > Regards, > > Ram > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |