Find bounding box coordinates for "target" in binary mask image
Posted by Josh Doe on Mar 23, 2006; 1:30pm
URL: http://imagej.273.s1.nabble.com/Find-bounding-box-coordinates-for-target-in-binary-mask-image-tp3703318.html
Hi, I have some binary mask images, and I need to get the coordinates and
size of a box surrounding the part of interest. Basically the images are all
black, except for a clump of white pixels somewhere in the image, which I
call the "target".
So what I could do is open each image in ImageJ, move the cursor to the left
most pixel of the "target", then the right side, top side, and bottom side,
writing down the pixel location for each of these. Then I can find the
center of the target, and the tolerances for the bounding box, side to side
and top to bottom.
However, this is very tedious, and I have many such images. Is there some
automated way of getting these coordinates, either using ImageJ or something
else? Thanks for any suggestions.
-jmd