Created
January 25, 2024 00:00
-
-
Save esmarr58/b09f6bdca8928241c27a739fe90143a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//g++ ejemplo1.cpp -o programa `pkg-config --cflags --libs opencv4` | |
#include<opencv2/core/core.hpp> | |
#include<opencv2/ml/ml.hpp> | |
#include<opencv2/imgproc/imgproc.hpp> | |
#include<opencv2/highgui/highgui.hpp> | |
#include<opencv2/video/background_segm.hpp> | |
#include<opencv2/videoio.hpp> | |
#include<opencv2/imgcodecs.hpp> | |
using namespace cv; | |
cv::VideoCapture camara(0); | |
int main(){ | |
Mat imagen; | |
Mat imagenChica; | |
for(;;){ | |
camara >> imagen; | |
resize(imagen,imagenChica,Size(250,250),0,0,INTER_NEAREST); | |
imshow("camara", imagenChica); | |
if(waitKey(30) == 's') break; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment