I tried installing opencv on my raspberry pi but I encountered some Cmake errors

I created a build directory in my opencv-4.0.0 folder but when I tried to configure my compilation using the command:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-4.0.0/modules \
    -D ENABLE_NEON=ON \
    -D ENABLE_VFPV3=ON \
    -D BUILD_TESTS=OFF \
    -D WITH_TBB=OFF \
    -D INSTALL_PYTHON_EXAMPLES=OFF \
    -D BUILD_EXAMPLES=OFF ..

It gave the following error:

CMake Error at cmake/OpenCVCompilerOptimizations.cmake:460 (message):
  Required baseline optimization is not supported: VFPV3
  (CPU_BASELINE_REQUIRE=;VFPV3;NEON)
Call Stack (most recent call first):
  cmake/OpenCVCompilerOptions.cmake:268 (include)
  CMakeLists.txt:556 (include)

CMake Error at cmake/OpenCVCompilerOptimizations.cmake:460 (message):
  Required baseline optimization is not supported: NEON
  (CPU_BASELINE_REQUIRE=VFPV4;VFPV3;NEON)
Call Stack (most recent call first):
  cmake/OpenCVCompilerOptions.cmake:268 (include)
  CMakeLists.txt:556 (include)

I have a raspberry pi 4B model with Raspbian os (bullseye 32 bit) installed on it. Can someone fix this?

Read more here: Source link