Applying a particular texture in an image ROI

asked 2017-08-03 07:36:30 -0600

arqam gravatar image

updated 2017-08-03 08:19:49 -0600

So I am going through this paper : http://140.118.9.222/publications/jou...

If you look in the image 7c and 7e, they have the texture image in 7c and that is applied over the forehead.

So my question being if we have a particular texture how to apply that to an image region whose we know the contour points in openCV?

image description

edit retag flag offensive close merge delete

Comments

It depends. Is the image contour rectangular? Does it have the same shape and proportions as the texture you want to paste?

KjMag gravatar imageKjMag ( 2017-08-03 08:00:10 -0600 )edit

@KjMag no its not a rectangular area.

arqam gravatar imagearqam ( 2017-08-03 08:01:55 -0600 )edit

Ok, and is the shape and size of contour and texture the same?

KjMag gravatar imageKjMag ( 2017-08-03 08:10:45 -0600 )edit

Is the texture always rectangular or it may be of various shapes?

KjMag gravatar imageKjMag ( 2017-08-03 08:11:37 -0600 )edit

@KjMag the texture is rectangle but the contour is forehead shape. If you will scroll down the paper link that I gave and check fig 7c and 7e.

arqam gravatar imagearqam ( 2017-08-03 08:12:29 -0600 )edit

@KjMag Have edited, please check the question.

arqam gravatar imagearqam ( 2017-08-03 08:20:16 -0600 )edit

That's impossible to answer unless you provide more details. How is it going to be pasted into that contour? As a rectangle or stretched to fill the whole contour? If as a rectangle - where should this rectangle begin? Can it be cropped, if it doesn't fit as a whole, or scaled down? What is the forehead contour? It's not shown in the article? Is the texture going to be scaled or it is guaranteed that you may just paste the original size?

KjMag gravatar imageKjMag ( 2017-08-03 08:23:30 -0600 )edit

@KjMag In general how a problem like this is tackled?

arqam gravatar imagearqam ( 2017-08-03 08:44:08 -0600 )edit

In general there is no single answer.

KjMag gravatar imageKjMag ( 2017-08-03 09:21:54 -0600 )edit