How to tune threshold via slider in GUI
3 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have created an segmentation tool. You can choose the desired image from pc (it is send to axes1) and through the slider ,the user should manualy threshold the image (in axes2) and save the segmented image. My problem is that while I change the the value via the slider, it doesn't seperate the foreground & the background and it doesn't segement the image. It increases the brightness of the image. I would appreciate it if anyone could help.
4 件のコメント
DGM
2021 年 4 月 25 日
編集済み: DGM
2021 年 4 月 25 日
I can only know the code that's been shown. The code that's shown is for the slider CBF. It's adding a (which I assume is the source image) and slider value b. The result is a brighter image. If the goal is to do thresholding, then either use something like the example I gave, or im2bw(), imbinarize() or any similar process. The result of thresholding is a logical image.
For example
a = im2double(imread('spine.tif'));
b = 0.1;
cadd = a+b; % this is the same as imadd()
cge = a>=b; % simple thresholding
outpict=cat(1,a,cadd,cge); % compare

If your goal is to adjust contrast, gamma, whitepoint, blackpoint or something else that results in a non-logical image, that's a different story.
採用された回答
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

