-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathImage.h
40 lines (31 loc) · 1.16 KB
/
Image.h
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
// Header file for the class defined for image processing.
#ifndef IMAGE_H
#define IMAGE_H
#include "Logger.h"
// Defining the class for all the image processing operations.
class Image
{
public:
char PGMType[3];
unsigned char** Data;
unsigned int Width;
unsigned int Height;
unsigned int MaximumGreyValue;
Image();
int getWidth();
int getHeight();
int getMaximumGreyValue();
void ignoreComments(FILE* FilePath);
bool readPGMFile(Image* PGM, const char* FileName);
void saveImageDetails(Image* PGM, const char* FileName);
int getPixel(unsigned int Row, unsigned int Column);
void setPixel(unsigned int Row, unsigned int Column, unsigned int Value);
int getSize();
void convertToNegative();
int meanPixelValue();
int numberOfBlackPixels();
int numberOfWhitePixels();
int averageBlackPixelsInRow();
void displayImageDetails();
};
#endif