Ask Your Question

Revision history [back]

cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed)

ann.train(np.array(image, dtype=np.float32), cv2.ml.ROW_SAMPLE, np.array(trainingLabel, dtype=np.float32))

cv2.error: OpenCV(4.3.0) ..\modules\ml\src\data.cpp:257: error: (-215:Assertion failed) samples.type() == CV_32F || samples.type() == CV_32S in function 'cv::ml::TrainDataImpl::setData'

click to hide/show revision 2
None

updated 2020-06-29 01:08:09 -0500

berak gravatar image

cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed)

.

ann.train(np.array(image, dtype=np.float32), cv2.ml.ROW_SAMPLE, np.array(trainingLabel, dtype=np.float32))

dtype=np.float32))

cv2.error: OpenCV(4.3.0) ..\modules\ml\src\data.cpp:257: error: (-215:Assertion failed) samples.type() == CV_32F || samples.type() == CV_32S in function 'cv::ml::TrainDataImpl::setData'

'cv::ml::TrainDataImpl::setData'
click to hide/show revision 3
retagged

updated 2020-06-29 02:44:25 -0500

berak gravatar image

cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed)

.

ann.train(np.array(image, dtype=np.float32), cv2.ml.ROW_SAMPLE, np.array(trainingLabel, dtype=np.float32))


cv2.error: OpenCV(4.3.0) ..\modules\ml\src\data.cpp:257: error: (-215:Assertion failed) samples.type() == CV_32F || samples.type() == CV_32S in function 'cv::ml::TrainDataImpl::setData'