findContours Fehler "- Unterstützung nur 8uC1 Bilder'
Versuchen zu laufen findContours auf einem binären Bild"
Mat conv(image.size(), CV_8U);
image.convertTo(conv, CV_8U);
vector<vector<cv::Point> > contours;
findContours(conv, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
thorws Fehler:
OpenCV Error: Unsupported format or combination of formats ([Start]FindContours support only 8uC1 images) in cvStartFindContours,
Irgendwelche Ideen?
Dank
InformationsquelleAutor der Frage 0xSina | 2012-11-02
Du musst angemeldet sein, um einen Kommentar abzugeben.
Vom die Dokumentation:
Sehen Sie, dass die Anzahl der Kanäle ist nicht geändert durch
convertTo
bedeutet dies wahrscheinlich, dass Sie 3 Kanäle (r, g und b). AllerdingsfindContours
erfordert ein Monochrom-Bild.Müssen Sie konvertieren Sie das Bild in schwarz-weiß:
InformationsquelleAutor der Antwort Vlad