8000 docPhil99 (Phil) · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
View docPhil99's full-sized avatar
  • University of Sussex

Highlights

  • Pro

Block or report docPhil99

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. How to display opencv video in pyqt ... How to display opencv video in pyqt apps
    1
    The code for this tutorial is [here](https://github.com/docPhil99/opencvQtdemo)
    2
    
                  
    3
    Opencv provides are useful, but limited, method of building a GUI. A much more complete system could be acheived using pyqt.
    4
    The question is, how do we display images. There are quite a few possible routes but perhaps the easiest is to use `QLabel` since it has a `setPixmap` function. Below is some code that creates two labels. It then creates a grey pixmap and displays it one of the labels. [code: staticLabel1.py](https://github.com/docPhil99/opencvQtdemo/blob/master/staticLabel1.py)
    5
    
                  
  2. Mac webcam FFmpeg Mac webcam FFmpeg
    1
    #Capture and stream a webcam
    2
    To capture using the iSight camera on a Mac, or infact any other webcam connected to the Mac, we can use FFmpeg. First get a list of the devices installed.
    3
    
                  
    4
    ```
    5
    ffmpeg -f avfoundation -list_devices true -i "" 
  3. opencvQtdemo opencvQtdemo Public

    Using opencv and QT together

    Python 22 7

  4. How to write lossless video in Python How to write lossless video in Python
    1
    OpenCV does a reasonable job of reading videos from file or webcams. It's simple and mostly works. When it comes to writing videos, 
    2
    it however leaves a lot to be desired. There is little control over the codecs and it is almost impossible to know which codecs are installed. It also wants to know things like the frame size at intailisation. This isn't always a problem, but if you don't know it yet it means you have to set up the video writer inside your main processing loop. 
    3
    
                  
    4
    To make something as cross-platform compatible as possible it would be nice to use FFmpeg. There are a few python wrappers around, but as far as I can tell they are mainly used for transcoding type applications. One solution is run FFmpeg as a subprocess and set its input to accept a pipe. Then every video frame is passed through the pipe. You write this yourself, in fact it's only a few lines of code. However, the [scikit-video](http://www.scikit-video.org/stable/index.html) package will do this for us, with some nice boilerplate to make life easier.
    5
    
                  
0