OpenCV unable to read certain jpg's [closed]
OpenCV can't open certain jpg files:
import cv2
img = cv2.imread('/absolute_path/sun_afmzwxkzmxkbamqi.jpg',0)
img is None # True
Image can be downloaded here: https://www.dropbox.com/s/aaldwlvp2zw...
Specs:
OpenCV 3.1.0
Ubuntu 14.04.1 LTS
Installed via Anaconda.
Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.19) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO
works absolutely fine here. what's your os ? opencv version ? did you build from src ?
try a
print cv2.getBuildInformation()
, what does the ' Media I/O:' section look like ?updated question!
I think opencv cannot load gif image and your image is in GIF format
@LBerger, why do you think, it's a gif ?
I have download image using given link after edit image using notepad++. Files begin with GIF89a
^^ hmm, i see. so just copying the img link to this site must have made a conversion...
i guess, it's better to remove it again ?