最終更新:2019-02-22 (金) 06:30:25 (1889d)  

cv::imread
Top / cv::imread

Mat imread(const string& filename, int flags=1)

パラメータ

  • filename – 読み込まれるファイルの名前
  • flags – 読み込まれる画像のカラータイプを指定
    • >0 画像は,強制的に3チャンネルカラー画像として読み込まれます
    • =0 画像は,強制的にグレースケール画像として読み込まれます
    • <0 画像は,そのままの画像として読み込まれます(現在の実装では,アルファチャンネルがもしあったとしても,出力画像からは取り除かれることに注意してください.例えば, flags >= 0 の場合でも,4チャンネルRGBA画像はRGB画像として読み込まれます)

OpenCvSharp

対応形式

OpenCV 4.0.1

  • Currently, the following file formats are supported:
  • Windows bitmaps - *.bmp?, *.dib (always supported)
  • JPEG files - *.jpeg?, *.jpg?, *.jpe? (see the *Note* section)
  • JPEG 2000 files - *.jp2 (see the *Note* section)
  • Portable Network Graphics - *.png (see the *Note* section)
  • WebP - *.webp (see the *Note* section)
  • Portable image format - *.pbm, *.pgm, *.ppm *.pxm, *.pnm (always supported)
  • PFM? files - *.pfm (see the *Note* section)
  • Sun rasters - *.sr, *.ras (always supported)
  • TIFF files - *.tiff, *.tif (see the *Note* section)
  • OpenEXR Image files - *.exr (see the *Note* section)
  • Radiance HDR - *.hdr, *.pic (always supported)
  • Raster and Vector geospatial data supported by GDAL (see the *Note* section)

関連