-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvolution.h
More file actions
32 lines (24 loc) · 1.06 KB
/
Convolution.h
File metadata and controls
32 lines (24 loc) · 1.06 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
// Convolution.h
#ifndef CONVOLUTION_H
#define CONVOLUTION_H
#include "ImageMatrix.h"
// Class `Convolution`: Provides the functionality to convolve an image with
// a kernel. Padding is a bool variable, indicating whether to use zero padding or not.
class Convolution {
public:
// Constructors and destructors
Convolution(); // Default constructor
Convolution(double** customKernel, int kernelHeight, int kernelWidth, int stride, bool padding); // Parametrized constructor for custom kernel and other parameters
~Convolution(); // Destructor
Convolution(const Convolution &other); // Copy constructor
Convolution& operator=(const Convolution &other); // Copy assignment operator
ImageMatrix convolve(const ImageMatrix& input_image) const; // Convolve Function: Responsible for convolving the input image with a kernel and return the convolved image.
private:
double** kernel;
int kernel_height;
int kernel_width;
int stride;
bool padding_value;
// Add any private member variables and functions .
};
#endif // CONVOLUTION_H