From: zhang on
Hi everyone.

I use imrect to put a rectangle on a image.
Now, what I want to do is when I double-click this rectangle,
the image in this rectangle will be saved.

The problem is how to correspond the double-click event for
that rectangle.

Thanks in advanced.

Zhong
From: ImageAnalyst on
On Apr 30, 6:20 pm, "zhang " <xiao...(a)gmail.com> wrote:
> Hi everyone.
>
> I use imrect to put a rectangle on a image.
> Now, what I want to do is when I double-click this rectangle,
> the image in this rectangle will be saved.
>
> The problem is how to correspond the double-click event for
> that rectangle.
>
> Thanks in advanced.
>
> Zhong

----------------------------------------------------------------------
From the help:

Example 2

Interactively place a rectangle by clicking and dragging. Use wait to
block the MATLAB command line. Double-click on the rectangle to resume
execution of the MATLAB command line.

figure, imshow('pout.tif');
h = imrect;
position = wait(h);
From: Ashish Uthama on
On Fri, 30 Apr 2010 19:20:21 -0300, zhang <xiaoc10(a)gmail.com> wrote:

> Hi everyone.
>
> I use imrect to put a rectangle on a image.
> Now, what I want to do is when I double-click this rectangle,
> the image in this rectangle will be saved.
>
> The problem is how to correspond the double-click event for
> that rectangle.
>
> Thanks in advanced.
>
> Zhong

This is a better description than your other post.

Maybe IMCROP is what you are looking for:

Please find more details online at:
http://www.mathworks.com/access/helpdesk/help/toolbox/images/ref/imcrop.html
Or please paste this in the MATLAB command window:
web([docroot,'/toolbox/images/ref/imcrop.html'])
From: us on
"zhang " <xiaoc10(a)gmail.com> wrote in message <hrfl35$o7d$1(a)fred.mathworks.com>...
> Hi everyone.
>
> I use imrect to put a rectangle on a image.
> Now, what I want to do is when I double-click this rectangle,
> the image in this rectangle will be saved.
>
> The problem is how to correspond the double-click event for
> that rectangle.
>
> Thanks in advanced.
>
> Zhong

a hint:
- if(f) you own the image proc tbx

help imcrop;

us