Thursday, May 1, 2014

OpenCV pySide python QT Line Detection Demo & Code Walkthrough

This is a simple demo and tutorial of using pyside Qt with OpenCV for visual detection. I used Linux as it is easy to setup and run openCV and it is free. With pyside it is easy to create the GUI. As this app is not so complicated, to transform image from cv to qt, I just saved it to disk as jpg for Qt GUI to load it. The interface got several slides, lcd number display and buttons. The original image is on the left, and processed image is on the right. codes are quite straight forward.
What it does is to find straight lines and their coordination on the original image. And then draw them on top of the image.
Below is code walkthrough.












3 comments:

  1. Replies
    1. check latest post for code

      Delete
    2. your project is wonderful, Is there any way if you could find the distance between lines in real time with a camera..

      Delete