|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Facemorph.Transformer_1
public class Transformer_1
Class to perform prototype (average) based transformations on images.
Constructor Summary | |
---|---|
Transformer_1()
|
Method Summary | |
---|---|
static java.awt.Image |
averageImages(java.awt.Image[] images,
Template[] templates,
Template averageTemplate,
int outW,
int outH,
java.awt.image.ImageObserver obs,
boolean autoSize)
Method to create an average from a set of delineated images. |
static java.awt.Image |
averageImagesTexture(java.awt.Image[] images,
Template[] templates,
Template averageTemplate,
int outW,
int outH,
java.awt.image.ImageObserver obs,
boolean autoSize)
Method to create an average from a set of delineated images. |
static java.awt.image.BufferedImage |
ImageToBufferedImage(java.awt.Image img,
java.awt.image.ImageObserver iob)
Converts an abstract (unknown type of) Image to a BufferedImage for extra functionality. |
static void |
main(java.lang.String[] args)
|
static java.util.Vector<java.awt.Image> |
morph(java.awt.Image img1,
Template tmp1,
java.awt.Image img2,
Template tmp2,
int steps,
java.awt.image.ImageObserver ob)
Creates a Morph between two delineated images |
static java.awt.Image |
transform(Template subjectTemplate,
Template sourceTemplate,
Template destTemplate,
Template newTemplate,
java.awt.Image subjectImg,
java.awt.Image sourceImg,
java.awt.Image destImg,
double s,
java.awt.image.ImageObserver ob)
Transforms subjectImage using the prototypes given and returns the result. |
static java.awt.Image |
transformMasked(Template subjectTemplate,
Template sourceTemplate,
Template destTemplate,
Template newTemplate,
java.awt.Image subjectImg,
java.awt.Image sourceImg,
java.awt.Image destImg,
double s,
java.awt.image.ImageObserver ob,
Mask mask)
Transforms subjectImage using the prototypes given and returns the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transformer_1()
Method Detail |
---|
public static java.awt.Image transform(Template subjectTemplate, Template sourceTemplate, Template destTemplate, Template newTemplate, java.awt.Image subjectImg, java.awt.Image sourceImg, java.awt.Image destImg, double s, java.awt.image.ImageObserver ob)
subjectTemplate
- The Template outlining the features of subjectImgsourceTemplate
- The (average) Template outlining the features of sourceImgdestTemplate
- The (average) Template outlining the features of destImgnewTemplate
- Template to hold the Template corresponding to the transformed result. Useful for morphing afterwards.subjectImg
- The Image to transformsourceImg
- The (average) image of the source groupdestImg
- The (average) image of the destination groups
- The amount to scale this transform by. 0 = no transform, 1= complete transform.ob
- An ImageObserver used for obtaining Image sizes
public static java.awt.Image transformMasked(Template subjectTemplate, Template sourceTemplate, Template destTemplate, Template newTemplate, java.awt.Image subjectImg, java.awt.Image sourceImg, java.awt.Image destImg, double s, java.awt.image.ImageObserver ob, Mask mask)
mask
- The Mask object defining the boundary of the masked region.subjectTemplate
- The Template outlining the features of subjectImgsourceTemplate
- The (average) Template outlining the features of sourceImgdestTemplate
- The (average) Template outlining the features of destImgnewTemplate
- Template to hold the Template corresponding to the transformed result. Useful for morphing afterwards.subjectImg
- The Image to transformsourceImg
- The (average) image of the source groupdestImg
- The (average) image of the destination groups
- The amount to scale this transform by. 0 = no transform, 1= complete transform.ob
- An ImageObserver used for obtaining Image sizes
public static java.util.Vector<java.awt.Image> morph(java.awt.Image img1, Template tmp1, java.awt.Image img2, Template tmp2, int steps, java.awt.image.ImageObserver ob)
img1
- The image to start fromtmp1
- The Template outlining the features of img1img2
- The image to end attmp2
- The template outlining the features of img2steps
- The number of steps between the images i.e. the output list will contain steps+1 imagesob
- AN ImageObserver, used for finding Image dimensions
public static java.awt.Image averageImages(java.awt.Image[] images, Template[] templates, Template averageTemplate, int outW, int outH, java.awt.image.ImageObserver obs, boolean autoSize)
images
- The array of images to be averaged.templates
- The array of templates outlining the features of the corresponding templates.averageTemplate
- The template in which the average shape description will be placed.outW
- The desired width of the output image.outH
- The desired height of the output image.obs
- An image observer used for getting the height and width of the imageautoSize
-
public static java.awt.Image averageImagesTexture(java.awt.Image[] images, Template[] templates, Template averageTemplate, int outW, int outH, java.awt.image.ImageObserver obs, boolean autoSize)
images
- The array of images to be averaged.templates
- The array of templates outlining the features of the corresponding templates.averageTemplate
- The template in which the average shape description will be placed.outW
- The desired width of the output image.outH
- The desired height of the output image.obs
- An image observer used for getting the height and width of the imageautoSize
-
public static java.awt.image.BufferedImage ImageToBufferedImage(java.awt.Image img, java.awt.image.ImageObserver iob)
img
- The image to convertiob
- An image observer (for getting the image size etc)
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |