Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Getting Co-ordinates of an Image

Subject: Getting Co-ordinates of an Image

From: Rachit

Date: 18 Oct, 2010 19:28:03

Message: 1 of 9

Hello All,

Is there a way where I can get the Co-ordinates of an image in Matlab ?

Subject: Getting Co-ordinates of an Image

From: David Young

Date: 18 Oct, 2010 19:57:03

Message: 2 of 9

Please don't post the same question twice - it's very confusing.

Subject: Getting Co-ordinates of an Image

From: ImageAnalyst

Date: 18 Oct, 2010 21:14:16

Message: 3 of 9

Do you mean just the row and column (that should be obvious), or do
you mean "real world units" like microns, meters, kilometers, inches,
etc.? For real world units you need to have (1) some object of known
dimensions in your scene, or (2) a point with a defined coordinate and
a scale (units per pixel), or (3) some knowledge of the optics and
geometry of the optical system.

What do you mean, and what do you have? You can post your image to
http://drop.io if you want.

Subject: Getting Co-ordinates of an Image

From: Rachit

Date: 26 Oct, 2010 00:46:03

Message: 4 of 9

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <38e0c5ad-c58b-485e-aebd-67c99b7c0516@t20g2000yqa.googlegroups.com>...
> Do you mean just the row and column (that should be obvious), or do
> you mean "real world units" like microns, meters, kilometers, inches,
> etc.? For real world units you need to have (1) some object of known
> dimensions in your scene, or (2) a point with a defined coordinate and
> a scale (units per pixel), or (3) some knowledge of the optics and
> geometry of the optical system.
>
> What do you mean, and what do you have? You can post your image to
> http://drop.io if you want.

Hello I have posted the image in your drop box with the file name Co-ordinate extraction. Kindly have a look at it.

Thanks

Subject: Getting Co-ordinates of an Image

From: ImageAnalyst

Date: 26 Oct, 2010 01:47:47

Message: 5 of 9

What's the URL? If you created an ImageAnalyst drop, I didn't find
it. I looked at
https://drop.io/imageanalyst and there is no such drop.
What is the exact URL of the drop you created?
If you didn't create one, go to https://drop.io/ and type in "rachit"
instead of the random drop name that it picks for you. Don't pick my
name. Then browse to upload your file. Then come back here and let
us know the drop name, eg https://drop.io/rachit.

Subject: Getting Co-ordinates of an Image

From: Rachit

Date: 26 Oct, 2010 15:39:06

Message: 6 of 9

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <1204cb7c-1de9-4fe4-8606-936e48405472@y23g2000yqd.googlegroups.com>...
> What's the URL? If you created an ImageAnalyst drop, I didn't find
> it. I looked at
> https://drop.io/imageanalyst and there is no such drop.
> What is the exact URL of the drop you created?
> If you didn't create one, go to https://drop.io/ and type in "rachit"
> instead of the random drop name that it picks for you. Don't pick my
> name. Then browse to upload your file. Then come back here and let
> us know the drop name, eg https://drop.io/rachit.

Hello,

The URL is http://drop.io/rachitp.

Thanks

Subject: Getting Co-ordinates of an Image

From: ImageAnalyst

Date: 26 Oct, 2010 16:42:27

Message: 7 of 9

I still don't understand. You have a colored blob on axes that go
from -10 to 10 on the y axis and from -15 to 0 on the x axis. You say
"The image whose co-ordinates I am trying to extract is the one
above." Do you just want the (row, column) indexes of non-zero pixel
values? Like this:
[rows cols] = find(imageArray > 0);

Subject: Getting Co-ordinates of an Image

From: Rachit

Date: 28 Oct, 2010 23:17:05

Message: 8 of 9

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <da3006a3-8767-4e43-8572-fe1aa4ad058c@g13g2000yqj.googlegroups.com>...
> I still don't understand. You have a colored blob on axes that go
> from -10 to 10 on the y axis and from -15 to 0 on the x axis. You say
> "The image whose co-ordinates I am trying to extract is the one
> above." Do you just want the (row, column) indexes of non-zero pixel
> values? Like this:
> [rows cols] = find(imageArray > 0);

When I open the image in Maltab and use the data cursor I can see the co-ordinates of the image (x ,y,z) is it possible to extract these co-ordinates?

I want these x,y and z values of the non-zero pixels

Thanks,

R

Subject: Getting Co-ordinates of an Image

From: ImageAnalyst

Date: 29 Oct, 2010 00:30:05

Message: 9 of 9

Like I said, to get the lateral coordinates, use:
[rows cols] = find(imageArray > 0);
then y = the rows, and x = cols.

Maybe this little demo will help you:

a=magic(5)
[y x] = find(a> 15)
linearIndexes = sub2ind(size(a), y, x)
z = a(linearIndexes)

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us