#include<opencv2/imgproc.hpp>
#include<opencv2/highgui.hpp>
#include<iostream>
#include<fstream>
using namespace std;
using namespace cv;
int main() {
std::ifstream infile("D:/HDJudge/dir.txt");
string image;
Mat img;
int width, height, pixel, index = 0;
const int HDint = 1000000;
string savePath = "../../HD/";
while (infile >> image) {
cout << image << endl;
img = imread(image);
width = img.cols;
height = img.rows;
pixel = width*height;
if (pixel > HDint) {
string imgPath = savePath + to_string(index).append(".jpg");
imwrite(imgPath, img);
}
index++;
}
}