Home opencv SVM detect mouth wounds area
Reply: 0

opencv SVM detect mouth wounds area

李仁雲 Published in 2018-01-11 18:54:22Z

I want to use openCV's SVM to train data and to detect mouth wounds area in image.
I try to put the pixel into Mat,but always appear a lot of bug. I already read this opencv train image.
My image is : image1 and image2 and labels :result1 and result2

for (int i = 0; i<img_mat.rows; i++) {
        for (int j = 0; j < img_mat.cols; j++) {
            training_mat.at<Vec3f>(cv::Point(ii,0)) = img_mat.at<Vec3f>(cv::Point(j,i));
            for (int k = 0; k < contours_Ans[0].size(); k++)
                if (contours_Ans[0][k].x == j && contours_Ans[0][k].y == i)
                    labels.at<int>(cv::Point(0, ii)) = 1;
                else if(k+1 == contours_Ans[0].size())
                    labels.at<int>(cv::Point( 0, ii)) = 2;

Who can help me to resolve this problem. Thank you very much.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.31894 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO