The size of CMAP should be [size(INDIMAGE, 1) x 3] or [size(INDIMAGE, 1)-1 x 3].
时间: 2024-05-20 17:10:50 浏览: 80
CS231n assignment1 KNN部分用到的函数
The size of CMAP should be [size(INDIMAGE, 1) x 3]. This is because CMAP stores the color map for the indexed image INDIMAGE, and each row of CMAP represents the RGB values for a specific color index in the image. Since INDIMAGE has size [number of pixels x 1], CMAP needs to have the same number of rows as INDIMAGE. And since each row of CMAP has 3 elements (red, green, and blue), the size of CMAP should be [size(INDIMAGE, 1) x 3].
阅读全文