18#ifndef STAGE_IMAGE_FUNCTIONS_H
19#define STAGE_IMAGE_FUNCTIONS_H
21#define M_PI 3.14159265358979323846
47 static int interpolate_color(
int p11,
int p21,
int p12,
int p22,
float dx,
float dy);
250 static void writeDataOnTxt(std::vector<double> &data, std::string filename);
Base class containing some basic functionalities for images.
This class is a base class for images. It provides some basic functionalities for images.
Definition ImageBase.hpp:21
This class contains common and useful methods for obscuring images.
Definition obscurationCommon.hpp:28
This class implements various image obscuration techniques for the PPM image format.
Definition obscurationPPM.hpp:31
static void compareImagesByHist(ImageBase &image1, ImageBase &image2)
Compares the histograms of two images.
Definition obscurationPPM.cpp:82
static void areaScrambling(ImageBase &image, ImageBase &o_image, int start_i, int start_j, int area_h, int area_w)
Applies area scrambling to an image using a given start position and area size.
Definition obscurationPPM.cpp:246
static void bilinearRedim299(ImageBase &image, ImageBase &o_image)
Resizes an image to 299x299 pixels using bilinear interpolation.
Definition obscurationPPM.cpp:42
static void computeColorHist(ImageBase &image, int histR[256], int histG[256], int histB[256])
Computes the histograms of the red, green, and blue color components of an image.
Definition obscurationPPM.cpp:65
static void areaAverager(ImageBase &image, ImageBase &o_image, int start_i, int start_j, int area_h, int area_w)
Applies area averaging to an image using a given start position and area size.
Definition obscurationPPM.cpp:298
static void selectiveGroupEncryption(ImageBase &image, ImageBase &o_image, int bitsGroup[8], int groupSize)
Applies selective group encryption to an image using a given bit group and group size.
Definition obscurationPPM.cpp:408
static double computePSNR(ImageBase &image1, ImageBase &image2)
Computes the peak signal-to-noise ratio (PSNR) between two images.
Definition obscurationPPM.cpp:437
static void interpolate_bilinear(ImageBase &image, int &valR, int &valG, int &valB, float i, float j)
Interpolates the color values of a pixel at a given position in an image using bilinear interpolation...
Definition obscurationPPM.cpp:31
static void writeDataOnTxt(std::vector< double > &data, std::string filename)
Writes data to a text file.
Definition obscurationPPM.cpp:476
static void generateGaussianKernel(std::vector< std::vector< float > > &kernel, int size, float sigma)
Generates a Gaussian kernel for image blurring.
Definition obscurationPPM.cpp:99
static void selectiveIndividualEncryption(ImageBase &image, ImageBase o_images[8])
Applies selective individual encryption to an image.
Definition obscurationPPM.cpp:378
static double computeSSIM(ImageBase &image1, ImageBase &image2)
Computes the structural similarity index (SSIM) between two images.
Definition obscurationPPM.cpp:510
static void averageByRegion(ImageBase &image, ImageBase &o_image, int regionHeight, int regionWidth)
Applies average by region to an image using a given region size.
Definition obscurationPPM.cpp:319
static void scrambling(ImageBase &image, ImageBase &o_image, int regionHeight, int regionWidth)
Applies scrambling to an image using a given region size.
Definition obscurationPPM.cpp:275
static void newAverageBlurring(ImageBase &image, std::vector< ImageBase > &o_images)
Applies new average blurring to an image using a given number of images.
Definition obscurationPPM.cpp:185
static void averageBlurring(ImageBase &image, ImageBase &o_image, int regionSize)
Applies average blurring to an image using a given region size.
Definition obscurationPPM.cpp:160
static void gaussianBlur(ImageBase &image, ImageBase &o_image, int kernelSize, float sigma)
Applies Gaussian blurring to an image using a given kernel size and standard deviation.
Definition obscurationPPM.cpp:120
static void computePSNRforAllAlterations(std::vector< double > &PSNRArray, const char *baseName, int i_min, int i_max, int step)
Computes the PSNR for all alterations in a given range.
Definition obscurationPPM.cpp:458
static void RGB2GREY(ImageBase &imColor, ImageBase &imGrey)
Converts an RGB image to grayscale.
Definition obscurationPPM.cpp:494
static double computeImageMean(ImageBase &image)
Computes the mean value of an image.
Definition obscurationPPM.cpp:501
static void selectiveProgressiveEncryption(ImageBase &image, ImageBase o_images[8], bool MSBtoLSB)
Applies selective progressive encryption to an image using a given encryption direction.
Definition obscurationPPM.cpp:342
static int interpolate_color(int p11, int p21, int p12, int p22, float dx, float dy)
Interpolates the color value of a pixel at a given position using bilinear interpolation.
Definition obscurationPPM.cpp:21
Header of super class containing common and useful methods for obscuring pgm and ppm images.