2015-01-13 01:47 阅读 2.7k




  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • wangyaninglm shiter 2015-01-13 02:09

    Python: cv2.imread(filename[, flags]) → retvalC: IplImage* cvLoadImage(const char* filename, int flags=CV_LOAD_IMAGE_COLOR )C: CvMat* cvLoadImageM(const char* filename, int flags=CV_LOAD_IMAGE_COLOR )Python: cv.LoadImage(filename, flags=CV_LOAD_IMAGE_COLOR) → NonePython: cv.LoadImageM(filename, flags=CV_LOAD_IMAGE_COLOR) → None

    filename – Name of file to be loaded.
    flags –
    Flags specifying the color type of a loaded image:
    ◦>0 Return a 3-channel color image
    ◦=0 Return a grayscale image
    ◦<0 Return the loaded image as is. Note that in the current implementation the alpha channel, if any, is stripped from the output image. For example, a 4-channel RGBA image is loaded as RGB if flags\ge0 .

    The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( Mat::data==NULL ). 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)

    点赞 评论 复制链接分享