Re: how to put bounding box over detected regions? [message #74869] |
Sun, 06 February 2011 05:57  |
Gray
Messages: 253 Registered: February 2010
|
Senior Member |
|
|
On Feb 6, 1:35 am, vijay <vijayans...@gmail.com> wrote:
> hi friends,
>
> i have a segmented image and the segmented features are
> white and the remaining are made zero. I want to put bounding box over
> each region separately. how i can do this?
>
> the link to image ishttps://picasaweb.google.com/vijayansiva/Idl#5570459623606 388546
>
> thanks in advance.
You probably want to use label_region.
|
|
|
Re: how to put bounding box over detected regions? [message #74955 is a reply to message #74869] |
Mon, 07 February 2011 09:45  |
James[2]
Messages: 44 Registered: November 2009
|
Member |
|
|
On Feb 6, 5:57 am, Gray <grayliketheco...@gmail.com> wrote:
> On Feb 6, 1:35 am, vijay <vijayans...@gmail.com> wrote:
>
>> hi friends,
>
>> i have a segmented image and the segmented features are
>> white and the remaining are made zero. I want to put bounding box over
>> each region separately. how i can do this?
>
>> the link to image ishttps://picasaweb.google.com/vijayansiva/Idl#5570459623606 388546
>
>> thanks in advance.
>
> You probably want to use label_region.
Yeah, Label_Region in conjunction with the reverse indices output from
Histogram. This would work, assuming you have a procedure DRAWBOX
that draws bounding boxes.
regs = label_region(image)
hist = histogram(regs, reverse_indices = r, min = 1, omax = n_regs)
for i = 0, omax - 1 do begin
coords1d = r[r[i]:r[i+1]-1]
coords2d = array_indices(image, coords1d)
lower_left = min(coords2d, dimension = 2, max = upper_right)
drawbox, lower_left, upper_right
endfor
|
|
|