LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Vision Image structure

Solved!
Go to solution

I currently grabbing an image, using my own hardware and windows messaging, and have it in memory as a bitmap image.  How do I copy this image to an IMAQ Vision Image structure.  I see from other threads that the structure is proprietary, but is there a way to copy the raw data into the Image structure.  The only way I can achieve this is to write to a BMP file, then use the imaqReadFile () to read it back in. This takes a lot of time, it would be much quicker if I could copy from one memory location to another. 

 

 

  

0 Kudos
Message 1 of 2
(3,724 Views)
Solution
Accepted by topic author Bjoles

you may use imaqArrayToImage() but i always found this function awkward to use.

 

my preferred way is to create a new image of the right size using imaqCreateImage(), then obtain a pointer to its first pixel using imaqGetImageInfo() and fill the pixels directly by copying the data into the image buffer. i already showed how to access pixels directly on this forum. you should pay attention to the size of your pixels and the image format (grayscale, rgb).

0 Kudos
Message 2 of 2
(3,708 Views)