This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original files and article is here: | |
# http://www.pyimagesearch.com/2014/12/15/real-time-barcode-detection-video-python-opencv | |
# import the necessary packages | |
import numpy as np | |
import cv2 | |
def detect(image): | |
# convert the image to grayscale | |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) |