Face++ 第三方类库的使用文档

本文档介绍了如何在iOS应用中使用Face++ SDK进行人脸识别,包括人脸检测、五官定位、微笑程度分析等功能。通过示例代码展示Face++ API的调用,如检测、属性分析、Person管理等。
摘要由CSDN通过智能技术生成

Face++主要实现人脸的扫描,定位五官位置。判断微笑程度,年龄等。

实现人脸识别等。

下载地址:http://www.faceplusplus.com.cn

以下是对此类库的使用笔记


//

//  RootViewController.m

//  FacePlusPlusDemo_and_SDK

//

//  Created by lihao on 14-3-26.

//  Copyright (c) 2014 lihao All rights reserved.

//


#import "RootViewController.h"

#import "APIKey+APISecret.h"

#import "FaceppAPI.h"


@interface RootViewController ()

{

    UIImage * _image;

    UIImage * _image2;

}

@property(nonatomic,retain)UIImageView * imageView;


@end


@implementation RootViewController


-(void)dealloc{

    [self.imageView release];

    [super dealloc];

}


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil

{

    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];

    if (self) {

        // Custom initialization

        _image = [UIImage imageNamed:@"face.jpg"];

        _image2 = [UIImage imageNamed:@"5E151821891.jpg"];

    }

    return self;

}


- (void)viewDidLoad

{

    [super viewDidLoad];

// Do any additional setup after loading the view.

    

//添加到UIImageView上,方便框出脸部等

    self.imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, 150, _image.size.height/(_image.size.width/150))];

    [_imageView setImage:_image];

    [self.view addSubview:_imageView];

    [_imageView release];

    

    UIButton * firstButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [firstButton setFrame:CGRectMake(10, 200, 150, 30)];

    [firstButton setBackgroundColor:[UIColor yellowColor]];

    [firstButton setTitle:@"/detection/detect" forState:UIControlStateNormal];

    [firstButton addTarget:self action:@selector(firstButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:firstButton];

    

    UIButton * secondButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [secondButton setFrame:CGRectMake(10, 250, 150, 30)];

    [secondButton setBackgroundColor:[UIColor yellowColor]];

    [secondButton setTitle:@"/detection/landmark" forState:UIControlStateNormal];

    [secondButton addTarget:self action:@selector(secondButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:secondButton];

    

    UIButton * thirdButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [thirdButton setFrame:CGRectMake(10, 300, 150, 30)];

    [thirdButton setBackgroundColor:[UIColor yellowColor]];

    [thirdButton setTitle:@"/group/create/delete" forState:UIControlStateNormal];

    [thirdButton addTarget:self action:@selector(thirdButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:thirdButton];

    

    UIButton * forthButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [forthButton setFrame:CGRectMake(10, 350, 150, 30)];

    [forthButton setBackgroundColor:[UIColor yellowColor]];

    [forthButton setTitle:@"/person/create/delete" forState:UIControlStateNormal];

    [forthButton addTarget:self action:@selector(forthButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:forthButton];

    

    UIButton * fifthButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [fifthButton setFrame:CGRectMake(10, 400, 150, 30)];

    [fifthButton setBackgroundColor:[UIColor yellowColor]];

    [fifthButton setTitle:@"/per/add/rem/face" forState:UIControlStateNormal];

    [fifthButton addTarget:self action:@selector(fifthButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:fifthButton];

    

    UIButton * sixButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [sixButton setFrame:CGRectMake(10, 450, 150, 30)];

    [sixButton setBackgroundColor:[UIColor yellowColor]];

    [sixButton setTitle:@"/person/get_info" forState:UIControlStateNormal];

    [sixButton addTarget:self action:@selector(sixButtonClick:) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:sixButton];


    UIButton * sevenButton = [UIButton buttonWithType:UIButtonTypeSystem];

    [sevenButton setFrame:CGRectMake(10, 500, 150, 30)];

    [sevenButton setBackgroundColor:[UIColor yellowColor]];

    [sevenButton setTitle:@"/person/set_info" forState:UIControlStateNormal];

    [sevenButton addTarget:self action:@selector(sevenButtonClick:) forControlEvents:UIControlEventTouchUpInside];

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值