Update OpenCV test2

This commit is contained in:
daleclack 2022-07-14 21:00:00 +08:00
parent 0a28bc1204
commit 5eacda9c97
1 changed files with 2 additions and 13 deletions

View File

@ -1,23 +1,12 @@
#include <opencv2/opencv.hpp>
#include <iostream>
#include <fstream>
using namespace cv;
int main(int argc, char ** argv){
std::fstream infile;
char filename[512];
std::string filename;
// Read image filename from file
infile.open("filename.txt", std::ios_base::in);
if(infile.is_open()){
infile.read(filename, sizeof(filename));
}else{
std::cout << "No filename.txt" << std::endl;
return -1;
}
std::cout << filename << std::endl;
std::cin >> filename;
// Open the image
Mat image, image_hsv, image_gray;