Leaper Vision Toolkit
中文 / English 2.x
Data Structures | Typedefs | Enumerations
LPVCoreLib Module Reference

LPV Core Library, provide basic functionalities. More...

Data Structures

interface  ILAnnulusRegion
 This interface expose APIs to create/modify an annulus region object. More...
 
interface  ILAnnulusSectorRegion
 This interface expose APIs to create/modify an annulus sector region object. More...
 
interface  ILCircleRegion
 This interface expose APIs to create/modify a circle region object. More...
 
interface  ILCompoundRegion
 This interface expose APIs to access a compound region object. More...
 
interface  ILDrawable
 This interface expose APIs to change graphics settings of a drawable class. More...
 
interface  ILEllipseRegion
 This interface expose APIs to create/modify an ellipse region object. More...
 
interface  ILImage
 This interface expose APIs to access/manipulate/draw a LPV LImage object. More...
 
interface  ILImageList
 This interface defines a list of images. More...
 
interface  ILMaskRegion
 This interface expose APIs to create/modify a mask region object. More...
 
interface  ILObject
 This base interface for a serializable LPV object. More...
 
interface  ILObjects
 This base interface for a multi-targets LPV object. More...
 
interface  ILPolyRegion
 This interface expose APIs to create/modify a polygon region object. More...
 
interface  ILRectRegion
 This interface expose APIs to create/modify a rectangle region object. More...
 
interface  ILRegion
 This interface expose APIs to create/modify/manipulate/draw a LPV region object (LRectRegion , LRotRectRegion , LCircleRegion , etc.). More...
 
interface  ILRotRectRegion
 This interface expose APIs to create/modify a rotated rectangle region object. More...
 
interface  ILSortable
 This interface represent a sortable LPV class. More...
 
interface  ILSortables
 This interface expose APIs to sort or apply permutation to a LPV class contains a collection of sortable objects. More...
 
interface  ILSystem
 This interface provide miscellaneous functions to change LPV system configurations globally. More...
 
class  LAnnulusRegion
 
class  LAnnulusSectorRegion
 
class  LCircleRegion
 
struct  LColor
 This structure represents a color scalar in 3 channels, each channel's value is in 0 ~ 255. More...
 
class  LCompoundRegion
 
class  LEllipseRegion
 
class  LImage
 
class  LImageList
 
class  LMaskRegion
 
struct  LMatrix23
 This structure represents a \( 2 \times 3 \) matrix (2 rows, 3 columns) More...
 
struct  LMatrix33
 This structure represents a \( 3 \times 3 \) matrix (3 rows, 3 columns) More...
 
struct  LMatrix44
 This structure represents a \( 4 \times 4 \) matrix (4 rows, 4 columns) More...
 
class  LPolyRegion
 
class  LRectRegion
 
class  LRotRectRegion
 
struct  LSize
 This structure represents a integer size with the specified width and height. More...
 
class  LSystem
 

Typedefs

typedef struct LPVCoreLib::LColor LColor
 
typedef struct LPVCoreLib::LMatrix23 LMatrix23
 
typedef struct LPVCoreLib::LMatrix33 LMatrix33
 
typedef struct LPVCoreLib::LMatrix44 LMatrix44
 
typedef struct LPVCoreLib::LSize LSize
 

Enumerations

enum  LPVAggregation {
  LPVAggAvg = 0 , LPVAggDev = 1 , LPVAggVar = 2 , LPVAggMin = 3 ,
  LPVAggMax = 4 , LPVAggMajor = 5 , LPVAggSum = 6
}
 This enumeration represents the type of an aggregation. More...
 
enum  LPVAxis { LPVAxisX = 0 , LPVAxisY = 1 , LPVAxisZ = 2 }
 This enumeration represents the three axes in the Cartesian coordinate system. More...
 
enum  LPVChartDrawFlags {
  LPVChartDrawAsBar = 1 , LPVChartDrawAsLine = 2 , LPVChartDrawGrid = 4 , LPVChartDrawIndexLabel = 8 ,
  LPVChartDrawValueLabel = 16 , LPVChartDrawAsLineDefault = LPVChartDrawAsLine + LPVChartDrawIndexLabel + LPVChartDrawValueLabel , LPVChartDrawAsBarDefault = LPVChartDrawAsBar + LPVChartDrawIndexLabel + LPVChartDrawValueLabel , LPVChartDrawDefault = LPVChartDrawAsBarDefault ,
  LPVChartDrawAll = 0xff
}
 This enumeration represents the flags to control which part of a data chart should be drawn. More...
 
enum  LPVColor {
  LPVWhite = 0xffffff , LPVBlack = 0x000000 , LPVRed = 0x0000ff , LPVDarkRed = 0x000080 ,
  LPVGreen = 0x00ff00 , LPVDarkGreen = 0x008000 , LPVBlue = 0xff0000 , LPVDarkBlue = 0x800000 ,
  LPVCyan = 0xffff00 , LPVDarkCyan = 0x808000 , LPVMagenta = 0xff00ff , LPVDarkMagenta = 0x800080 ,
  LPVYellow = 0x00ffff , LPVDarkYellow = 0x008080 , LPVGray = 0xa4a0a0 , LPVDarkGray = 0x808080 ,
  LPVLightGray = 0xc0c0c0 , LPVTransparent = -1 , LPVColorRandom = -2
}
 This enumeration represents the commonly used colors. More...
 
enum  LPVColorMap {
  LPVColorMapAutumn = 0 , LPVColorMapBone = 1 , LPVColorMapJet = 2 , LPVColorMapWinter = 3 ,
  LPVColorMapRainbow = 4 , LPVColorMapOcean = 5 , LPVColorMapSummer = 6 , LPVColorMapSpring = 7 ,
  LPVColorMapCool = 8 , LPVColorMapHSV = 9 , LPVColorMapPink = 10 , LPVColorMapHot = 11 ,
  LPVColorMapParula = 12 , LPVColorMapMagma = 13 , LPVColorMapInferno = 14 , LPVColorMapPlasma = 15 ,
  LPVColorMapViridis = 16 , LPVColorMapCividis = 17 , LPVColorMapTwilight = 18 , LPVColorMapTwilightShifted = 19 ,
  LPVColorMapTurbo = 20 , LPVColorMapDeepgreen = 21 , LPVColorMapSemi = 22 , LPVColorMapRed = 23 ,
  LPVColorMapGreen = 24 , LPVColorMapBlue = 25
}
 This enumeration represents the supported GNU Octave / MATLAB equivalent colormaps. More...
 
enum  LPVColorSpace {
  LPVColorSpaceBGR = 0 , LPVColorSpaceHSV = 1 , LPVColorSpaceHLS = 2 , LPVColorSpaceYCrCb = 3 ,
  LPVColorSpaceYUV = 4 , LPVColorSpaceXYZ = 5 , LPVColorSpaceLAB = 6 , LPVColorSpaceLUV = 7
}
 This enumeration represents the color space of the image and also indicates the order of the channels. Each channel is normalized to 0 ~ 255. More...
 
enum  LPVDirection { LPVDirLeft = 0 , LPVDirRight = 1 , LPVDirUp = 2 , LPVDirDown = 3 }
 This enumeration represents the direction or orientation of the object. More...
 
enum  LPVEdgeKernel { LPVSobel = 0 , LPVPrewitt = 1 , LPVScharr = 2 }
 This enumeration represents type of kernel used in edge filtering. More...
 
enum  LPVErrorCode {
  LPVNoError = 0 , LPVNoResult = 1 , LPVErrUnknown = 0x81000000 , LPVErrEmptyImage = 0x81000001 ,
  LPVErrEmptyRegion = 0x81000002 , LPVErrSizeTooSmall = 0x81000003 , LPVErrSizeNotMatch = 0x81000004 , LPVErrTypeNotMatch = 0x81000005 ,
  LPVErrTypeNotInit = 0x81000006 , LPVErrTypeUnsupported = 0x81000007 , LPVErrTimeOut = 0x81000008 , LPVErrFileUnsupportFormat = 0x81000101 ,
  LPVErrFileEmpty = 0x81000102 , LPVErrFileFailEncode = 0x81000103 , LPVErrFileFailDecode = 0x81000104 , LPVErrFileFailOpen = 0x81000105 ,
  LPVErrFileUnexpect = 0x81000106 , LPVErrFileFailSave = 0x81000107 , LPVErrFileFailLoad = 0x81000108 , LPVErrFileFailRemove = 0x81000109 ,
  LPVErrCalibTooFewPoints = 0x81000201 , LPVErrCalibUnequalImageWorldPoints = 0x81000202 , LPVErrCalibFailDetectImagePoints = 0x81000203 , LPVErrCalibFailCalibration = 0x81000204 ,
  LPVErrCalibUnexpect = 0x81000205 , LPVErrCalibNotCalib = 0x81000206 , LPVErrCalibPointsCollinear = 0x81000207 , LPVErrWithoutImgSize = 0x81000208 ,
  LPVErrInvalidAxisDir = 0x81000209 , LPVErrFailMultiCameraCalibration = 0x8100020a , LPVErrFailDetectRefInstance = 0x8100020b , LPVErrFailUpdateRefInstance = 0x8100020c ,
  LPVErrFailVerifyRefInstance = 0x8100020d , LPVErrFailImageSizeNotMatch = 0x8100020e , LPVErrFailDistortionModelNotMatch = 0x8100020f , LPVErrCalibRotationFailed = 0x81000299 ,
  LPVErrPatFailTrain = 0x81000301 , LPVErrPatNotTrain = 0x81000302 , LPVErrSortArrayFailed = 0x81000401 , LPVErrMLSampleFailLoad = 0x81000501 ,
  LPVErrMLTooFewClass = 0x81000502 , LPVErrMLNoModel = 0x81000503 , LPVErrMLNoFeature = 0x81000504 , LPVErrMLDirtyModel = 0x81000505 ,
  LPVErrMLNotTrained = 0x81000506 , LPVErrMLTooFewSample = 0x81000507 , LPVErrMLBusy = 0x81000509 , LPVErrOCRNoFontDB = 0x81000601 ,
  LPVErrOCRNoCharDB = 0x81000602 , LPVErrOCRFailAddSampleToFontDB = 0x81000604 , LPVErrOCRFailRemoveFromFontDB = 0x81000605 , LPVErrOCRFailTrainFontDB = 0x81000606 ,
  LPVErrOCRFailTrainTooFewChar = 0x81000607 , LPVErrOCRFailTrainTooFewSample = 0x81000608 , LPVErrOCRFailTrainFailExtFeature = 0x81000609 , LPVErrOCRFailAddCharToFontDB = 0x8100060a
}
 This enumeration represents the type of a LPV function error. More...
 
enum  LPVExcludeBoundaryMode { LPVEBModeNone = 0 , LPVEBModeEntire = 1 , LPVEBModePartial = 2 }
 This enumeration defines how to handle object on or outside the image/region/mask boundary. More...
 
enum  LPVFindBy { LPVFindBest = 0 , LPVFindFirst = 1 , LPVFindLast = 2 , LPVFindCentral = 3 }
 This enumeration represents the strategy how to select one target from multiple candidates. More...
 
enum  LPVFlipType { LPVFlipH = 0x01 , LPVFlipV = 0x02 , LPVFlipBoth = LPVFlipH + LPVFlipV }
 This enumeration represents type of image flipping. More...
 
enum  LPVImageFormat { LPVImageFormatGrayscale8 = 0 , LPVImageFormatColor24 = 1 , LPVImageFormatGrayscale16 = 2 }
 This enumeration represents the format of the image. More...
 
enum  LPVInterpolationMethod { LPVInterNearest = 0 , LPVInterLinear = 1 , LPVInterCubic = 2 , LPVInterArea = 3 }
 This enumeration represents the method for pixel interpolation. More...
 
enum  LPVMorphShape { LPVMorphRect = 0 , LPVMorphCross = 1 , LPVMorphEllipse = 2 }
 This enumeration represents shape of the structuring element used in morphological transformations. More...
 
enum  LPVPenStyle {
  LPVPenSolid = 0 , LPVPenDash = 1 , LPVPenDot = 2 , LPVPenDashDot = 3 ,
  LPVPenDashDotDot = 4
}
 This enumeration represents the pen style used to draw the path. More...
 
enum  LPVPointShape {
  LPVPointShapeCross = 0 , LPVPointShapeTiltedCross = 1 , LPVPointShapeStar = 2 , LPVPointShapeDiamond = 3 ,
  LPVPointShapeSquare = 4 , LPVPointShapeTriangle = 5 , LPVPointShapeTriangleInv = 6
}
 This enumeration represents the shape of the point in drawing. More...
 
enum  LPVPolarity {
  LPVBlack2White = 0 , LPVWhite2Black = 1 , LPVPolarityEitherEdge = 2 , LPVBlackOnWhite = 3 ,
  LPVWhiteOnBlack = 4 , LPVPolarityEitherObject = 5 , LPVPolarityEither = 6
}
 This enumeration represents the polarity of the edge or object to be located. More...
 
enum  LPVPositionMode {
  LPVPosModeCenter = 0 , LPVPosModeTopLeft = 1 , LPVPosModeTopRight = 2 , LPVPosModeBottomLeft = 3 ,
  LPVPosModeBottomRight = 4
}
 This enumeration represents which point is used as a object's position, used in sorting. More...
 
enum  LPVRoiHandle {
  LPVRoiHandleUnknown = -1 , LPVRoiHandleNone = 0 , LPVRoiHandleInside = 16 , LPVRoiHandleTop = 1 ,
  LPVRoiHandleBottom = 2 , LPVRoiHandleLeft = 4 , LPVRoiHandleRight = 8 , LPVRoiHandleTopLeft = LPVRoiHandleTop | LPVRoiHandleLeft ,
  LPVRoiHandleBottomLeft = LPVRoiHandleBottom | LPVRoiHandleLeft , LPVRoiHandleTopRight = LPVRoiHandleTop | LPVRoiHandleRight , LPVRoiHandleBottomRight = LPVRoiHandleBottom | LPVRoiHandleRight , LPVRoiHandleRotation = 32 ,
  LPVRoiHandleMoveVertex = 64 , LPVRoiHandleAddVertex = 128 , LPVRoiHandleRemoveVertex = 256 , LPVRoiHandleAnchor = 512
}
 This enumeration represents the type of a region handle for drag. More...
 
enum  LPVSortBy {
  LPVSortByReserved = 0 , LPVSortByX = 1 , LPVSortByY = 2 , LPVSortByScore = 3 ,
  LPVSortByColumn = 4 , LPVSortByRow = 5
}
 This enumeration represents the type of sorting. More...
 
enum  LPVSortOrder {
  LPVSortOrderRandom = 1 , LPVSortOrderAscending = 2 , LPVSortOrderDescending = 3 , LPVSortOrderAscendingZigZag = 4 ,
  LPVSortOrderDescendingZigZag = 5
}
 This enumeration represents the order of sorting. More...
 
enum  LPVThresholdType { LPVThresholdCustom = 0 , LPVThresholdAdaptGlobal = 1 , LPVThresholdAdaptLocal = 2 }
 This enumeration represents the thresholding method. More...
 
enum  LPVTransformType { LPVTransformRigid = 0 , LPVTransformSimilar = 1 , LPVTransformAffine = 2 , LPVTransformHomography = 3 }
 This enumeration represents the type of a transformation matrix. More...
 

Detailed Description

LPV Core Library, provide basic functionalities.

All other LPV Libraries rely on this library. To include the definitions of the library's classes, use the following directive:

Example Code

Enumeration Type Documentation

◆ LPVAggregation

This enumeration represents the type of an aggregation.

Enumerator
LPVAggAvg 

Average value

LPVAggDev 

Standard deviation

LPVAggVar 

Variance

LPVAggMin 

Minimum value

LPVAggMax 

Maximum value

LPVAggMajor 

Majority value

LPVAggSum 

Total sum of all values

◆ LPVAxis

enum LPVAxis

This enumeration represents the three axes in the Cartesian coordinate system.

Enumerator
LPVAxisX 

The X axis. It is usually the horizontal axis of the image, from left to right.

LPVAxisY 

The Y axis. It is usually the vertical axis of the image, from top to bottom.

LPVAxisZ 

The Z axis. It is usually the axis which is perpendicular to the image.

◆ LPVChartDrawFlags

This enumeration represents the flags to control which part of a data chart should be drawn.

Enumerator
LPVChartDrawAsBar 

Draw as bar chart

LPVChartDrawAsLine 

Draw as line chart

LPVChartDrawGrid 

Draw the grid

LPVChartDrawIndexLabel 

Draw the index labels on X axis

LPVChartDrawValueLabel 

Draw the value labels on Y axis

LPVChartDrawAsLineDefault 

Default line chart flags, which draws a line chart with all axis labels and no grid

LPVChartDrawAsBarDefault 

Default bar chart flags, which draws a bar chart with all axis labels and no grid

LPVChartDrawDefault 

Default chart flags, same as LPVChartDrawAsBarDefault

LPVChartDrawAll 

Draw a bar chart with all components

◆ LPVColor

enum LPVColor

This enumeration represents the commonly used colors.

Enumerator
LPVWhite 

White

LPVBlack 

Black

LPVRed 

Red

LPVDarkRed 

Dark red

LPVGreen 

Green

LPVDarkGreen 

Dark green

LPVBlue 

Blue

LPVDarkBlue 

Dark blue

LPVCyan 

Cyan

LPVDarkCyan 

Dark cyan

LPVMagenta 

Magenta

LPVDarkMagenta 

Dark magenta

LPVYellow 

Yellow

LPVDarkYellow 

Dark yellow

LPVGray 

Gray

LPVDarkGray 

Dark gray

LPVLightGray 

Light gray

LPVTransparent 

Transparent

LPVColorRandom 

Randomized color
Since 2.12.0

◆ LPVColorMap

This enumeration represents the supported GNU Octave / MATLAB equivalent colormaps.

Enumerator
LPVColorMapAutumn 

autumn

LPVColorMapBone 

bone

LPVColorMapJet 

jet

LPVColorMapWinter 

winter

LPVColorMapRainbow 

rainbow

LPVColorMapOcean 

ocean

LPVColorMapSummer 

summer

LPVColorMapSpring 

spring

LPVColorMapCool 

cool

LPVColorMapHSV 

hsv

LPVColorMapPink 

pink

LPVColorMapHot 

hot

LPVColorMapParula 

parula

LPVColorMapMagma 

magma

LPVColorMapInferno 

inferno

LPVColorMapPlasma 

plasma

LPVColorMapViridis 

viridis

LPVColorMapCividis 

cividis

LPVColorMapTwilight 

twilight

LPVColorMapTwilightShifted 

twilight shifted

LPVColorMapTurbo 

turbo

LPVColorMapDeepgreen 

deepgreen

LPVColorMapSemi 

semi     Since 2.13.0

LPVColorMapRed 

red     Since 2.13.0

LPVColorMapGreen 

green     Since 2.13.0

LPVColorMapBlue 

blue     Since 2.13.0

◆ LPVColorSpace

This enumeration represents the color space of the image and also indicates the order of the channels. Each channel is normalized to 0 ~ 255.

Enumerator
LPVColorSpaceBGR 

BGR color space. The order of channels are: B(blue), G(green), R(red).

LPVColorSpaceHSV 

HSV color space The order of channels are: H(hue), S(saturation), V(brightness).

\[ V_{max} = max(R,G,B), V_{min} = min(R,G,B) \\ V = V_{max} \\ S = \left\{ \begin{array}{ll} \frac{V - V_{min}}{V} \cdot 255 & V \neq 0 \\ 0 & otherwise \\ \end{array} \right. \\ h = \left\{ \begin{array}{ll} \frac{G - B}{V - V_{min}} \cdot 60 & V = R \\ \frac{B - R}{V - V_{min}} \cdot 60 + 120 & V = R \\ \frac{R - G}{V - V_{min}} \cdot 60 + 240 & V = B \\ \end{array} \right. , H = \left\{ \begin{array}{ll} \frac{h + 360}{2} & h < 0\ \\ \frac{h}{2} & otherwise \\ \end{array} \right. \]

LPVColorSpaceHLS 

HLS color space. The order of channels are: H(hue), L(lightness), S(saturation).

\[ V_{max} = max(R,G,B), V_{min} = min(R,G,B) \\ L = \frac{V_{min} + V_{max}}{2} \\ S = \left\{ \begin{array}{ll} \frac{V_{max} - V_{min}}{V_{max} + V_{min}} \cdot 255 & L < 128 \\ \frac{V_{max} - V_{min}}{255 \cdot 2 - (V_{max} + V_{min})} \cdot 255 & otherwise \\ \end{array} \right. \\ h = \left\{ \begin{array}{ll} \frac{G - B}{V_{max} - V_{min}} \cdot 60 & V_{max} = R \\ \frac{B - R}{V_{max} - V_{min}} \cdot 60 + 120 & V_{max} = R \\ \frac{R - G}{V_{max} - V_{min}} \cdot 60 + 240 & V_{max} = B \\ \end{array} \right. , H = \left\{ \begin{array}{ll} \frac{h + 360}{2} & h < 0\ \\ \frac{h}{2} & otherwise \\ \end{array} \right. \]

LPVColorSpaceYCrCb 

YCrCb color space. The order of channels are: Y(luminance), Cr(red chroma), Cb(blue chroma)

\[ Y = 0.299 \cdot R + 0.587 \cdot G + 0.114 \cdot B \\ Cr = 0.713 \cdot (R-Y) + 128 \\ Cb = 0.564 \cdot (B-Y) + 128 \\ \]

LPVColorSpaceYUV 

YUV color space. The order of channels are: Y(luminance), U(blue–luminance), V(red–luminance)

\[ Y = 0.299 \cdot R + 0.587 \cdot G + 0.114 \cdot B \\ U = 0.492 \cdot (R-Y) + 128 \\ V = 0.877 \cdot (B-Y) + 128 \\ \]

LPVColorSpaceXYZ 

CIE 1931 XYZ color space. The order of channels are: X(red tristimulus value), Y(green tristimulus value), Z(blue tristimulus value)

\[ X = 0.412453 \cdot R + 0.357580 \cdot G + 0.180423 \cdot B \\ Y = 0.212671 \cdot R + 0.715160 \cdot G + 0.072169 \cdot B \\ Z = 0.019334 \cdot R + 0.119193 \cdot G + 0.950227 \cdot B \\ \]

LPVColorSpaceLAB 

CIE 1976 L*a*b* color space. The order of channels are: L(lightness), a*(red-green chroma), b*(blue-yellow chroma).
The conversion between BGR is calculated based on XYZ values using normalized RGB values between 0 ~ 1.

\[ l = \left\{ \begin{array}{ll} (116 \cdot Y^{\frac{1}{3}} - 16) & Y > 0.008856 \\ 903.3 \cdot Y & otherwise \\ \end{array} \right. \\ L = l \cdot \frac{255}{100} \\ f(t) = \left\{ \begin{array}{ll} t^{\frac{1}{3}} & t > 0.008856 \\ 7.787 \cdot t + \frac{16}{116} & otherwise \\ \end{array} \right. \\ a = (f(\frac{X}{0.950456}) - f(Y)) \cdot 500 + 255 \\ b = (f(Y) - f(\frac{X}{1.088754})) \cdot 200 + 255 \\ \]

LPVColorSpaceLUV 

CIE 1976 L*u*v* color space. The order of channels are: L*(luminance), u*(u chroma), v*(v chroma).
The conversion between BGR is calculated based on XYZ values using normalized RGB values between 0 ~ 1.

\[ l = \left\{ \begin{array}{ll} (116 \cdot Y^{\frac{1}{3}} - 16) & Y > 0.008856 \\ 903.3 \cdot Y & otherwise \\ \end{array} \right. \\ L = l \cdot \frac{255}{100} \\ u' = \frac{4 \cdot X}{X + 15 \cdot Y + 3 \cdot Z} \\ v' = \frac{9 \cdot Y}{X + 15 \cdot Y + 3 \cdot Z} \\ u = (13 \cdot l \cdot (u' - 0.19793943) + 134) \cdot \frac{255}{354} \\ v = (13 \cdot l \cdot (v' - 0.46831096) + 140) \cdot \frac{255}{262} \\ \]

◆ LPVDirection

This enumeration represents the direction or orientation of the object.

Enumerator
LPVDirLeft 

The object is moving or pointing to the left direction.

LPVDirRight 

The object is moving or pointing to the right direction.

LPVDirUp 

The object is moving or pointing to the up direction.

LPVDirDown 

The object is moving or pointing to the down direction.

◆ LPVEdgeKernel

This enumeration represents type of kernel used in edge filtering.

Enumerator
LPVSobel 

A Sobel kernel, it combines Gaussian smoothing and differentiation, so the result is more or less resistant to the noise. A typical \( 3 \times 3 \) x and y order kernel is:
\( \begin{bmatrix}-1 & 0 & 1\\-2 & 0 & 2\\-1 & 0 & 1\end{bmatrix} \) \( \begin{bmatrix}-1 & -2 & -1\\0 & 0 & 0\\1 & 2 & 1\end{bmatrix} \)

LPVPrewitt 

A Prewitt kernel, only \( 3 \times 3 \) size kernel is supported, the x and y order kernel is:
\( \begin{bmatrix}-1 & 0 & 1\\-1 & 0 & 1\\-1 & 0 & 1\end{bmatrix} \) \( \begin{bmatrix}-1 & -1 & -1\\0 & 0 & 0\\1 & 1 & 1\end{bmatrix} \)

LPVScharr 

A Scharr kernel, addresses more inaccurate derivation than Sobel kernel. Only \( 3 \times 3 \) size kernel is supported, the x and y order kernel is:

\( \begin{bmatrix}-3 & 0 & 3\\-10 & 0 & 10\\-3 & 0 & 3\end{bmatrix} \) \( \begin{bmatrix}-3 & -10 & -3\\0 & 0 & 0\\3 & 10 & 3\end{bmatrix} \)

◆ LPVErrorCode

This enumeration represents the type of a LPV function error.

Enumerator
LPVNoError 

No error

LPVNoResult 

No result(and no error), for example, the algorithm reports nothing found

LPVErrUnknown 

Unknown error

LPVErrEmptyImage 

The input image is empty

LPVErrEmptyRegion 

The input region is empty

LPVErrSizeTooSmall 

The size is too small

LPVErrSizeNotMatch 

The size does not match

LPVErrTypeNotMatch 

The type does not match

LPVErrTypeNotInit 

The object is not well-initialized

LPVErrTypeUnsupported 

Unsupported behavior

LPVErrTimeOut 

Timeout

LPVErrFileUnsupportFormat 

Failed to parse the input file of an unsupported format

LPVErrFileEmpty 

The input file is empty

LPVErrFileFailEncode 

Failed to encode required class to file contents

LPVErrFileFailDecode 

Failed to decode required class from file contents

LPVErrFileFailOpen 

Failed to open the input file

LPVErrFileUnexpect 

Unexpected error

LPVErrFileFailSave 

Failed to save the file

LPVErrFileFailLoad 

Failed to load the required file

LPVErrFileFailRemove 

Failed to remove the required file

LPVErrCalibTooFewPoints 

Calibration failed due to inefficient number of point pairs

LPVErrCalibUnequalImageWorldPoints 

Calibration failed due to number of world and image points not match

LPVErrCalibFailDetectImagePoints 

Calibration failed due to find no calibrate patterns on image

LPVErrCalibFailCalibration 

Calibration failed in camera parameters(matrix) optimization

LPVErrCalibUnexpect 

Calibration failed in unexpected error

LPVErrCalibNotCalib 

Operation failed since the camera is not calibrated yet

LPVErrCalibPointsCollinear 

Calibration failed since all image points are almost collinear, thus we are not able to estimate the correct camera pose

LPVErrWithoutImgSize 

Calibration failed since image size is not provided

LPVErrInvalidAxisDir 

Calibration failed since the specified axes directions are invalid

LPVErrFailMultiCameraCalibration 

Calibration failed of the multi-camera system.

LPVErrFailDetectRefInstance 

Failed to get proper calibration instance in the multi-camera system.

LPVErrFailUpdateRefInstance 

Failed to update the calibration instance in the multi-camera system.

LPVErrFailVerifyRefInstance 

Verification failed for the multi-camera system.

LPVErrFailImageSizeNotMatch 

Image size does not match for the multi-camera system.

LPVErrFailDistortionModelNotMatch 

Distortion model does not match for the multi-camera system.

LPVErrCalibRotationFailed 

Rotation center calibration failed, we are not able to estimate a proper center with input data

LPVErrPatFailTrain 

Training pattern detector failed, there's no acceptable feature in provided template image

LPVErrPatNotTrain 

Pattern detector is not trained

LPVErrSortArrayFailed 

Sort to array failed, we are not able to find a proper grid for the input data

LPVErrMLSampleFailLoad 

Failed to load sample image files

LPVErrMLTooFewClass 

Failed to train the classifier due to there's only 1 or no class

LPVErrMLNoModel 

The classifier has no model in it

LPVErrMLNoFeature 

The classifier has no feature in it

LPVErrMLDirtyModel 

The classifier need to be re-trained, as any of its model' parameters is changed.

LPVErrMLNotTrained 

The classifier is not trained

LPVErrMLTooFewSample 

Failed to train the classifier due to there's too few samples collected for each class.

LPVErrMLBusy 

The classifier is busy with training, auto-tune, testing or other tasks, you may try later.

LPVErrOCRNoFontDB 

Failed due to absence of the trained font database

LPVErrOCRNoCharDB 

Failed due to absence of the character sample database

LPVErrOCRFailAddSampleToFontDB 

Failed to add new samples to the font database

LPVErrOCRFailRemoveFromFontDB 

Failed to remove char from the font database

LPVErrOCRFailTrainFontDB 

Failed to train classifier for the font database

LPVErrOCRFailTrainTooFewChar 

Failed to train classifier for font database, you should at least add two characters

LPVErrOCRFailTrainTooFewSample 

Failed to train classifier for font database due to empty or too few samples

LPVErrOCRFailTrainFailExtFeature 

Failed to train classifier for font database, please check the feature configuration

LPVErrOCRFailAddCharToFontDB 

Failed to add new character to font database, a space or non-printable character is not supported

◆ LPVExcludeBoundaryMode

This enumeration defines how to handle object on or outside the image/region/mask boundary.

Enumerator
LPVEBModeNone 

Do nothing.

LPVEBModeEntire 

Handle the object entirely.

LPVEBModePartial 

Handle the object partially, per-pixel

◆ LPVFindBy

enum LPVFindBy

This enumeration represents the strategy how to select one target from multiple candidates.

Enumerator
LPVFindBest 

Select the ones of highest scores

LPVFindFirst 

Select the first ones, according to scan direction of region

LPVFindLast 

Select the last ones, according to scan direction of region

LPVFindCentral 

Select the central ones, according to their distance to the center of region. Currently, it's only used in gauge tools.

◆ LPVFlipType

This enumeration represents type of image flipping.

Enumerator
LPVFlipH 

Flip horizontally

LPVFlipV 

Flip vertically

LPVFlipBoth 

Flip horizontally and vertically

◆ LPVImageFormat

This enumeration represents the format of the image.

Enumerator
LPVImageFormatGrayscale8 

The image is stored using an 8-bit grayscale format.

LPVImageFormatColor24 

The image is stored using a 24-bit BGR color format (8-8-8).

LPVImageFormatGrayscale16 

The image is stored using an 16-bit grayscale format.
Since 2.4.0

◆ LPVInterpolationMethod

This enumeration represents the method for pixel interpolation.

Enumerator
LPVInterNearest 

Nearest neighbor interpolation. Fastest, but lowest quality

LPVInterLinear 

Bilinear interpolation.

LPVInterCubic 

Bicubic interpolation. This is the preferred method for enlarging image.

LPVInterArea 

Area relation based re-sampling. This is the preferred method for shrinking image.

◆ LPVMorphShape

This enumeration represents shape of the structuring element used in morphological transformations.

Enumerator
LPVMorphRect 

A rectangular element, for example a \( 5 \times 5 \) element is:
\( \begin{bmatrix}1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\end{bmatrix} \)

LPVMorphCross 

A cross-shaped element, for example a \( 5 \times 5 \) element is:
\( \begin{bmatrix}0 & 0 & 1 & 0 & 0\\0 & 0 & 1 & 0 & 0\\1 & 1 & 1 & 1 & 1\\0 & 0 & 1 & 0 & 0\\0 & 0 & 1 & 0 & 0\end{bmatrix} \)

LPVMorphEllipse 

A filled-elliptic element, for example a \( 5 \times 5 \) element is:
\( \begin{bmatrix}0 & 0 & 1 & 0 & 0\\1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\\1 & 1 & 1 & 1 & 1\\0 & 0 & 1 & 0 & 0\end{bmatrix} \)

◆ LPVPenStyle

This enumeration represents the pen style used to draw the path.

Enumerator
LPVPenSolid 

A plain solid line

LPVPenDash 

Dashes separated by a few pixels

LPVPenDot 

Dots separated by a few pixels

LPVPenDashDot 

Alternate dots and dashes

LPVPenDashDotDot 

One dash, two dots, one dash, two dots

◆ LPVPointShape

This enumeration represents the shape of the point in drawing.

Enumerator
LPVPointShapeCross 

A crosshair shape

LPVPointShapeTiltedCross 

A 45 degree crosshair shape

LPVPointShapeStar 

A star marker shape, combination of cross and tilted cross

LPVPointShapeDiamond 

A diamond shape

LPVPointShapeSquare 

A square shape

LPVPointShapeTriangle 

A triangle shape

LPVPointShapeTriangleInv 

A inverted triangle shape

◆ LPVPolarity

This enumeration represents the polarity of the edge or object to be located.

Enumerator
LPVBlack2White 

The edge is from black(dark) pixels to white(light), according to scan direction of region.

LPVWhite2Black 

The edge is from white(light) pixels to black(dark), according to scan direction of region.

LPVPolarityEitherEdge 

Either edge polarity is acceptable, black-to-white or white-to-black.

LPVBlackOnWhite 

This is a black(dark) object on white(light) background.

LPVWhiteOnBlack 

This is a white(light) object on black(dark) background.

LPVPolarityEitherObject 

Either object polarity is acceptable.

LPVPolarityEither 

Either polarity is acceptable.

◆ LPVPositionMode

This enumeration represents which point is used as a object's position, used in sorting.

Enumerator
LPVPosModeCenter 

Use the center point as the position

LPVPosModeTopLeft 

Use the top-left corner of the object's bounding rectangle as the position

LPVPosModeTopRight 

Use the top-right corner of the object's bounding rectangle as the position

LPVPosModeBottomLeft 

Use the bottom-left corner of the object's bounding rectangle as the position

LPVPosModeBottomRight 

Use the bottom-right corner of the object's bounding rectangle as the position

◆ LPVRoiHandle

This enumeration represents the type of a region handle for drag.

Enumerator
LPVRoiHandleUnknown 

Unknown handle, usually used as initial value

LPVRoiHandleNone 

None, it's not a dragable handle

LPVRoiHandleInside 

Inside handle, it's inside the region, used to move the region

LPVRoiHandleTop 

Top handle, used to drag top side of the region to resize it

LPVRoiHandleBottom 

Bottom handle, used to drag bottom side of the region to resize it

LPVRoiHandleLeft 

Left handle, used to drag left side of the region to resize it

LPVRoiHandleRight 

Right handle, used to drag right side of the region to resize it

LPVRoiHandleTopLeft 

Top-left handle, used to drag top-left corner of the region to resize it

LPVRoiHandleBottomLeft 

Bottom-left handle, used to drag bottom-left corner of the region to resize it

LPVRoiHandleTopRight 

Top-right handle, used to drag top-right corner of the region to resize it

LPVRoiHandleBottomRight 

Bottom-right handle, used to drag bottom-right corner of the region to resize it

LPVRoiHandleRotation 

Rotation handle, used to rotate the whole region around its center

LPVRoiHandleMoveVertex 

Vertex move handle, used to drag a region's nearest vertex to current cursor position. Works only for LPolyRegion.

LPVRoiHandleAddVertex 

Vertex add handle, used to add a new region vertex based on current cursor position. Works only for LPolyRegion.

LPVRoiHandleRemoveVertex 

Vertex remove handle, used to remove a region vertex based on current cursor position. Works only for LPolyRegion.

LPVRoiHandleAnchor 

Anchor handle, used to drag the anchor point of the region. For LAnnulusSectorRegion, it's used to control the bending of the region.

◆ LPVSortBy

enum LPVSortBy

This enumeration represents the type of sorting.

Enumerator
LPVSortByReserved 

No specified sort-by, usually worked with random ordering.

LPVSortByX 

Sort by the x-coordinates, regardless of the y-coordinates

LPVSortByY 

Sort by the y-coordinates, regardless of the x-coordinates

LPVSortByScore 

Sort by score

LPVSortByColumn 

Sort first with respect to column, then to row.

LPVSortByRow 

Sort first with respect to row, then to column.

◆ LPVSortOrder

This enumeration represents the order of sorting.

Enumerator
LPVSortOrderRandom 

Shuffle randomly

LPVSortOrderAscending 

Sort ascendingly, for example:

LPVSortByRow, LPVSortOrderAscending:
\( \begin{matrix}0 & \rightarrow & 1 & \rightarrow & 2\\3 & \rightarrow & 4 & \rightarrow & 5\\6 & \rightarrow & 7 & \rightarrow & 8\end{matrix} \)

LPVSortByColumn, LPVSortOrderAscending:
\( \begin{matrix}0 & 3 & 6\\ \downarrow & \downarrow & \downarrow\\1 & 4 & 7\\ \downarrow & \downarrow & \downarrow\\2 & 5 & 8\end{matrix} \)

LPVSortOrderDescending 

Sort descendingly, for example:

LPVSortByRow, LPVSortOrderDescending:
\( \begin{matrix}8 & \leftarrow & 7 & \leftarrow & 6\\5 & \leftarrow & 4 & \leftarrow & 3\\2 & \leftarrow & 1 & \leftarrow & 0\end{matrix} \)

LPVSortByColumn, LPVSortOrderDescending:
\( \begin{matrix}8 & 5 & 2\\ \uparrow & \uparrow & \uparrow\\7 & 4 & 1\\ \uparrow & \uparrow & \uparrow\\6 & 3 & 0\end{matrix} \)

LPVSortOrderAscendingZigZag 

Sort in alternating ascending and descending orders, starting from ascending order:

LPVSortByRow, LPVSortOrderAscendingZigZag:
\( \begin{matrix}0 & \rightarrow & 1 & \rightarrow & 2\\5 & \leftarrow & 4 & \leftarrow & 3\\6 & \rightarrow & 7 & \rightarrow & 8\end{matrix} \)

LPVSortOrderDescendingZigZag 

Sort in alternating ascending and descending orders, starting from descending order:

LPVSortByRow, LPVSortOrderDescendingZigZag:
\( \begin{matrix}2 & \leftarrow & 1 & \leftarrow & 0\\3 & \rightarrow & 4 & \rightarrow & 5\\8 & \leftarrow & 7 & \leftarrow & 6\end{matrix} \)

◆ LPVThresholdType

This enumeration represents the thresholding method.

Enumerator
LPVThresholdCustom 

Use the used-specified threshold value or range

LPVThresholdAdaptGlobal 

Use the optimal global-adaptive threshold value or range, which is calculated base on the entire input image.

LPVThresholdAdaptLocal 

Use the optimal local-adaptive threshold value or range, which is calculated base on the nearby region around individual position.

◆ LPVTransformType

This enumeration represents the type of a transformation matrix.

Enumerator
LPVTransformRigid 

Rigid transform, support translate and rotate

LPVTransformSimilar 

Similar transform, support translate, rotate and scale

LPVTransformAffine 

Affine transform, support translate, rotate, scale and skew

LPVTransformHomography 

Homography transform, support translate, rotate, scale and perspective projection