Login  Register

Re: Find bounding box coordinates for "target" in binary mask image

Posted by Wayne Rasband on Mar 23, 2006; 2:44pm
URL: http://imagej.273.s1.nabble.com/Find-bounding-box-coordinates-for-target-in-binary-mask-image-tp3703318p3703323.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.

     1. Check "Bounding Rectangle" in Analyze>Set Measurements
     2. Click inside the "target" with the wand tool
     3. Press 'm' (Analyze>Measure)

-wayne