LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Capture image from IMAQ-generated window]

Hello,

 

We're utilizing the IMAQ module to display a camera image on a Windows interface using the WindDraw function, specifying window number 1. We've adjusted pixel mapping and window size with WindDisplayMapping and WindZoom, which rely on window number 1 rather than the image source. Now, we aim to export the modified window as an image, incorporating these adjustments, as the image source lacks these modifications. We haven't yet discovered a function that enables exporting an image from a specified window number. Could you provide guidance on the appropriate steps please?

 

We are utilizing LabVIEW 2016, Vision Acquisition Software and Vision Development Module 2017.

 

Thank you for your assistance.

 

Masiva

 

0 Kudos
Message 1 of 4
(409 Views)

I don't think you can easily achieve this with IMAQ (I don't know appropriate function, which will associate Window Nr. with Image), but you can create kind of Functional Global and wrap IMAQ WindDraw into your VI, where you will track displayed images in uninitialized shift register and get these back if needed, quick and dirty something like that:

SubVI.png

Then use it like this:

MainVI.png

VI as "getting started" in the attachment.

Message 2 of 4
(360 Views)

Hello,

 

Appreciate your prompt response. We tested your solution, but it doesn't account for pixel mapping and window size modifications set by WindDisplayMapping and WindZoom.

 

Do you have an alternative solution or an equivalent function for image conversion policy please?

 

In this case, we aim to use the WindDisplayMapping function "Given Range" and apply it to the image.

 

Masiva

0 Kudos
Message 3 of 4
(316 Views)
it doesn't account for pixel mapping and window size modifications set by WindDisplayMapping and WindZoom.

 


Well, obviously you can get all properties of the windows programmatically, like Zoom, Center Point, Size, 16 to 8 bit mapping, etc, and apply these transforms accurately in your functional global. In this case I would like to recommend do not modify original image, but create "Screen Window Images" array inside of this global, for example, for Zoom something like that:

 

sn1.png

 

This is quite amount of work if you would like to take care about zoomed images which are displayed without "Fit to Window", in this case you should take the size and center point and cut off the only visible portion. The same with WindDisplayMapping. You can also get overlays, and so on.

 

Another possible approach is to grab images directly from the screen using WinAPI, but not sure if you will be able to get content of the window in case if the window overlapped by other. Will not recommend, if you haven't WinAPI experience.

Message 4 of 4
(297 Views)