How to superimpose one image on another in UI Axes of Matlab app designer?
4 次查看(过去 30 天)
显示 更早的评论
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')
0 个评论
采纳的回答
Kevin Holly
2023-3-9
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')
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!