Files

35 lines
752 B
C++
Raw Permalink Normal View History

2025-10-09 17:30:43 +02:00
#include "histo.h"
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
int main(){
2025-11-05 11:32:53 +01:00
Mat img = imread("../KossuthSquare/SnapShot-20180731_173715.jpg"/*, IMREAD_COLOR*/);
2025-10-09 17:30:43 +02:00
Mat acc = Mat::zeros(img.size(), CV_64FC3);
int nframes = 0;
for(int i = 715; i <= 918; i++){
Mat img = imread("../KossuthSquare/SnapShot-20180731_173"+std::to_string(i)+".jpg");
if(img.empty()){
continue;
}
acc += img;
nframes++;
imshow("img", img);
waitKey(5);
}
Mat dest;
acc.convertTo(dest, CV_8UC3, 1.0 / nframes);
imshow("dest", dest);
waitKey(0);
return 0;
}