Improve I/O Efficiency
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
using namespace cv;
|
||||
|
||||
Mat testFrame = imread("/home/midstate/Documents/flirTest.tif", CV_16UC1);
|
||||
|
||||
bool ImageAnalyzer::ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPointer, FaultManager fault_mgr, bool test = false)
|
||||
{
|
||||
Mat frame, mask, viewfinder;
|
||||
@@ -27,7 +29,7 @@ bool ImageAnalyzer::ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPo
|
||||
if (!test)
|
||||
frame = Mat(height, width, CV_16UC1, imgPointer, Mat::AUTO_STEP);
|
||||
else
|
||||
frame = imread("/home/midstate/Documents/image.png", CV_16UC1);
|
||||
frame = testFrame;
|
||||
|
||||
// Create mask and then flatten
|
||||
GaussianBlur(frame, mask, cv::Size(0, 0), 1);
|
||||
@@ -52,7 +54,7 @@ bool ImageAnalyzer::ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPo
|
||||
if (area > fault_area)
|
||||
{
|
||||
drawContours(viewfinder, contours, i, Scalar(ZERO, BITS8, ZERO), 2);
|
||||
fault_mgr.SaveImage(frame);
|
||||
fault_mgr.SaveImage(viewfinder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user