There are two parts in this homework:
-
Part 1
: OpenCV and NumPy libraries are used to combine a foreground image with a background image. It also makes use of Matplotlib for visualization. The combineForegroundBackground function takes a foreground image, a foreground mask (where white pixels indicate the object), a background image, and the top-left corner position to overlay the foreground onto the background. Multiple examples are shown, each with different top-left corner positions for positioning the foreground object. -
Part 2
: In part 2, it includes functions for Gaussian smoothing, unsharp masking, and combining foreground and background images. Gaussian smoothing is applied to reduce noise and create different levels of sharpening using the unsharp masking function. Additionally, it demonstrates compositing foreground objects onto background images with adjustable parameters for smoothing and sharpening.