C# Класс SetVision.Vision.ContourAnalyzer

Наследование: ICardDetector
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AnalyzeNode ( ContourNode cardNode ) : ContourNode>.KeyValuePair
DrawContours ( ContourNode node, Byte>.Image canvas ) : void
DrawContours ( ContourNode node, Byte>.Image canvas, System color ) : void
FindBestColoredPixel ( Byte>.Image image, Byte>.Image &debug ) : Point
FindMostOccuringColor ( Byte>.Image image, int step ) : CardColor
GiveCards ( ContourNode tree ) : ContourNode>>.IEnumerable
IsCard ( ContourNode node ) : bool
IsDiamond ( ContourNode node ) : bool
IsOval ( ContourNode node ) : bool
IsSquiggle ( ContourNode node ) : bool
LocateCards ( Byte>.Image table, Settings settings ) : Point>.Dictionary

LocateCards works by analyzing the contours in the image. For instance, the Diamond in Set is a polygon with exactly 4 vertices. The Oval has no such features yet. The Squiggle is not convex, but concave and has edges in a 'right bend', instead of only 'left bends' All these shapes are inside the contour of a (white) card, which is a rounded square. Cards may also be the (only) exterior boundaries

Приватные методы

Метод Описание
AssignAverageColors ( ContourNode node, Settings settings ) : void
AssignColor ( ContourNode node, Byte>.Image image, Settings settings ) : void
AssignColors ( ContourNode tree, Byte>.Image image, Settings settings ) : void
AssignFill ( ContourNode node ) : void
AssignFills ( ContourNode tree ) : void
AssignImage ( ContourNode node, Byte>.Image image, bool setROI ) : void
AssignImages ( ContourNode tree, Byte>.Image image, bool setROI ) : void
AssignShape ( ContourNode node ) : void
AssignShapes ( ContourNode tree ) : void
ClassifyBgr ( Bgr col ) : CardColor
ClassifyBgr2 ( Bgr col ) : CardColor
ClassifyHsv ( Hsv hsv ) : CardColor
ColorDistance ( Bgr a, Bgr b ) : double
ColorDistance ( Hsv a, Hsv b ) : double
DetermineFill ( ContourNode cardNode ) : Fill
ExtractContourImage ( Byte>.Image image, Contour contour, Byte>.Image &mask ) : Byte>.Image
FilterNode ( ContourNode node ) : void
FilterTree ( ContourNode tree ) : void
RecognizeColor ( ContourNode node, Settings settings ) : CardColor
isDashed ( ContourNode inner ) : bool
isGray ( Bgr col, double range ) : bool

Check if R, G and B are closer than range together

Описание методов

AnalyzeNode() публичный статический Метод

public static AnalyzeNode ( ContourNode cardNode ) : ContourNode>.KeyValuePair
cardNode ContourNode
Результат ContourNode>.KeyValuePair

DrawContours() публичный статический Метод

public static DrawContours ( ContourNode node, Byte>.Image canvas ) : void
node ContourNode
canvas Byte>.Image
Результат void

DrawContours() публичный статический Метод

public static DrawContours ( ContourNode node, Byte>.Image canvas, System color ) : void
node ContourNode
canvas Byte>.Image
color System
Результат void

FindBestColoredPixel() публичный статический Метод

public static FindBestColoredPixel ( Byte>.Image image, Byte>.Image &debug ) : Point
image Byte>.Image
debug Byte>.Image
Результат Point

FindMostOccuringColor() публичный статический Метод

public static FindMostOccuringColor ( Byte>.Image image, int step ) : CardColor
image Byte>.Image
step int
Результат CardColor

GiveCards() публичный статический Метод

public static GiveCards ( ContourNode tree ) : ContourNode>>.IEnumerable
tree ContourNode
Результат ContourNode>>.IEnumerable

IsCard() публичный статический Метод

public static IsCard ( ContourNode node ) : bool
node ContourNode
Результат bool

IsDiamond() публичный статический Метод

public static IsDiamond ( ContourNode node ) : bool
node ContourNode
Результат bool

IsOval() публичный статический Метод

public static IsOval ( ContourNode node ) : bool
node ContourNode
Результат bool

IsSquiggle() публичный статический Метод

public static IsSquiggle ( ContourNode node ) : bool
node ContourNode
Результат bool

LocateCards() публичный Метод

LocateCards works by analyzing the contours in the image. For instance, the Diamond in Set is a polygon with exactly 4 vertices. The Oval has no such features yet. The Squiggle is not convex, but concave and has edges in a 'right bend', instead of only 'left bends' All these shapes are inside the contour of a (white) card, which is a rounded square. Cards may also be the (only) exterior boundaries
public LocateCards ( Byte>.Image table, Settings settings ) : Point>.Dictionary
table Byte>.Image An image displaying the table with the Set cards
settings Settings
Результат Point>.Dictionary