Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shape Recognition for ios

Analyse if a points array can be a shape and correct it to a regular shape

How to use:

[[TXShapeRecognizer sharedInstance] Analyze: points compleleted:^(TXShapeType result, NSArray *output) {
    switch (result) {
        case TXShapeStraight:
            NSLog(@"Stright");
            break;
        case TXShapeRectangle:
            NSLog(@"Rectangle");
            break;
        case TXShapeCirle:
            NSLog(@"Circle");
            break;
        case TXShapeTriangle:
            NSLog(@"Triangle");
            break;
        default:
            NSLog(@"Others");
            break;
    }
}];

the parameter "points" is an array of CGPoint, in the return call back, the result will be fllow option: TXShapeOther
TXShapeStraight
TXShapeCirle
TXShapeRectangle
TXShapeTriangle

if the result is TXShapeOther, the output will be nil, if not, the output will also be an array of GCPoint, you can use this array to build a regular shape

About

Shape recognition:Analyse if a points array can be a shape and correct it to a regular shape

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages