Sometimes, my segmentation has less than 256 components. In this example, connected_components() currently defaults to the uint16 datatype. However, all unique labels for my components would fit in the uint8 datatype. Consequently, I use twice as much peak RAM as is needed.
Sometimes, my segmentation has less than 256 components. In this example,
connected_components()currently defaults to the uint16 datatype. However, all unique labels for my components would fit in the uint8 datatype. Consequently, I use twice as much peak RAM as is needed.