1 /* 2 * Copyright 2009-2017 Alibaba Cloud All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEIDENTITYCARDRESULT_H_ 18 #define ALIBABACLOUD_OCR_MODEL_RECOGNIZEIDENTITYCARDRESULT_H_ 19 20 #include <string> 21 #include <vector> 22 #include <utility> 23 #include <alibabacloud/core/ServiceResult.h> 24 #include <alibabacloud/ocr/OcrExport.h> 25 26 namespace AlibabaCloud 27 { 28 namespace Ocr 29 { 30 namespace Model 31 { 32 class ALIBABACLOUD_OCR_EXPORT RecognizeIdentityCardResult : public ServiceResult 33 { 34 public: 35 struct Data 36 { 37 struct FrontResult 38 { 39 struct FaceRectangle 40 { 41 struct Center 42 { 43 float x; 44 float y; 45 }; 46 struct Size 47 { 48 float height; 49 float width; 50 }; 51 Center center; 52 float angle; 53 Size size; 54 }; 55 struct CardArea 56 { 57 float x; 58 float y; 59 }; 60 struct FaceRectVertice 61 { 62 float x; 63 float y; 64 }; 65 std::string address; 66 FaceRectangle faceRectangle; 67 std::vector<FaceRectVertice> faceRectVertices; 68 std::vector<CardArea> cardAreas; 69 std::string gender; 70 std::string nationality; 71 std::string name; 72 std::string iDNumber; 73 std::string birthDate; 74 }; 75 struct BackResult 76 { 77 std::string startDate; 78 std::string issue; 79 std::string endDate; 80 }; 81 FrontResult frontResult; 82 BackResult backResult; 83 }; 84 85 86 RecognizeIdentityCardResult(); 87 explicit RecognizeIdentityCardResult(const std::string &payload); 88 ~RecognizeIdentityCardResult(); 89 Data getData()const; 90 91 protected: 92 void parse(const std::string &payload); 93 private: 94 Data data_; 95 96 }; 97 } 98 } 99 } 100 #endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEIDENTITYCARDRESULT_H_