Skip to content

Instantly share code, notes, and snippets.

@esmarr58
Created January 25, 2024 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esmarr58/b09f6bdca8928241c27a739fe90143a9 to your computer and use it in GitHub Desktop.
Save esmarr58/b09f6bdca8928241c27a739fe90143a9 to your computer and use it in GitHub Desktop.
//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