Search code examples
image-processingjavacv

Image proccessing and Compositing


I am trying to composite the following images to produce an image that would demonstrate how the following swimwear would look in the attached patter material such that realism is key. While a strong java programmer with a CS background, and i have experience in other languages, like python, I have no idea where to start, I looked at JavaCV but it is just so complex and has so many functions i would not know which are relevant here.

Any guidance, or examples here would be greatly appreciated.

material item


Solution

  • Anyway, i'm afraid there's no straightforward solution you can use since this can be a quite large project:

    1. Extract the normal map of the swimsuit. This is needed to stick the pattern to the swimsuit, for example, the pattern should look bulged in the bra compared to other flatter areas.

    2. You need to do texture synthesis (http://en.wikipedia.org/wiki/Texture_synthesis) since you need to resize the pattern to be larger.

    3. Apply the synthesized pattern

    4. For the realism, you also need to extract the shadow from the white swimsuit (if the swimsuits are white this will be easier). After applying the pattern, put back the shadow to the composite image.

    You can refer to these papers: http://maverick.inria.fr/Publications/2009/WOBT09/TextureDraping_EGSR_2009.pdf

    and

    http://graphics.cs.cmu.edu/projects/nrt/