LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to record mouse coordinate into array?

Solved!
Go to solution

yeah this one is good, do you know why my code doesn't work? can you check it if you have time? I want to know where is my mistake. thanks

0 Kudos
Message 11 of 16
(534 Views)
Solution
Accepted by topic author PULSE.Wannabe

Sorry, I don't have IMAQ installed, so all I see is broken code and unknown events.

 

altenbach_0-1651069686991.png

 

 

Just comparing with my code, The logic does not seem right.

 

In the "mouse up/down event", shouldn't the new time after the select go to the selector of the case structure?

In the "mouse move" event", shouldn't you ignore the type and just read from the shift register?

 

Similar to the following?

altenbach_1-1651070134183.png

 

 

 

0 Kudos
Message 12 of 16
(517 Views)

Ok then , I will learn more about this , thanks so much for the help !

 

by the way, do you happen to know how to get the coordinates of a contour ?

 

- What it should look like :

PULSEWannabe_0-1651074171563.png

 

 

- What I did (It's too much, it counts every x pixel): 

PULSEWannabe_1-1651074171545.png

 

 

 

- Is it possible to get the yellow boxes' coordinate? (I'm using Clamp(Rake) function.

PULSEWannabe_2-1651074171456.png

 

 

0 Kudos
Message 13 of 16
(506 Views)

As I said, I don't have IMAQ here, but I would just make my own algorithm using plain LabVIEW.

 

For example if all contour points have unique x values, I would just go over all image columns and look for the step transition, then fit them to a suitable polynomial or other function. How much do you know about the shape?

 

Do you have a raw image? (i.e. without the red markers?)

0 Kudos
Message 14 of 16
(497 Views)
Solution
Accepted by topic author PULSE.Wannabe

See if this rough draft can give you some ideas. (most likely you need to tune and polish it. adapt to your specific image type, adjust threshold, reject outliers, smooth using polynomial, etc.)

 

altenbach_0-1651079283044.png

 

0 Kudos
Message 15 of 16
(489 Views)

Got it !

thanks so much

0 Kudos
Message 16 of 16
(470 Views)