View Full Version : how to use two camera buffers using activeX? (in MFC application)

November 6, 2007, 06:36:38
dear sir,

i need to use two cameras in my project. if i use activex control, is there any possibilities of process the camera buffers?

my main requirement is.. i don't wants to save the image and then go for image processing, i need to convert the image from image buffer in to my bitmap format..

i hereby attached one MFC sample application for ur view..

also let me know that is there any problem arise if i use activeX control in MFC dialog based applcation? why because sometimes my project is getting very slow duirng the opening..

avidly looking for ur valuable and quick reply

thanks in advance..

Abdul Khathar

Stefan Geissler
November 6, 2007, 13:31:31

Using the ActiveX in an C++ application is no good idea, because not all properties and methods of the ActiveX are added correctly to the wrapper. It is a better idea to use the classlibrary in a C++ program. Also it is simpler, because you would receive a simple BYTE* pointer instead of a VARIANT array type.

You would need to add the ImageAvailable event to your application and set the IC property "LiveCaptureContinuous" to true. In the ImageAvailable event you will recieve as parameter a buffer index, that is used as index for the image buffer. Then you can access the images data.