Re: How do I get the pixel coordinates of the minimum value?
Posted by
Jeremy Adler on
URL: http://imagej.273.s1.nabble.com/How-do-I-get-the-pixel-coordinates-of-the-minimum-value-tp5009363p5009368.html
use
getPixel(x,y)
this returns the intensity at the designated location - you have the start and end positions of the line, so write a loop that incrementally steps along the line, compares this intensity with the lowest found so far and if the new intensity is lower saves the x,y values.
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of TLowe
Sent: den 27 augusti 2014 02:44
To:
[hidden email]
Subject: How do I get the pixel coordinates of the minimum value?
This routine draws a line, gets the profile and returns the pixel values. How do I get the pixel coordinates of the minimum value?
//setTool("line");
makeLine(746, 344, 534, 582);
run("Clear Results");
profile = getProfile();
for (i=0; i<profile.length; i++)
setResult("Value", i, profile[i]);
updateResults;
-----
Tom Lowe
Chemical Technician
Eastman Kodak
--
View this message in context:
http://imagej.1557.x6.nabble.com/How-do-I-get-the-pixel-coordinates-of-the-minimum-value-tp5009363.htmlSent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html