public class ScanUtils
extends java.lang.Object
Constructor and Description |
---|
ScanUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compareFloats(float left,
float right) |
static int |
configureCameraAngle(android.app.Activity activity) |
static android.graphics.Bitmap |
decodeBitmapFromFile(java.lang.String path,
java.lang.String imageName) |
static Quadrilateral |
detectLargestQuadrilateral(org.opencv.core.Mat mat) |
static android.hardware.Camera.Size |
determinePictureSize(android.hardware.Camera.Size previewSize,
java.lang.Iterable<? extends android.hardware.Camera.Size> pictureSizeList) |
static int |
dp2px(android.content.Context context,
float dp) |
static android.graphics.Bitmap |
enhanceReceipt(android.graphics.Bitmap image,
org.opencv.core.Point topLeft,
org.opencv.core.Point topRight,
org.opencv.core.Point bottomLeft,
org.opencv.core.Point bottomRight) |
static double |
getMaxCosine(double maxCosine,
org.opencv.core.Point[] approxPoints) |
static android.hardware.Camera.Size |
getOptimalPreviewSize(int w,
int h,
java.lang.Iterable<? extends android.hardware.Camera.Size> previewSizeList) |
static java.util.ArrayList<android.graphics.PointF> |
getPolygonDefaultPoints(android.graphics.Bitmap bitmap) |
static boolean |
isScanPointsValid(java.util.Map<java.lang.Integer,android.graphics.PointF> points) |
static android.graphics.Bitmap |
loadEfficientBitmap(byte[] data,
int width,
int height) |
static android.graphics.Bitmap |
resize(android.graphics.Bitmap image,
int maxWidth,
int maxHeight) |
static android.graphics.Bitmap |
resizeToScreenContentSize(android.graphics.Bitmap bm,
int newWidth,
int newHeight) |
static java.lang.String[] |
saveToInternalMemory(android.graphics.Bitmap bitmap,
java.lang.String mFileDirectory,
java.lang.String mFileName,
android.content.Context mContext,
int mQuality) |
public static boolean compareFloats(float left, float right)
public static android.hardware.Camera.Size determinePictureSize(android.hardware.Camera.Size previewSize, java.lang.Iterable<? extends android.hardware.Camera.Size> pictureSizeList)
public static android.hardware.Camera.Size getOptimalPreviewSize(int w, int h, java.lang.Iterable<? extends android.hardware.Camera.Size> previewSizeList)
public static int configureCameraAngle(android.app.Activity activity)
public static Quadrilateral detectLargestQuadrilateral(org.opencv.core.Mat mat)
public static double getMaxCosine(double maxCosine, org.opencv.core.Point[] approxPoints)
public static android.graphics.Bitmap enhanceReceipt(android.graphics.Bitmap image, org.opencv.core.Point topLeft, org.opencv.core.Point topRight, org.opencv.core.Point bottomLeft, org.opencv.core.Point bottomRight)
public static java.lang.String[] saveToInternalMemory(android.graphics.Bitmap bitmap, java.lang.String mFileDirectory, java.lang.String mFileName, android.content.Context mContext, int mQuality)
public static android.graphics.Bitmap decodeBitmapFromFile(java.lang.String path, java.lang.String imageName)
public static int dp2px(android.content.Context context, float dp)
public static android.graphics.Bitmap loadEfficientBitmap(byte[] data, int width, int height)
public static android.graphics.Bitmap resize(android.graphics.Bitmap image, int maxWidth, int maxHeight)
public static android.graphics.Bitmap resizeToScreenContentSize(android.graphics.Bitmap bm, int newWidth, int newHeight)
public static java.util.ArrayList<android.graphics.PointF> getPolygonDefaultPoints(android.graphics.Bitmap bitmap)
public static boolean isScanPointsValid(java.util.Map<java.lang.Integer,android.graphics.PointF> points)