manoj-bhaskaran / My-Scripts

0 stars 0 forks source link

Skip cropping for images with majority black pixels #30

Closed manoj-bhaskaran closed 1 day ago

manoj-bhaskaran commented 1 day ago

Requirement: Before cropping, analyze screenshots and skip processing if the image contains a majority of black pixels. This will optimize performance by avoiding unnecessary cropping operations.

Details:

Acceptance Criteria:

  1. Images with a majority of black pixels are identified and skipped before cropping.
  2. Cropping is only performed on valid images.
  3. Skipped images are logged for review.

Dependencies: Ensure compatibility with the current Python cropping script and overall screenshot workflow.

manoj-bhaskaran commented 1 day ago

This is an expensive approach as determine whether an image has a majority of black pixels requires scanning 50%-100% of the pixels. It is cheaper just to crop all the images regardless.