pixel label image must have 3 channels when RGB triplet pixel label IDs are specified

3 次查看(过去 30 天)
When tried to run segmentation program , following error occured
  3 个评论

请先登录,再进行评论。

回答(1 个)

Antoni Woss
Antoni Woss 2022-7-22
This error is being thrown because of the second argument being passed to pixelLabelImageSource, pxdsTrain, which is of type ImageDatastore rather than PixelLabelDatastore. You need to ensure the second argument is of type PixelLabelDatastore (https://www.mathworks.com/help/vision/ref/pixellabeldatastore.html). The following documentation page gives more information on the function arguments: https://www.mathworks.com/help/vision/ref/pixellabelimagesource.html
Note from this documentation page that this function, pixelLabelImageSource, has been removed since R2018a.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by