From: Maximilian NotImportant on
Hi!

I want to get the position of a pixel of an image by clicking with the mouse on that pixel. is there a function that can do this? i really tried to find it but i just found a function to get the values of that pixel. It should be really obvious how to get the pixel information but i am just not getting it... please, help!

thank you!

max
From: Ashish Uthama on
On Fri, 16 Apr 2010 14:35:26 -0300, Maximilian NotImportant
<MaximilianNh(a)gmx.de> wrote:

> Hi!
>
> I want to get the position of a pixel of an image by clicking with the
> mouse on that pixel. is there a function that can do this? i really
> tried to find it but i just found a function to get the values of that
> pixel. It should be really obvious how to get the pixel information but
> i am just not getting it... please, help!
>
> thank you!
>
> max

If you have IPT:
http://www.mathworks.com/access/helpdesk/help/toolbox/images/impixel.html

Else you might fashion something from GINPUT.
From: Maximilian NotImportant on
"Ashish Uthama" <first.last(a)mathworks.com> wrote in message <op.vbe1hmica5ziv5(a)uthamaa.dhcp.mathworks.com>...
> On Fri, 16 Apr 2010 14:35:26 -0300, Maximilian NotImportant
> <MaximilianNh(a)gmx.de> wrote:
>
> > Hi!
> >
> > I want to get the position of a pixel of an image by clicking with the
> > mouse on that pixel. is there a function that can do this? i really
> > tried to find it but i just found a function to get the values of that
> > pixel. It should be really obvious how to get the pixel information but
> > i am just not getting it... please, help!
> >
> > thank you!
> >
> > max
>
> If you have IPT:
> http://www.mathworks.com/access/helpdesk/help/toolbox/images/impixel.html
>
> Else you might fashion something from GINPUT.

impixel gives me just the pixel values right? not the position in the matrix...
From: Ashish Uthama on
On Mon, 19 Apr 2010 14:17:04 -0300, Maximilian NotImportant
<MaximilianNh(a)gmx.de> wrote:

> "Ashish Uthama" <first.last(a)mathworks.com> wrote in message
> <op.vbe1hmica5ziv5(a)uthamaa.dhcp.mathworks.com>...
>> On Fri, 16 Apr 2010 14:35:26 -0300, Maximilian NotImportant
>> <MaximilianNh(a)gmx.de> wrote:
>> > Hi!
>> >
>> > I want to get the position of a pixel of an image by clicking with
>> the > mouse on that pixel. is there a function that can do this? i
>> really > tried to find it but i just found a function to get the
>> values of that > pixel. It should be really obvious how to get the
>> pixel information but > i am just not getting it... please, help!
>> >
>> > thank you!
>> >
>> > max
>> If you have IPT:
>> http://www.mathworks.com/access/helpdesk/help/toolbox/images/impixel.html
>> Else you might fashion something from GINPUT.
>
> impixel gives me just the pixel values right? not the position in the
> matrix...

From the help text in the link above:

If you supply three output arguments, impixel returns the coordinates of
the selected pixels. For example,
[c,r,P] = impixel(...)


Demo:

>> d=magic(10);
>> imshow(d);
>> [c r p ] =impixel

c =

4


r =

3


p =

20 20 20 %gray scale being shown as RGB.

>> d(3,4)

ans =

20
 | 
Pages: 1
Prev: simple array quesion
Next: gradient image...