Hey,
thanks for your instant replys. 2 month ago i should have know the trick using invert + invert LUT :-) The situation right now. I got the Histograms (Visual as well as count) of quiet a few samples. We are investigating the pressure distribution when fusing two bones. We were using pressure sensitive film (fuji). With pressure sensitive film, pressure is converted into different shades of red --> therefore I got a bunch of pictures with different shads of red on them. I had to conduct several picture processing steps, as the quality was not perfect. Finally resulting in 8-bit images, with the AUC of the Histogram being Total Pressure. Using the Histogram Tool --> List, I manually calculated the following 2 parameters: Total Pressure [Sum: Pixel*Greyscale] Mean Pressure [Total Pressure / Sum:Pixel] The settings I used resulted, as mentioned initially, in values 0 equaling black and 255 white. Can I simply subtract my results (Total Pressure and Mean Pressure) from 255? If I understood you correctly, that should work well. Thank you so much for your time! On 29.08.2009, at 02:05, Robert Baer wrote: > At the risk of exposing my ignorance, I would submit it depends what > you mean by subtract. > > Basically, you are dealing with a computer byte and what you want to > do is complement the bits. If by subtraction you mean byte > subtraction, your method works. If by subtraction you mean 2 byte > or 4 byte subtraction, you will arrive at something that may or may > not represent what you want if you simply subtract 255. > > There are basically two commands related (but different) to what you > may want to do that are available from the ImageJ menu. Compare > analyze histogram after each to understand the difference. The > effect on image appearance is similar in the two cases. > > For example, open the bridge.gif sample. Note that it is 8-bit > greyscale. Do Analyze | Histogram and note that the mean is 114, and > the mode is 85. > > Now do, Edit | Invert The visual image complements. Analyze > histogram produces a mean of 141 and a mode of 170. Note that > 114+141=255 and 85+170=255. Thus, 255-x gives the appropriate mean > or mode of the inverted histogram. The image is inverted and the > histogram is inverted. > > Open a fresh copy of the sample bridge.gif. Do Image | Lookup > tables | invert LUT Again the visual image swaps blackness and > whitness. Now, analyze | histogram produces a mean of 114 and a > mode of 85, the same histogram values as produced by the origninal > image. The image appearance is inverted but the histogram is > unchanged. > > Finally, open Bridge.gif sample and do Edit | Invert followed by > Image | Lookup tables | Invert LUT. The image appears as it > originally did. Analyze histogram shows a mean of 141 and a mode of > 170. The image is unchanged but the histogram is inverted. If I > understand you, this is exactly the effect you wish to acheive. > > This can be done by macro with: > run("Bridge (174K)"); > run("Invert"); > run("Invert LUT"); > > Hope this helps, > Rob > > > > ----- Original Message ----- From: "Sebastian Baumbach" <[hidden email] > > > To: <[hidden email]> > Sent: Friday, August 28, 2009 12:53 PM > Subject: Converting 8-bit Grey Scale > > >> Hey All, >> >> I have analyzed pressure sensitive film using imageJ. I am using >> several processing steps and finally receive a 8-bit grey scale >> image. I am analyzing the pressure using the grey values which I >> receive through the histogram tool embedded in ImageJ. 0 equals >> black and 2 white 55. >> >> To make the correlation between grey values and pressure more >> apparent, I would like to have 0 equalling white and 255 black. If >> I remember correctly, grey scale is linear function, which means >> that I should be able to simply subtract the received values by 255. >> >> Is that correct? >> >> Thank you very much in advance! >> >> Sebastian |
Free forum by Nabble | Edit this page |