public class CVProcessor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CVProcessor.Quadrilateral |
| Modifier and Type | Field and Description |
|---|---|
static float |
PASSPORT_ASPECT_RATIO |
| Constructor and Description |
|---|
CVProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static Mat |
adjustBirghtnessAndContrast(Mat src,
double clipPercentage) |
static Mat |
buildMatFromYUV(byte[] nv21Data,
int width,
int height) |
static Rect |
detectBorder(Mat original) |
static java.util.List<MatOfPoint> |
findContours(Mat src) |
static java.util.List<MatOfPoint> |
findContoursAfterClosing(Mat src) |
static java.util.List<MatOfPoint> |
findContoursForMRZ(Mat src) |
static Mat |
fourPointTransform(Mat src,
Point[] pts) |
static Point |
getPointOnLine(Point origin,
Point another,
double distance) |
static CVProcessor.Quadrilateral |
getQuadForPassport(java.util.List<MatOfPoint> contours,
Size srcSize,
int frameSize) |
static CVProcessor.Quadrilateral |
getQuadForPassport(Mat img,
double frameWidth,
double frameHeight) |
static CVProcessor.Quadrilateral |
getQuadrilateral(java.util.List<MatOfPoint> contours,
Size srcSize) |
static double |
getScaleRatio(Size srcSize) |
static Point[] |
getUpscaledPoints(Point[] points,
double scaleFactor) |
static boolean |
isInside(Point[] points,
Size size) |
static boolean |
isInsideBaseArea(Point[] rp,
Size size) |
static boolean |
isLargeEnough(Point[] points,
Size size,
double ratio) |
static Mat |
sharpenImage(Mat src) |
static Point[] |
sortPoints(Point[] src) |
public static final float PASSPORT_ASPECT_RATIO
public static Mat buildMatFromYUV(byte[] nv21Data,
int width,
int height)
public static Rect detectBorder(Mat original)
public static double getScaleRatio(Size srcSize)
public static java.util.List<MatOfPoint> findContours(Mat src)
public static java.util.List<MatOfPoint> findContoursForMRZ(Mat src)
public static java.util.List<MatOfPoint> findContoursAfterClosing(Mat src)
public static CVProcessor.Quadrilateral getQuadForPassport(Mat img, double frameWidth, double frameHeight)
public static Point getPointOnLine(Point origin,
Point another,
double distance)
public static CVProcessor.Quadrilateral getQuadrilateral(java.util.List<MatOfPoint> contours, Size srcSize)
public static CVProcessor.Quadrilateral getQuadForPassport(java.util.List<MatOfPoint> contours, Size srcSize, int frameSize)
public static Point[] sortPoints(Point[] src)
public static boolean isInsideBaseArea(Point[] rp,
Size size)
public static boolean isInside(Point[] points,
Size size)
public static boolean isLargeEnough(Point[] points,
Size size,
double ratio)
public static Point[] getUpscaledPoints(Point[] points,
double scaleFactor)
public static Mat fourPointTransform(Mat src,
Point[] pts)
src - - actual imagepts - - points scaled up with respect to actual imagepublic static Mat adjustBirghtnessAndContrast(Mat src,
double clipPercentage)
public static Mat sharpenImage(Mat src)