-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.h
33 lines (31 loc) · 820 Bytes
/
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
#ifndef IMAGE_H
#define IMAGE_H
#include <iostream>
#include <fstream>
using namespace std;
class Image
{
public:
friend ifstream &operator>>(ifstream &is, Image &i);
friend ofstream &operator<<(ofstream &os, Image &i);
friend Image operator+(Image left, Image right);
friend Image operator*(Image left, Image right);
friend Image operator!(Image i);
void print();
void sobel();
void setTreshold(int t);
int getTreshold();
int getHeight();
int getWidth();
void copy(Image im);
private:
int height, width, length, treshold;
unsigned char **pixels;
unsigned char **sobelPixels;
};
ifstream &operator>>(ifstream &is, Image &i);
ofstream &operator<<(ofstream &os, Image &i);
Image operator+(Image left, Image right);
Image operator*(Image left, Image right);
Image operator!(Image i);
#endif