Edge detection in Image processing using OpenMPI

Description

This project is an implementation of an MPI version of the Sobel operator for image processing. Here is a description of the project folder :

File Description Inputs
sobel.cpp MPI program that implements the sobel operator in OpenMPI arg[1]: image_path
sobel_seq.cpp Sequential Sobel operator program arg[1]: image_path
pgm_generator.cpp Generates a P5 pgm image with random values arg[1]: width, arg[2]: height
pgmlib.c A library to read P5 pgm files (GEEKSFORGEEKS)

The files data1.txt and data2.txt contain the execution time for generated images of sizes (2000x2000, 4000x4000, 6000x6000, 8000x8000, 10000x10000).

Compilation

You can compile and execute the MPI program using :

$ mpic++ sobel.cpp -o sobel
$ mpirun -n <number_of_nodes> sobel <path_to_P5_pgm_image>

You can compile and execute the sequential program using :

$ g++ sobel_seq.cpp -o sobel_seq
$ ./sobel_seq <path_to_P5_pgm_image>

Bonus

You can use an MPI profiler (MPIP) to generate a simple report containing information about the communication overhead. The rest of the images used for performance comparison are available here : https://filesamples.com/formats/pgm