2024年4月28日
Ubuntu22.04编译OpenCV4.8.1
问题:
opencv-4.8.1/modules/dnn/src/layers/../cuda4dnn/primitives/normalize_bbox.hpp:114:24: error: ambiguous overload for ‘operator!=’ (operand types are ‘__half’ and ‘double’) 114 | if (weight != 1.0) | ~~~~~~~^~~~~~
解决:
modules/dnn/src/cuda4dnn/primitives/normalize_bbox.hpp
- if (weight != 1.0) + if (weight != static_cast(1.0f))
/modules/dnn/src/cuda4dnn/primitives/region.hpp
- if (nms_iou_threshold > 0) { + if (nms_iou_threshold > static_cast(0.0f)) {
参考:
https://github.com/microsoft/vcpkg/issues/33874