#include <highlevelmonitorconfigurationapi.h>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\opencv.hpp>
using
namespace
cv;
using
namespace
std;
int
main(
int
argc,
char
** argv)
{
Mat image = imread(
"C:\\Users\\dell\\Desktop\\abc.jpg"
);
if
(image.empty()) {
cout <<
"Could not open or find the image"
<< endl;
return
-1;
}
Mat imageBrighnessHigh50;
image.convertTo(imageBrighnessHigh50, -1, 1, 50);
Mat imageBrighnessHigh100;
image.convertTo(imageBrighnessHigh100, -1, 1, 100);
Mat imageBrighnessLow50;
image.convertTo(imageBrighnessLow50, -1, 1, -50);
Mat imageBrighnessLow100;
image.convertTo(imageBrighnessLow100, -1, 1, -100);
String windowNameOriginalImage =
"Original Image"
;
String windowNameBrightnessHigh50 =
"Brightness Increased by 50"
;
String windowNameWithBrightnessHigh100 =
"Brightness Increased by 100"
;
String windowNameBrightnessLow50 =
"Brightness Decreased by 50"
;
String windowNameBrightnessLow100 =
"Brightness Decreased by 100"
;
namedWindow(windowNameOriginalImage, WINDOW_NORMAL);
namedWindow(windowNameBrightnessHigh50, WINDOW_NORMAL);
namedWindow(windowNameWithBrightnessHigh100, WINDOW_NORMAL);
namedWindow(windowNameBrightnessLow50, WINDOW_NORMAL);
namedWindow(windowNameBrightnessLow100, WINDOW_NORMAL);
imshow(windowNameOriginalImage, image);
imshow(windowNameBrightnessHigh50, imageBrighnessHigh50);
imshow(windowNameWithBrightnessHigh100, imageBrighnessHigh100);
imshow(windowNameBrightnessLow50, imageBrighnessLow50);
imshow(windowNameBrightnessLow100, imageBrighnessLow100);
waitKey(0);
destroyAllWindows();
return
0;
}