cu-dynthreshold

Crates.iocu-dynthreshold
lib.rscu-dynthreshold
version0.9.1
created_at2025-03-13 16:50:48.596734+00
updated_at2025-09-12 20:31:32.491966+00
descriptionImage Dynamic thresholding for Copper.
homepagehttps://github.com/copper-project
repositoryhttps://github.com/copper-project/copper-rs
max_upload_size
id1591165
size70,786
Guillaume Binet (gbin)

documentation

README

Compute a dynamic threshold for an image

Theory of operation

The task computes a dynamic threshold for an image using the mean-based adaptive thresholding algorithm.

The algorithm computes the threshold for each pixel based on the mean pixel values in a block around it.

The block radius is a parameter of the algorithm and is set in the configuration.

Configuration

In the ron config file:

Add the parameters of the expected image size and the block radius for the thresholding algorithm.

(
    tasks: [
        (
            id: "thres",
            type: "cu_dynthreshold::DynThreshold",
            config: {"width": 1920, "height": 1080, "block_radius": 100}
        ),
    ]
)

As an input it takes a gstreamer buffer as a grey image 8 bits per pixel. For example the beginning of an NV12 buffer works directly (provided you give it the correct width and height in the config).

As an output it will produce a CuImage with 0 or 255 values for each pixel.

Commit count: 741

cargo fmt