This project was made for the "parallel computing" course at the Computer Engineering University of Florence.
Git submodules are used, so make sure to run
$ git submodule init
$ git submodule update
before building the targets.
The main goal is to write two version of the same program which must compute the histogram of an image an perform an histogram equalization.
This project can be built using meson and ninja; the development was made under Ubuntu 20.10.
To build the program you need to navigate to the folder "sequential" or "parallel" and use the following commands:
$ meson builddir
$ cd builddir
$ ninja
The project uses STB Single file libraries for reading and writing images.
You can run the program by specifying an image path:
# To run sequential version
$ cd src/sequential/builddir
$ ./histogram-equalizer-sequential <input_file_path> <output_file_path> [options]
For the sequential project, the following options are available:
-p
to plot the image histogram and the post-processed image histogram (requires gnuplot to be installed on the system)-s
to print the time elapsed for the execution of the program-l
to log the histogram and cdf values on stdout
Some tests are written using the Unity C framework.
There are also some script under utils like verifier.sh which can be used to build multiple project versions, run them and compare the outputs.
The following images show the result after the equalization process:
Before processing | After processing |
---|---|
![]() |
![]() |