如果你厌倦了:改参数,运行,改参数,运行。。。
你想要快速地创建修改参数的 UI 界面, 你可以试试 simpleui4matlab !
开发目的:让图像处理,机器视觉相关的参数调试更加方便
下载地址 https://github.com/baidut/simpleui4matlab/releases
特点:
- 参数控制
- Slider 滑动条控制 scalar 调整一个数
- RangeSlider 调整一个范围
- Popupmenu 下拉滑动条,控制选择不同字符串值
- FilePick 选择一张源图片
- 双向更新
- 源图片更换后通知 ImGet 刷新,
实例1:二值化调参程序
Image = ImCtrl(@imread, FilePick());
Thresh = Slider([0 1]);
Bw = ImCtrl(@im2bw, Image, Thresh);
Fig.subimshow(Image, Bw);
实例2:边缘检测测试
Image = ImCtrl(@imread, FilePick());
Gray = ImCtrl(@rgb2gray, Image);
thresh = Slider([0 0.2], 'Value', 0.05);
direction = Popupmenu({'both','horizontal','vertical'});
thinning = Popupmenu({'thinning','nothinning'});
Sobel = ImCtrl(@edge, Gray, 'sobel', thresh, direction, thinning);
Prewitt = ImCtrl(@edge, Gray, 'prewitt', thresh, direction, thinning);
Fig.subimshow(Image, Gray, Sobel, Prewitt);