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!
Related
This isn't a question per se, rather a couple things I have learned while trying to write a Python script to interface with a ThorLabs USB 3.0 digital camera.
I tried a few different drivers (uEye, flycapture2, etc) and found that the uc480 driver was the easiest to use and most reliable one. However, I found it to be a bit tricky to get working properly. I used the import statement from instrumental.drivers.cameras import uc480 to import it into my code. Whenever ThorLab's "ThorCam" software was installed and working properly, this worked no problem. (This software can be found on Thorlab's website: https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=ThorCam). However, I found that often, ThorLabs would be installed, but unable to interface with the camera. When this was the case, the uc480 driver would be unable to find any available cameras. This is what I found worked to fix that problem:
If ThorCam can't find the camera and the light on the camera is red, uninstall and reinstall ThorCam, then restart the computer and try again. If the light is red on the camera, I believe this means that the camera is unable to interface with the computer, so uninstalling and reinstalling ThorCam should fix whatever driver issue is causing this.
If ThorCam can't find the camera and the light on the camera is green, this means the camera is probably interfacing with an alternative software. In particular, I found uEye from IDS to be particularly bad about interfacing with the camera and not allowing ThorCams to connect. If this is the case, you can either switch to using uEye using from pyueye import ueye (though I personally would not recommend this as I found uEye a lot more difficult to use compared to uc480), or delete the IDS software and restart your computer. I also tried using pylablib instead to get the camera to choose which software to interface with, but I did not have any luck. (If you want to try for yourself, here's a link to some documentation: https://pylablib.readthedocs.io/en/latest/devices/uc480.html#operation). If this still doesn't work, try deleting other camera interfacing softwares (such as Spinnaker, FlyCapture, or Flir), restarting your computer, and seeing if ThorCam can now find your camera. This worked for me.
You can check if uc480 is able to find your camera in python using uc480.list_instruments().
If anyone has any more refined ways of solving these issues, or additional tips, please add them!
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.
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 ;-)
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.
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)