35 lines
756 B
C++
35 lines
756 B
C++
#include "histo.h"
|
|
#include <opencv2/core.hpp>
|
|
#include <opencv2/highgui.hpp>
|
|
#include <opencv2/imgproc.hpp>
|
|
#include <iostream>
|
|
|
|
using namespace cv;
|
|
|
|
int main(){
|
|
Mat img = imread("../KossuthSquare/SnapShot-20180731_173715.jpg.png"/*, IMREAD_COLOR*/);
|
|
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;
|
|
}
|