如果你厭倦了:改參數,運行,改參數,運行。。。
你想要快速地創建修改參數的 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);