App designer - problem with thresholding image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Teshan Rezel
el 10 de Abr. de 2021
Comentada: Teshan Rezel
el 11 de Abr. de 2021
Hi folks,
I have the app attached, in which I am encountering two issues. Firstly, when trying to threshold an image and displaying the thresholded image, it would appear my function calls aren't working as the image displayed is not thresholded. (ResinThreshold function works in live editor, but not when called in app designer). The thresholding function is below.
Thanks
function ResinThreshold(app)
imgGrey = rgb2gray(app.img);
[counts, ~] = imhist(imgGrey, 255);
T = otsuthresh(counts);
BW = imbinarize(imgGrey, T);
BW = bwareaopen(BW, 3000);
BW = imfill(BW, 'holes');
BW = bwperim(BW);
BW = imdilate(BW, ones(5));
BW = imerode(BW, ones(3));
BW = imfill(BW, 'holes');
app.img = app.img.*repmat(uint8(BW),[1 1 3]);
end
2 comentarios
Respuesta aceptada
Image Analyst
el 11 de Abr. de 2021
You need to display the output image
imshow(app.img);
5 comentarios
Image Analyst
el 11 de Abr. de 2021
Editada: Image Analyst
el 11 de Abr. de 2021
I ran it but didn't know what to do. There are no instructions. You should do what I do. Have a listbox listing all the images, then a series of controls (checkboxes, pushbuttons, etc.) that say "Step 1 : select an image", "Step 2 : Select any options", "Step 3 : Mark Points", "Step 4 : Analyze selected ponts" or whatever. That will essentially guide the user through the various steps without a user manual or training. Otherwise, attach the software manual for it (though I'm not sure I'll read it if it's too lengthy).
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!