I realize this question might be closed with the “not enough research”. However I did spent like 2 days googling for it and didn’t find a conclusive answer.
Well I have an application that spawns a window, not written in c++. This application can have a c-interface with dlls. Now I wish to use the power of OpenCV, so I started on a dll to extend. Ss passing image data from/to the application is near impossible (only capable of passing c-strings & double values directly – using the hard drive for drawing is slowing down too much for real time image manipulation).
I am looking into letting opencv draw the image data directly – onto the window. I can gain the window handle easily, so would it then be possible to let openCV draw their data “over” the other window – or better into the other window?
Is this even possible with any library (FFMPEG, or something else)?
Yes, it’s possible, but it’s far from ideal. You can use GDI to draw on top of the other window (just convert IplImage to HBITMAP). Another technique is to do such drawing in a borderless layered window.
An easier approach is, since you own both applications, to write a function that passes an
IplImagebetween them using standard C data types, after all,IplImageis nothing but a data type that is built from these standard types.Here is how you will disassemble
IplImageinto 5 standard parameters:After receiving these parameters on the other side, you may wonder: how do I assemble a
IplImagefrom scratch? CallcvCreateImageHeader()followed bycvSetData().