#include "ImageLocation.h" ImageLocation::ImageLocation() { score=0; } ImageLocation::~ImageLocation() { } double ImageLocation::GetDefinition() { return imgLocDryChemistry.GetDefinition(); } int ImageLocation::GetPaperColor() { return imgLocDryChemistry.GetLocatorColor(); } int ImageLocation::GetPaperItems() { return imgLocDryChemistry.GetPaperItems();//14,12,11,,,, } int ImageLocation::GetPaperLocLength() { return imgLocDryChemistry.GetLocatorType();//2/3/0 } Mat& ImageLocation::GetPaperImg() { return imgLocDryChemistry.GetPaperImg(); } cv::Mat ImageLocation::LocationProc(cv::Mat& image, cv::Rect roi, bool bDraw,cv::Scalar& paperParams, cv::Scalar& wbAvgRgb, std::vector& roiPositions, cv::Mat& rotRoiImage) { score=0; roiPositions.clear(); int err=-1; cv::Mat r = imgLocDryChemistry.GetPosition(image, roi, bDraw, wbAvgRgb, roiPositions); err = imgLocDryChemistry.GetLastError(); wbAvgRgb.val[3] = err; if (err == 0) { paperParams.val[0] = imgLocDryChemistry.GetLocatorColor(); paperParams.val[1] = imgLocDryChemistry.GetLocatorType(); paperParams.val[2] = imgLocDryChemistry.GetPaperItems(); cv::Mat(image,roi).copyTo(rotRoiImage); score= imgLocDryChemistry.GetScore(); } return r; }