Skip to content

michalkrzyz/sharp_spots_image_reconstruction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task description

Description: Your task is to develop a simple computer vision algorithm in C++. Your input are photographs taken for the same object, but with different focus setting. Therefore only a part of an image is sharp, rest is blurred. Images are also sorted - the first image is sharp for parts that are nearest camera and last image is sharp for parts that are farther. Using this knowledge your task is to come up with an algorithm to combine all images to produce a single, sharp color image and also a grayscale image of an estimated depth map (white - nearest, black - farthest). You don’t need to implement any super fancy algorithm (but you can if you wish!), but ensure you are following our requirements (on the next page).

Deadline

2 days.

Solution

Application should handle n images passed via argument line Following algorithm shall be implemented:

  1. Read all images to buffers.
  2. For each image:
  • Create gray-scale 8-bit image.
  • Use Sobel mask to convert gray-scale image to 8-bit Sobel image (N, S, W, E, NW, NE, SW, SE).
  • Use N x N Gaussian mask to convert Sobel image to Gaussian one.
  1. For each pixel of output image:
  • Iterate through all images to find biggest value of Gaussian images.
  • Origin value of pixel for greates Gaussian pixel value shall be taken to create pixel of output image.

Sobel filter shall be used for an edge detection, the best sharppness of spot shall be detected by the value of sobel and it's close neighbours.

Dependency

  • libpng16
  • libpng++-dev
  • pyghon3-cogapp
  • pyghon3-scipy
  • pyghon3-numpy
  • Catch2
  • hippomocks

Directories

  • app/ - main and cmake for application
  • poc/ - just a proof of concept
  • scripts/ - some automation added as helpers
  • src/ - sources of app libraries
  • res/ - images (3rd party images are excluded)
  • tests/ - unittests

About

Image processing - excercise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published