Hand rectangle detection with OpenPose - computer-vision

I'm using openpose, and I have no clue of how to start this task.
I need to draw a rectangle over the people's hand (not the pose of the fingers, just the rectangle), using the skeleton estimation that open pose provides, but I don't really have experience with this framework, and I'm having a hard time understanding the openpose code, so I don't know if somebody could give any advice or clue about how to achieve this task, might be with the right direction I could get it done.
Any comment is welcome, thanks in advance for any help.

It is not easy to start at first, you should read more from the dlib home page before starting. After that you could follow my below suggestion to achieve your desire.
Download the source code from github Dlib on github
Implement by the function void work(TDatums& tDatums) in the file /include/openpose/pose/wPoseExtractor.hpp
Get the keypoints and image as below code
auto &ProceedData = (*tDatums)[0];
Array keypoints = ProceedData.poseKeypoints;
Mat proceedImage = ProceedData.cvOutputData;
You can draw your own image.

Related

Extract object from black background OpenCV C++

First you have to know that I work with OpenCV in C++ in Visual Studio.
I have a picture like : Original image
I want to create a new picture of the hand but with a lot less of black bacground.
So the final image should look like this : Final Image
I know there are some OpenCv functions that could help me but I have really trouble to implement the algorithm because OpenCv can't be used in Debug Mode so it hard to check what I am doing.
Have anyone any idea how to proceed ?
Thanks you very much.
Find contour, find bounding rectangle, crop.
Here is example of finding bounding box: example

Real time Object detection: where to learn?

I am working with opencv these days and I am capable of doing 99% of stuff explained in opencv official tutorials. And I managed to do motion tracking manually with background substraction, where some users claimed as impossible.
However, right now I am working with object detection, where I need to track the hand and want to find whether the hand is moved to left or right. Can this be done by following steps? (used in motion detection)
Get camera 2 instances of camera video (real time)
blur it to reduce noise
theresold it to find hand (or leave it if blur is enough)
find the absolute deference between 2 images
Get PSR
find pixel position of motion
However, it seems like it is not 100% same as motion detection, because I read some stuff about Kalman Filter, Block-matching, etc which I did not use in motion detection. However, I found this tutorial
http://homepages.cae.wisc.edu/~ece734/project/s06/lintangwuReport.pdf
But, I really need your advice. Is there any tutorial which teach me how to do this? I am interested in learning core theory with opencv explanation (c++).
Since I am not good at maths( I am working on it - I didnt go to the university , they found me and invited me to join the final year for free because of my programming skills, so I missed math) , full of math stuff will not work.
Please help. Thank you.

CalcOpticalFlowLK camera motion c++

this time i would know how can i calculate for each frame the camera motion in term of x and y pixel coordinates, i've googled and i've found that CalcOpticalFlowLK can do this.
I'm not expert in opencv and i'm asking your help!
Thank you all!
Yes OpenCV can do this. You should follow the tutorials on the site below to start and then attempt the CalcOpticalFlowLK implementation yourself. If you get stuck post your specific problem here (with a code sample) and I'd be glad to help.
http://opencv-srf.blogspot.ie/2010/09/opencv-basics.html
Then Look at
OpenCV tracking using optical flow

C++: Creating Polygons from images' transparency

Alright guys..
I'm at a loss here. I've been trying to code an image to polygon converter to no avail, it's really bugging me. It's supposed to create a polygon from the transparency of an image (the non transparent part is the polygon). I've seen programs that do it, but they were closed-source and really expensive. It's not just edge-detection, it's polygon generalization and hole-detection as well, all this in a Box2D compatible, triangulated polygon.
Please hand me some tips on this, or a library name, or an algorithm or something..
Thanks!
I suggest looking at the openCV library. It has several useful algorithms and tools for
image processing. I think you can accomplish your goal with it.
Good luck.

stitching aerial images to create a map

I am working on a project to stitch together around 400 high resolution aerial images around 36000x2600 to create a map. I am currently using OpenCV and so far I have obtained the match points between the images. Now I am at a lost in figuring out how to get the matrix transformation of the images so I can begin the stitching process. I have absolutely no background in working with images nor graphics so this is a first time for me. Can I get some advice on how I would approach this?
The images that I received also came with a data sheet showing longitude, latitude, airplane wing angle, altitude, etc. of each image. I am unsure how accurate these data are, but I am wondering if I can use these information to perform the proper matrix transformation that I need.
Thanks
Do you want to understand the math behind the process or just have an superficial idea of whats going on and just use it?
The regular term for "image snitching" is image alignment. Feed google with it and you'll find tons of sources.
For example, here.
Best regards,
zhengtonic
In recent opencv 2.3 release...they implemented a whole process of image stitching. Maybe it is worth looking at.