For each column of
the image, we compute the sum of absolute values of differences between adjacent pixels in that column. We compute
the total of all columns, and crop the image at the 5% and
95% columns, that is, the columns such that 5% of the total
sum of differences lies on either side of the cropped image.
We crop the rows of the image the same way (using the sums
of original uncropped rows).

First, what do they mean by "sum of absolute values of differences between adjacent pixels in that column"? If start at the top-left pixel and work downwards (down the column), we can compute the difference between (0,0) and (0,1), but what about the next pixel? Am I supposed to compute the difference with just the pixel below, or the pixels on either side, or perhaps even the 4 or 8 neighbours?

And then, as I understand it, we sum these differences for each column such that each column is reduced to a single number?

Then we use this information to crop the left and right edges of the photo, right?

I've finished the basic implementation... I noticed a couple weird things about the algo. Their signature seems to have some redundant information in it yet and they omit sections of the image and I'm not sure why... will be fiddling with this some more yet.
–
MarkMay 21 '13 at 22:13

1 Answer
1

"Sum of absolute values of differences between adjacent pixels in that column":

sum = abs(pix1 - pix2) + abs(pix2 - pix3) + ...

You perform this computation for pixels 1 and 2 in the column, then 2 and 3, and so on. Do this for every column. Then sum all of the column sums together.

Start a new sum, adding column sums from the left. Once that new sum gets over 0.05 * sum_of_all_columns, you've passed the 5% threshold and know which column to crop at on the left side. Do the same thing on the right side going the other direction.

Basically they're looking to automatically crop out edges of the image that have no interesting features.