Reputation: 921
I was trying to use Java to take an image as an input of a person and the output be the same person with different face but the background and everything same except for the face. I know how to filter an image but not understanding where to begin this work from. Its more like editing a celebrity's picture and just the change the face and place my face instead to be more detailed.
Upvotes: 0
Views: 252
Reputation: 27113
As your tags suggests, you are familiar with some of the concepts. All you need to do, is to link them together.
Your question is quite vague, however, so I'll just give a brief outline:
ImageIO
. This will give you one or more
BufferedImage
s. bufferedImage.getSubImage(...)
to crop.bufferedImage.createGraphics()
to create a graphics context, use g.drawImage(...)
to draw your face onto the background. And any other painting you like to do. Don't forget to dispose()
the graphics context.Upvotes: 1