Release SearchFace BatchAddFaces.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-10-08 Version: 1.36.891
|
||||
- Release SearchFace BatchAddFaces.
|
||||
|
||||
2021-09-29 Version: 1.36.890
|
||||
- Supported AssumeRoleWithOIDC.
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ set(facebody_public_header_model
|
||||
include/alibabacloud/facebody/model/AddFaceEntityResult.h
|
||||
include/alibabacloud/facebody/model/AddFaceImageTemplateRequest.h
|
||||
include/alibabacloud/facebody/model/AddFaceImageTemplateResult.h
|
||||
include/alibabacloud/facebody/model/BatchAddFacesRequest.h
|
||||
include/alibabacloud/facebody/model/BatchAddFacesResult.h
|
||||
include/alibabacloud/facebody/model/BeautifyBodyRequest.h
|
||||
include/alibabacloud/facebody/model/BeautifyBodyResult.h
|
||||
include/alibabacloud/facebody/model/BlurFaceRequest.h
|
||||
@@ -160,6 +162,8 @@ set(facebody_src
|
||||
src/model/AddFaceEntityResult.cc
|
||||
src/model/AddFaceImageTemplateRequest.cc
|
||||
src/model/AddFaceImageTemplateResult.cc
|
||||
src/model/BatchAddFacesRequest.cc
|
||||
src/model/BatchAddFacesResult.cc
|
||||
src/model/BeautifyBodyRequest.cc
|
||||
src/model/BeautifyBodyResult.cc
|
||||
src/model/BlurFaceRequest.cc
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "model/AddFaceEntityResult.h"
|
||||
#include "model/AddFaceImageTemplateRequest.h"
|
||||
#include "model/AddFaceImageTemplateResult.h"
|
||||
#include "model/BatchAddFacesRequest.h"
|
||||
#include "model/BatchAddFacesResult.h"
|
||||
#include "model/BeautifyBodyRequest.h"
|
||||
#include "model/BeautifyBodyResult.h"
|
||||
#include "model/BlurFaceRequest.h"
|
||||
@@ -171,6 +173,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::AddFaceImageTemplateResult> AddFaceImageTemplateOutcome;
|
||||
typedef std::future<AddFaceImageTemplateOutcome> AddFaceImageTemplateOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::AddFaceImageTemplateRequest&, const AddFaceImageTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddFaceImageTemplateAsyncHandler;
|
||||
typedef Outcome<Error, Model::BatchAddFacesResult> BatchAddFacesOutcome;
|
||||
typedef std::future<BatchAddFacesOutcome> BatchAddFacesOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::BatchAddFacesRequest&, const BatchAddFacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchAddFacesAsyncHandler;
|
||||
typedef Outcome<Error, Model::BeautifyBodyResult> BeautifyBodyOutcome;
|
||||
typedef std::future<BeautifyBodyOutcome> BeautifyBodyOutcomeCallable;
|
||||
typedef std::function<void(const FacebodyClient*, const Model::BeautifyBodyRequest&, const BeautifyBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BeautifyBodyAsyncHandler;
|
||||
@@ -368,6 +373,9 @@ namespace AlibabaCloud
|
||||
AddFaceImageTemplateOutcome addFaceImageTemplate(const Model::AddFaceImageTemplateRequest &request)const;
|
||||
void addFaceImageTemplateAsync(const Model::AddFaceImageTemplateRequest& request, const AddFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddFaceImageTemplateOutcomeCallable addFaceImageTemplateCallable(const Model::AddFaceImageTemplateRequest& request) const;
|
||||
BatchAddFacesOutcome batchAddFaces(const Model::BatchAddFacesRequest &request)const;
|
||||
void batchAddFacesAsync(const Model::BatchAddFacesRequest& request, const BatchAddFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchAddFacesOutcomeCallable batchAddFacesCallable(const Model::BatchAddFacesRequest& request) const;
|
||||
BeautifyBodyOutcome beautifyBody(const Model::BeautifyBodyRequest &request)const;
|
||||
void beautifyBodyAsync(const Model::BeautifyBodyRequest& request, const BeautifyBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BeautifyBodyOutcomeCallable beautifyBodyCallable(const Model::BeautifyBodyRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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_BATCHADDFACESREQUEST_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_BATCHADDFACESREQUEST_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 BatchAddFacesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
BatchAddFacesRequest();
|
||||
~BatchAddFacesRequest();
|
||||
|
||||
std::string getEntityId()const;
|
||||
void setEntityId(const std::string& entityId);
|
||||
float getQualityScoreThreshold()const;
|
||||
void setQualityScoreThreshold(float qualityScoreThreshold);
|
||||
float getSimilarityScoreThresholdBetweenEntity()const;
|
||||
void setSimilarityScoreThresholdBetweenEntity(float similarityScoreThresholdBetweenEntity);
|
||||
float getSimilarityScoreThresholdInEntity()const;
|
||||
void setSimilarityScoreThresholdInEntity(float similarityScoreThresholdInEntity);
|
||||
std::string getDbName()const;
|
||||
void setDbName(const std::string& dbName);
|
||||
Array getFaces()const;
|
||||
void setFaces(const Array& faces);
|
||||
|
||||
private:
|
||||
std::string entityId_;
|
||||
float qualityScoreThreshold_;
|
||||
float similarityScoreThresholdBetweenEntity_;
|
||||
float similarityScoreThresholdInEntity_;
|
||||
std::string dbName_;
|
||||
Array faces_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_BATCHADDFACESREQUEST_H_
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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_BATCHADDFACESRESULT_H_
|
||||
#define ALIBABACLOUD_FACEBODY_MODEL_BATCHADDFACESRESULT_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 BatchAddFacesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct InsertedFacesItem
|
||||
{
|
||||
std::string faceId;
|
||||
std::string imageURL;
|
||||
};
|
||||
struct FailedFacesItem
|
||||
{
|
||||
std::string message;
|
||||
std::string imageURL;
|
||||
std::string code;
|
||||
};
|
||||
std::vector<InsertedFacesItem> insertedFaces;
|
||||
std::vector<FailedFacesItem> failedFaces;
|
||||
};
|
||||
|
||||
|
||||
BatchAddFacesResult();
|
||||
explicit BatchAddFacesResult(const std::string &payload);
|
||||
~BatchAddFacesResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_FACEBODY_MODEL_BATCHADDFACESRESULT_H_
|
||||
@@ -35,13 +35,25 @@ namespace AlibabaCloud
|
||||
DetectFaceRequest();
|
||||
~DetectFaceRequest();
|
||||
|
||||
long getMaxFaceNumber()const;
|
||||
void setMaxFaceNumber(long maxFaceNumber);
|
||||
bool getLandmark()const;
|
||||
void setLandmark(bool landmark);
|
||||
int getImageType()const;
|
||||
void setImageType(int imageType);
|
||||
bool getPose()const;
|
||||
void setPose(bool pose);
|
||||
bool getQuality()const;
|
||||
void setQuality(bool quality);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
long maxFaceNumber_;
|
||||
bool landmark_;
|
||||
int imageType_;
|
||||
bool pose_;
|
||||
bool quality_;
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace AlibabaCloud
|
||||
SearchFaceRequest();
|
||||
~SearchFaceRequest();
|
||||
|
||||
long getMaxFaceNum()const;
|
||||
void setMaxFaceNum(long maxFaceNum);
|
||||
float getQualityScoreThreshold()const;
|
||||
void setQualityScoreThreshold(float qualityScoreThreshold);
|
||||
int getLimit()const;
|
||||
@@ -47,6 +49,7 @@ namespace AlibabaCloud
|
||||
void setImageUrl(const std::string& imageUrl);
|
||||
|
||||
private:
|
||||
long maxFaceNum_;
|
||||
float qualityScoreThreshold_;
|
||||
int limit_;
|
||||
std::string dbNames_;
|
||||
|
||||
@@ -195,6 +195,42 @@ FacebodyClient::AddFaceImageTemplateOutcomeCallable FacebodyClient::addFaceImage
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::BatchAddFacesOutcome FacebodyClient::batchAddFaces(const BatchAddFacesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchAddFacesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchAddFacesOutcome(BatchAddFacesResult(outcome.result()));
|
||||
else
|
||||
return BatchAddFacesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FacebodyClient::batchAddFacesAsync(const BatchAddFacesRequest& request, const BatchAddFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchAddFaces(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FacebodyClient::BatchAddFacesOutcomeCallable FacebodyClient::batchAddFacesCallable(const BatchAddFacesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchAddFacesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchAddFaces(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FacebodyClient::BeautifyBodyOutcome FacebodyClient::beautifyBody(const BeautifyBodyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
95
facebody/src/model/BatchAddFacesRequest.cc
Normal file
95
facebody/src/model/BatchAddFacesRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/BatchAddFacesRequest.h>
|
||||
|
||||
using AlibabaCloud::Facebody::Model::BatchAddFacesRequest;
|
||||
|
||||
BatchAddFacesRequest::BatchAddFacesRequest() :
|
||||
RpcServiceRequest("facebody", "2019-12-30", "BatchAddFaces")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchAddFacesRequest::~BatchAddFacesRequest()
|
||||
{}
|
||||
|
||||
std::string BatchAddFacesRequest::getEntityId()const
|
||||
{
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setEntityId(const std::string& entityId)
|
||||
{
|
||||
entityId_ = entityId;
|
||||
setBodyParameter("EntityId", entityId);
|
||||
}
|
||||
|
||||
float BatchAddFacesRequest::getQualityScoreThreshold()const
|
||||
{
|
||||
return qualityScoreThreshold_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setQualityScoreThreshold(float qualityScoreThreshold)
|
||||
{
|
||||
qualityScoreThreshold_ = qualityScoreThreshold;
|
||||
setBodyParameter("QualityScoreThreshold", std::to_string(qualityScoreThreshold));
|
||||
}
|
||||
|
||||
float BatchAddFacesRequest::getSimilarityScoreThresholdBetweenEntity()const
|
||||
{
|
||||
return similarityScoreThresholdBetweenEntity_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setSimilarityScoreThresholdBetweenEntity(float similarityScoreThresholdBetweenEntity)
|
||||
{
|
||||
similarityScoreThresholdBetweenEntity_ = similarityScoreThresholdBetweenEntity;
|
||||
setBodyParameter("SimilarityScoreThresholdBetweenEntity", std::to_string(similarityScoreThresholdBetweenEntity));
|
||||
}
|
||||
|
||||
float BatchAddFacesRequest::getSimilarityScoreThresholdInEntity()const
|
||||
{
|
||||
return similarityScoreThresholdInEntity_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setSimilarityScoreThresholdInEntity(float similarityScoreThresholdInEntity)
|
||||
{
|
||||
similarityScoreThresholdInEntity_ = similarityScoreThresholdInEntity;
|
||||
setBodyParameter("SimilarityScoreThresholdInEntity", std::to_string(similarityScoreThresholdInEntity));
|
||||
}
|
||||
|
||||
std::string BatchAddFacesRequest::getDbName()const
|
||||
{
|
||||
return dbName_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setDbName(const std::string& dbName)
|
||||
{
|
||||
dbName_ = dbName;
|
||||
setBodyParameter("DbName", dbName);
|
||||
}
|
||||
|
||||
Array BatchAddFacesRequest::getFaces()const
|
||||
{
|
||||
return faces_;
|
||||
}
|
||||
|
||||
void BatchAddFacesRequest::setFaces(const Array& faces)
|
||||
{
|
||||
faces_ = faces;
|
||||
setBodyParameter("Faces", std::to_string(faces));
|
||||
}
|
||||
|
||||
86
facebody/src/model/BatchAddFacesResult.cc
Normal file
86
facebody/src/model/BatchAddFacesResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/BatchAddFacesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Facebody;
|
||||
using namespace AlibabaCloud::Facebody::Model;
|
||||
|
||||
BatchAddFacesResult::BatchAddFacesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchAddFacesResult::BatchAddFacesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchAddFacesResult::~BatchAddFacesResult()
|
||||
{}
|
||||
|
||||
void BatchAddFacesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allInsertedFacesNode = dataNode["InsertedFaces"]["insertedFacesItem"];
|
||||
for (auto dataNodeInsertedFacesinsertedFacesItem : allInsertedFacesNode)
|
||||
{
|
||||
Data::InsertedFacesItem insertedFacesItemObject;
|
||||
if(!dataNodeInsertedFacesinsertedFacesItem["ImageURL"].isNull())
|
||||
insertedFacesItemObject.imageURL = dataNodeInsertedFacesinsertedFacesItem["ImageURL"].asString();
|
||||
if(!dataNodeInsertedFacesinsertedFacesItem["FaceId"].isNull())
|
||||
insertedFacesItemObject.faceId = dataNodeInsertedFacesinsertedFacesItem["FaceId"].asString();
|
||||
data_.insertedFaces.push_back(insertedFacesItemObject);
|
||||
}
|
||||
auto allFailedFacesNode = dataNode["FailedFaces"]["failedFacesItem"];
|
||||
for (auto dataNodeFailedFacesfailedFacesItem : allFailedFacesNode)
|
||||
{
|
||||
Data::FailedFacesItem failedFacesItemObject;
|
||||
if(!dataNodeFailedFacesfailedFacesItem["ImageURL"].isNull())
|
||||
failedFacesItemObject.imageURL = dataNodeFailedFacesfailedFacesItem["ImageURL"].asString();
|
||||
if(!dataNodeFailedFacesfailedFacesItem["Code"].isNull())
|
||||
failedFacesItemObject.code = dataNodeFailedFacesfailedFacesItem["Code"].asString();
|
||||
if(!dataNodeFailedFacesfailedFacesItem["Message"].isNull())
|
||||
failedFacesItemObject.message = dataNodeFailedFacesfailedFacesItem["Message"].asString();
|
||||
data_.failedFaces.push_back(failedFacesItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BatchAddFacesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
BatchAddFacesResult::Data BatchAddFacesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchAddFacesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,28 @@ DetectFaceRequest::DetectFaceRequest() :
|
||||
DetectFaceRequest::~DetectFaceRequest()
|
||||
{}
|
||||
|
||||
long DetectFaceRequest::getMaxFaceNumber()const
|
||||
{
|
||||
return maxFaceNumber_;
|
||||
}
|
||||
|
||||
void DetectFaceRequest::setMaxFaceNumber(long maxFaceNumber)
|
||||
{
|
||||
maxFaceNumber_ = maxFaceNumber;
|
||||
setBodyParameter("MaxFaceNumber", std::to_string(maxFaceNumber));
|
||||
}
|
||||
|
||||
bool DetectFaceRequest::getLandmark()const
|
||||
{
|
||||
return landmark_;
|
||||
}
|
||||
|
||||
void DetectFaceRequest::setLandmark(bool landmark)
|
||||
{
|
||||
landmark_ = landmark;
|
||||
setBodyParameter("Landmark", landmark ? "true" : "false");
|
||||
}
|
||||
|
||||
int DetectFaceRequest::getImageType()const
|
||||
{
|
||||
return imageType_;
|
||||
@@ -38,6 +60,28 @@ void DetectFaceRequest::setImageType(int imageType)
|
||||
setBodyParameter("ImageType", std::to_string(imageType));
|
||||
}
|
||||
|
||||
bool DetectFaceRequest::getPose()const
|
||||
{
|
||||
return pose_;
|
||||
}
|
||||
|
||||
void DetectFaceRequest::setPose(bool pose)
|
||||
{
|
||||
pose_ = pose;
|
||||
setBodyParameter("Pose", pose ? "true" : "false");
|
||||
}
|
||||
|
||||
bool DetectFaceRequest::getQuality()const
|
||||
{
|
||||
return quality_;
|
||||
}
|
||||
|
||||
void DetectFaceRequest::setQuality(bool quality)
|
||||
{
|
||||
quality_ = quality;
|
||||
setBodyParameter("Quality", quality ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string DetectFaceRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
|
||||
@@ -27,6 +27,17 @@ SearchFaceRequest::SearchFaceRequest() :
|
||||
SearchFaceRequest::~SearchFaceRequest()
|
||||
{}
|
||||
|
||||
long SearchFaceRequest::getMaxFaceNum()const
|
||||
{
|
||||
return maxFaceNum_;
|
||||
}
|
||||
|
||||
void SearchFaceRequest::setMaxFaceNum(long maxFaceNum)
|
||||
{
|
||||
maxFaceNum_ = maxFaceNum;
|
||||
setBodyParameter("MaxFaceNum", std::to_string(maxFaceNum));
|
||||
}
|
||||
|
||||
float SearchFaceRequest::getQualityScoreThreshold()const
|
||||
{
|
||||
return qualityScoreThreshold_;
|
||||
|
||||
Reference in New Issue
Block a user