ScanImageResult.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_
  17. #define ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/imageaudit/ImageauditExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Imageaudit
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_IMAGEAUDIT_EXPORT ScanImageResult : public ServiceResult
  30. {
  31. public:
  32. struct Data
  33. {
  34. struct Result
  35. {
  36. struct SubResult
  37. {
  38. struct Frame
  39. {
  40. float rate;
  41. std::string uRL;
  42. };
  43. struct SfaceData
  44. {
  45. struct Face
  46. {
  47. float rate;
  48. std::string id;
  49. std::string name;
  50. };
  51. float x;
  52. float y;
  53. float height;
  54. float width;
  55. std::vector<SfaceData::Face> faces;
  56. };
  57. struct HintWordsInfo
  58. {
  59. std::string context;
  60. };
  61. struct LogoData
  62. {
  63. std::string type;
  64. float x;
  65. float y;
  66. float height;
  67. float width;
  68. std::string name;
  69. };
  70. struct ProgramCodeData
  71. {
  72. float x;
  73. float y;
  74. float height;
  75. float width;
  76. };
  77. std::vector<SubResult::Frame> frames;
  78. std::string suggestion;
  79. std::vector<SubResult::SfaceData> sfaceDataList;
  80. float rate;
  81. std::vector<std::string> oCRDataList;
  82. std::vector<SubResult::HintWordsInfo> hintWordsInfoList;
  83. std::string label;
  84. std::vector<SubResult::LogoData> logoDataList;
  85. std::string scene;
  86. std::vector<SubResult::ProgramCodeData> programCodeDataList;
  87. };
  88. std::string taskId;
  89. std::string dataId;
  90. std::string imageURL;
  91. std::vector<Result::SubResult> subResults;
  92. };
  93. std::vector<Result> results;
  94. };
  95. ScanImageResult();
  96. explicit ScanImageResult(const std::string &payload);
  97. ~ScanImageResult();
  98. Data getData()const;
  99. protected:
  100. void parse(const std::string &payload);
  101. private:
  102. Data data_;
  103. };
  104. }
  105. }
  106. }
  107. #endif // !ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_