Hi,
I wish to take a series of consecutive images and merge them to obtain a mean grayscale value. So far I have been creating a stack and then summing images from the Z-functions menu. Finally I would select the SUM image and obtain the mean gray value. However, I am not too sure what is happening 'behind the scenes' with this process. it does appear that there is some sort of autoscale process happening - would I be correct in thinking that this is the case? I have had a look online but have not yet found and documentation or details of the image processing for any of the z-function. Ideally I would like to avoid any autoscaling or be able to apply a fixed autoscale to different stacks in order to provide a realistic relative difference between different stacks. Regards, Martin. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Martin,
could you please be more specific with what you are doing and what you are suspecting? E.g., I don't see a "Z-functions menu" but a "ZProjection"-dialog window that is accessible from the "Image > Stacks > Z Project..."-submenu. This dialog provides various "Projection type"-options. None of them is called "SUM" but there is a corresponding option called "Sum Slices". Do you speak of different operations? Somehow puzzled Herbie ::::::::::::::::::::::::::::::::::::::::: Am 22.06.15 um 11:16 schrieb Martin Ward: > Hi, > > I wish to take a series of consecutive images and merge them to obtain a > mean grayscale value. So far I have been creating a stack and then > summing images from the Z-functions menu. Finally I would select the > SUM image and obtain the mean gray value. > > However, I am not too sure what is happening 'behind the scenes' with > this process. it does appear that there is some sort of autoscale > process happening - would I be correct in thinking that this is the > case? I have had a look online but have not yet found and documentation > or details of the image processing for any of the z-function. > > Ideally I would like to avoid any autoscaling or be able to apply a > fixed autoscale to different stacks in order to provide a realistic > relative difference between different stacks. > > > Regards, > Martin. > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Martin,
how do you expect the sum of several 8bit images to fit into the dynamic range (0...255) of the resulting 8bit image? Does this help? The different appearance of objects in single slices after summing may be explained by taking into account the properties of your stack images and the 32bit result image. HTH Herbie ::::::::::::::::::::::::::::::::::::::::: Am 22.06.15 um 12:38 schrieb Martin Ward: > Hi Herbie, > > Apologies for my confusing post, I was recalling the menu options from > memory at the time. Yes, you are correct I was using the sum slices command > from the projection type menu. > > Upon summing the slices in my stack I notice that some objects that appear > bright in a single frame are dulled following the stack slices being summed. > I am assuming that this can only be the case if there is some sort of > averaging/scaling occurring too? > > I have just noticed that my starting stack is comprised of 8-bit images and > the summed image is 32-bit - should this cause any problems regarding the > mean gray value that I would measure? > > > Thanks, > Martin -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi,
If all what you want to compute is the average of the slices, in the Z Project menu, there is already an "Average" function, so no need to sum them up. Cheers Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Gabriel,
Thanks for your reply. For my application, the images vary with a function of time (slice number) and it is the average intensity (grayscale) of a number of slices that I require. I will use the average projection type and see how I get on with that. However, having found out that there is a scale applied to the sum slices process it would be good to find out what actually happens when the average projection type is used; i.e., is it a simply pixel by pixel average or not? Regards, Martin. Quoting Gabriel Landini <[hidden email]> on Mon, 22 Jun 2015 13:20:57 +0100: > Hi, > If all what you want to compute is the average of the slices, in the > Z Project > menu, there is already an "Average" function, so no need to sum them up. > Cheers > > Gabriel > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Herbie
Sorry Martin,
your questions have nothing to do with images but with logic and perhaps a bit of mathematics. What you may consider is a single pixel in your image stack. Let's assume you have three images in the stack and we consider the pixels at coordinate 0,0 in every image. If this pixel has a gray value of 100 in every image, then the sum is 300 which is beyond the scope of an 8bit image that is limited to 2^8 = 256 values (0...255). That is why the summing result is represented as a 32bit image which can have deal with very high values. Hence the resulting pixel in our example is represented having the correct value of 300. In short: nothing is scaled. But... In general, computer displays can show only 256 shades of gray and you may ask how the value of 300 is displayed. In fact there is a scaling for the display but the considered pixel in the result image still has the value of 300. You may use the "Image > Adjust > Brightness/Contrast..." to change display parameters (for a description see the ImageJ-UserGuide at <http://rsb.info.nih.gov/ij/docs/guide/index.html>). (The values in the 32bit result image remain unaltered!) If you want to keep the 8bit representation, you should use the average-option. So in our example the resulting pixel from averaging will show the value 100. HTH Herbie ::::::::::::::::::::::::::::::::::::::::: Am 22.06.15 um 13:59 schrieb Martin Ward: > Hi Herbie, > > As it may be quite clear by now, I am in no way an expert in image analysis. > I understand that something is being scaled but I do not know what the > scaling factor is; therefore, I cannot directly compare different stacks of > images as I wish to. If it is possible I would like to establish if there > is a way that I can find out what the scaling factor is. Also, if anyone > has done something similar, it would be good to find out if they would > recommend a different projection type to use when merging the images(perhaps > average or median?). > > > Regards, > Martin. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Martin Ward-2
Hi Martin,
yes, the Image>Stacks>Z Project operation is very simple: sum = sum of all pixels at a given position (no scale!) average = sum / (number of slices in the stack) The operation is done on raw pixel values; not taking the pixel value calibration (if any) into account. If there is no nonlinear pixel value calibration, the average is simply the average over all pixels at a given position. There is no scale applied to the 'Sum Slices'. Just look at the pixel values in the ImageJ status line when placing the cursor at some position of the SUM_... image or use the Pixel Inspector to see the values of the cursor position and a small neighborhood. http://rsb.info.nih.gov/ij/docs/guide/146-19.html#toc-Subsection-19.20 Michael ________________________________________________________________ On Jun 22, 2015, at 14:55, Martin Ward wrote: > Hi Gabriel, > > Thanks for your reply. For my application, the images vary with a function of time (slice number) and it is the average intensity (grayscale) of a number of slices that I require. I will use the average projection type and see how I get on with that. However, having found out that there is a scale applied to the sum slices process it would be good to find out what actually happens when the average projection type is used; i.e., is it a simply pixel by pixel average or not? > > > Regards, > Martin. > > > > Quoting Gabriel Landini <[hidden email]> on Mon, 22 Jun 2015 13:20:57 +0100: > >> Hi, >> If all what you want to compute is the average of the slices, in the Z Project >> menu, there is already an "Average" function, so no need to sum them up. >> Cheers >> >> Gabriel >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > -- > 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 |