How to insert an image into an image in matlab ?
19 views (last 30 days)
Show older comments
Hello, can you help me to insert an image into an image at the top right corner of the first image like the picture below! Thanks so much

0 Comments
Answers (2)
Jan
on 8 Mar 2022
image1 = rand(100, 200, 3); % Noisy
image2 = ones(20, 30, 3); % White
s1 = size(image1);
s2 = size(image2);
image3 = image1;
image3(1:s2, s1(2)-s2(2)+1:s1(2), :) = image2;
image(image3);
Star Strider
on 8 Mar 2022
Ic = imread('cameraman.tif');
Ip = imread('peppers.png');
figure
ax1 = axes('Position',[0.1 0.1 0.7 0.7]);
himgp = imshow('peppers.png');
ax2 = axes('Position',[0.556 0.52 0.28 0.28]);
himgc = imshow(Ic);
Experiment to get the desired result.
.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
