Hi,
here is what I do for a little plugin in Java: pic1 - pic2 = result1 --> measure --> min1 = 0 (pic1 +100) - pic2 = result2 --> measure --> min2 = 53 Built-in Plugins give the same results. Is ImageJ setting negative Pixel values to Zero, since I expected min2=100? And of course if you do image statistics stdDev (result1) and stdDev (result2), the results will be different. In my opinion the addition of an offset is required for the correct calculation of stdDev, but maybe I am wrong. Any suggestions on this issue? Thanks for your help! Sebi |
Hi,
Make sure you are using the correct bit depth for your images in these calculations. I would recommend using 32bit to allow negative numbers and prevent the maths failing due to the values hitting the top of the available range (ie 180 + 100 = 255 in 8bit data). Hope that helps Dr Colin Rickman Centre for Integrative Physiology School of Biomedical Sciences University of Edinburgh Hugh Robson Building George Square Edinburgh EH8 9XD Tel: +44 (0)131 6511512 Fax: +44 (0)131 6503128 Sebastian Rhode wrote: > Hi, > > here is what I do for a little plugin in Java: > > pic1 - pic2 = result1 --> measure --> min1 = 0 > > (pic1 +100) - pic2 = result2 --> measure --> min2 = 53 > > Built-in Plugins give the same results. Is ImageJ setting negative Pixel > values to Zero, since I expected min2=100? > > And of course if you do image statistics stdDev (result1) and stdDev > (result2), the results will be different. In my opinion the addition of an > offset is required for the correct calculation of stdDev, but maybe I am > wrong. > Any suggestions on this issue? > > Thanks for your help! > > Sebi > -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |
In reply to this post by Sebastian Rhode-2
Just answer the statistics part of your question. Adding/substracting a
constant number to your orignal data will not change the standard deviation. Hi, here is what I do for a little plugin in Java: pic1 - pic2 = result1 --> measure --> min1 = 0 (pic1 +100) - pic2 = result2 --> measure --> min2 = 53 Built-in Plugins give the same results. Is ImageJ setting negative Pixel values to Zero, since I expected min2=100? And of course if you do image statistics stdDev (result1) and stdDev (result2), the results will be different. In my opinion the addition of an offset is required for the correct calculation of stdDev, but maybe I am wrong. Any suggestions on this issue? Thanks for your help! Sebi |
Hi again,
JAIN, mathematically true, but 8-Bit and 16-Bit ImageJ image format (if not scaled) is considered unsigned, so any negative calculation result will be clamped to zero, you need to at least convert the image to 32-Bit - or add an appropriate offset - to retain image statistics. JW ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008 17:48:48: > Just answer the statistics part of your question. Adding/substracting a > constant number to your orignal data will not change the standard > deviation. > > > Hi, > > here is what I do for a little plugin in Java: > > pic1 - pic2 = result1 --> measure --> min1 = 0 > > (pic1 +100) - pic2 = result2 --> measure --> min2 = 53 > > Built-in Plugins give the same results. Is ImageJ setting negative Pixel > values to Zero, since I expected min2=100? > > And of course if you do image statistics stdDev (result1) and stdDev > (result2), the results will be different. In my opinion the addition of > an offset is required for the correct calculation of stdDev, but maybe I > am wrong. > Any suggestions on this issue? > Thanks for your help! > > Sebi ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
Free forum by Nabble | Edit this page |