Files
opencv-MIRROR/modules
Neal006 a23985fbdb photo: accept CV_Bool masks in inpaint (#25895)
cv::Mat_<bool>::depth() returns CV_Bool in 5.0, where it was CV_8U in 4.x, so
code that passed a boolean mask to inpaint() stopped working on the 5.x branch.
icvInpaint() rejected anything that was not CV_8UC1, even though CV_Bool is a
single byte like CV_8U and the uchar reads in the fast marching code are already
correct for it. Relaxing the type gate is therefore sufficient, no conversion of
the mask is needed.

The regression test checks a boolean mask against the equivalent CV_8U mask and
requires both the output type and every pixel to match, for both inpainting
algorithms and for 1 and 3 channel input.

Verified locally: the test fails against unmodified 5.x with "The mask must be
8-bit 1-channel image" and passes with the change. The rest of opencv_test_photo
is unaffected.
2026-08-10 23:06:33 +05:30
..
2026-07-29 20:19:40 +05:30
2026-07-09 12:17:24 +03:00
2026-07-09 12:17:24 +03:00
2026-07-09 12:17:24 +03:00
2026-07-28 20:27:29 +05:30
2026-05-20 17:57:51 +03:00