2 pièce(s) jointe(s)
Problème avec cv::matchShapes
slt a tous ,
j'essaye de matcher deux contours détectés a partir de segmentation et après avoir extrais les contours. quand je compile j'ai un message d'erreur qui apparais et je ne sais pas d'ou sa vient voila le code!
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include<opencv2\opencv.hpp>
#include<opencv2\core\core.hpp>
int main(){
std::vector<std::vector<cv::Point>> contours1,contours2;
cv::Mat image1,image2;
cv::VideoCapture cap(0);
cap.read(image1);
cv::inRange(image1,cv::Scalar(15,30,0),cv::Scalar(145,255,255),image1);
image1.copyTo(image2);
cv::inRange(image2,cv::Scalar(15,30,0),cv::Scalar(145,255,255),image2);
cv::findContours(image1,contours1,CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE);
cv::findContours(image2,contours2,CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE);
cv::matchShapes(contours1,contours2,CV_CONTOURS_MATCH_I2,0);
} |
et le message d'erreur et la console en fichier joint
Mercii