Delphi opencv ocvFFMpegIPCamSource to a bitmap?

There is a way to a capture/convert ocvFFMpegIPCamSource stream to a bitmap?

First I try to do this:

FrameBitmap := TBitmap.Create;
FrameBitmap.PixelFormat := pf24bit;

Image5.Picture.Graphic := IplImage2Bitmap(ocvView1.Image, FrameBitmap);

// Image5 is my bitmap.

Obviously is geting a error, because "ocvView1.Image" is of type "IocvImage" and the first parameter of the function IplImage2Bitmap needs a type "pIpIImage"

I missed something in the middle of the process..

Second i try using "cvImage2Bitmap":

FrameBitmap := TBitmap.Create;
FrameBitmap.PixelFormat := pf24bit;

Image5.Picture.Graphic := cvImage2Bitmap(ocvView1.Image, FrameBitmap);

Again, needs a type "pIpIImage" and i am trying to pass a "IocvImage"

I cannot see what is missing.

There is a way to make this conversion?

I need to do this directly from ocvFFMpegIPCamSource component, or from ocvView component?

1 answer

  • answered 2020-02-17 04:05 MBo

    I can see in sources:

    IocvImage = interface
    ...
    property IpImage: pIplImage Read GetIplImage;
    

    so you have to use ocvView1.Image.IpImage