PiCapture Video Source Selection on Python

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #960
    burak.derya
    Participant

    Hello,
    I am working with PicaptureSD1 wit 3 cameras, but i do not know how to preview selected camera. My code is as below. Could you please help about it?
    import picamera
    import time
    with picamera.PiCamera() as camera:
    camera.resolution(640,480)
    camera.framerate(60)
    camera.start_preview()
    time.sleep(10)
    camera.stop_preview()

    #961
    mwlinder
    Keymaster

    The PiVideo software can be used within python for this purpose. First, make sure that you have installed PiVideo and can communicate with the PiCapture board:

    pivideo -p i2c1 -q all

    In your python program, you then use something like this:

    import pivideo_class
    vid=pivideo_class.PiVideo()
    vid.pivideo_port=’i2c1′
    vidopen=vid.open

    Now you have an open communication port to the PiCapture processor, and can issue commands like:

    vid.source=’video1′

    or:

    vid.source=’video3′

    Please note that you need to make sure that the port used for communication (I2C1, I2C0, or serial) matches the jumpers on the PiCapture and the code above.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
burak.deryaVideo Source Selection on Python