03-24-2021 02:58 AM
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.
Solved! Go to Solution.
03-24-2021 03:47 AM
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
03-24-2021 07:37 AM
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
03-24-2021 09:28 AM
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.
03-24-2021 09:50 AM
See my example vi. But it's so basic LabVIEW that possibly I misunderstood your needs.
03-24-2021 10:27 AM
@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!