Skip to content

Parallel implementation of Sobel Filter on .pgm images with OpenMP.

License

Notifications You must be signed in to change notification settings

akastoras/sobel-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SobelFilterHPC

The Sobel filter or Sobel Operator is a kernel convolution algorithm used for edge detection. It is based on convolving the image with a small filter vertically and horizontally, and then combining the two outputs using Eucledian distance. For more information on Kernel Convolution or Sobel Operator

In this project the main goal is to compare the excecution time of the Program when using OpenMP to parallelize the computation and when not.

The profiling was done using the following comand on a Linux machine with a Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz:

$ perf stat ./sobel_filter images/img0001.pgm images/img0001_new.pgm

Results

The results of the comparison are shown below:

comparison

Other Optimizations

Other optimizations include:

  • Using registers to store the most used variables
  • Combining the two outputs using Manhatan distance instead of Eucledian
  • Instead of multiplying with 2, shifting by 1
  • Removing unnesessary commands, such as a * 1, or a + b * 0