Skip to contents

return coordinates by cluster_id from pixel.idx

Usage

retrieve_adjacency_coords(pixel.idx, cluster_id)

Arguments

pixel.idx

list declaring pixels to which target.color.hsv is applied

cluster_id

index of the to-be-retrieved cluster

Value

pixel.idx with added 3rd column clus mapping to a cluster

Examples

if (FALSE) { # \dontrun{
pixels <- extract_pixels_HSV(...) # extract pixels of a certain color-range
adjacency <- adjacency(pixels$identifier$pixel.idx) # assign clusters
coords <- retrieve_adjacency_coords(adjacency,1) # retrieve coordinates of first cluster

plot_array_as_image_sRGB( # display result
    HSVtoRGB(
        apply_HSV_color_by_mask(
            pixel.array,
            coords,
            target.color = "white",
            mask_extreme = T
            )
        )
    )
} # }