Ask Your Question

Christophe M.'s profile - activity

2016-09-07 10:46:34 -0500 asked a question usbtv007 driver for capturevideo

i have an usb analog video converter based on usbtv007 chipset (EASYCAP). I connect on it a PAL analog camera.

It works nearly properly with "mplayer tv://". Video has few half white lines running on image, and around the moving part of the image. The displayed and used driver is V4l2.

If i use opencv with python, the video is really worst with latency in addition. When i use in place an usb webcam with same setup (640x480, 20fps), i get a good video quality.

I supposed it is not due to raspberry speed, and I believe it is a driver issue. But i dont know which driver i have to use, and how to use it with opencv.

Do you have any advice on usb video converter and driver to use with opencv ? Thanks to help me not to be lost anymore.

2016-08-03 09:55:03 -0500 asked a question opencv and tkinter received an x window system error

I first developped with eclipse under windows seven and i had no trouble. I then tried to test the code with geany under raspbian jessie of the rasperry pi with the trouble : the program frame received an x window system error

here is the code :

import cv2 as ocv
import tkinter
import pygubu

class app_root:
    def __init__(self, master):
        self.builder = builder = pygubu.Builder()
        builder.add_from_file("curgent.ui")
        self.Frame_1 = builder.get_object('Frame_1', master)
        builder.connect_callbacks(self)
    def bt_testCam1_click(self):
        global button
        button = 1
        root.quit()
        root.destroy()

if __name__ == "__main__":
     global button
     button = 0

     while True:
        root = tkinter.Tk()
        app = app_root(root)     
        root.mainloop()
        if button == 1 :
            cap = ocv.VideoCapture(0)
            if(cap.isOpened()):
                while(cap.isOpened()):
                    ret, the_frame = cap.read()
                    if ret==True:
                        ocv.imshow('frame',the_frame)

                    if (ocv.waitKey(5) != -1):
                        cap.release()
                        ocv.destroyWindow('frame')
                        break
            else:
                print("No free Camera")
            button = 0

Version : - Python 3 - OpenCV 3.0.0 - pygubu: 0.9.7.8

i tested different way without success. Thanks for help or idea