user1606191
user1606191

Reputation: 551

Which Format of Images are supported by OpenCV

For a project of mine a require an image(logo of some company) to be overlaid on the main screen and I want only the Logo to be visible not the borders or the extra regions of the image, I even tried overlaying the .png image but then also the borders are visible in black color along with the logo.

Can anyone let me know which format of the image shall I use So that only the logo of my image gets displayed not the extra part which lies in the rectangular part of the image.

If u need more clarification... Please let me know

Thanks :)

Upvotes: 2

Views: 9421

Answers (1)

m01
m01

Reputation: 9395

It sounds like what you should do is crop your image using an image editing program, like Paint, Paint.net, GIMP or Photoshop, and then display or overlay the cropped image.

If you really want to use OpenCV to do this, here's how to load and display images, and here's the imread function's documentation. From the latter, to answer your question's title:

Currently, the following file formats are supported:

    Windows bitmaps - *.bmp, *.dib (always supported)
    JPEG files - *.jpeg, *.jpg, *.jpe (see the Notes section)
    JPEG 2000 files - *.jp2 (see the Notes section)
    Portable Network Graphics - *.png (see the Notes section)
    Portable image format - *.pbm, *.pgm, *.ppm (always supported)
    Sun rasters - *.sr, *.ras (always supported)
    TIFF files - *.tiff, *.tif (see the Notes section)

Upvotes: 8

Related Questions