comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to put bounding box over detected regions?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: how to put bounding box over detected regions? [message #74869] Sun, 06 February 2011 05:57 Go to next message
Gray is currently offline  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 Go to previous message
James[2] is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Need Workaroud for UNIX Color Bug
Next Topic: How to skip lines when reading in a file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:48:36 PDT 2025

Total time taken to generate the page: 0.00416 seconds