Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
|
A subclass of obscurationCommon for obscuring images in the PGM format. More...
#include <obscurationPGM.hpp>
Static Public Member Functions | |
static int | interpolate_grey (int p11, int p21, int p12, int p22, float dx, float dy) |
Interpolates a greyscale value between four neighboring pixels. | |
static void | interpolate_bilinear_PGM (ImageBase &image, int &valV, float i, float j) |
Interpolates a greyscale value at a specific point in an image using bilinear interpolation. | |
static void | bilinearRedim299_PGM (ImageBase &image, ImageBase &o_image) |
Resizes an image to 299x299 pixels using bilinear interpolation. | |
static void | newAverageBlurring_PGM (ImageBase &image, std::vector< ImageBase > &o_images) |
Applies average blurring to an image. | |
static void | areaScrambling_PGM (ImageBase &image, ImageBase &o_image, int start_i, int start_j, int area_h, int area_w) |
Scrambles the pixels in a specific area of an image. | |
static void | scrambling_PGM (ImageBase &image, ImageBase &o_image, int regionHeight, int regionWidth) |
Scrambles the pixels in an image. | |
static void | areaAverager_PGM (ImageBase &image, ImageBase &o_image, int start_i, int start_j, int area_h, int area_w) |
Applies averaging to a specific area of an image. | |
static void | averageByRegion_PGM (ImageBase &image, ImageBase &o_image, int regionHeight, int regionWidth) |
Applies averaging to an image. | |
static void | selectiveIndividualEncryption_PGM (ImageBase &image, ImageBase o_images[8]) |
Encrypts an image using selective individual encryption. | |
static void | selectiveProgressiveEncryption_PGM (ImageBase &image, ImageBase o_images[8], bool MSBtoLSB) |
Encrypts an image using selective progressive encryption. | |
static void | selectiveGroupEncryption_PGM (ImageBase &image, ImageBase &o_image, int bitsGroup[8], int groupSize) |
Encrypts an image using selective group encryption. | |
Static Public Member Functions inherited from obscurationCommon | |
static void | genPRNS (unsigned int seq[8]) |
Generate a random sequence of 8 bits. | |
static void | genBitsGroups (std::vector< std::vector< int > > &groups, int groupSize) |
Generate groups of bits. | |
static void | intVec2intArray (std::vector< int > &vec, int arr[8]) |
Convert a vector of integers to an array of integers. | |
A subclass of obscurationCommon for obscuring images in the PGM format.
This class provides functions to obscure images in the PGM format, inspired by Norman Hutte's methods for PPM images.
|
static |
Applies averaging to a specific area of an image.
Inspired by Norman Hutte's method areaAverager.
image | The image to average. |
o_image | The averaged image. |
start_i | The starting row of the area to average. |
start_j | The starting column of the area to average. |
area_h | The height of the area to average. |
area_w | The width of the area to average. |
|
static |
Scrambles the pixels in a specific area of an image.
Inspired by Norman Hutte's method areaScrambling.
image | The image to scramble. |
o_image | The scrambled image. |
start_i | The starting row of the area to scramble. |
start_j | The starting column of the area to scramble. |
area_h | The height of the area to scramble. |
area_w | The width of the area to scramble. |
|
static |
Applies averaging to an image.
Inspired by Norman Hutte's method averageByRegion.
image | The image to average. |
o_image | The averaged image. |
regionHeight | The height of the regions to average. |
regionWidth | The width of the regions to average. |
Resizes an image to 299x299 pixels using bilinear interpolation.
Inspired by Norman Hutte's method bilinearRedim299.
image | The image to resize. |
o_image | The resized image. |
|
static |
Interpolates a greyscale value at a specific point in an image using bilinear interpolation.
Inspired by Norman Hutte's method interpolate_bilinear.
image | The image to interpolate. |
valV | The interpolated greyscale value. |
i | The x-coordinate of the point to interpolate. |
j | The y-coordinate of the point to interpolate. |
|
static |
Interpolates a greyscale value between four neighboring pixels.
Inspired by Norman Hutte's method interpolate_color.
p11 | The top-left pixel value. |
p21 | The top-right pixel value. |
p12 | The bottom-left pixel value. |
p22 | The bottom-right pixel value. |
dx | The distance between the desired point and the top-left pixel along the x-axis. |
dy | The distance between the desired point and the top-left pixel along the y-axis. |
|
static |
Applies average blurring to an image.
Inspired by Norman Hutte's method newAverageBlurring.
image | The image to blur. |
o_images | The blurred images. |
|
static |
Scrambles the pixels in an image.
Inspired by Norman Hutte's method scrambling.
image | The image to scramble. |
o_image | The scrambled image. |
regionHeight | The height of the regions to scramble. |
regionWidth | The width of the regions to scramble. |
|
static |
Encrypts an image using selective group encryption.
Inspired by Norman Hutte's method selectiveGroupEncryption.
image | The image to encrypt. |
o_image | The encrypted image. |
bitsGroup | The group of bits to encrypt. |
groupSize | The size of the group of bits to encrypt. |
|
static |
Encrypts an image using selective individual encryption.
Inspired by Norman Hutte's method selectiveIndividualEncryption.
image | The image to encrypt. |
o_images | The encrypted images. |
|
static |
Encrypts an image using selective progressive encryption.
Inspired by Norman Hutte's method selectiveProgressiveEncryption.
image | The image to encrypt. |
o_images | The encrypted images. |
MSBtoLSB | Whether to encrypt from MSB to LSB or vice versa. |