#25890·opencv

CV_Bool support is not complete

Author: asmorkalovCreated Jul 9, 2024Updated Sep 17, 2026
Labelsfeaturecategory: core

Describe the feature and motivation

Currently OpenCV 5.x has 2 options for flags/bools:

  • cv::Mat with CV_Bool type
  • cv::Mat with CV_8U type or std::vector treated as bit array.

cv::norm does not support CV_Bool as input cv::norm interprets CV_8U matrix as regular integer matrix for NORM_INF and NORM_2 and as bit array for NORM_HAMMING Also CV_Bool is not supported by cv::Hamming, HAL functions.

Options:

  • Add CV_Bool support for Hamming, NORM_HAMMING case and all related functions
  • Added a way to squeeze / unsqueeze the bit arrays from/to CV_Bool type.

Additional context

No response