AUTHORS:ABHISHEK KUMAR ANNAMRAJU,AKASH DEEP SINGH,ADHESH SHRIVASTAVA
Hi Friends,
Lets look into a way of opening image/video/camera with opencv
Reading an image:-
1)Create a new c++ file (eg-open_image.cpp )
2)Code(copy the code in the file):-
Click once somewhere on the code and press ctrl+A to select whole code.You may not see the whole code so its better to copy the code and paste it in your favourite text editor and then go through it.
3)Compiling and Executing:-
Open a terminal and change the directory to where the file is present and type
a)chmod +x FILENAME.cpp
Note:FILENAME is the name given to the file,use the one you used
b)g++ -ggdb `pkg-config --cflags opencv` -o `basename FILENAME.cpp .cpp` FILENAME.cpp `pkg-config --libs opencv` c)./FILENAME
Reading a video/camera input:-
1)Create a new c++ file (eg-open_image.cpp )
2)Code(copy the code in the file):-
#include <highgui.h> CvCapture* capture = NULL; int main( int argc, char** argv )…
View original post 150 more words