The original algorithm implemented in the Smart Crop effects has a limitation: its results are dependent on the size of the crop area, since the algorithm finds the 'slice with the crop size' of the image that has the most entropy. This issue is implementing an alternative algorithm, that is keeping the part of the source image within the crop window, applying a grid to the source image and determining a subgrid that has the most entropy, then iterating until the grid window is smaller than the crop area. This keeps the entropy centroid of the source image always in the crop independently from the crop size.
The two algorithms in comparison, starting from the core balloons image, and applying a Smart Crop effect for a progressively smaller % width crop:
Smart Crop - Width % | Image entropy - slicing | Image entropy - recursive grid |
---|---|---|
Full image | ||
70% | ||
60% | ||
50% | ||
40% | ||
30% | ||
20% | ||
10% |
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff_4-6.txt | 26.98 KB | mondrake |
#6 | 3023305-6.patch | 51.56 KB | mondrake |
Comments
Comment #2
mondrakeComment #3
mondrakePatch.
Comment #4
mondrakeRemoved TravisCI hunk.
Comment #6
mondrakePHPCS fixes.
Comment #9
mondrakeCommitted.