无法解码图像并形成矩阵

Unable to decode an image and form a matrix

我想解码图像并制作它的矩阵以供进一步处理。执行以下代码后只得到一个空列表

from pyzbar.pyzbar import decode
from PIL import Image

decode(Image.open("here.png"))

为此目的使用 OpenCV 怎么样...?这是一个非常强大的图像处理库

import cv2 #importing opencv
img = cv2.imread('filename.jpg', 0) 
      #1st param: image file. 2nd param: 1 - color, 0 - grayscale
#img contains a matrix of the image file