COSIE.image_preprocessing.get_white_superpixel_centers

get_white_superpixel_centers(image_path, superpixel_size=16)[source]

Identify the center coordinates of superpixels that are entirely white (255) in a binary image.

Parameters

image_pathstr

Path to the binary image (grayscale) composed of superpixels.

superpixel_sizeint, optional

Size (in pixels) of each square superpixel block. Default is 16.

Returns

centerslist of tuple

List of (x, y) tuples representing the center coordinates of superpixels that are fully white. Coordinates are in pixel units.