錯誤發生於opencv顏色空間轉換時:
im_lab = cv2.cvtColor(im_bgr, cv2.COLOR_BGR2LAB)
根據上面第二個鏈接里的回答,數據不能是浮點型,只能是整型。但根據我的實驗,float64會報如題的錯誤,但只要改成float32就可以運行。
im_bgr = im_bgr.astype(np.float64) # throws an error in the title
im_bgr = im_bgr.astype(np.float32) # runs without error
參考:
https://github.com/llSourcell/Object_Detection_demo_LIVE/issues/6
https://stackoverflow.com/questions/52739143/opencv-error-215assertion-failed-vscncontainsscn-vdcncontainsdcn
