Repository navigation
Mask support with CV_Bool in remaining modules - #25951
asmorkalov wants to merge 1 commit into
Conversation
|
@opencv-alalek @mshabunin @vpisarev Please review. |
| 0, | ||
| 0, | ||
| 0, | ||
| resize_bitExact<uchar, interpolationLinear<uchar> >, /* resize bool as uchar */ |
There was a problem hiding this comment.
As I understand CV_Bool should have 255 as true value. How will resize work in this case? Wouldn't it create true values with other values than 255. Perhaps test would be useful to check this.
| ( i < cols / 2 ? ((i / 128) * (85 - j / 256 * 40) * ((j / 128) % 2) + (7 - i / 128) * (85 - j / 256 * 40) * ((j / 128 + 1) % 2)) : | ||
| ((uchar)rnd) ) ; | ||
| if ((depth == CV_8U) || (depth == CV_Bool)) | ||
| line[i*cn + c] = (uint8_t)val; |
There was a problem hiding this comment.
Shouldn't it be 0 or 255 for CV_Bool?
| } | ||
| } | ||
| if ((depth == CV_8U) || (depth == CV_Bool)) | ||
| eval4< uint8_t, fixedShiftU8>(xcoeff0, xcoeff1, ycoeff0, ycoeff1, c, src_pt00, src_pt01, src_pt10, src_pt11, dst_pt); |
There was a problem hiding this comment.
I believe we should check that all values in the result image are either 0 or 255 for CV_Bool.
c727b2a to
3a1d0b8
Compare
3a1d0b8 to
dd2ec32
Compare
There was a problem hiding this comment.
Status: 🔴 Red
Verdict: Refactor before merge.
Audit every mask consumer for CV_Bool; several paths still construct Mat_, and 0/1 versus 0/255 semantics need an explicit contract.
Please address this in the current PR and add focused regression coverage where applicable.
Partially address #25895
Continues #25902
Also:
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.