Skip to content

🖼️ Compare the speed of sequential and parallel KIP

Notifications You must be signed in to change notification settings

urluur/Kernel-Image-Processing

Repository files navigation

Kernel Image Processing

Static Badge Static Badge

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.

screenshot_cli

Guidelines

Link to guidelines posted by Famnit.

What is it doing?

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.

image

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.

Usage

  • 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 or Distributed 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

Distributed computing setup (macOS/Linux)

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.

  1. Download MPJ Express v0.44 from SourceForge
  2. Move to the project repository: cd Kernel-Image-Processing/
  3. Create libs folder: mkdir libs
  4. Move extracted folder to the libs folder
  5. 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
  6. Add MPJ to path:
    export MPJ_HOME=libs/mpj-v0_44
    export PATH=$MPJ_HOME/bin:$PATH
  7. Compile the project:
    mvn clean install
  8. Run the project:
    libs/mpj-v0_44/bin/mpjrun.sh -np 4 target/kernel-image-processing-1.0-SNAPSHOT.jar

About

🖼️ Compare the speed of sequential and parallel KIP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •