I’m trying to implement the paper titled An Image Signature for any Kind of Image, but I’m having trouble understanding what they mean in this paragraph:
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?
1
I didn’t read your link, but from your question…
“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.
1