For guys who use Apple silicon chip to code OpenCV in c++.
Hint: Using docker to run opencv c++ will not allow you to use imshow unless you set up Xserver.
docker build -t opencv_cpp .
docker run -it --rm -v $(pwd):/app opencv_cppThis will sync the folder you run with the docker bash. You can directly code it inside main.cpp
./compile.sh <cpp_file>