-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
46 lines (38 loc) · 1.37 KB
/
main.cpp
File metadata and controls
46 lines (38 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include<iostream>
#include<stdio.h>
#include<assert.h>
#include "bmp.h"
using namespace std;
const char* INPUT_IMAGE_PATH = "C:\\Users\\m0pxnn\\Desktop\\ImageTestFiles\\img2.bmp";
const char* OUTPUT_IMAGE_PATH = "C:\\Users\\m0pxnn\\Desktop\\ImageTestFiles\\img2_modified.bmp";
//******************************************************************************************
// M A I N - for testing purpose.
//******************************************************************************************
int main()
{
int retval = -1;
{
BitmapImage bmpImage(INPUT_IMAGE_PATH);
bmpImage.displayImageDetails();
//bmpImage.displayImagePixels();
//retval = bmpImage.ConvertToGrayScale();
//bmpImage.displayHistogram();
printf("\n\nDoing histogram equalization...\n");
bmpImage.doHistogramEqualization();
//retval = bmpImage.ConvertToGrayScale();
//bmpImage.displayHistogram();
//bmpImage.DoImageBlur();
printf("\nWriting to file...\n");
retval = bmpImage.writeModifiedImageDataToFile(OUTPUT_IMAGE_PATH);
if (retval != 0)
{
printf("\n>> Failed to create %s\n", OUTPUT_IMAGE_PATH);
}
else
{
printf("\n>> Created %s\n", OUTPUT_IMAGE_PATH);
}
}//Scope of BitmapImage object ends here
getchar();
return 0;
}