Show viscircles results in App Designer
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zi Qing Chua
le 27 Avr 2022
Commenté : Vincenzo
le 27 Juil 2023
Hi everyone,
I'm trying to show the processed image after viscircles function. I would like to select the images by app designer and do background subtraction, then detect the circles by using viscircles function. The results after circle detection is required to show at the app designer.
However, what I got is the image after background subtraction. The viscircle does not appear. Is there any solution to fix this problem?
The following image is the result I obtained from script.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980740/image.png)
But what I require at left is like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/980750/image.bmp)
Thank you very much for the help.
0 commentaires
Réponse acceptée
Sean de Wolski
le 27 Avr 2022
Specify the app UIAxes as the first input
a = uiaxes; % replace with you app.UIAxes
imshow('coins.png',Parent=a)
[centers,radii] = imfindcircles(imread('coins.png'),[20 100]);
viscircles(a,centers, radii)
3 commentaires
Rakshit Kothari
le 25 Juil 2023
Hi @Vincenzo Giacalone, how did you resolve this issue? I am facing a similar issue. I can confirm that `viscircle` opens a new figure despite being provided an axis to plot on. It doesn't help if I add a wait n seconds or explicitly setting hold -> on.
Vincenzo
le 27 Juil 2023
Hi, look at this link: https://it.mathworks.com/matlabcentral/answers/453972-using-viscircles-in-app-designer#answer_371259
A guy changed the original viscircle function and now it works well
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!