ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan Bitmap

hello,
i'd like to produce an anaglyph picture. therefore i switch between two channels while the acquisition is running.
in the callback function i paint the two images in two different HBITMAPs. this happens not until i have both images
(this means, that the while-loop has to run twice before plotting). when i got the two HBITMAPS, i read the COLORREFs wit GetPixel().
In a new HBITMAP i set the Pixel with setPixel(...,RGB(RValue(colorref1),0,BValue(colorref2))). This HBitmap is then
drawn with imgPlotDC.
the problem is, that SetPixel() is very slow, so that my frame rate goes down to 0.58 f/s...
has anybody an idea how to solve this problem?

best regards,
malte
0 Kudos
Message 1 of 2
(3,036 Views)

If I understand your nedds correctly, I would propose you multiply the two pictures with different coefficients and then add them.

 

Cheers

It would be nice if you take the time to rate this answer
http://www.machinevision.ch
0 Kudos
Message 2 of 2
(3,024 Views)