Ask Your Question

jestshen's profile - activity

2014-09-30 13:35:15 -0600 received badge  Student (source)
2014-09-03 03:47:03 -0600 received badge  Supporter (source)
2014-09-03 03:46:39 -0600 commented question PointsClouds Generated by Reporjectimageto3D is So Bad

This the code to getting points clouds- - if (disparity.empty()) { return 0; }

cv::reprojectImageTo3D(disparity, pointClouds, m_Calib_Mat_Q, true);
pointClouds *= 1.6;


for (int y = 0; y < pointClouds.rows; ++y)
{
    for (int x = 0; x < pointClouds.cols; ++x)
    {
        cv::Point3f point = pointClouds.at<cv::Point3f>(y,x);
        point.y = -point.y;
        pointClouds.at<cv::Point3f>(y,x) = point;
    }
}

Q is right, error rate is only 0.181

2014-09-03 03:38:25 -0600 answered a question Unable to open video from C++ in opencv. It works from python

You can use Visual studio, I have written a program about face detecting from a video just right now, and it works without error - -.

2014-09-03 03:30:05 -0600 answered a question Java: dense SIFT?

I have written it in C++, You can have a try, because they are simular.

initModule_nonfree();//if use SIFT or SURF Ptr<featuredetector> detector = FeatureDetector::create("SIFT"); Ptr<descriptorextractor> descriptor_extractor = DescriptorExtractor::create("SIFT"); Ptr<descriptormatcher> descriptor_matcher = DescriptorMatcher::create("BruteForce"); //if( detector.empty() || descriptor_extractor.empty() ) // MessageBox(_T("aaaaa")); //throw runtime_error("fail to create detector!");

Mat img1 = imread("1.jpg");
Mat img2 = imread("2.jpg");
//imshow("Mathc",img1);
//detect keypoints;
vector<KeyPoint> keypoints1,keypoints2;
detector->detect( img1, keypoints1 );
detector->detect( img2, keypoints2 );
//cout <<"img1:"<< keypoints1.size() << " points  img2:" <<keypoints2.size() 
//  << " points" << endl << ">" << endl;

//compute descriptors for keypoints;
//cout << "< Computing descriptors for keypoints from images..." << endl;
Mat descriptors1,descriptors2;
descriptor_extractor->compute( img1, keypoints1, descriptors1 );
descriptor_extractor->compute( img2, keypoints2, descriptors2 );

//cout<<endl<<"Descriptors Size: "<<descriptors2.size()<<" >"<<endl;
//cout<<endl<<"Descriptor's Column: "<<descriptors2.cols<<endl
//  <<"Descriptor's Row: "<<descriptors2.rows<<endl;
//cout << ">" << endl;

//Draw And Match img1,img2 keypoints
Mat img_keypoints1,img_keypoints2;
drawKeypoints(img1,keypoints1,img_keypoints1,Scalar::all(-1),0);
drawKeypoints(img2,keypoints2,img_keypoints2,Scalar::all(-1),0);
imshow("Box_in_scene keyPoints",img_keypoints1);
imshow("Box keyPoints",img_keypoints2);

descriptor_extractor->compute( img1, keypoints1, descriptors1 );  
vector<DMatch> matches;
descriptor_matcher->match( descriptors1, descriptors2, matches );

Mat img_matches;
drawMatches(img1,keypoints1,img2,keypoints2,matches,img_matches,Scalar::all(-1),CV_RGB(255,255,255),Mat(),4);

imshow("Mathc",img_matches);
waitKey(10000);
2014-09-03 03:15:43 -0600 answered a question How to count person in video?

image description

like that? or you can detecting body information.

2014-09-03 02:00:32 -0600 received badge  Editor (source)
2014-09-03 01:59:58 -0600 asked a question PointsClouds Generated by Reporjectimageto3D is So Bad

image description

Disparity image seems well but Points Clouds is too bad, anyone catch the problem? image description You can find that coordinate x,y are ok, while z is far from reality.

2014-09-03 01:54:17 -0600 answered a question Unable to open video from C++ in opencv. It works from python

You can try to add full path of the file of your video file, and more using // istead of /.

2014-09-03 01:48:20 -0600 answered a question Can someone please create a precompiled framework of OpenCV for Mac OS X Mavericks or a CocoaPod?

I only have it in windows- -.

2014-09-03 01:43:26 -0600 answered a question FFmpeg performance decrease after OpenCV 2.4.6 to 2.4.9 upgrade on Windows

Perhaps, you should change debug mode to release.

2014-09-03 01:37:58 -0600 answered a question Error while building opencv from source on Windows

I have built up OpenCV on windows8 VS2012. I guess your problem must be some error on your include file direction.