I using this example code FHOG Object Detector from Dlib. It's possible to get prediction and distance (probability of class) of sample? I want to generate a ROC curve from distances of samples.
(Like in OpenCV CvSVM::predict)
Related
I'm using ANN and SVM for classification of 6 classes. All works well, but I'd like to measure accuracies of the classifiers using ROC curves.
I can easily get the confusion matrix for each of the classifiers but I don't know what parameter I should change to get more points and actually plot the ROC curves.
Could someone help me please!
I need to estimate the face pose of a person using OpenCV but I can't find any specific functions that is able to do so. I don't want to use 3D modelling as it is out of my project field.
Is there any specific way on doing so? Eg, obtaining the Yaw, Roll, Pitch value of a person?
You can locate some landmarks of the face in your image using haar cascades or AAM, then use some predefined 3d estimation of where those selected points should be in the worldview and leave it to OpenCV SolvePnP to find the pose matrix.
Check out this example
I am currently working on a robotic project: a robot must grab an cube using a Kinect camera that process cube detection and calculate coordinates.
I am new in computer vision. I first worked on static image of square in order to get a basic understanding. Using C++ and openCV, I managed to get the corners (and their x y pixel coordinates) of the square using smoothing (remove noise), edge detection (canny function), lines detection (Hough transform) and lines intersection (mathematical calculation) on an simplified picture (uniform background).
By adjusting some threshold I can achieve corners detection assuming that I have only one square and no line feature in the background.
Now is my question: do you have any direction/recommendation/advice/literature about cube recognition algorithm ?
What I have found so far involves shape detection combined with texture detection and/or learning sequence. Moreover, in their applications, they often use GPU/parallellisation computing, which I don't have...
The Kinect also provided a depth camera which gives distance of the pixel from the camera. Maybe I can use this to bypass "complicated" image processing ?
Thanks in advance.
OpenCV 3.0 with contrib includes surface_matching module.
Cameras and similar devices with the capability of sensation of 3D
structure are becoming more common. Thus, using depth and intensity
information for matching 3D objects (or parts) are of crucial
importance for computer vision. Applications range from industrial
control to guiding everyday actions for visually impaired people. The
task in recognition and pose estimation in range images aims to
identify and localize a queried 3D free-form object by matching it to
the acquired database.
http://docs.opencv.org/3.0.0/d9/d25/group__surface__matching.html
I have been working on Classifications of 3D Objects using SVM Classifier,
I'm stuck up at classification step.
I have taken a 3D data : Point Cloud Data,
For training model to be build, i have applied SIFT 3D detection method to identify the keypoints and FPFH descriptor to extract the features of these keypoints.
Then used K-means clustering algorithm to construct bag of features, I'm giving bag of features along with the label set as an input.
SVM.train(trainingDataMat, labelsMat, Mat(), Mat(), params);
CvSVMParams
I have tried using different combination but failed to get correct output ( accuracy), like out of 5 classes, i can predict at the most 3 classes correctly.
Please help me.
I have a problem when I'm getting the results of using the function cvFindHomograhpy().
The results it gives negative coordinates, I will explain now what I'm doing.
I'm working on video stabilization by using optical flow method. I have estimated the location of the features in the first and second frame. Now, my aim is to warp the images in order to stabilize the images. Before this step I should calculate the homography matrix between the frames which I used the function mentioned above but the problem that I'm getting this results which it doesn't seem to be realistic because it has negative values and these values can be changed to more weird results.
0.482982 53.5034 -0.100254
-0.000865877 63.6554 -0.000213824
-0.0901095 0.301558 1
After obtaining these results I get a problem to apply for image Warping by using CvWarpPerspective(). The error shows that there is a problem with using the matrices. Incorrect transforming from "cvarrTomat"?
So where is the problem? Can you give me another suggestion if it's available?
Notice: if you can help me about implementing the warping in c++ it would be great.
Thank you
A poor homography estimation can generate warping error inside CvWarpPerspective().
The homography values you have posted show that you have a full projective transformation that move points at infinity to points in 2d euclidean plane and it could be wrong.
In video stabilization to compute a good homography model usually other features are used such as harris corner, hessian affine or SIFT/SURF combined with a robust model estimator such as RANSAC or LMEDS.
Check out this link for a matlab example on video stabilization...