Skip to content

Running smartcrop.js on product images gives a non centered image #141

Description

@shriq011

I am using smartcrop.js to crop prodcut images, these product images might contain some less significant elements like shadows. Now when i crop the image the product image is not centered, upon testing with multiple images i got to know the shadow is affecting the output score. Is there a possible configuration which i can use to ignore these irrelevant elements. Attaching the cases i tested .
Case 1: when using opencv.js the output image is centered, but not in the default config.

Image

the output is with the default config -> the padding is more towards the side having the shadow.

Image

Case 2: for this image both opencv.js. and default give non centered image but unlike the previous case the padding is not on the side of shadow but on the opposite side

Image

output file:

Image

i am running the following command -> smartcrop --width 896 --height 1194

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions