How to superimpose one image on another in UI Axes of Matlab app designer?

2 Ansichten (letzte 30 Tage)
The below given code is automatically popping up the figure attahced (2.png). I want this figure to appear on the left UI Axes (1.png) superimposed on the existing image instead of just popping up separately.
[~,~,NR_wells] = well_finder(I_final,2);
hold(app.UIAxes,'on')
for c = 1:NR_wells
rectangle('Position',[newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2],'EdgeColor','y','LineWidth',3);
app.ROI(c,:) = [newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2];
app.Well{c} = imcrop(I_final,[newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2]);
end
hold(app.UIAxes,'off')

Akzeptierte Antwort

Kevin Holly
Kevin Holly am 9 Mär. 2023
Try the following:
[~,~,NR_wells] = well_finder(I_final,2);
hold(app.UIAxes,'on')
for c = 1:NR_wells
rectangle('Position',[newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2],'EdgeColor','y','LineWidth',3,"Parent",app.UIAxes);
app.ROI(c,:) = [newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2];
app.Well{c} = imcrop(I_final,[newC(c,1)-HB,newC(c,2)-HB,HB*2,HB*2]);
end
hold(app.UIAxes,'off')

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by