I'm applying contrast with opencv. I follow the docs to make contrast transformation with:
for(int y = 0; y < image.rows; y++) {
for(int x = 0; x < image.cols; x++) {
for(int c = 0; c < 3; c++) {
new_image.at<Vec3b>(y,x)[c] =
saturate_cast<uchar>(alpha*(image.at<Vec3b>(y,x)[c]) + beta);
}
}
}
But the contrast this method apply was not the one i want. So then i found this tutorial which uses:
Mat dst;
int iBrightness = iSliderValue1 - 50;
double dContrast = iSliderValue2 / 50.0;
src.convertTo(dst, -1, dContrast, iBrightness);
but this uses Mat and for m work i'm doind IplImage. How could i made it with IplImage? I tried cvConvert but it seems to not do this.