public class FluentCv
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FluentCv.ColorCode |
Constructor and Description |
---|
FluentCv() |
Modifier and Type | Method and Description |
---|---|
FluentCv |
absDiff(java.lang.String source1,
java.lang.String... tag)
Calculate the absolute difference between the previously stored Mat called source1 and the
current Mat.
|
FluentCv |
blurGaussian(int kernelSize,
java.lang.String... tag) |
FluentCv |
blurMedian(int kernelSize,
java.lang.String... tag) |
static double |
calculatePsnr(Mat I1,
Mat I2) |
static double |
calculateSharpnessGRAS(Mat image)
From FireSight: https://github.com/firepick1/FireSight/wiki/op-Sharpness
|
static Scalar |
colorToScalar(java.awt.Color color) |
static java.awt.image.BufferedImage |
convertBufferedImage(java.awt.image.BufferedImage src,
int type) |
FluentCv |
convertCirclesToLocations(java.util.List<Location> locations) |
FluentCv |
convertCirclesToPoints(java.util.List<Point> points) |
FluentCv |
convertColor(FluentCv.ColorCode code,
java.lang.String... tag) |
FluentCv |
convertColor(int code,
java.lang.String... tag) |
FluentCv |
drawCircles(java.lang.String baseTag,
java.awt.Color color,
java.lang.String... tag)
Draw circles from the current Mat contained onto the Mat specified in baseTag using the
specified color, optionally storing the results in tag.
|
FluentCv |
drawCircles(java.lang.String baseTag,
java.lang.String... tag)
Draw circles from the current Mat contained onto the Mat specified in baseTag using the color
red, optionally storing the results in tag.
|
FluentCv |
drawContours(java.util.List<MatOfPoint> contours,
java.awt.Color color,
int thickness,
java.lang.String... tag) |
FluentCv |
drawRects(java.util.List<RotatedRect> rects,
java.awt.Color color,
int thickness,
java.lang.String... tag) |
static void |
drawRotatedRect(Mat mat,
RotatedRect rect,
java.awt.Color color,
int thickness) |
FluentCv |
filterCirclesByDistance(double originX,
double originY,
double minDistance,
double maxDistance,
java.lang.String... tag) |
FluentCv |
filterCirclesByDistance(Length minDistance,
Length maxDistance,
java.lang.String... tag) |
FluentCv |
filterCirclesToLine(double maxDistance,
java.lang.String... tag)
Filter circles as returned from e.g.
|
FluentCv |
filterCirclesToLine(Length maxDistance,
java.lang.String... tag) |
FluentCv |
filterContoursByArea(java.util.List<MatOfPoint> contours,
double areaMin,
double areaMax) |
FluentCv |
filterRectsByArea(java.util.List<RotatedRect> rects,
double areaMin,
double areaMax) |
FluentCv |
findCirclesHough(int minDiameter,
int maxDiameter,
int minDistance,
java.lang.String... tag) |
FluentCv |
findCirclesHough(Length minDiameter,
Length maxDiameter,
Length minDistance,
java.lang.String... tag) |
FluentCv |
findContours(java.util.List<MatOfPoint> contours,
java.lang.String... tag) |
FluentCv |
findEdgesCanny(double threshold1,
double threshold2,
java.lang.String... tag) |
FluentCv |
findEdgesRobertsCross(java.lang.String... tag) |
FluentCv |
floodFill(Point seedPoint,
java.awt.Color color,
java.lang.String... tag) |
FluentCv |
getContourMaxRects(java.util.List<MatOfPoint> contours,
java.util.List<RotatedRect> rect) |
FluentCv |
getContourRects(java.util.List<MatOfPoint> contours,
java.util.List<RotatedRect> rects) |
java.util.List<java.lang.String> |
getStoredTags() |
static java.awt.Color |
indexedColor(int i)
Return a Color from an imaginary list of colors starting at index 0 and extending on to
Integer.MAX_VALUE.
|
static void |
infiniteLine(Mat img,
Point p1,
Point p2,
java.awt.Color color)
Draw the infinite line defined by the two points to the extents of the image instead of just
between the two points.
|
Mat |
mat() |
FluentCv |
mat(Mat mat,
java.lang.String... tag) |
static double |
pointToLineDistance(Point A,
Point B,
Point P) |
static double |
pointToLineSegmentDistance(Point A,
Point B,
Point P) |
FluentCv |
read(java.io.File file,
java.lang.String... tag) |
FluentCv |
recall(java.lang.String tag) |
FluentCv |
saveDebugImage(java.lang.Class implementationClass,
java.lang.String function,
java.lang.String identifier) |
FluentCv |
setCamera(Camera camera)
Set a Camera that can be used for calculations that require a Camera Location or units per
pixel.
|
FluentCv |
settleAndCapture(java.lang.String... tag) |
FluentCv |
store(java.lang.String tag) |
FluentCv |
threshold(double threshold,
boolean invert,
java.lang.String... tag) |
FluentCv |
threshold(double threshold,
java.lang.String... tag)
Apply a threshold to the Mat.
|
FluentCv |
thresholdAdaptive(boolean invert,
java.lang.String... tag) |
FluentCv |
thresholdAdaptive(java.lang.String... tag) |
java.awt.image.BufferedImage |
toBufferedImage() |
FluentCv |
toColor(java.lang.String... tag) |
FluentCv |
toGray(java.lang.String... tag) |
FluentCv |
toMat(java.awt.image.BufferedImage img,
java.lang.String... tag) |
FluentCv |
write(java.io.File file) |
public FluentCv toMat(java.awt.image.BufferedImage img, java.lang.String... tag)
public FluentCv toGray(java.lang.String... tag)
public FluentCv toColor(java.lang.String... tag)
public FluentCv convertColor(FluentCv.ColorCode code, java.lang.String... tag)
public FluentCv convertColor(int code, java.lang.String... tag)
public FluentCv threshold(double threshold, java.lang.String... tag)
threshold
- tag
- public FluentCv threshold(double threshold, boolean invert, java.lang.String... tag)
public FluentCv thresholdAdaptive(java.lang.String... tag)
public FluentCv thresholdAdaptive(boolean invert, java.lang.String... tag)
public FluentCv blurGaussian(int kernelSize, java.lang.String... tag)
public FluentCv blurMedian(int kernelSize, java.lang.String... tag)
public FluentCv findCirclesHough(Length minDiameter, Length maxDiameter, Length minDistance, java.lang.String... tag)
public FluentCv findCirclesHough(int minDiameter, int maxDiameter, int minDistance, java.lang.String... tag)
public FluentCv convertCirclesToPoints(java.util.List<Point> points)
public FluentCv convertCirclesToLocations(java.util.List<Location> locations)
public FluentCv drawCircles(java.lang.String baseTag, java.awt.Color color, java.lang.String... tag)
baseTag
- color
- tag
- public FluentCv drawCircles(java.lang.String baseTag, java.lang.String... tag)
baseTag
- tag
- public FluentCv recall(java.lang.String tag)
public FluentCv store(java.lang.String tag)
public java.util.List<java.lang.String> getStoredTags()
public FluentCv write(java.io.File file) throws java.lang.Exception
java.lang.Exception
public FluentCv saveDebugImage(java.lang.Class implementationClass, java.lang.String function, java.lang.String identifier)
public FluentCv read(java.io.File file, java.lang.String... tag) throws java.lang.Exception
java.lang.Exception
public java.awt.image.BufferedImage toBufferedImage()
public FluentCv settleAndCapture(java.lang.String... tag)
public FluentCv setCamera(Camera camera)
camera
- public FluentCv filterCirclesByDistance(Length minDistance, Length maxDistance, java.lang.String... tag)
public FluentCv filterCirclesByDistance(double originX, double originY, double minDistance, double maxDistance, java.lang.String... tag)
public FluentCv filterCirclesToLine(Length maxDistance, java.lang.String... tag)
public FluentCv filterCirclesToLine(double maxDistance, java.lang.String... tag)
tag
- public Mat mat()
public FluentCv mat(Mat mat, java.lang.String... tag)
public FluentCv absDiff(java.lang.String source1, java.lang.String... tag)
source1
- tag
- public FluentCv findEdgesCanny(double threshold1, double threshold2, java.lang.String... tag)
public FluentCv findEdgesRobertsCross(java.lang.String... tag)
public FluentCv findContours(java.util.List<MatOfPoint> contours, java.lang.String... tag)
public FluentCv drawContours(java.util.List<MatOfPoint> contours, java.awt.Color color, int thickness, java.lang.String... tag)
public FluentCv filterContoursByArea(java.util.List<MatOfPoint> contours, double areaMin, double areaMax)
public FluentCv drawRects(java.util.List<RotatedRect> rects, java.awt.Color color, int thickness, java.lang.String... tag)
public FluentCv getContourRects(java.util.List<MatOfPoint> contours, java.util.List<RotatedRect> rects)
public FluentCv getContourMaxRects(java.util.List<MatOfPoint> contours, java.util.List<RotatedRect> rect)
public FluentCv filterRectsByArea(java.util.List<RotatedRect> rects, double areaMin, double areaMax)
public FluentCv floodFill(Point seedPoint, java.awt.Color color, java.lang.String... tag)
public static Scalar colorToScalar(java.awt.Color color)
public static java.awt.Color indexedColor(int i)
i
- public static java.awt.image.BufferedImage convertBufferedImage(java.awt.image.BufferedImage src, int type)
public static double pointToLineDistance(Point A, Point B, Point P)
public static double pointToLineSegmentDistance(Point A, Point B, Point P)
public static void infiniteLine(Mat img, Point p1, Point p2, java.awt.Color color)
img
- p1
- p2
- color
- public static void drawRotatedRect(Mat mat, RotatedRect rect, java.awt.Color color, int thickness)
public static double calculatePsnr(Mat I1, Mat I2)
public static double calculateSharpnessGRAS(Mat image)
image
-