CV_16FC1/C3 Missing

The GitHub repo for depthai-core is missing definitions for CV_16FC1/C3. OpenCV has never had any 16-bit float formats so this is new code. The cases for CV_16FC1/C3 look like they can just be commented out as they are not likely to be used. There is a lot of active development in the repo so I may have just cloned the repo at a bad time. Please advise…

uhh, 3rdparty problem
(don’t expect anyone here to be familiar with it)

not entirely true. (added in 4.x but only used within the dnn code)

now what are you talking about ? links ? example code ?
please be more concise

and: opencv version ?

The repo with the problem is here:

The camera that the code supports is the OpenCV Oak-D RGBZ camera. If you clone that repo, run CMake, and build the resulting .sln, you will see the error. OpenCV has no CV_16FC1/C3 support and this code assumed it did. This is not a third-party problem as Luxonis is supporting the Oak-D camera. If you would like to give it a try, this code with show the error when running on Windows 10.

if exist depthai-core (rmdir depthai-core /s)
“c:\Program Files\Git\bin\git.exe” clone “GitHub - luxonis/depthai-core: DepthAI C++ Library
cd depthai-core
git submodule update --init --recursive
cd …
“C:\Program Files\CMake\bin\Cmake.exe” -DCMAKE_CONFIGURATION_TYPES=Debug;Release -DDEPTHAI_BUILD_EXAMPLES=ON -DOpenCV_DIR=…/opencv/Build -S depthai-core -B depthai-core/Build
msbuild.exe depthai-core/Build/depthai.sln /p:Configuration=Debug
msbuild.exe depthai-core/Build/depthai.sln /p:Configuration=Release

that’s far too broad. please locate problem closer.

it’s unclear, how you get to that conclusion
and again, which opencv version are you talking about ?

4.5.3 - the latest version of OpenCV.

please provide some compiler messages that show the issue. you know how bug reports work.

The email editor added the extra dot in my .bat file in the earlier email. The version of the OpenCV that is up one directory from the depthai-core is 4.5.3 and the CV_16FC1/C3 are both defined there.

"C:\_src\OpenCVB\depthai-core\Build\depthai.sln" (default target) (1) ->
"C:\_src\OpenCVB\depthai-core\Build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"C:\_src\OpenCVB\depthai-core\Build\examples\bootloader_version.vcxproj.metaproj" (default target) (4) ->
"C:\_src\OpenCVB\depthai-core\Build\depthai-opencv.vcxproj.metaproj" (default target) (9) ->
"C:\_src\OpenCVB\depthai-core\Build\depthai-opencv.vcxproj" (default target) (10) ->
(ClCompile target) ->
C:\_src\OpenCVB\depthai-core\src\opencv\ImgFrame.cpp(44,20): error C2065: 'CV_16FC1': undeclared identifier [C:\_src\
C:\_src\OpenCVB\depthai-core\src\opencv\ImgFrame.cpp(57,20): error C2065: 'CV_16FC3': undeclared identifier [C:\_src\

24 Warning(s)
2 Error(s)

I have figured out the problem. It is rooted in the CMake script used to prepare the depthai-core tree. Even though the script explicitly calls for CMake to use -DOpenCV_DIR=…/opencv/Build, the command line for CMake searches nearby directories for a version of OpenCV and found an old version without the CV_16FC1/C3 definitions. It only became clear when using CMake-gui and the OpenCV_Dir was incorrectly defined. Changing it in CMake-gui fixes the problem with the luxonis code. Sorry for all the trouble but it helped to get past the problem with CMake. Thanks.