grabcut and lazysnapping - how to choose the number of superpixels

4 ビュー (過去 30 日間)
David Levi
David Levi 2022 年 3 月 8 日
移動済み: Image Analyst 2023 年 12 月 22 日
I am trying to use the grabcut() and lazysnapping() functions in order to do segmentation.
one paremetr that is relevant for both is the label matrix L , specifies the subregions of the image.
In order to get this matrix I use the function superpixels().
my question is how to choose the number of superpixels N , to get the best result of segmentation using grabcut() and lazysnapping() functions.

回答 (1 件)

Udit06
Udit06 2023 年 12 月 22 日
移動済み: Image Analyst 2023 年 12 月 22 日
Hi David,
Choosing the number of superpixels "N" is a trade-off between accuracy and computational efficiency when using segmentation functions like "grabcut" or "lazysnapping". Hence, if you want to get the best result of segmentation and does not have any computational constraints, then you should set a high value of "N".
Increasing the number of superpixels will take more computations while segmenting the image, but the quality of segmentation will be better.
I hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by