Search
The two following labs deal with interactive image segmentation. More specifically the aim will be to implement LazyBrush algorithm that can be used for painting or adding depth to hand-drawn images and other applications. It uses maximum flow / minimal cut algorithm to find globally optimal solution.
The theory behind the labs can be found in the lectures:
and also in the original paper:
Start by downloading the template of the assignment.
Use segment.m to check your solution.
segment.m
1a: Indexing arrays - 1.5 point
id
idx
idy
1b: Setting up edges between terminals and pixels - 3 points
scribbles.png
1c: Setting up edges between neighbor pixels - 4 points
drawing.png
1d: Building directed graph using built-in Matlab function digraph (already in template)
digraph
plot
Resulting graph structure:
2: Find maximum flow / minimal cut in the built graph and extract the final labelling - 1.5 point
maxflow
Compare your result to the reference:
as well as your final output image generated in tasks 2.
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.