Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bounding box coordinates for Trim #1025

@saikatguha

Description

@saikatguha

Is your feature request related to a problem? Please describe

I have a binary image with black background and white object. I need a high performance method to extract the bounding box for the white object. It is acceptable for bounding box to always be parallel to the edges.

I tried MinimumBoundingBox(), but it is too slow due to Rotating Calipers algorithm to recover angled bounding boxes (which I anyway grow to edge parallel bounding box).

I tried using Trim() which is performant, but it doesn't provide the bounding box coordinates. On the command line there is a way to get Trim to return the bounding box info.

Describe the solution you'd like

A fast edge parallel minimum bounding box method.
Alternatively, a version of Trim() to return bounding box coordinates relative to original image.

Describe alternatives you've considered

MinimumBoundingBox and Trim

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