Hello
I am trying to figure out how to convert various climate data images to a usable format for analysis in ImageJ. As an example, I'd like to analyze this NOAA image of mean sea level changes. link I believe it is a pseudo color image. I have created a color index to mm/yr rise from the color scale bar. Here are a few lines of my table: Index Temp 1 -9 102 -8 101 -7 .... 7 30 8 27 9 9 I enter this table into the Analyze > Calibrate table and try various functions, but with no success. Is there a way for ImageJ to convert a color index to an equivalent mm/yr value. I have been able to calibrate 8-bit images. It's the pseudo color images that are confusing me. I'd appreciate any help you can give me. Kelly O'Day |
Hi Kelly,
it would be a reasonably easy task without the transitions between the colors. Here is a simple macro that works well except for some transition colors. It needs the Versatile Wand plugin from http://imagejdocu.tudor.lu/doku.php? id=plugin:segmentation:versatile_wand:start It can't cope with the transition colors: if you increase the color tolerance, some shades of red will be interpreted as one color and the macro will fail. With the current settings, some colors will not be converted. Mind that the mailer may introduce extra line breaks, e.g. the line starting with 'run("Versatile Wand"' is quite long. // Convert pseudo colors into values // Needs an input image with sharp steps between the colors // and a calibration color bar // Does not work if the color map contains shades of gray // (except for the first few fields in some cases) // The input image must not have jpeg compression artifacts // scaleFirst=-9.4; //first data value in calibration color bar scaleLast=9.4; //last data value in calibration color bar barWidth=2150; //pixels, set to zero for vertical color bar barHeight=0; //pixels, set to zero for horizontal bar barX0=96; //x position of the first color field in the color bar barY0=1146; //y position of the first color field in the color bar colorSteps=18; //number of pseudo colors //NOTE: The macro fails if the tolerance is too large and //two colors are selected at once grayTolerance=20; //how accurate the colors must be. hueSensitivity=50;//-100 is sensitive to grayscale only, +100 is sensitive to hue only run("Versatile Wand", "value=&grayTolerance color=&hueSensitivity gradient=0 connectedness=non-contiguous"); run("Conversions...", " "); //have a defined state for "weighted color conversions" xStep = barWidth/colorSteps; yStep = barHeight/colorSteps; for (i=0; i<colorSteps; i++) { call("Versatile_Wand.mousePressed", round(barX0+i*xStep), round (barY0+i*yStep)); run("Set...", "value="+(i+1)); run("Select None"); } run("32-bit"); run("Add...", "value=-1"); run("Multiply...", "value="+((scaleLast-scaleFirst)/(colorSteps-1))); run("Add...", "value="+scaleFirst); setMinAndMax(minOf(scaleFirst,scaleLast), maxOf(scaleFirst,scaleLast)); Michael ________________________________________________________________ On 9 Mar 2010, at 05:52, D Kelly O'Day wrote: > Hello > > I am trying to figure out how to convert various climate data > images to a > usable format for analysis in ImageJ. > > As an example, I'd like to analyze this NOAA image of mean sea level > changes. > > http://ibis.grdl.noaa.gov/SAT/SeaLevelRise/slr/ > map_txj1j2_blue2red.png link > > I believe it is a pseudo color image. > > I have created a color index to mm/yr rise from the color scale > bar. Here > are a few lines of my table: > > Index Temp > 1 -9 > 102 -8 > 101 -7 > > .... > > 7 30 > 8 27 > 9 9 > > I enter this table into the Analyze > Calibrate table and try various > functions, but with no success. > > Is there a way for ImageJ to convert a color index to an equivalent > mm/yr > value. I have been able to calibrate 8-bit images. It's the pseudo > color > images that are confusing me. > > I'd appreciate any help you can give me. > > Kelly O'Day > > > -- > View this message in context: http://n2.nabble.com/How-to-Recode- > Pseudo-Color-Images-tp4700313p4700313.html > Sent from the ImageJ mailing list archive at Nabble.com. |
Free forum by Nabble | Edit this page |