LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Research a data by selecting X an Y in a 2D array

Solved!
Go to solution

Hello,

 

I am a student in electronics and i need to finish a program that i create. My last job is to make a search engine capable to find a data by choosing the X an Y in a 2D array, this program is able to display an image from a binary file and show the data that correspond to each pixel in a 2d array that's make 1096 by 2808

 

I mean : the user just have to imput the X and the Y of the array and the program can display the data that correspond

 

At the time i can't fine anything that correspond to this so i will be really happy if you guys can help me

 

I put the program in the tread but you need to have the IMAQ ad-on to fully display the image but you really dont need it for making this task, i will also put one file that i create to show the image and that is the data of the array

 

Sorry for my english i am french feel free to ask question if you didnt understand what i said here

 

Thanks.

drift_0-1616572663497.png

 

0 Kudos
Message 1 of 6
(1,428 Views)

What's your problem here? It seems simply a matter of indexing out the 2D array. Are you able to read the image properly?

Do you need help about the user interface?

 

P.S. my LabVIEW 2019 hangs after opening the vi, maybe it's related to the IMAQ part I don't have

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 6
(1,398 Views)

hi,

 

I am able to read the image properly. My issue is to create a tool who can search a data in my 2D array by selecting the X and Y in the user interface to display the value of this data.

 

Ask me more if you didnt understand

 

Thanks for reply

0 Kudos
Message 3 of 6
(1,368 Views)
Solution
Accepted by topic author drift

I don't know what you mean by "research" an array.

 

And you say "search a data" in the 2D array.  What is your search criteria?

 

If what you actually want to do is pick out a specific element from the array at row x, column y  (or row y, column x), then you should be using Index Array.

 

But it can't be that because that is too simple of a question to be asking in the forums for someone who would have already taken LabVIEW tutorials.

0 Kudos
Message 4 of 6
(1,346 Views)
Solution
Accepted by topic author drift

See my example vi. But it's so basic LabVIEW that possibly I misunderstood your needs.

 

pincpanter_0-1616597406656.png

 

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 6
(1,340 Views)

@drift wrote:

 

I am able to read the image properly. My issue is to create a tool who can search a data in my 2D array by selecting the X and Y in the user interface to display the value of this data.


You don't need to "search", because you already know the indices. It is just a lookup. (By convention, "search" is the reverse, e.g. finding the xy indices of an element that has a certain value).

 

To get the indices, all you probably need is a user interaction to get the image coordinates (e.g. via a mouse down event on the image), then use that to index into your array. Make it user friendly!

Message 6 of 6
(1,330 Views)