Skip to content

Find the histogram of an image, which acts as a graphical representation of the tonal distribution in a digital image, in C.

License

Notifications You must be signed in to change notification settings

moocf/image-histogram.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this project, we demonstrate how to find the histogram of an image, which acts as a graphical representation of the tonal distribution in a digital image, in the C programming language.

You can clone this repository with git clone <repo url>. Then, install the required dependencies (here, tigr.c) with npm i in command prompt/terminal. You can use clang for compiling the C code, once you install LLVM on your system. The script to compile and run the code is build.sh. You can run it in the terminal with bash build.sh.


Task

The code has a sequential implementation of histogram computation. You are to implement parallel histogram computation using OpenMP. Time the speedup achieved by the parallel implementation over the sequential one. Test with large images to see sensible speedups - small workloads do not benefit from parallelism. You can place the image files in the images/ folder, and pass it as a command line argument while compiling/running the code, as bash build.sh images/large_image.png. As tigr does not support all PNG formats, you can try converting any image (bmp/png/jpg) to a compatible PNG using online converters, such as JPG2PNG.

We will use a leaderboard to track the best speedups across all submissions.


Screenshots



ORG

About

Find the histogram of an image, which acts as a graphical representation of the tonal distribution in a digital image, in C.

Resources

License

Stars

Watchers

Forks