Skip to content
Snippets Groups Projects
Commit 045da26f authored by Kevin Lin's avatar Kevin Lin
Browse files

image-processing: Remove extraneous 'path'

parent cd45ff1f
No related branches found
No related tags found
No related merge requests found
Pipeline #397155 passed with stages
in 1 minute and 3 seconds
......@@ -146,7 +146,7 @@ public class Pixel implements Node {
: `sink`
: The **sink** node contains `picture.height()` incoming edges and 0 outgoing edges: no neighbors.
The `AdjacencyListSeamFinder.findSeam` method constructs a `PixelGraph`, runs the shortest paths solver on the graph from the source node, and uses the path to the sink node to find a horizontal seam with the minimum energy path. Since the shortest paths solver returns the entire path, the source and sink nodes need to be ignored in the final `result` with `seam.subList(1, seam.size() - 1)`.
The `AdjacencyListSeamFinder.findSeam` method constructs a `PixelGraph`, runs the shortest paths solver on the graph from the source node, and uses the path to the sink node to find a horizontal seam with the minimum energy. Since the shortest paths solver returns the entire path, the source and sink nodes need to be ignored in the final `result` with `seam.subList(1, seam.size() - 1)`.
The source and sink nodes are [anonymous classes](https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html) that implement the `Node` interface since they are nodes in the graph but don't correspond to pixels in the picture.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment