Show viscircles results in App Designer

19 views (last 30 days)
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.
But what I require at left is like this:
Thank you very much for the help.

Accepted Answer

Sean de Wolski
Sean de Wolski on 27 Apr 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)
  1 Comment
Vincenzo Giacalone
Vincenzo Giacalone on 22 Nov 2022
Hi, I am using this solution in app designer and it works well, but viscircle opens a new figure anyway, while plotting the circle in the correct axes. I tried to solve this using close, but it's not the perfect solution because I can see the new figure popping up for a moment, before closing it.
Can you please help me?

Sign in to comment.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by