Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
ObscurationPPM_main.cpp File Reference

This file contains the main function for the PPM image obscuration program, which applies various image obscuration techniques to PPM images using the Paillier cryptosystem. More...

Include dependency graph for ObscurationPPM_main.cpp:

Functions

bool is_ppm (const std::string &extension)
 Checks if a given file extension is PPM.
 
void getFilePathsOfPPMFilesFromFolder (std::vector< std::string > &imagePaths, std::string folderPath)
 Gets the file paths of all PPM images in a given folder.
 
void string2char (std::string str, char *charArray)
 Converts a std::string to a char array.
 
int main (int argc, char **argv)
 Main function for the PPM image obscuration program.
 

Detailed Description

This file contains the main function for the PPM image obscuration program, which applies various image obscuration techniques to PPM images using the Paillier cryptosystem.

Author
Katia Auxilien
Date
April 2024

The techniques include blurring, scrambling, pixelation, and selective encryption. The program takes a directory as input and applies the obscuration techniques to all PPM images in the directory. The obscured images are then saved to separate directories based on the technique used. Source files main.cpp and Functions.h by Norman Hutte.

Function Documentation

◆ getFilePathsOfPPMFilesFromFolder()

void getFilePathsOfPPMFilesFromFolder ( std::vector< std::string > & imagePaths,
std::string folderPath )

Gets the file paths of all PPM images in a given folder.

Parameters
imagePathsThe vector to store the file paths in.
folderPathThe path to the folder to search in.
Author
Katia Auxilien
Date
April 2024

◆ is_ppm()

bool is_ppm ( const std::string & extension)

Checks if a given file extension is PPM.

Parameters
extensionThe file extension to check.
Returns
True if the extension is PPM, false otherwise.
Author
Katia Auxilien
Date
April 2024

◆ main()

int main ( int argc,
char ** argv )

Main function for the PPM image obscuration program.

Parameters
argcThe number of command-line arguments.
argvThe command-line arguments.
Returns
0 if the program runs successfully, 1 otherwise.
Author
Katia Auxilien
Date
April 2024

◆ string2char()

void string2char ( std::string str,
char * charArray )

Converts a std::string to a char array.

Parameters
strThe string to convert.
charArrayThe char array to store the result in.
Author
Katia Auxilien
Date
April 2024