DetectFaceAttributesResult.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. #ifndef ALIBABACLOUD_CLOUDAUTH_MODEL_DETECTFACEATTRIBUTESRESULT_H_
  17. #define ALIBABACLOUD_CLOUDAUTH_MODEL_DETECTFACEATTRIBUTESRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/cloudauth/CloudauthExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Cloudauth
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_CLOUDAUTH_EXPORT DetectFaceAttributesResult : public ServiceResult
  30. {
  31. public:
  32. struct Data
  33. {
  34. struct FaceAttributesDetectInfo
  35. {
  36. struct FaceRect
  37. {
  38. int left;
  39. int top;
  40. int height;
  41. int width;
  42. };
  43. struct FaceAttributes
  44. {
  45. struct Gender
  46. {
  47. float score;
  48. std::string value;
  49. };
  50. struct Smiling
  51. {
  52. float value;
  53. float threshold;
  54. };
  55. struct Headpose
  56. {
  57. float pitchAngle;
  58. float rollAngle;
  59. float yawAngle;
  60. };
  61. std::string ethnicity;
  62. std::string facetype;
  63. Headpose headpose;
  64. std::string glasses;
  65. float blur;
  66. Smiling smiling;
  67. Gender gender;
  68. int age;
  69. };
  70. FaceAttributes faceAttributes;
  71. FaceRect faceRect;
  72. };
  73. int imgWidth;
  74. int imgHeight;
  75. std::vector<FaceAttributesDetectInfo> faceInfos;
  76. };
  77. DetectFaceAttributesResult();
  78. explicit DetectFaceAttributesResult(const std::string &payload);
  79. ~DetectFaceAttributesResult();
  80. std::string getMessage()const;
  81. Data getData()const;
  82. std::string getCode()const;
  83. bool getSuccess()const;
  84. protected:
  85. void parse(const std::string &payload);
  86. private:
  87. std::string message_;
  88. Data data_;
  89. std::string code_;
  90. bool success_;
  91. };
  92. }
  93. }
  94. }
  95. #endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_DETECTFACEATTRIBUTESRESULT_H_