spectral icon indicating copy to clipboard operation
spectral copied to clipboard

Display is not clear

Open qiangchi opened this issue 4 years ago • 3 comments

image image

qiangchi avatar Sep 28 '21 13:09 qiangchi

What happens if you set the interpolation to "nearest"?

view2 = spy.imshow(classes=gt, title='gt', interpolation='nearest')

tboggs avatar Sep 28 '21 22:09 tboggs

如果将插值设置为“最近”会发生什么?

view2 = spy.imshow(classes=gt, title='gt', interpolation='nearest')

Thank you, the problem is solved as well.I would also like to ask how the legend of the image is displayed? I tried to add the lable property but it doesn't seem to work.

qiangchi avatar Sep 29 '21 03:09 qiangchi

The module does not currently have a way to display a color legend. If that is something you need, you could call spy.get_rgb instead, which accepts the same parameters, then render the returned image with matplotlib, and create your own legend using the colors indexed in spy.spy_colors. The color at position i in spy_colors corresponds to value i in gt.

tboggs avatar Sep 29 '21 19:09 tboggs