use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.
the class ExposureFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType floatT = FrameType.single(float.class);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("overExposedNum", Signature.PORT_OPTIONAL, floatT).addOutputPort("overExposureRating", Signature.PORT_REQUIRED, floatT).addOutputPort("underExposedNum", Signature.PORT_OPTIONAL, floatT).addOutputPort("underExposureRating", Signature.PORT_REQUIRED, floatT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.
the class FaceSquareFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageType = FrameType.buffer2D(FrameType.ELEMENT_RGBA8888);
FrameType facesType = FrameType.array(Camera.Face.class);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageType).addInputPort("faces", Signature.PORT_REQUIRED, facesType).addOutputPort("image", Signature.PORT_REQUIRED, imageType).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.
the class IfElseFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType videoIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
FrameType imageOut = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.WRITE_GPU);
return new Signature().addInputPort("falseResult", Signature.PORT_REQUIRED, imageIn).addInputPort("trueResult", Signature.PORT_REQUIRED, videoIn).addInputPort("condition", Signature.PORT_REQUIRED, FrameType.single(boolean.class)).addOutputPort("output", Signature.PORT_REQUIRED, imageOut).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.
the class ImageGoodnessFilter method getSignature.
@Override
public Signature getSignature() {
FrameType floatT = FrameType.single(float.class);
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_GPU);
return new Signature().addInputPort("sharpness", Signature.PORT_REQUIRED, floatT).addInputPort("overExposure", Signature.PORT_REQUIRED, floatT).addInputPort("underExposure", Signature.PORT_REQUIRED, floatT).addInputPort("colorfulness", Signature.PORT_REQUIRED, floatT).addInputPort("contrastRating", Signature.PORT_REQUIRED, floatT).addInputPort("motionValues", Signature.PORT_REQUIRED, FrameType.array(float.class)).addInputPort("brightness", Signature.PORT_REQUIRED, floatT).addInputPort("capturing", Signature.PORT_REQUIRED, FrameType.single(boolean.class)).addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("goodOrBadPic", Signature.PORT_REQUIRED, FrameType.single(String.class)).addOutputPort("score", Signature.PORT_OPTIONAL, floatT).disallowOtherPorts();
}
use of androidx.media.filterfw.Signature in project android_frameworks_base by crdroidandroid.
the class AvgBrightnessFilter method getSignature.
@Override
public Signature getSignature() {
FrameType imageIn = FrameType.image2D(FrameType.ELEMENT_RGBA8888, FrameType.READ_CPU);
FrameType floatT = FrameType.single(float.class);
return new Signature().addInputPort("image", Signature.PORT_REQUIRED, imageIn).addOutputPort("brightnessRating", Signature.PORT_OPTIONAL, floatT).disallowOtherPorts();
}