i'm using opencv with c++ for a face recognition application, the face recognition part works just fine until i wanted to add two lines on the video capture to split it on 3 parts, this is my code i'm using opencv 2.4.11 and visual studio 2012:i wrote this part to insert lines in an image but for a video i dont get anything .
Mat image;
image = imread("C:\\Users\\user\\Desktop\\pfedocs\\ggg_opt.jpg", CV_LOAD_IMAGE_COLOR);
line(image,Point(25,0),Point(25,500),Scalar(0,255,0),3,2,0);
line(image,Point(190,0),Point(190,500),Scalar(0,255,0),3,2,0);
line(image,Point(355,0),Point(355,500),Scalar(0,255,0),3,2,0);
can anyone help me with this ?
Related
I'm trying to use opencv APIs to warp image so that to dispaly it to a curved screen.
I have gone through the warping apis provided in opencv here.
But all APIS require the camera calibration matrix(K) and the rotation matrix(R).
But my images does not depend on a camera as im not correcting any distortion.
So can someone help me how achieve this kind of warping so that image can be better displayed on a curved screen.
I am using visual studio with opencv library in C++.
My input image will be like this
and output needs to like this
And i have to use opencv apis.
The above shape I have achieved through the code from here
Please give some suggestions.....
I have images of 4 different positions of a road and I want to stitch them together using OpenCV. The problem is that the changes between the pictures is not "smooth", the color and the texture of the images is not the same so it doesn't seem like this is actually 1 big picture.
You could try out the sticher class of opencv. Specially the examples examples opencv brings in the source code at opencv_source_code/samples/cpp/stitching.cpp and at opencv_source_code/samples/cpp/stitching_detailed.cpp.
If the result of executing the stiching example in your images is what you want you can explore the code to see how it was done.
I am using open CV and C++ to stitch 3 images together so that it forms a panorama. So what I am doing is..
use SURF Detector then Surf Descriptor Extractor etc to stitch 2 images. I then save the result of these 2images in the folder where my project is located and repeat the same thing but this time with previous result of 2 stitched images and the last image that needs to be stitched..i get build errors :S can anyone help please?
Here is the code pastebin.com/QuDuN0Ze
I am new in opencv. I am trying to make a program which capture video from webcam and show the face on the video is exist in the directory or not. I already complete face detect from webcam. Now i jast need to compare the similarity of detected face with the directory image face. Please help me some one...
I am using
C++
MSVC 2010
OpenCV 2.1
You can use OpenCV's face detection methods. They have a very good tutorial in their website.
http://opencv.willowgarage.com/wiki/FaceDetection/
You can see to libface. It can detect and recognise faces.
I'm learning OpenCV because I want to build and program a 3D Scanner over the summer.
I bought three webcams for this purpose (two for the actual stereo images and one for texture [or as a backup]).
I tried to get a webcam's video with OpenCV. However, this does not work, as I ended up with a black screen, instead of video.
I then tried the same code with my grandmother's webcam. It worked fine.
However, I already bought 3 webcams of the type that I was planning on using to build my scanner: http://www.amazon.com/Webcam-Camera-Vision-Meeting-compatible/dp/B0015TJNEY/ref=pd_bxgy_e_img_b
I don't want to buy any new webcams.
Does anybody have any idea of why my webcams don't work with OpenCV (they work with other programs)?
How can I get OpenCV to accept my webcams?
Any suggestions would be appreciated!
Thanks
If your program pass this step , you should try a different number for cvCaptureFromCAM(0); 0 is the first web cam but maybe your's is set as 1, 2 or 3. you can also try -1 and see what happens
CvCapture *capture;
capture = cvCaptureFromCAM(0);
if (!capture)
{
printf("Error at capture");
return 1;
}