NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
uniqme04
Posts: 3
0 Kudos

to extract coordinate from an image

Hi,

We are new to labview and are workin to extract a coordinate in (a,b) form from a subtracted image.The subtracted image in question has a single object shown.we need the image to be represented a s 8*8 matrix (0,0) to (8,8) (assigned manually previously)and get the location of that object as a coordinate ranging in this.

We need two sets of coordinates,one from where the object has moved from and the other,the current location of the object in the matrix defined.

please help

 

 

 

 

 

 

 

 

Trusted Enthusiast
chilly_charly
Posts: 3,439
0 Kudos

Re : to extract coordinate from an image

This can be done in a snap using IMAQ Vision. Do you have access to this package ?

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...        
Member
uniqme04
Posts: 3
0 Kudos

Re : to extract coordinate from an image

Hi,

I did use IMAQ vision for the whole program.But im finding trouble extracting a coordinate in (a,b) form the way i need it.We only found options to get pixel coordinates not coordinated defined by the user.

Trusted Enthusiast
P@Anand
Posts: 2,454
0 Kudos

Re : to extract coordinate from an image

you can get the cordinates of the mouse click if you are using the mouse during the process... Otherwise go to examples there you can have examples for selecting the ROI manually and finding the object and some other.. In corporate these things and try to get what you needed...

 

:smileywink:

-----

The best solution is the one you find it by yourself
Trusted Enthusiast
chilly_charly
Posts: 3,439
0 Kudos

Re : to extract coordinate from an image

[ Edited ]

 


uniqme04 a écrit :

Hi,

I did use IMAQ vision for the whole program.But im finding trouble extracting a coordinate in (a,b) form the way i need it.We only found options to get pixel coordinates not coordinated defined by the user.


With IMAQ Vision, you can easily find the coordinate x,y of the center of mass and the size W,H of the picture. Then it's just a matter of scale calibration : the X coordinate is x*8/W, and the Y coordinate is y*8/H. So easy... Where are you stuck ?

Can you post a sample image ?

 

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...        
Member
uniqme04
Posts: 3
0 Kudos

Re : to extract coordinate from an image

Hi,

here is the sample image.i need to be able to automatically acquire the coordinates of the two black squares (the output should be of the form (0,0) and (1,3)).can you please help me with the vi?

Trusted Enthusiast
chilly_charly
Posts: 3,439
0 Kudos

Re : to extract coordinate from an image

 


uniqme04 a écrit :

Hi,

here is the sample image.i need to be able to automatically acquire the coordinates of the two black squares (the output should be of the form (0,0) and (1,3)).can you please help me with the vi?


Yes, I can indeed help you. This is a basic task (4 operations, one min job overall), so I suppose you are just discovering image analysis and LabVIEW (homework ?). No problem, but I prefer to help you rather than to do it for you.

Where are you stuck ? What have you been able to do so far ? Please, post your work, starting with the script developed with VI Assistant. 

 

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...        
Member
danny123098
Posts: 1
0 Kudos

Re : to extract coordinate from an image

HI charlie, I had a similar problem. but in my case, I was able to open an image. What I want as my output is the x,y value when i move my mouse over my picture. i just cant seem to get this coordinate out for further analysis...could you help please?