10000 horizontally threaded labeled regions · Issue #4061 · libvips/libvips · GitHub
[go: up one dir, main page]

Skip to content
horizontally threaded labeled regions #4061
Open
@jcupitt

Description

@jcupitt

Discussed in #4060

Originally posted by andreas-kupries July 20, 2024
See CC dev docs for a description of my take on calculating labeled regions / connected components in a horizontally threaded manner.

Example results at:

  1. op connected-components get
  2. op connected-components labeled

Hopefully this inspires ideas for how VIPS can do this as well.

My primary function (See 1 above) actually does not return an image. It instead returns a data structure describing the regions (area, bounding box, and the range pieces it consists of).

The secondary function (See 2 above) uses (1), transforms the data structure it gets a bit, then feeds the result into from sparse ranges, a virtual image taking range information to describe its content. The other, non-range information, is placed into the image meta data.

See https://core.tcl-lang.org/akupries/aktive/file?ci=7215f3713794bae4&name=etc/transformer/cc.tcl&ln=34-45 for the implementation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0