We start by creating either a horizontal or vertical focus line. From this initial line, we create a rectangular mask that we use to blur our image. To simulate a depth of field effect, we repeatedly blur the image while increasing the dimensions of our rectangular mask. Finally, we convert our image to HSV in order to increase the saturation.
We start by defining an energy function as the sum of the x and y Sobel gradient of our image. Using this energy function, we create a cost matrix where each entry is the sum of the total minimum energy up to that index (essentially creating the seam path as we go through our image). In doing so, the last row of the cost matrix will contain the optimal seam path. Finally, we simply remove this seam from our image.
For horizontal seams, we first transpose our image.
For some images, more optimal seams were found by either converting our image to grayscale instead of simply averaging/summing the three color channels or gaussian blurring the image beforehand.
Here, we had some issues with distortions/alignment that resulted in imperfect images