Update SearchFace.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-11-24 Version: patch
|
||||
- Update SearchFace.
|
||||
|
||||
2020-11-24 Version: patch
|
||||
- Generated 2020-01-01 for `ddoscoo`.
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace AlibabaCloud
|
||||
SearchFaceRequest();
|
||||
~SearchFaceRequest();
|
||||
|
||||
std::string getDbNames()const;
|
||||
void setDbNames(const std::string& dbNames);
|
||||
std::string getDbName()const;
|
||||
void setDbName(const std::string& dbName);
|
||||
std::string getImageUrl()const;
|
||||
@@ -43,6 +45,7 @@ namespace AlibabaCloud
|
||||
void setLimit(int limit);
|
||||
|
||||
private:
|
||||
std::string dbNames_;
|
||||
std::string dbName_;
|
||||
std::string imageUrl_;
|
||||
int limit_;
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace AlibabaCloud
|
||||
std::string faceId;
|
||||
std::string entityId;
|
||||
float score;
|
||||
std::string dbName;
|
||||
std::string extraData;
|
||||
};
|
||||
std::vector<MatchListItem::FaceItemsItem> faceItems;
|
||||
|
||||
@@ -27,6 +27,17 @@ SearchFaceRequest::SearchFaceRequest() :
|
||||
SearchFaceRequest::~SearchFaceRequest()
|
||||
{}
|
||||
|
||||
std::string SearchFaceRequest::getDbNames()const
|
||||
{
|
||||
return dbNames_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setDbNames(const std::string& dbNames)
|
||||
{
|
||||
dbNames_ = dbNames;
|
||||
setParameter("DbNames", dbNames);
|
||||
}
|
||||
|
||||
std::string SearchFaceRequest::getDbName()const
|
||||
{
|
||||
return dbName_;
|
||||
|
||||
@@ -50,12 +50,14 @@ void SearchFaceResult::parse(const std::string &payload)
|
||||
Data::MatchListItem::FaceItemsItem faceItemsObject;
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["FaceId"].isNull())
|
||||
faceItemsObject.faceId = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["FaceId"].asString();
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].isNull())
|
||||
faceItemsObject.score = std::stof(dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].asString());
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].isNull())
|
||||
faceItemsObject.extraData = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].asString();
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["EntityId"].isNull())
|
||||
faceItemsObject.entityId = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["EntityId"].asString();
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].isNull())
|
||||
faceItemsObject.score = std::stof(dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].asString());
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["DbName"].isNull())
|
||||
faceItemsObject.dbName = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["DbName"].asString();
|
||||
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].isNull())
|
||||
faceItemsObject.extraData = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].asString();
|
||||
matchListItemObject.faceItems.push_back(faceItemsObject);
|
||||
}
|
||||
auto locationNode = value["Location"];
|
||||
@@ -63,10 +65,10 @@ void SearchFaceResult::parse(const std::string &payload)
|
||||
matchListItemObject.location.x = std::stoi(locationNode["X"].asString());
|
||||
if(!locationNode["Y"].isNull())
|
||||
matchListItemObject.location.y = std::stoi(locationNode["Y"].asString());
|
||||
if(!locationNode["Width"].isNull())
|
||||
matchListItemObject.location.width = std::stoi(locationNode["Width"].asString());
|
||||
if(!locationNode["Height"].isNull())
|
||||
matchListItemObject.location.height = std::stoi(locationNode["Height"].asString());
|
||||
if(!locationNode["Width"].isNull())
|
||||
matchListItemObject.location.width = std::stoi(locationNode["Width"].asString());
|
||||
data_.matchList.push_back(matchListItemObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user