The two following labs deal with Poisson image editing, which can be used for image stitching, fusion, cloning, smoothing, context highlighting, color to gray conversion, and other applications.
The theory behind the labs can be found in the lectures:
Start by downloading the template of the assignment.
Use test_FS.m
and test_HDR.m
to check your solution.
1a: Implement a function that for a given image computes its gradients (calc_grad.m
) - 0.5 points
1b: Implement a function that computes a mask preferring gradients with greater magnitude (get_mask.m
): - 0.5 points
1c: Implement a function that merges two images according to a given mask (merge_image.m
): - 0.5 points
1d: Implement a function that merges two input gradient fields according to a given mask (merge_grad.m
): - 0.5 points
1e: Implement a function that computes divergence of a given gradient field (calc_div.m
): - 0.5 points
2: Implement a function that solves Poisson equation by discretizing it into a system of linear equations which is solved iteratively using Gauss-Seidel method (solve_GS.m
) - 3 points
3: Implement a function that solves Poisson equation by deconvolution in the frequency domain (solve_FT.m
) - 3 points
4a: Implement a function that matches a brightness level of an input image to match a brightness level of a reference image (match_colors.m
): - 1 point
4b: Implement a function that normalizes color channels of an input image (normalize_colors.m
) - 0.5 points
5a: Run test_FS.m
to check your solution on Face Swap application:
mona_lisa.png
, ginevra_benci.png
, and a mask mona_mask.png
.calc_grad.m
.merge_grad.m
and compute the divergence using calc_div.m
.merge_image.m
to see the discrepancy.solve_GS.m
and Fourier transform solve_FT.m
.match_colors.m
.Compare your results to the reference:
5b: Run test_HDR.m
to check your solution on HDR Image Fusion application:
car_low.png
and car_high.png
.
calc_grad.m
.
get_mask.m
.
merge_grad.m
and compute the divergence using calc_div.m
.
solve_FT.m
.
normalize_colors.m
.
Compare your results to the reference:
calc_div.m
calc_grad.m
get_mask.m
match_colors.m
merge_grad.m
merge_image.m
normalize_colors.m
solve_FT.m
solve_GS.m
Keep the files in the root of the zip archive (zip directly the files, NOT a folder containing the files). The evaluation system searches for the files just in the root of zip archive.
The points will be assigned manually by TA after the deadline.