ov2640: support sharpness control

This commit is contained in:
Joo Aun Saw
2024-01-30 17:27:57 +11:00
committed by CaCO3
parent a8fb88a35d
commit 69f1a99b55
10 changed files with 276 additions and 49 deletions

View File

@@ -636,6 +636,20 @@ CImageBasis::CImageBasis(string _name, uint8_t* _rgb_image, int _channels, int _
}
void CImageBasis::Negative(void)
{
RGBImageLock();
for (int i = 0; i < width * height * channels; i += channels) {
for (int c = 0; c < channels; c++) {
rgb_image[i+c] = 255 - rgb_image[i+c];
}
}
RGBImageRelease();
}
void CImageBasis::Contrast(float _contrast) //input range [-100..100]
{
stbi_uc* p_source;