Support negative photo effect and auto exposure control 2

This commit is contained in:
Joo Aun Saw
2024-01-12 01:28:34 +11:00
committed by CaCO3
parent d418d22155
commit a8fb88a35d
7 changed files with 102 additions and 20 deletions

View File

@@ -54,6 +54,8 @@ void ClassFlowTakeImage::SetInitialParameter(void)
ZoomMode = 0;
zoomOffsetX = 0;
zoomOffsetY = 0;
ImageNegative = false;
ImageAec2 = false;
#ifdef GRAYSCALE_AS_DEFAULT
ImageGrayscale = true;
#else
@@ -122,6 +124,20 @@ bool ClassFlowTakeImage::ReadParameter(FILE* pfile, string& aktparamgraph)
else if (toUpper(splitted[1]) == "FALSE")
ImageGrayscale = false;
}
if ((toUpper(splitted[0]) == "NEGATIVE") && (splitted.size() > 1))
{
if (toUpper(splitted[1]) == "TRUE")
ImageNegative = true;
else if (toUpper(splitted[1]) == "FALSE")
ImageNegative = false;
}
if ((toUpper(splitted[0]) == "AEC2") && (splitted.size() > 1))
{
if (toUpper(splitted[1]) == "TRUE")
ImageAec2 = true;
else if (toUpper(splitted[1]) == "FALSE")
ImageAec2 = false;
}
if ((toUpper(splitted[0]) == "AUTOEXPOSURELEVEL") && (splitted.size() > 1))
_autoExposureLevel = std::stod(splitted[1]);
@@ -183,7 +199,7 @@ bool ClassFlowTakeImage::ReadParameter(FILE* pfile, string& aktparamgraph)
}
}
Camera.SetBrightnessContrastSaturation(_brightness, _contrast, _saturation, _autoExposureLevel, ImageGrayscale);
Camera.SetBrightnessContrastSaturation(_brightness, _contrast, _saturation, _autoExposureLevel, ImageGrayscale, ImageNegative, ImageAec2);
Camera.SetQualitySize(ImageQuality, ImageSize, ZoomEnabled, ZoomMode, zoomOffsetX, zoomOffsetY);
image_width = Camera.image_width;