This project is a part of the course Programming III at UP FAMNIT.
It is a simple image processing program that uses a kernel to process the image. It is written in Java and uses Swing for the GUI.
Link to guidelines posted by Famnit.
The program is using a kernel, which is a small matrix that is applied to every pixel of the image. It calculates the new value of the pixel by multiplying the kernel with the surrounding pixels and summing them up.
Photo by Michael Plotke, CC BY-SA 3.0, via Wikimedia Commons
This process can take a lot of time if done sequentially, so we can use parallel processing to speed it up. The program measures the time it takes to process the image both sequentially and in parallel.
- Drag and drop an image to the left panel or choose a sample image from the
Demo images
dropdown menu - Choose the Kernel from the dropdown menu
- Choose
Sequential
,Parallel
orDistributed
button to start the processing of the image - Processed image will be visible on the right panel
- The time it took to process the image will be displayed in the according label
- You can Save the processed image by clicking the
Save
button on the top right corner - Click the
Reset
button or drag and drop a new image if you want to process another image
Important
Code on this branch only works if MPI is set up in your environment. Simplified non-distributed version is available on no-mpi branch.
- Download MPJ Express v0.44 from SourceForge
- Move to the project repository:
cd Kernel-Image-Processing/
- Create libs folder:
mkdir libs
- Move extracted folder to the libs folder
- Install MPJ Express as dependancy:
mvn install:install-file -Dfile=libs/mpj-v0_44/lib/mpj.jar -DgroupId=com.googlecode.mpj-express -DartifactId=mpj-v0_44 -Dversion=0.44 -Dpackaging=jar
- Add MPJ to path:
export MPJ_HOME=libs/mpj-v0_44 export PATH=$MPJ_HOME/bin:$PATH
- Compile the project:
mvn clean install
- Run the project:
libs/mpj-v0_44/bin/mpjrun.sh -np 4 target/kernel-image-processing-1.0-SNAPSHOT.jar