mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-26 09:38:40 +00:00
minor fixes
This commit is contained in:
parent
39fc9bbf36
commit
4829158b78
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Karaka
|
||||
*
|
||||
* @package Image
|
||||
* @package Utils
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user