Method | Description | |
---|---|---|
BlobMeanColor ( CvBlobs blobs, |
Calculates mean color of a blob in an image.
|
|
CalcAngle ( |
Calculates angle orientation of a blob. This function uses central moments so cvCentralMoments should have been called before for this blob. (cvAngle)
|
|
CalcCentroid ( |
Calculates centroid. Centroid will be returned and stored in the blob structure. (cvCentroid)
|
|
ContourChainCodePerimeter ( |
Calculates perimeter of a chain code contour.
|
|
ContourPolygonArea ( CvContourPolygon polygon ) : double |
Calculates area of a polygonal contour.
|
|
ContourPolygonCircularity ( CvContourPolygon polygon ) : double |
Calculates the circularity of a polygon (compactness measure).
|
|
ContourPolygonPerimeter ( CvContourPolygon polygon ) : double |
Calculates perimeter of a chain code contour.
|
|
ConvertChainCodesToPolygon ( |
Convert a chain code contour to a polygon.
|
|
FilterByArea ( CvBlobs blobs, int minArea, int maxArea ) : void |
Filter blobs by area. Those blobs whose areas are not in range will be erased from the input list of blobs. (cvFilterByArea)
|
|
FilterByLabel ( CvBlobs blobs, int label ) : void |
Filter blobs by label. Delete all blobs except those with label l.
|
|
FilterLabels ( CvBlobs blobs, Mat imgOut ) : void |
Draw a binary image with the blobs that have been given. (cvFilterLabels)
|
|
GetLabel ( CvBlobs blobs, int x, int y ) : int |
Get the label value from a labeled image.
|
|
GreaterBlob ( CvBlobs blobs ) : |
Find greater blob. (cvGreaterBlob)
|
|
Label ( Mat img, CvBlobs blobs ) : int |
Label the connected parts of a binary image. (cvLabel)
|
|
LargestBlob ( CvBlobs blobs ) : |
Find the largest blob. (cvLargestBlob)
|
|
PolygonContourConvexHull ( CvContourPolygon polygon ) : CvContourPolygon |
Calculates convex hull of a contour. Uses the Melkman Algorithm. Code based on the version in http://w3.impa.br/~rdcastan/Cgeometry/.
|
|
RenderBlob ( |
Draws or prints information about a blob.
|
|
RenderBlob ( |
Draws or prints information about a blob.
|
|
RenderBlob ( |
Draws or prints information about a blob.
|
|
RenderBlobs ( CvBlobs blobs, Mat imgSource, Mat imgDest ) : void |
Draws or prints information about blobs. (cvRenderBlobs)
|
|
RenderBlobs ( CvBlobs blobs, Mat imgSource, Mat imgDest, RenderBlobsMode mode, double alpha = 1.0 ) : void |
Draws or prints information about blobs. (cvRenderBlobs)
|
|
RenderContourChainCode ( |
Draw a contour.
|
|
RenderContourChainCode ( |
Draw a contour.
|
|
RenderContourPolygon ( CvContourPolygon contour, Mat img ) : void |
Draw a polygon.
|
|
RenderContourPolygon ( CvContourPolygon contour, Mat img, Scalar color ) : void |
Draw a polygon.
|
|
RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest ) : void |
Prints tracks information.
|
|
RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest, RenderTracksMode mode ) : void |
Prints tracks information.
|
|
RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest, RenderTracksMode mode, Scalar textColor, HersheyFonts fontFace = HersheyFonts.HersheySimplex, double fontScale = 1d, int thickness = 1 ) : void |
Prints tracks information.
|
|
SaveImageBlob ( string fileName, Mat img, |
Save the image of a blob to a file. The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure. Then the function saves a copy of the part of the image where the blob is.
|
|
SimplifyPolygon ( CvContourPolygon polygon ) : CvContourPolygon |
Simplify a polygon reducing the number of vertex according the distance "delta". Uses a version of the Ramer-Douglas-Peucker algorithm (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
|
|
SimplifyPolygon ( CvContourPolygon polygon, double delta ) : CvContourPolygon |
Simplify a polygon reducing the number of vertex according the distance "delta". Uses a version of the Ramer-Douglas-Peucker algorithm (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
|
|
UpdateTracks ( CvBlobs blobs, CvTracks tracks, double thDistance, int thInactive ) : void |
Updates list of tracks based on current blobs.
|
|
UpdateTracks ( CvBlobs blobs, CvTracks tracks, double thDistance, int thInactive, int thActive ) : void |
Updates list of tracks based on current blobs. Tracking based on: A. Senior, A. Hampapur, Y-L Tian, L. Brown, S. Pankanti, R. Bolle. Appearance Models for Occlusion Handling. Second International workshop on Performance Evaluation of Tracking and Surveillance Systems & CVPR'01. December, 2001. (http://www.research.ibm.com/peoplevision/PETS2001.pdf) |
|
WriteContourPolygonCsv ( CvContourPolygon polygon, string filename ) : void |
Write a contour to a CSV (Comma-separated values) file.
|
|
WriteContourPolygonSvg ( CvContourPolygon polygon, string fileName ) : void |
Write a contour to a SVG file.
|
|
WriteContourPolygonSvg ( CvContourPolygon polygon, string fileName, Scalar stroke, Scalar fill ) : void |
Write a contour to a SVG file.
|
public static BlobMeanColor ( CvBlobs blobs, |
||
blobs | CvBlobs | Blob list |
targetBlob | The target blob | |
originalImage | Mat | Original image. |
return | Scalar |
public static CalcAngle ( |
||
blob | Blob. | |
return | double |
public static CalcCentroid ( |
||
blob | Blob whose centroid will be calculated. | |
return | Point2d |
public static ContourChainCodePerimeter ( |
||
cc | Contour (chain code type). | |
return | double |
public static ContourPolygonArea ( CvContourPolygon polygon ) : double | ||
polygon | CvContourPolygon | Contour (polygon type). |
return | double |
public static ContourPolygonCircularity ( CvContourPolygon polygon ) : double | ||
polygon | CvContourPolygon | Contour (polygon type). |
return | double |
public static ContourPolygonPerimeter ( CvContourPolygon polygon ) : double | ||
polygon | CvContourPolygon | Contour (polygon type). |
return | double |
public static ConvertChainCodesToPolygon ( |
||
cc | Chain code contour. | |
return | CvContourPolygon |
public static FilterByArea ( CvBlobs blobs, int minArea, int maxArea ) : void | ||
blobs | CvBlobs | List of blobs. |
minArea | int | Minimun area. |
maxArea | int | Maximun area. |
return | void |
public static FilterByLabel ( CvBlobs blobs, int label ) : void | ||
blobs | CvBlobs | List of blobs. |
label | int | Label to leave. |
return | void |
public static FilterLabels ( CvBlobs blobs, Mat imgOut ) : void | ||
blobs | CvBlobs | List of blobs to be drawn. |
imgOut | Mat | Output binary image (depth=IPL_DEPTH_8U and nchannels=1). |
return | void |
public static GetLabel ( CvBlobs blobs, int x, int y ) : int | ||
blobs | CvBlobs | Blob data. |
x | int | X coordenate. |
y | int | Y coordenate. |
return | int |
public static GreaterBlob ( CvBlobs blobs ) : |
||
blobs | CvBlobs | List of blobs. |
return |
public static Label ( Mat img, CvBlobs blobs ) : int | ||
img | Mat | Input binary image (depth=IPL_DEPTH_8U and num. channels=1). |
blobs | CvBlobs | List of blobs. |
return | int |
public static LargestBlob ( CvBlobs blobs ) : |
||
blobs | CvBlobs | List of blobs. |
return |
public static PolygonContourConvexHull ( CvContourPolygon polygon ) : CvContourPolygon | ||
polygon | CvContourPolygon | Contour (polygon type). |
return | CvContourPolygon |
public static RenderBlob ( |
||
labels | Label data. | |
blob | Blob. | |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
return | void |
public static RenderBlob ( |
||
labels | Label data. | |
blob | Blob. | |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
mode | RenderBlobsMode | Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE. |
return | void |
public static RenderBlob ( |
||
labels | Label data. | |
blob | Blob. | |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
mode | RenderBlobsMode | Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE. |
color | Scalar | Color to render (if CV_BLOB_RENDER_COLOR is used). |
alpha | double | If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default). |
return | void |
public static RenderBlobs ( CvBlobs blobs, Mat imgSource, Mat imgDest ) : void | ||
blobs | CvBlobs | List of blobs. |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
return | void |
public static RenderBlobs ( CvBlobs blobs, Mat imgSource, Mat imgDest, RenderBlobsMode mode, double alpha = 1.0 ) : void | ||
blobs | CvBlobs | List of blobs. |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
mode | RenderBlobsMode | Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE. |
alpha | double | If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default). |
return | void |
public static RenderContourChainCode ( |
||
contour | Chain code contour. | |
img | Mat | Image to draw on. |
return | void |
public static RenderContourChainCode ( |
||
contour | Chain code contour. | |
img | Mat | Image to draw on. |
color | Scalar | Color to draw (default, white). |
return | void |
public static RenderContourPolygon ( CvContourPolygon contour, Mat img ) : void | ||
contour | CvContourPolygon | Polygon contour. |
img | Mat | Image to draw on. |
return | void |
public static RenderContourPolygon ( CvContourPolygon contour, Mat img, Scalar color ) : void | ||
contour | CvContourPolygon | Polygon contour. |
img | Mat | Image to draw on. |
color | Scalar | Color to draw (default, white). |
return | void |
public static RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest ) : void | ||
tracks | CvTracks | List of tracks. |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
return | void |
public static RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest, RenderTracksMode mode ) : void | ||
tracks | CvTracks | List of tracks. |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
mode | RenderTracksMode | Render mode. By default is CV_TRACK_RENDER_ID. |
return | void |
public static RenderTracks ( CvTracks tracks, Mat imgSource, Mat imgDest, RenderTracksMode mode, Scalar textColor, HersheyFonts fontFace = HersheyFonts.HersheySimplex, double fontScale = 1d, int thickness = 1 ) : void | ||
tracks | CvTracks | List of tracks. |
imgSource | Mat | Input image (depth=IPL_DEPTH_8U and num. channels=3). |
imgDest | Mat | Output image (depth=IPL_DEPTH_8U and num. channels=3). |
mode | RenderTracksMode | Render mode. By default is CV_TRACK_RENDER_ID. |
textColor | Scalar | |
fontFace | HersheyFonts | |
fontScale | double | |
thickness | int | |
return | void |
public static SaveImageBlob ( string fileName, Mat img, |
||
fileName | string | Name of the file. |
img | Mat | Image. |
blob | Blob. | |
return | void |
public static SimplifyPolygon ( CvContourPolygon polygon ) : CvContourPolygon | ||
polygon | CvContourPolygon | Contour (polygon type). |
return | CvContourPolygon |
public static SimplifyPolygon ( CvContourPolygon polygon, double delta ) : CvContourPolygon | ||
polygon | CvContourPolygon | Contour (polygon type). |
delta | double | Minimun distance. |
return | CvContourPolygon |
public static UpdateTracks ( CvBlobs blobs, CvTracks tracks, double thDistance, int thInactive ) : void | ||
blobs | CvBlobs | List of blobs. |
tracks | CvTracks | List of tracks. |
thDistance | double | Max distance to determine when a track and a blob match. |
thInactive | int | Max number of frames a track can be inactive. |
return | void |
public static UpdateTracks ( CvBlobs blobs, CvTracks tracks, double thDistance, int thInactive, int thActive ) : void | ||
blobs | CvBlobs | List of blobs. |
tracks | CvTracks | List of tracks. |
thDistance | double | Max distance to determine when a track and a blob match. |
thInactive | int | Max number of frames a track can be inactive. |
thActive | int | If a track becomes inactive but it has been active less than thActive frames, the track will be deleted. |
return | void |
public static WriteContourPolygonCsv ( CvContourPolygon polygon, string filename ) : void | ||
polygon | CvContourPolygon | Polygon contour. |
filename | string | File name. |
return | void |
public static WriteContourPolygonSvg ( CvContourPolygon polygon, string fileName ) : void | ||
polygon | CvContourPolygon | Polygon contour. |
fileName | string | File name. |
return | void |
public static WriteContourPolygonSvg ( CvContourPolygon polygon, string fileName, Scalar stroke, Scalar fill ) : void | ||
polygon | CvContourPolygon | Polygon contour. |
fileName | string | File name. |
stroke | Scalar | Stroke color (black by default). |
fill | Scalar | Fill color (white by default). |
return | void |