11-11-2008 05:39 PM
Hi all,
I'm trying to control a camera by sending DO control signals and acquiring AI signals. After I grab a whole image, and show it on the screen, I want to set it as 2D array of bool controls. So that I can click certain pixels, to send next controlling signals which stand for the addresses. I also want to zoom in and zoom out functions, by which I can see the pixels (buttons) clearly. Can I implement that in LabVIEW? If I build a 2D array of buttons, I cannot get rid of the spaces between the buttons. I'm using LabVIEW 8.5. Any suggestion will be appreciated.
Best wishes,
Bo
Solved! Go to Solution.
11-11-2008 08:48 PM
I'm not clear on what the 2D array of booleans has to do with a picture.
If you have a picture and where you click on the picture means something. You could use a picture control. Use a mouse down event on that picture. Use the mouse coordinates to determine where the picture got clicked.
11-12-2008 05:23 AM
Hi,
My issue is I want to output different addresses which stand for different pixels (but not all of them). So if user just click the pixels, the program will generate correspoding addresses. In another word, I want to display the image I acquired, and then click the image to tell which parts should be updated. The addresses can be converted easily from 2D array of booleans (I have done that part), so I think it may be easier to deal with picture and buttons. Thank you for your reply.
Regards,
Bo
11-12-2008 07:25 AM
11-12-2008 07:53 AM
Hi Ravens Fan,
Yes, I think what you suggested makes sense. I'll try that. Thank you.
Best wishes,
Bo
11-12-2008 08:16 AM
11-12-2008 08:21 AM
Hi foolooo,
what have you done so far? Why do you need an array of buttons? You can click into your image and read the mouse position to know where you are in the image. It´s the same as using a boolean control.
Mike
11-12-2008 09:22 AM
Hi Mike,
Thank you for your reply. The things I've done is using a 2D array of 64x64 booleans on the front panel to send the addresses, and display the 64x64 pixels image after acquired. What I want is simply clicking the image instead of the buttons. My image is an intensity graph, so I can have X,Y and Z values to display 2D array. I dont konw if a picture control can display a 2D array. Besides that, I also want to make the pixels different after I click them, so that I can confirm which pixels are pressed. A simpler way came to my mind is use 2D array of booleans to do that, change the color of them by the acquired value. So the array will by a picture. But the spaces between the booleans are on the way. So is there any way:
1. Use 2D booleans, and update the color of each button after required, and get rid of the spaces between the buttons. Since the buttons should be 1x1 or 2x2 pixes big, I want to find a way to zoom in them.
2. Or, monitor the coordinates of the mouse, and use a proper graph to display, which can be zoomed in and zoomed out, and become different when pressed.
Thank you very much.
Best wishes,
Bo
11-12-2008 09:27 AM
Hi Bo,
i still don´t understand why you need the buttons. Use an event structure with the mouse move event to get the current mouse location. To send your command you can use the mouse up event. There you can use the coordinates from mouse move which you can store in shift registers. If you do this, then you have no problem with space between the buttons.
Mike
11-12-2008 09:40 AM - edited 11-12-2008 09:44 AM
Hi Mike,
Sorry about me expression. So let's say we use the event structure to monitor the mouse, but is it possible that after I pressed certain pixels of the image, the pressed pixels turn different? I need to highlight these pixels. Which kind of graph shall I use, to display a 2D array and is able to zoom in and zoom out? Thank you.
Regards,
Bo