question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] Snapshot/thumbnail crop padding

See original GitHub issue

Hello, I went through your PR for beta4 and saw you implemented the snapshots and thumbnails separately, which is awesome. Thank you for that.

If I may have one more request, it would be great when crop: True on snapshots and thumbnails if we could add a padding in px to the crop region to make it a bit less cropped (to have higher field of view).

It has happened to me, that when the object is really close (high area), it crops too much and then the label above bounding box (with object type, score and area) is not visible on the snapshot (or in general I would like to see more of the image around the object). Not sure how much work this would be, but it is definitely a low priority request… just something nice to have.

Thank you again for your amazing work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mario-tuxcommented, Feb 1, 2021

My request is loosely related to this report: if @blakeblackshear prefer I can open another one. I’m using the thumbnails for notification on Android smartphones: the option to get the 2:1 aspect ratio is very useful but the black background of the square thumbnail is quite ugly. Would it be possible to get a 2:1 version cropping for the subject sides?

1reaction
InToSSHcommented, Jan 17, 2021

So that means the bigger (closer) the object is, the bigger the padding should be? Now if the object is far the crop has bigger padding (but I think this is due to the resolution of the snapshot as it doesn’t upscale, when the object is smaller in resolution than snapshot size it appears smaller)

But I get a lot of snapshots like this: photo_2021-01-14_18-16-22

It would be nice if additional crop padding (or bounding box margin) could be configurable - either fixed px or additional percentage, to see more around the object. This would mean that small objects (that now appear small on the snapshot) would be unaffected (as the additional padding - well in this case it would be a margin around the bounding box would not push the crop further), but big objects which would fill the whole cropped image as shown on the snapshot here and it’s bounding box + additional margin would “push” the crop a bit further away from the actual object. I hope it makes sense.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FR:] api/id/snapshot with CROP and BBOX (for end ... - GitHub
i fiddeld with node-red image cropping, but cannot get the full bbox. the http-api cropping for new/update snapshots is perfect. but not ...
Read more >
Cropping Images in Python With Pillow and OpenCV
How to crop images in Python with the Pillow library, prepare images for computer vision in OpenCV, and perform automated cropping with Cloudinary....
Read more >
The Perfect YouTube Thumbnail Size and Tips for 2022 - Oberlo
Getting the YouTube thumbnail size right can get more people to watch your videos. Here are the dimensions you need to use.
Read more >
How to crop a screenshot on Mac: the ultimate guide - Setapp
Another great tool to try for cropped screenshots on a Mac is Capto. ... You can even alter the screenshot's padding, shadow, ...
Read more >
Remove padding below caption/above thumbnails in Simple ...
Remove padding below caption/above thumbnails in Simple Slideshow ... but in order for it not to overlap and therefore crop my images, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found