mirror of
https://github.com/opencv/opencv.git
synced 2026-09-25 04:09:57 +03:00
cv::Mat_<bool>::depth() returns CV_Bool in 5.0 where it returned CV_8U in 4.x, so distanceTransform started rejecting boolean masks. CV_Bool is a 1-byte type whose values are only zero-tested here, so accept it wherever a CV_8UC1 mask was previously accepted, matching the 4.x behaviour and the 4->5 migration guide. Relaxes the type checks on all four reachable paths: the public wrapper, distanceTransform_L1_8U, trueDistTrans (DIST_MASK_PRECISE) and distanceATS_L1_8u (CV_8U output). Closes #29596