#include #include #include using namespace std; using namespace cv; int main() { Mat tehen = imread("resources/milka.jpg",IMREAD_COLOR); cvtColor(tehen,tehen,COLOR_BGR2HSV); Vec3b c; for (int i = 0; i < tehen.rows; i++) { for (int o = 0; o < tehen.cols; o++) { c = tehen.at(i,o); if (c[0] > 130 && c[0] < 160) { tehen.at(i,o)[0] = 20; } } } cvtColor(tehen,tehen,COLOR_HSV2BGR); imshow("tehen",tehen); waitKey(); return 0; }