Update SearchFace.
This commit is contained in:
@@ -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