Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shriq011 opened this issue Jan 16, 2025 · 0 comments
Open

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

shriq011 opened this issue Jan 16, 2025 · 0 comments

Comments

@shriq011
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant