Ask Your Question

hekevintran's profile - activity

2020-10-08 13:38:32 -0600 received badge  Student (source)
2018-05-22 18:14:14 -0600 received badge  Famous Question (source)
2017-09-08 13:52:51 -0600 received badge  Notable Question (source)
2017-01-20 08:29:08 -0600 received badge  Popular Question (source)
2015-10-03 00:26:42 -0600 asked a question cv2.imread() cannot read gifs

I installed OpenCV 3 using Homebrew and linked it to my Python installation. I'm following through this basic tutorial: https://opencv-python-tutroals.readth...

I'm having trouble with the first code snippet that reads an image:

import numpy as np
import cv2

# Load an color image in grayscale
img = cv2.imread('messi5.jpg',0)

I can run the code above fine if the image is a jpeg or a png, but not if it is a gif.

How do I get cv2.imread() to work on gifs?

2015-10-03 00:26:41 -0600 answered a question Homebrew installation of OpenCV 3.0 not linking to Python 3

When you installed it, did you tell it to include Python 3 support? i.e.:

brew install opencv3 --with-python3