Skip to content

Open CV Mat to/from libvips VipsImage #929

@fangqiao

Description

@fangqiao

Hi,
I just started to learn libvips. I think that it has much better API for image format and meta data handling, while opencv's Mat is extremely flexible and powerful for pixel manipulation. It would be greate if the two can work together at memoery leve. I went through libvips documentation and found this one :

vips_image_new_from_buffer (const void *buf,
                            size_t len,
                            const char *option_string,
                            ...);

which seems to do the trick.

But I can't find the documentation for defining option_string to tell libvips how many channels and the sequence of channels as RGBA or ARGB etc. as defined by the Mat object , or if the Mat object should have certain spefic sequence of channels as RGBA.

I am wondering if anyone tried to make libvips work with opencv before and would like to share with me the right way to do it or point me to the right documentaiton. Some sample code would be much appreciated.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions