minor fixes

This commit is contained in:
Dennis Eichhorn 2022-03-17 17:19:33 +01:00
parent 39fc9bbf36
commit 4829158b78
3 changed files with 4 additions and 3 deletions

View File

@ -64,7 +64,8 @@ namespace Image {
}
}
/* we probably don't want a polygon all the time?! */
// Approximate polygon
/* Question: we probably don't want a polygon all the time?! */
std::vector<std::vector<cv::Point> > contoursDraw (contoursArea.size());
for (int i = 0; i < contoursArea.size(); ++i){
cv::approxPolyDP(cv::Mat(contoursArea[i]), contoursDraw[i], 40, true);

View File

@ -63,7 +63,7 @@ namespace Image {
sum = intImg[x2][y2] - intImg[x2][y1 - 1] - intImg[x1 - 1][y2] + intImg[x1 - 1][y1 - 1];
bgr = in.at<cv::Vec3b>(j, i);
brightness = (float) Image::ImageUtils::lightnessFromRgb(bgr[2], bgr[1], bgr[0]);
brightness = Image::ImageUtils::lightnessFromRgb(bgr[2], bgr[1], bgr[0]);
color = brightness * count <= (sum * (100.0 - t) / 100.0) && brightness < 0.95 ? 0 : 255;

View File

@ -1,7 +1,7 @@
/**
* Karaka
*
* @package Image
* @package Utils
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0