Release GenerateHumanAnimeStyle CountCrowd.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-11-13 Version: patch
|
||||
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||
|
||||
2020-11-13 Version: patch
|
||||
- Release SegmentHDSky SegmentHDCommonImage.
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ set(facebody_public_header_model
|
||||
include/alibabacloud/facebody/model/BodyPostureResult.h
|
||||
include/alibabacloud/facebody/model/CompareFaceRequest.h
|
||||
include/alibabacloud/facebody/model/CompareFaceResult.h
|
||||
include/alibabacloud/facebody/model/CountCrowdRequest.h
|
||||
include/alibabacloud/facebody/model/CountCrowdResult.h
|
||||
include/alibabacloud/facebody/model/CreateFaceDbRequest.h
|
||||
include/alibabacloud/facebody/model/CreateFaceDbResult.h
|
||||
include/alibabacloud/facebody/model/DeleteFaceRequest.h
|
||||
@@ -71,6 +73,8 @@ set(facebody_public_header_model
|
||||
include/alibabacloud/facebody/model/FaceMakeupResult.h
|
||||
include/alibabacloud/facebody/model/FaceTidyupRequest.h
|
||||
include/alibabacloud/facebody/model/FaceTidyupResult.h
|
||||
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleRequest.h
|
||||
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleResult.h
|
||||
include/alibabacloud/facebody/model/GetFaceEntityRequest.h
|
||||
include/alibabacloud/facebody/model/GetFaceEntityResult.h
|
||||
include/alibabacloud/facebody/model/HandPostureRequest.h
|
||||
@@ -110,6 +114,8 @@ set(facebody_src
|
||||
src/model/BodyPostureResult.cc
|
||||
src/model/CompareFaceRequest.cc
|
||||
src/model/CompareFaceResult.cc
|
||||
src/model/CountCrowdRequest.cc
|
||||
src/model/CountCrowdResult.cc
|
||||
src/model/CreateFaceDbRequest.cc
|
||||
src/model/CreateFaceDbResult.cc
|
||||
src/model/DeleteFaceRequest.cc
|
||||
@@ -150,6 +156,8 @@ set(facebody_src
|
||||
src/model/FaceMakeupResult.cc
|
||||
src/model/FaceTidyupRequest.cc
|
||||
src/model/FaceTidyupResult.cc
|
||||
src/model/GenerateHumanAnimeStyleRequest.cc
|
||||
src/model/GenerateHumanAnimeStyleResult.cc
|
||||
src/model/GetFaceEntityRequest.cc
|
||||
src/model/GetFaceEntityResult.cc
|
||||
src/model/HandPostureRequest.cc
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "model/BodyPostureResult.h"
|
||||
#include "model/CompareFaceRequest.h"
|
||||
#include "model/CompareFaceResult.h"
|
||||
#include "model/CountCrowdRequest.h"
|
||||
#include "model/CountCrowdResult.h"
|
||||
#include "model/CreateFaceDbRequest.h"
|
||||
#include "model/CreateFaceDbResult.h"
|
||||
#include "model/DeleteFaceRequest.h"
|
||||
@@ -72,6 +74,8 @@
|
||||
#include "model/FaceMakeupResult.h"
|
||||
#include "model/FaceTidyupRequest.h"
|
||||
#include "model/FaceTidyupResult.h"
|
||||
#include "model/GenerateHumanAnimeStyleRequest.h"
|
||||
#include "model/GenerateHumanAnimeStyleResult.h"
|
||||
#include "model/GetFaceEntityRequest.h"
|
||||
#include "model/GetFaceEntityResult.h"
|
||||
#include "model/HandPostureRequest.h"
|
||||
@@ -122,6 +126,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CompareFaceResult> CompareFaceOutcome;
|
||||
typedef std::future<CompareFaceOutcome> CompareFaceOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::CompareFaceRequest&, const CompareFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFaceAsyncHandler;
|
||||
typedef Outcome<Error, Model::CountCrowdResult> CountCrowdOutcome;
|
||||
typedef std::future<CountCrowdOutcome> CountCrowdOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::CountCrowdRequest&, const CountCrowdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CountCrowdAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateFaceDbResult> CreateFaceDbOutcome;
|
||||
typedef std::future<CreateFaceDbOutcome> CreateFaceDbOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::CreateFaceDbRequest&, const CreateFaceDbOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateFaceDbAsyncHandler;
|
||||
@@ -182,6 +189,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::FaceTidyupResult> FaceTidyupOutcome;
|
||||
typedef std::future<FaceTidyupOutcome> FaceTidyupOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::FaceTidyupRequest&, const FaceTidyupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FaceTidyupAsyncHandler;
|
||||
typedef Outcome<Error, Model::GenerateHumanAnimeStyleResult> GenerateHumanAnimeStyleOutcome;
|
||||
typedef std::future<GenerateHumanAnimeStyleOutcome> GenerateHumanAnimeStyleOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::GenerateHumanAnimeStyleRequest&, const GenerateHumanAnimeStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateHumanAnimeStyleAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetFaceEntityResult> GetFaceEntityOutcome;
|
||||
typedef std::future<GetFaceEntityOutcome> GetFaceEntityOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::GetFaceEntityRequest&, const GetFaceEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFaceEntityAsyncHandler;
|
||||
@@ -241,6 +251,9 @@ namespace AlibabaCloud
|
||||
CompareFaceOutcome compareFace(const Model::CompareFaceRequest &request)const;
|
||||
void compareFaceAsync(const Model::CompareFaceRequest& request, const CompareFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CompareFaceOutcomeCallable compareFaceCallable(const Model::CompareFaceRequest& request) const;
|
||||
CountCrowdOutcome countCrowd(const Model::CountCrowdRequest &request)const;
|
||||
void countCrowdAsync(const Model::CountCrowdRequest& request, const CountCrowdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CountCrowdOutcomeCallable countCrowdCallable(const Model::CountCrowdRequest& request) const;
|
||||
CreateFaceDbOutcome createFaceDb(const Model::CreateFaceDbRequest &request)const;
|
||||
void createFaceDbAsync(const Model::CreateFaceDbRequest& request, const CreateFaceDbAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateFaceDbOutcomeCallable createFaceDbCallable(const Model::CreateFaceDbRequest& request) const;
|
||||
@@ -301,6 +314,9 @@ namespace AlibabaCloud
|
||||
FaceTidyupOutcome faceTidyup(const Model::FaceTidyupRequest &request)const;
|
||||
void faceTidyupAsync(const Model::FaceTidyupRequest& request, const FaceTidyupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
FaceTidyupOutcomeCallable faceTidyupCallable(const Model::FaceTidyupRequest& request) const;
|
||||
GenerateHumanAnimeStyleOutcome generateHumanAnimeStyle(const Model::GenerateHumanAnimeStyleRequest &request)const;
|
||||
void generateHumanAnimeStyleAsync(const Model::GenerateHumanAnimeStyleRequest& request, const GenerateHumanAnimeStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GenerateHumanAnimeStyleOutcomeCallable generateHumanAnimeStyleCallable(const Model::GenerateHumanAnimeStyleRequest& request) const;
|
||||
GetFaceEntityOutcome getFaceEntity(const Model::GetFaceEntityRequest &request)const;
|
||||
void getFaceEntityAsync(const Model::GetFaceEntityRequest& request, const GetFaceEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetFaceEntityOutcomeCallable getFaceEntityCallable(const Model::GetFaceEntityRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT CountCrowdRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CountCrowdRequest();
|
||||
~CountCrowdRequest();
|
||||
|
||||
bool getIsShow()const;
|
||||
void setIsShow(bool isShow);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
bool isShow_;
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT CountCrowdResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
int peopleNumber;
|
||||
std::string hotMap;
|
||||
};
|
||||
|
||||
|
||||
CountCrowdResult();
|
||||
explicit CountCrowdResult(const std::string &payload);
|
||||
~CountCrowdResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||
@@ -30,17 +30,25 @@ namespace AlibabaCloud
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT ExtractPedestrianFeatureAttributeRequest : public RpcServiceRequest
|
||||
{
|
||||
public:
|
||||
struct UrlList
|
||||
{
|
||||
std::string url;
|
||||
};
|
||||
|
||||
public:
|
||||
ExtractPedestrianFeatureAttributeRequest();
|
||||
~ExtractPedestrianFeatureAttributeRequest();
|
||||
|
||||
std::vector<UrlList> getUrlList()const;
|
||||
void setUrlList(const std::vector<UrlList>& urlList);
|
||||
std::string getMode()const;
|
||||
void setMode(const std::string& mode);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::vector<UrlList> urlList_;
|
||||
std::string mode_;
|
||||
std::string imageURL_;
|
||||
|
||||
|
||||
@@ -34,12 +34,34 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Element
|
||||
{
|
||||
std::string hair;
|
||||
std::string upperType;
|
||||
float upperTypeScore;
|
||||
float qualityScore;
|
||||
std::string lowerColor;
|
||||
std::string gender;
|
||||
std::string feature;
|
||||
float upperColorScore;
|
||||
float lowerColorScore;
|
||||
float genderScore;
|
||||
std::string objType;
|
||||
float lowerTypeScore;
|
||||
float hairScore;
|
||||
std::string upperColor;
|
||||
std::string lowerType;
|
||||
float ageScore;
|
||||
float objTypeScore;
|
||||
std::string age;
|
||||
};
|
||||
std::string hair;
|
||||
std::string upperType;
|
||||
float upperTypeScore;
|
||||
float qualityScore;
|
||||
std::string lowerColor;
|
||||
std::string gender;
|
||||
std::vector<Element> elements;
|
||||
std::string feature;
|
||||
float upperColorScore;
|
||||
float lowerColorScore;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanAnimeStyleRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GenerateHumanAnimeStyleRequest();
|
||||
~GenerateHumanAnimeStyleRequest();
|
||||
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Facebody
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanAnimeStyleResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string imageURL;
|
||||
};
|
||||
|
||||
|
||||
GenerateHumanAnimeStyleResult();
|
||||
explicit GenerateHumanAnimeStyleResult(const std::string &payload);
|
||||
~GenerateHumanAnimeStyleResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||
@@ -231,6 +231,42 @@ FacebodyClient::CompareFaceOutcomeCallable FacebodyClient::compareFaceCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::CountCrowdOutcome FacebodyClient::countCrowd(const CountCrowdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CountCrowdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CountCrowdOutcome(CountCrowdResult(outcome.result()));
|
||||
else
|
||||
return CountCrowdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FacebodyClient::countCrowdAsync(const CountCrowdRequest& request, const CountCrowdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, countCrowd(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FacebodyClient::CountCrowdOutcomeCallable FacebodyClient::countCrowdCallable(const CountCrowdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CountCrowdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->countCrowd(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::CreateFaceDbOutcome FacebodyClient::createFaceDb(const CreateFaceDbRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -951,6 +987,42 @@ FacebodyClient::FaceTidyupOutcomeCallable FacebodyClient::faceTidyupCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::GenerateHumanAnimeStyleOutcome FacebodyClient::generateHumanAnimeStyle(const GenerateHumanAnimeStyleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenerateHumanAnimeStyleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenerateHumanAnimeStyleOutcome(GenerateHumanAnimeStyleResult(outcome.result()));
|
||||
else
|
||||
return GenerateHumanAnimeStyleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FacebodyClient::generateHumanAnimeStyleAsync(const GenerateHumanAnimeStyleRequest& request, const GenerateHumanAnimeStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, generateHumanAnimeStyle(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FacebodyClient::GenerateHumanAnimeStyleOutcomeCallable FacebodyClient::generateHumanAnimeStyleCallable(const GenerateHumanAnimeStyleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenerateHumanAnimeStyleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->generateHumanAnimeStyle(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::GetFaceEntityOutcome FacebodyClient::getFaceEntity(const GetFaceEntityRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -46,20 +46,20 @@ void BodyPostureResult::parse(const std::string &payload)
|
||||
Data::Output outputObject;
|
||||
if(!dataNodeOutputsOutput["HumanCount"].isNull())
|
||||
outputObject.humanCount = std::stoi(dataNodeOutputsOutput["HumanCount"].asString());
|
||||
auto allResultsNode = allOutputsNode["Results"]["Result"];
|
||||
for (auto allOutputsNodeResultsResult : allResultsNode)
|
||||
auto allResultsNode = dataNodeOutputsOutput["Results"]["Result"];
|
||||
for (auto dataNodeOutputsOutputResultsResult : allResultsNode)
|
||||
{
|
||||
Data::Output::Result resultsObject;
|
||||
auto allBodiesNode = allResultsNode["Bodies"]["Body"];
|
||||
for (auto allResultsNodeBodiesBody : allBodiesNode)
|
||||
auto allBodiesNode = dataNodeOutputsOutputResultsResult["Bodies"]["Body"];
|
||||
for (auto dataNodeOutputsOutputResultsResultBodiesBody : allBodiesNode)
|
||||
{
|
||||
Data::Output::Result::Body bodiesObject;
|
||||
if(!allResultsNodeBodiesBody["Confident"].isNull())
|
||||
bodiesObject.confident = std::stof(allResultsNodeBodiesBody["Confident"].asString());
|
||||
if(!allResultsNodeBodiesBody["Label"].isNull())
|
||||
bodiesObject.label = allResultsNodeBodiesBody["Label"].asString();
|
||||
auto allPositionsNode = allBodiesNode["Positions"]["Position"];
|
||||
for (auto allBodiesNodePositionsPosition : allPositionsNode)
|
||||
if(!dataNodeOutputsOutputResultsResultBodiesBody["Confident"].isNull())
|
||||
bodiesObject.confident = std::stof(dataNodeOutputsOutputResultsResultBodiesBody["Confident"].asString());
|
||||
if(!dataNodeOutputsOutputResultsResultBodiesBody["Label"].isNull())
|
||||
bodiesObject.label = dataNodeOutputsOutputResultsResultBodiesBody["Label"].asString();
|
||||
auto allPositionsNode = dataNodeOutputsOutputResultsResultBodiesBody["Positions"]["Position"];
|
||||
for (auto dataNodeOutputsOutputResultsResultBodiesBodyPositionsPosition : allPositionsNode)
|
||||
{
|
||||
Data::Output::Result::Body::Position positionsObject;
|
||||
auto allPoints = value["Points"]["Point"];
|
||||
|
||||
51
facebody/src/model/CountCrowdRequest.cc
Normal file
51
facebody/src/model/CountCrowdRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/CountCrowdRequest.h>
|
||||
|
||||
using AlibabaCloud::Facebody::Model::CountCrowdRequest;
|
||||
|
||||
CountCrowdRequest::CountCrowdRequest() :
|
||||
RpcServiceRequest("facebody", "2019-12-30", "CountCrowd")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CountCrowdRequest::~CountCrowdRequest()
|
||||
{}
|
||||
|
||||
bool CountCrowdRequest::getIsShow()const
|
||||
{
|
||||
return isShow_;
|
||||
}
|
||||
|
||||
void CountCrowdRequest::setIsShow(bool isShow)
|
||||
{
|
||||
isShow_ = isShow;
|
||||
setBodyParameter("IsShow", isShow ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CountCrowdRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void CountCrowdRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
54
facebody/src/model/CountCrowdResult.cc
Normal file
54
facebody/src/model/CountCrowdResult.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/CountCrowdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Facebody;
|
||||
using namespace AlibabaCloud::Facebody::Model;
|
||||
|
||||
CountCrowdResult::CountCrowdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CountCrowdResult::CountCrowdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CountCrowdResult::~CountCrowdResult()
|
||||
{}
|
||||
|
||||
void CountCrowdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["PeopleNumber"].isNull())
|
||||
data_.peopleNumber = std::stoi(dataNode["PeopleNumber"].asString());
|
||||
if(!dataNode["HotMap"].isNull())
|
||||
data_.hotMap = dataNode["HotMap"].asString();
|
||||
|
||||
}
|
||||
|
||||
CountCrowdResult::Data CountCrowdResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -50,12 +50,12 @@ void DetectIPCPedestrianResult::parse(const std::string &payload)
|
||||
imageInfoListItemObject.errorMessage = dataNodeImageInfoListImageInfoListItem["ErrorMessage"].asString();
|
||||
if(!dataNodeImageInfoListImageInfoListItem["DataId"].isNull())
|
||||
imageInfoListItemObject.dataId = dataNodeImageInfoListImageInfoListItem["DataId"].asString();
|
||||
auto allElementsNode = allImageInfoListNode["Elements"]["Element"];
|
||||
for (auto allImageInfoListNodeElementsElement : allElementsNode)
|
||||
auto allElementsNode = dataNodeImageInfoListImageInfoListItem["Elements"]["Element"];
|
||||
for (auto dataNodeImageInfoListImageInfoListItemElementsElement : allElementsNode)
|
||||
{
|
||||
Data::ImageInfoListItem::Element elementsObject;
|
||||
if(!allImageInfoListNodeElementsElement["Score"].isNull())
|
||||
elementsObject.score = std::stof(allImageInfoListNodeElementsElement["Score"].asString());
|
||||
if(!dataNodeImageInfoListImageInfoListItemElementsElement["Score"].isNull())
|
||||
elementsObject.score = std::stof(dataNodeImageInfoListImageInfoListItemElementsElement["Score"].asString());
|
||||
auto allBoxes = value["Boxes"]["Box"];
|
||||
for (auto value : allBoxes)
|
||||
elementsObject.boxes.push_back(value.asString());
|
||||
|
||||
@@ -48,24 +48,24 @@ void DetectLivingFaceResult::parse(const std::string &payload)
|
||||
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||
if(!dataNodeElementsElement["ImageURL"].isNull())
|
||||
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
||||
auto allResultsNode = allElementsNode["Results"]["Result"];
|
||||
for (auto allElementsNodeResultsResult : allResultsNode)
|
||||
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||
{
|
||||
Data::Element::Result resultsObject;
|
||||
if(!allElementsNodeResultsResult["Label"].isNull())
|
||||
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
|
||||
if(!allElementsNodeResultsResult["Suggestion"].isNull())
|
||||
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
|
||||
if(!allElementsNodeResultsResult["Rate"].isNull())
|
||||
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
|
||||
auto allFramesNode = allResultsNode["Frames"]["Frame"];
|
||||
for (auto allResultsNodeFramesFrame : allFramesNode)
|
||||
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||
auto allFramesNode = dataNodeElementsElementResultsResult["Frames"]["Frame"];
|
||||
for (auto dataNodeElementsElementResultsResultFramesFrame : allFramesNode)
|
||||
{
|
||||
Data::Element::Result::Frame framesObject;
|
||||
if(!allResultsNodeFramesFrame["Rate"].isNull())
|
||||
framesObject.rate = std::stof(allResultsNodeFramesFrame["Rate"].asString());
|
||||
if(!allResultsNodeFramesFrame["Url"].isNull())
|
||||
framesObject.url = allResultsNodeFramesFrame["Url"].asString();
|
||||
if(!dataNodeElementsElementResultsResultFramesFrame["Rate"].isNull())
|
||||
framesObject.rate = std::stof(dataNodeElementsElementResultsResultFramesFrame["Rate"].asString());
|
||||
if(!dataNodeElementsElementResultsResultFramesFrame["Url"].isNull())
|
||||
framesObject.url = dataNodeElementsElementResultsResultFramesFrame["Url"].asString();
|
||||
resultsObject.frames.push_back(framesObject);
|
||||
}
|
||||
elementObject.results.push_back(resultsObject);
|
||||
|
||||
@@ -27,6 +27,21 @@ ExtractPedestrianFeatureAttributeRequest::ExtractPedestrianFeatureAttributeReque
|
||||
ExtractPedestrianFeatureAttributeRequest::~ExtractPedestrianFeatureAttributeRequest()
|
||||
{}
|
||||
|
||||
std::vector<ExtractPedestrianFeatureAttributeRequest::UrlList> ExtractPedestrianFeatureAttributeRequest::getUrlList()const
|
||||
{
|
||||
return urlList_;
|
||||
}
|
||||
|
||||
void ExtractPedestrianFeatureAttributeRequest::setUrlList(const std::vector<UrlList>& urlList)
|
||||
{
|
||||
urlList_ = urlList;
|
||||
for(int dep1 = 0; dep1!= urlList.size(); dep1++) {
|
||||
auto urlListObj = urlList.at(dep1);
|
||||
std::string urlListObjStr = "UrlList." + std::to_string(dep1 + 1);
|
||||
setParameter(urlListObjStr + ".Url", urlListObj.url);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ExtractPedestrianFeatureAttributeRequest::getMode()const
|
||||
{
|
||||
return mode_;
|
||||
|
||||
@@ -76,6 +76,48 @@ void ExtractPedestrianFeatureAttributeResult::parse(const std::string &payload)
|
||||
data_.age = dataNode["Age"].asString();
|
||||
if(!dataNode["AgeScore"].isNull())
|
||||
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
|
||||
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||
for (auto dataNodeElementsElement : allElementsNode)
|
||||
{
|
||||
Data::Element elementObject;
|
||||
if(!dataNodeElementsElement["ObjType"].isNull())
|
||||
elementObject.objType = dataNodeElementsElement["ObjType"].asString();
|
||||
if(!dataNodeElementsElement["ObjTypeScore"].isNull())
|
||||
elementObject.objTypeScore = std::stof(dataNodeElementsElement["ObjTypeScore"].asString());
|
||||
if(!dataNodeElementsElement["Feature"].isNull())
|
||||
elementObject.feature = dataNodeElementsElement["Feature"].asString();
|
||||
if(!dataNodeElementsElement["QualityScore"].isNull())
|
||||
elementObject.qualityScore = std::stof(dataNodeElementsElement["QualityScore"].asString());
|
||||
if(!dataNodeElementsElement["UpperColor"].isNull())
|
||||
elementObject.upperColor = dataNodeElementsElement["UpperColor"].asString();
|
||||
if(!dataNodeElementsElement["UpperColorScore"].isNull())
|
||||
elementObject.upperColorScore = std::stof(dataNodeElementsElement["UpperColorScore"].asString());
|
||||
if(!dataNodeElementsElement["UpperType"].isNull())
|
||||
elementObject.upperType = dataNodeElementsElement["UpperType"].asString();
|
||||
if(!dataNodeElementsElement["UpperTypeScore"].isNull())
|
||||
elementObject.upperTypeScore = std::stof(dataNodeElementsElement["UpperTypeScore"].asString());
|
||||
if(!dataNodeElementsElement["LowerColor"].isNull())
|
||||
elementObject.lowerColor = dataNodeElementsElement["LowerColor"].asString();
|
||||
if(!dataNodeElementsElement["LowerColorScore"].isNull())
|
||||
elementObject.lowerColorScore = std::stof(dataNodeElementsElement["LowerColorScore"].asString());
|
||||
if(!dataNodeElementsElement["LowerType"].isNull())
|
||||
elementObject.lowerType = dataNodeElementsElement["LowerType"].asString();
|
||||
if(!dataNodeElementsElement["LowerTypeScore"].isNull())
|
||||
elementObject.lowerTypeScore = std::stof(dataNodeElementsElement["LowerTypeScore"].asString());
|
||||
if(!dataNodeElementsElement["Gender"].isNull())
|
||||
elementObject.gender = dataNodeElementsElement["Gender"].asString();
|
||||
if(!dataNodeElementsElement["GenderScore"].isNull())
|
||||
elementObject.genderScore = std::stof(dataNodeElementsElement["GenderScore"].asString());
|
||||
if(!dataNodeElementsElement["Hair"].isNull())
|
||||
elementObject.hair = dataNodeElementsElement["Hair"].asString();
|
||||
if(!dataNodeElementsElement["HairScore"].isNull())
|
||||
elementObject.hairScore = std::stof(dataNodeElementsElement["HairScore"].asString());
|
||||
if(!dataNodeElementsElement["Age"].isNull())
|
||||
elementObject.age = dataNodeElementsElement["Age"].asString();
|
||||
if(!dataNodeElementsElement["AgeScore"].isNull())
|
||||
elementObject.ageScore = std::stof(dataNodeElementsElement["AgeScore"].asString());
|
||||
data_.elements.push_back(elementObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
40
facebody/src/model/GenerateHumanAnimeStyleRequest.cc
Normal file
40
facebody/src/model/GenerateHumanAnimeStyleRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/GenerateHumanAnimeStyleRequest.h>
|
||||
|
||||
using AlibabaCloud::Facebody::Model::GenerateHumanAnimeStyleRequest;
|
||||
|
||||
GenerateHumanAnimeStyleRequest::GenerateHumanAnimeStyleRequest() :
|
||||
RpcServiceRequest("facebody", "2019-12-30", "GenerateHumanAnimeStyle")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenerateHumanAnimeStyleRequest::~GenerateHumanAnimeStyleRequest()
|
||||
{}
|
||||
|
||||
std::string GenerateHumanAnimeStyleRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void GenerateHumanAnimeStyleRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
52
facebody/src/model/GenerateHumanAnimeStyleResult.cc
Normal file
52
facebody/src/model/GenerateHumanAnimeStyleResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/facebody/model/GenerateHumanAnimeStyleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Facebody;
|
||||
using namespace AlibabaCloud::Facebody::Model;
|
||||
|
||||
GenerateHumanAnimeStyleResult::GenerateHumanAnimeStyleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateHumanAnimeStyleResult::GenerateHumanAnimeStyleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateHumanAnimeStyleResult::~GenerateHumanAnimeStyleResult()
|
||||
{}
|
||||
|
||||
void GenerateHumanAnimeStyleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["ImageURL"].isNull())
|
||||
data_.imageURL = dataNode["ImageURL"].asString();
|
||||
|
||||
}
|
||||
|
||||
GenerateHumanAnimeStyleResult::Data GenerateHumanAnimeStyleResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ void HandPostureResult::parse(const std::string &payload)
|
||||
Data::Output outputObject;
|
||||
if(!dataNodeOutputsOutput["HandCount"].isNull())
|
||||
outputObject.handCount = std::stoi(dataNodeOutputsOutput["HandCount"].asString());
|
||||
auto allResultsNode = allOutputsNode["Results"]["Result"];
|
||||
for (auto allOutputsNodeResultsResult : allResultsNode)
|
||||
auto allResultsNode = dataNodeOutputsOutput["Results"]["Result"];
|
||||
for (auto dataNodeOutputsOutputResultsResult : allResultsNode)
|
||||
{
|
||||
Data::Output::Result resultsObject;
|
||||
auto boxNode = value["Box"];
|
||||
@@ -71,8 +71,8 @@ void HandPostureResult::parse(const std::string &payload)
|
||||
Data::Output::Result::Hands::KeyPoint keyPointObject;
|
||||
if(!handsNodeKeyPointsKeyPoint["Label"].isNull())
|
||||
keyPointObject.label = handsNodeKeyPointsKeyPoint["Label"].asString();
|
||||
auto allPositions1Node = allKeyPointsNode["Positions"]["Position"];
|
||||
for (auto allKeyPointsNodePositionsPosition : allPositions1Node)
|
||||
auto allPositions1Node = handsNodeKeyPointsKeyPoint["Positions"]["Position"];
|
||||
for (auto handsNodeKeyPointsKeyPointPositionsPosition : allPositions1Node)
|
||||
{
|
||||
Data::Output::Result::Hands::KeyPoint::Position2 positions1Object;
|
||||
auto allPoints3 = value["Points"]["Point"];
|
||||
|
||||
@@ -46,8 +46,8 @@ void RecognizeActionResult::parse(const std::string &payload)
|
||||
Data::Element elementObject;
|
||||
if(!dataNodeElementsElement["Timestamp"].isNull())
|
||||
elementObject.timestamp = std::stoi(dataNodeElementsElement["Timestamp"].asString());
|
||||
auto allBoxesNode = allElementsNode["Boxes"]["BoxesItem"];
|
||||
for (auto allElementsNodeBoxesBoxesItem : allBoxesNode)
|
||||
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
|
||||
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
|
||||
{
|
||||
Data::Element::BoxesItem boxesObject;
|
||||
auto allBox = value["Box"]["Box"];
|
||||
|
||||
@@ -48,38 +48,38 @@ void RecognizePublicFaceResult::parse(const std::string &payload)
|
||||
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||
if(!dataNodeElementsElement["ImageURL"].isNull())
|
||||
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
||||
auto allResultsNode = allElementsNode["Results"]["Result"];
|
||||
for (auto allElementsNodeResultsResult : allResultsNode)
|
||||
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||
{
|
||||
Data::Element::Result resultsObject;
|
||||
if(!allElementsNodeResultsResult["Label"].isNull())
|
||||
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
|
||||
if(!allElementsNodeResultsResult["Suggestion"].isNull())
|
||||
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
|
||||
if(!allElementsNodeResultsResult["Rate"].isNull())
|
||||
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
|
||||
auto allSubResultsNode = allResultsNode["SubResults"]["SubResult"];
|
||||
for (auto allResultsNodeSubResultsSubResult : allSubResultsNode)
|
||||
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||
auto allSubResultsNode = dataNodeElementsElementResultsResult["SubResults"]["SubResult"];
|
||||
for (auto dataNodeElementsElementResultsResultSubResultsSubResult : allSubResultsNode)
|
||||
{
|
||||
Data::Element::Result::SubResult subResultsObject;
|
||||
if(!allResultsNodeSubResultsSubResult["H"].isNull())
|
||||
subResultsObject.h = std::stof(allResultsNodeSubResultsSubResult["H"].asString());
|
||||
if(!allResultsNodeSubResultsSubResult["W"].isNull())
|
||||
subResultsObject.w = std::stof(allResultsNodeSubResultsSubResult["W"].asString());
|
||||
if(!allResultsNodeSubResultsSubResult["X"].isNull())
|
||||
subResultsObject.x = std::stof(allResultsNodeSubResultsSubResult["X"].asString());
|
||||
if(!allResultsNodeSubResultsSubResult["Y"].isNull())
|
||||
subResultsObject.y = std::stof(allResultsNodeSubResultsSubResult["Y"].asString());
|
||||
auto allFacesNode = allSubResultsNode["Faces"]["Face"];
|
||||
for (auto allSubResultsNodeFacesFace : allFacesNode)
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResult["H"].isNull())
|
||||
subResultsObject.h = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["H"].asString());
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResult["W"].isNull())
|
||||
subResultsObject.w = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["W"].asString());
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResult["X"].isNull())
|
||||
subResultsObject.x = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["X"].asString());
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResult["Y"].isNull())
|
||||
subResultsObject.y = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["Y"].asString());
|
||||
auto allFacesNode = dataNodeElementsElementResultsResultSubResultsSubResult["Faces"]["Face"];
|
||||
for (auto dataNodeElementsElementResultsResultSubResultsSubResultFacesFace : allFacesNode)
|
||||
{
|
||||
Data::Element::Result::SubResult::Face facesObject;
|
||||
if(!allSubResultsNodeFacesFace["Id"].isNull())
|
||||
facesObject.id = allSubResultsNodeFacesFace["Id"].asString();
|
||||
if(!allSubResultsNodeFacesFace["Name"].isNull())
|
||||
facesObject.name = allSubResultsNodeFacesFace["Name"].asString();
|
||||
if(!allSubResultsNodeFacesFace["Rate"].isNull())
|
||||
facesObject.rate = std::stof(allSubResultsNodeFacesFace["Rate"].asString());
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Id"].isNull())
|
||||
facesObject.id = dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Id"].asString();
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Name"].isNull())
|
||||
facesObject.name = dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Name"].asString();
|
||||
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Rate"].isNull())
|
||||
facesObject.rate = std::stof(dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Rate"].asString());
|
||||
subResultsObject.faces.push_back(facesObject);
|
||||
}
|
||||
resultsObject.subResults.push_back(subResultsObject);
|
||||
|
||||
@@ -44,18 +44,18 @@ void SearchFaceResult::parse(const std::string &payload)
|
||||
for (auto dataNodeMatchListMatchListItem : allMatchListNode)
|
||||
{
|
||||
Data::MatchListItem matchListItemObject;
|
||||
auto allFaceItemsNode = allMatchListNode["FaceItems"]["FaceItemsItem"];
|
||||
for (auto allMatchListNodeFaceItemsFaceItemsItem : allFaceItemsNode)
|
||||
auto allFaceItemsNode = dataNodeMatchListMatchListItem["FaceItems"]["FaceItemsItem"];
|
||||
for (auto dataNodeMatchListMatchListItemFaceItemsFaceItemsItem : allFaceItemsNode)
|
||||
{
|
||||
Data::MatchListItem::FaceItemsItem faceItemsObject;
|
||||
if(!allMatchListNodeFaceItemsFaceItemsItem["FaceId"].isNull())
|
||||
faceItemsObject.faceId = allMatchListNodeFaceItemsFaceItemsItem["FaceId"].asString();
|
||||
if(!allMatchListNodeFaceItemsFaceItemsItem["Score"].isNull())
|
||||
faceItemsObject.score = std::stof(allMatchListNodeFaceItemsFaceItemsItem["Score"].asString());
|
||||
if(!allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].isNull())
|
||||
faceItemsObject.extraData = allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].asString();
|
||||
if(!allMatchListNodeFaceItemsFaceItemsItem["EntityId"].isNull())
|
||||
faceItemsObject.entityId = allMatchListNodeFaceItemsFaceItemsItem["EntityId"].asString();
|
||||
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();
|
||||
matchListItemObject.faceItems.push_back(faceItemsObject);
|
||||
}
|
||||
auto locationNode = value["Location"];
|
||||
|
||||
Reference in New Issue
Block a user