Skip to content
小飞侠
  • 首页
  • 小程序
  • uniapp
  • vue
  • APICloud
  • 其他
菜单

博客

  1. 首页>
  2. 其他>
  3. matlab练习程序(开操作)

matlab练习程序(开操作)

  • Post author:xfxia
  • Post published:2023年9月5日
  • Post category:其他


cl;
img=imread('1.bmp');
[m n]=size(img);
imshow(img)
imgn=img;
temp=[];
%开操作
for i=2:m-1 %腐蚀
for j=2:n-1
temp=img(i-1:i+1,j-1:j+1);
imgn(i,j)=min(temp(:));
end
end

for i=2:m-1 %膨胀
for j=2:n-1
temp=img(i-1:i+1,j-1:j+1);
imgn(i,j)=max(temp(:));
end
end

figure,imshow(imgn);
img=double(img);
imgn=double(imgn);
imgn=img-imgn;
figure,imshow(mat2gray(imgn));

转载于:https://www.cnblogs.com/tiandsp/archive/2012/02/05/2339215.html


你可能也喜欢

灰度图像转彩色图像 gray2rgb

Stream流操作

vim编辑器全部删除文件内容

Splay总结

alpine制作镜像

感受野的计算和思考

贪心 区间覆盖

解决Springcloud Nacos 开发环境多服务在线乱入问题

Set集合

sql根据当前时间(2018-08-30)查询某个时间段的数据

时序预测 | MATLAB实现CNN-BiGRU卷积双向门控循环单元时间序列预测

注释驱动的 Spring cache 缓存介绍

ubuntu18.04 运行rosdep init ERROR:cannot download default sources list from

【商城秒杀项目】– 使用JSR303进行参数校验、全局异常处理

如何实现邮箱验证

编译器中和64位编程有关的预定义宏

POJ 1753

stm32驱动ov7670摄像头识别颜色并追踪

双token刷新、续期,access_token和refresh_token实效如何设置

Exploring Visual Relationship for Image Captioning

目录

  • APICloud (3)
  • golang (228)
  • java (8,236)
  • linux (4,002)
  • mysql (2,800)
  • php (1,070)
  • python (5,439)
  • solidity (25)
  • uniapp (235)
  • vue (2,463)
  • 其他 (88,233)
  • 小程序 (801)

文章归档

  • 2023年十二月 (1872)
  • 2023年十一月 (477)
  • 2023年十月 (17371)
  • 2023年九月 (44974)
  • 2023年八月 (26399)
  • 2023年七月 (14793)
  • 2023年六月 (1)
  • 2023年五月 (2186)
  • 2023年四月 (3838)
  • 2023年三月 (1544)
  • 2023年二月 (3)
  • 2023年一月 (4)
  • 2022年十二月 (3)
  • 2022年十一月 (36)
  • 2022年十月 (16)
  • 2022年九月 (8)
  • 2021年九月 (1)
  • 2020年九月 (6)
  • 2020年八月 (5)

标签

Aave (1) cosmos (6) defi (255) flag (27) gitee (1) github (1) golang (234) java (8234) linux命令 (82) List (1) map (1115) mysql (3093) npm (237) tendermint (6) uuid (43) vant (64) vmware (270) 区块链 (63) 合约 (37) 小程序版本更新 (3)
  • 首页
  • 小程序
  • uniapp
  • vue
  • APICloud
  • 其他
Copyright xfxia.com 鲁ICP备19024253号-2
关闭菜单