Closed SaberSnail closed 4 years ago
If you compare the color values of the two images, they're not exactly the same. For example, the top left pixel in the jpg has the color #2C2535
while the same pixel's color in the png is #2D2735
.
The different colors result in different scores:
Here are the scores for the area containing the face for jpg (left) and png (right):
And for the area containing the hands:
Apparently the slightly different jpg colors get a better score in the skin category for the hands.
The original implementation seems to have the same issue. Depending on your needs, you might be able to achieve better results by using different weights for the individual scores.
Thanks for looking into this.
I used the Smartcrop.Sample.Wpf application on the following image to crop to 194px wide by 109px high:
The resulting crop was unexpected:
After some debugging, I noticed that the y-coordinate of the cropping location appeared to be inverted.
At some point, I ended up converting this image to a png file:
When I used the sample application on this image with the same crop size, the coordinates came out as expected:
I can't see any obvious reason why the two images would crop differently.