I'm trying to get opencv2 working on a Raspberry PI with a NOIR camera module. As I understand it Opencv doesn't work natively with the camera module; so I'm following this link to try and get it working.
I've installed Opencv on the PI, and I think thats working, but just need it to work with the camera.
When I get to step 3 in the above link, which suggests I navigate to the /opt/vc folder and type:
sed -i ‘s/if (DEFINED CMAKE_TOOLCHAIN_FILE)/if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)/g’ makefiles/cmake/arm-linux.cmake
I get the error message:
-bash: syntax error near unexpected token `('
1) Could someone please explain what the above command does?
2) Why might I get this error?
3) Does the folder structure matter? When I downloaded the source files from github, it was in the format userland-master/userland-master/then_all_the_files so I took all_the_files and placed them in the /opt/vc/ folder.