LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help me to do this "IMAQ"-2 image file attached

Dear friends

In this i attach my image file in Tif format & jpeg format

Please go through this vi
this vi it will display a image window when u click inside that window a square box will create, where ever u click it will create multiple box. i used imaq windraw function, u can see another image window in the front pannel also.

now my aim is to put a box over that spot with the spot as center and to extract the pixel values of the individual boxes,

now whats happening is when i run this program a image window is opening from the imaq windraw function in that 1ly i can able to put multiple box but that box is displayed in the image display in the front pannel also. but i cant put the box in the image window in the front pannel. if u click the mouse in the image window in the front pannel it will display the 25x25pixel values.

i want both to be done in a same window i want to put a multiple square box and the pixel values i want to extract seperately for the individual boxes. please help me give some ideas how to do this please modify this vi.



thank u
sasi
0 Kudos
Message 1 of 3
(2,534 Views)
Sasi,

I am a little confused on what exactly you want to do and why you are using both WinDraw and an Image Display Control to show the image. It sounds like what you want to be able to do are the following 3 things:

1) Display the Image
2) Click on the image and have a rectangle overlay appear on image
3) Get the pixel values from that rectangle into an array

If I am understanding you correctly, then you should only display the image using one of the above display methods and have only a signal case structure in your code that adds the overlay to the image AND extracts the pixel values. I am a little unclear as to why you have decided to only get the pixel values if the user clicks on the Image Display and only draw the rectangle if the user clicks on the WinDraw display.

I have attached an image of a block diagram, which is what I think that you are trying to do. In the block diagram you can see that I have combined everything into one case structure so that whenever a user clicks on the Image Display (no WinDraw) then I add a rectangle overlay to my image and also get the pixel values for that area. If you want to keep track of the pixel values for each rectangle then you could use a shift register and build up a 3-D array with all of this information ... or write the data to file ... or use another method to keep that data for future use.

Regards,
Michael
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,522 Views)
Here is the attachment:
0 Kudos
Message 3 of 3
(2,513 Views)