I'm an absolute beginner with Python, but unfortunately I have to reach in a RPI project within 20 days.

My task is to build a Barcode-Scanner. This is the code I want to use: github: loleg/iotcam.py, but it just prints "PiCamera ready" and "RESTART"

I tried to locate the problem:

     cv2.namedWindow("Fenster", cv2.WND_PROP_FULLSCREEN)
     cv2.setWindowProperty("#iothack15", cv2.WND_PROP_FULLSCREEN,cv2.cv.CV_WINDOW_FULLSCREEN)

I guess this is the non-working part, and I don't know why. Open CV says it should be


but nothing worked.

If this part does not issue an error:

from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import sys
import cv2
import zbar
import Image

then it means that the necessary modules are installed, doesn't it? I use Python 2 - with Python 3, I get a lot of errors.


I see nothing in your imports that declare cv, you have:

import cv2

and you call this while instantiating the window with the name Fenster then asking it to modify the properties of a windows called #iothack15, i dont know if this causes an issue, but it looks like something to me that might:

    cv2...("Fenster", cv2...)
    cv2...("#iothack15", cv2...,cv2...)

then suddenly you call just plain old cv


Ive never used this git? maybe im wrong? but perhaps check your declarations for consistancy? It might help to post your whole script, as it is at least somewhat different from the one i see here at https://gist.github.com/loleg/5b581d774fc8500325f7

Not the answer you're looking for? Browse other questions tagged or ask your own question.