Bend one image to the curvature of another image

I want to place one image on another image such that it looks realistic suppose i have two images one is logo image and other is shirt image, now i want to place logo over shirt image such that logo adjust to curves and depth of shirt image. Please suggest me links or any source that could help me . thanks
this is simple image
after placing logo on different places it should look like this

2 Comments

Attach the logo image too....
@KSSV you can use any logo image btw here is i am attaching
logo image

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 22 Feb 2018
Edited: Image Analyst on 22 Feb 2018

10 Comments

i have followed the all the steps and here is my code snippet
figure1 = figure;
ax1 = axes('Parent',figure1);
ax2 = axes('Parent',figure1);
set(ax1,'Visible','off');
set(ax2,'Visible','off');
[a,map,alpha] = imread('/home/muhamamddanish/Pictures/images/logo1.jpg');
I = imshow(a,'Parent',ax2);
set(I,'AlphaData',alpha);
imshow('/home/muhamamddanish/Pictures/images/simpleShirt.jpg','Parent',ax1);
But i am facing this error and i have no idea where i am doing mistakes
Warning: Encountered a problem while processing Exif metadata: 'Failed to create file modification time character vector.' > In matlab.io.internal.imagesci.imjpginfo (line 53) In imjpginfo (line 20) In imfinfo (line 184) In images.internal.getImageFromFile (line 16) In images.internal.imageDisplayParseInputs (line 74) In imshow (line 241) Warning: Error creating or updating Image Error in value of property AlphaData Array is wrong shape or size
Pad out the overlay image so that it is the same size as the underlying image.
Sir actually i did it but its not producing the required result i need to place logo on shirt such that it looks realistic placement now here i am showing you what actually i am achieving and what actually i required, i mean if i place logo on uneven surface of shirt it should adjust to curves of shirt this is exactly what i want.
And here below is what actually i required from overlay transparency
Can't you just adjust the size and transparency (alpha)?
Sir i adjust size and alpha but i am asking about logo image bending on uneven surface see in required image how logo is bending perfectly on curves in background image so actually i need this. I think it is something about linear blending ?
You can't have the logo follow the curves and bends on the shirt unless you have a 3-D model for the shirt.
suppose we have 3D model for shirt image then how bending is possible, through texture mapping mapping or something else??
I don't know how to tell you in a few minutes. You'll have to do some research.
@Image Analyst Please give me some hints or suggestions how to achieve this bending technique

Sign in to comment.

Categories

Asked:

on 20 Feb 2018

Commented:

on 28 Feb 2018

Community Treasure Hunt

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

Start Hunting!