Ich versuche Konturen in ein binäres Bild zu finden, das eine numpy Array istopencv: Suche nach Konturen auf numpy Array
a = np.array(np.random.rand(1024,768),dtype='float32')
_, t2 = cv2.threshold(a,127,255,0)
im2, contours, hierarchy = cv2.findContours(t2,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
Wenn ich versuche, diesen Code ich diesen Fehler zu laufen
OpenCV Error: Unsupported format or combination of formats
([Start]FindContours supports only CV_8UC1 images when
mode != CV_RETR_FLOODFILL otherwise supports CV_32SC1 images only)
in cvStartFindContours
Dank j-Kaspar, das das Problem behebt. –