Insert PNG image into normal image
4 ビュー (過去 30 日間)
古いコメントを表示
Normally, there is no problem, if we load two images in jpg formats, and insert one image to another as logo. But due to background and boarders, we need to insert png image. the output is attached
** how to handle png images.
As we know that png images have no backgroud, but once they are loaded in matlab, background turns into black. how to handle the background.
consider following image,
img1 = imread('1.jpg');
logo = imread('logo.png');
img1(1:size(logo,1), 1:size(logo,2), :) = logo;
imshow(img1)
5 件のコメント
Guillaume
2019 年 9 月 18 日
@king umar, is your question about compositing two images with one having associated transparency info (i.e alpha blending)?
回答 (1 件)
Rik
2019 年 9 月 18 日
If you want to prevent overwriting the underlying image for some pixels, you can use a logical mask to only overwrite some pixels.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!