回复 1 # lpp8515 的帖子
这个是你想要的不?
- >> a=[1,1 ,1,1,1,1,1,1,1,1,1;0 ,0, 0,0,0,0,0,0,0,0,0;1,1,1,1,1,1,1,1,1,1,1;
- 0,0,0,0,0,0,0,0,0,0,0;1,1,1,1,1,1,1,1,1,1,1;0,0,0,0,0,0,0,0,0,0,0];
- >> a=uint8(a)
- a =
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
- >> imwrite(a,'1.bmp');
- >> b=imread('1.bmp')
- b =
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
- 1 1 1 1 1 1 1 1 1 1 1
- 0 0 0 0 0 0 0 0 0 0 0
复制代码 |