12345678910111213141516171819202122232425262728293031 |
- #include <iostream>
- #include "AutoWWWL.h"
- #include <opencv2/opencv.hpp>
- using namespace std;
- using namespace cv;
- using namespace ATWL;
- vector<String> globroot(String pattern)
- {
- vector<String> fn;
- glob(pattern, fn, false);
- return fn;
- }
- int main()
- {
- Mat img = imread(R"(Image_FinalImage.tif)",-1);
- Mat mask = imread(R"(mask.tif)", -1);
- int width = img.cols;
- int height = img.rows;
- int ww = 0;
- int wl = 0;
- int ret = AutoWWWL(img.ptr<ushort>(), mask.ptr<uchar>(), width, height, ww, wl);
- cout << "WW:" << ww << endl;
- cout << "WL:" << wl << endl;
- system("pause");
- return 0;
- }
|