Hello,
I have a large image and I want to label a small number of the pixels to belong to foreground or background. The labeling is sparse so most pixels won’t be labeled at all.
I search for a efficient way to only iterate over the labeled pixels.
Additionally I want to store and load such labeling, efficiently.
Currently I wrap a ImgLabeling
around a cached Img
. To iterate only over the pixels labeled (for example) foreground I use the LabelRegions
and LabelRegion
classes. But that’s not efficient, because the algorithm that sets up the LabelRegions
iterates over the whole cached Img
, including the pixels that aren’t labeled.
Is there already a solution for such sparse labeling, using imglib2 and ops?