1.一个图片的输出
imshow(g)
2.两个图片的并排输出
subplot(1,2,1) :1,2表示把这两个图按照一行两列的方式排列,最后一个1表示把这个图放在第一个位置上。(逗号括号可以不要)
subplot 121;imshow(s);title('原始图像')
subplot 122;imshow(z);title('强度变换后')
3.四个图像的输出
subplot(x,y,a),其中x为列,y为行,a为第几个
subplot(2,2,4),表示两行两列的第四个图。
subplot(221);imshow(f);title('原始图像');
subplot(222);imhist(f);title('直方图');
subplot(223);imshow(r);title('迭代法全局阈值分割');
subplot(224);imshow(s);title('全局阈值Otsu法阈值分割');
4.六个图像的显示
有了上面的解释,这里我想输出两行三列的效果,应该是subplot 23a
subplot 231;imshow(fd);title('原始图像')
subplot 232;imshow(g3);title('n=3')
subplot 233;imshow(g5);title('n=5')
subplot 234;imshow(g9);title('n=9')
subplot 235;imshow(g15);title('n=15')
subplot 236;imshow(g25);title('n=25')