Optical Flow in python - python

Can someone show me an example of how to use cv.calcOpticalFlowPyrLK in python? I've looked over the internet and can't quite figure it out.

This webpage from the OpenCV-Python Documentation can help understanding the Optical Flow algorithm with source code. The source code can also be found in the OpenCV installation folder : C:\opencv\samples\python2\lk-track.py.
EDIT
This also can help.(Explanation+SC+Demo)

Related

Images will not show in GitHub README.md even after using GitHub Documentation

I can't find any information on why I am getting these weird errors. I followed GitHub's documentation when trying to implement some screenshots of the pygames I built into the README by using:
Format:
But when I do this the all that shows up in the commit is the code and no picture. I also added separate folder called 'game_images' which houses the screenshots I want to use and even copied the url of these images into the image formatting, but still nothing.
Here is the link to my github:
https://github.com/wisenickel5/Pygamez
The readme will show what I am talking about.
I greatly appreciate anyone who took the time to read through this and is willing to help me out.

Dynamic Gesture Recognition and Kinect with Python?

I am working on "Kinect for XBox One" on my HP Laptop with Windows 10 and 64-bit operating system. I have worked on python before and want to work in it only with jupyter notebok or python command line.
The topic of my project is Dynamic Sign Language Recognition and till now I have worked on only static images. I found many tutorials for working with kinect camera but every tutorial has been done with C++, C# or Sketch in Processing 3. I have downloaded Processing 3 and tried some programs in Sketch also by following this link: https://www.youtube.com/watch?v=XKatPT3HlqA
But even after 2 days, I am not able to run a simple program in it and only a black picture is there as an output, kinect is detected though.
I have also tried Pykinect and python example from this link: https://github.com/Kinect/PyKinect2
It was good and I was able to track the skeleton of the body. I want to learn Pykinect and many more such examples but I am not getting any source from where I can learn all these. My aim is to use all the three cues:RGB, Depth, and Skeleton for my work.
Even for dynamic gesture recognition, there are projects in C++ and languages other than python.
If you have any suggestions regarding kinect with python and dynamic gesture recognition, then you are welcome.
After searching for days, I figured out that there are no tutorials on Kinect using Python. Those who want to learn kinect with python and Windows should go to this link first: https://github.com/Kinect/PyKinect2
Go by the instructions and run the example programs whether in Visual studio, python command line or jupyter notebook. There are no tutorials defining the programming functions of Pykinect library. The only way to learn it is through one more link:
https://github.com/Microsoft/PTVS
Explore this link as it has one or two more examples which will help in understanding the functions. I am not done yet so I will keep updating my answer if I find any more sources.

How to capture screen on Wayland(Gnome) in Python code?

I'm trying to capture my screen using Python because I'll use it on OpenCV, but I couldn't find a way to make it work on Gnome, since Gnome uses Wayland and all libraries that I've found only work with X11.
For now I'm not considering change my interface. I'm searching a solution to this problem.
Does someone know a solution?
To be more specific, I'll use the images to train an AI and so I need they continuously.
EDIT:
I've found this but how can I pass frames to OpenCV in Python instead of save a video file?
The proper way to do screencasting these days is by using the Screencast portal, which is part of XDG desktop portals and is already supported by GNOME, KDE, wlroots (and more). As an added advantage, this will also work in containerized formats like Flatpaks.
You can find an example on how to do screencasting in Pyhon using this snippet, created by one of the Mutter maintainers. If you look for parse_launch(), you will see a GStreamer pipeline which you can modify to include the GStreamer OpenCV elements that can do the processing for you.
Note: in your edit, you link to a predecessor of that portal, which is GNOME-specifc, internal API, so I wouldn't rely on it ;-)

Connecting ROS with opencv for a drone

I need to recognize human faces using a drone. I have done that in opencv using xmls like
1. haarcascade_frontalface_default.xml
2. haarcascade_eye.xml
Can somebody help me to connect ROS with Opencv and detect faces from ARDRONE in simpler steps ?
Please find out the stable version of ROS in documentation of ROS (org) , a long before i have worked with ROS, this is a commen issue that ROS is being updated day by day so try proper documentation of ROS.
may this link help you: http://wiki.ros.org/opencv3
but recommendation is that please choose the right version of ROS and right configuration to work with, Good Luck!

Digital Image Processing via Python

I am starting a new project with a friend of mine, we want to design a system that would alert the driver if the car is diverting from its original path and its dangerous.
so in a nutshell we have to design a real-time algorithm that would take pictures from the camera and process them. All of this will be done in Python.
I was wondering if anyone has any advises for us or maybe point out some stuff that we have to consider
Cheers !
You can search for this libraries: dlib, PIL (pillow), opencv and scikit learn image. This libraries are image processing libraries for python.
Hope it helps.

Categories