From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying images to build a track map

Hi! 

I want to write a program which will use some external data to build a map of a track. I have images of each section of the track and I want to display them in such a way so a map of track is created. I don't know how to set the position of a picture so end of one section matches the beginning of the next.
Is there a way in LabVIEW to specify a x & y position of separate images? Tricky part is with corners, so need to rotate a picture as well. What are my options?
It is a track for Scalextric car racing game for those who are interested.

Thanks

Kamil 

0 Kudos
Message 1 of 5
(3,344 Views)

Hi kropiak,

 

you could load that image data and place it in a 2D picture indicator arbitrarily to build your track. You need to calculate xy positions on your own, probably the track parts a following a certain raster size…

 

To rotate images you should search the forum, there are similar questions already answered!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,299 Views)

Hi again! This is what I have achieved so far - see attached VI. In order to take it to the next level I need to solve one problem. I can't display multiple pictures onto the picture display. The program so far is to just display one picture, move the origin by -25,-25 and display second picture. As soon as second picture is displayed, the first one disappears. 
I use 'EraseFirst' property node with '0' input which should prevent the display from erasing but it doesn't seem to help.

Any hints or help with why this is happening?

 

Also Note that I have a student version of the LabVIEW

 

Thanks

Kropiak

 

PS. run the program first, stop it and then run it again to make it work... Just noticed that

0 Kudos
Message 3 of 5
(3,245 Views)

Hi kropiak,

 

two big problems:

- right now you load a new picture and overwrite the old 2D picture indicator: so you can never keep the previous picture…

- you seem to move the origin of the 2d picture. You rather want to place the sub-images at different positions in the full 2d picture image…

 

Other problems:

- too many local variables! THINK DATAFLOW!

- your way of building a path is rather buggy. Use path functions instead!

- make your selection buttons a radio button…

 

In the attachment I just made some of those mentioned changes, you have to proceed further…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,233 Views)

Thanks for the reply and showing me my problems! I still struggle with getting my head round LV 🙂 
Your changes and suggestions helped me. I will now try to build the a track. I will keep updating about my progress and problems if I have any 🙂

0 Kudos
Message 5 of 5
(3,216 Views)