Release DetectCardScreenshot RecognizePoiName.

This commit is contained in:
sdk-team
2020-11-13 06:21:27 +00:00
parent 67d6a5f9d4
commit 02122aa7ea
18 changed files with 591 additions and 36 deletions

View File

@@ -22,6 +22,8 @@
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "OcrExport.h"
#include "model/DetectCardScreenshotRequest.h"
#include "model/DetectCardScreenshotResult.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/RecognizeAccountPageRequest.h"
@@ -46,6 +48,8 @@
#include "model/RecognizeLicensePlateResult.h"
#include "model/RecognizePassportMRZRequest.h"
#include "model/RecognizePassportMRZResult.h"
#include "model/RecognizePoiNameRequest.h"
#include "model/RecognizePoiNameResult.h"
#include "model/RecognizeQrCodeRequest.h"
#include "model/RecognizeQrCodeResult.h"
#include "model/RecognizeStampRequest.h"
@@ -75,6 +79,9 @@ namespace AlibabaCloud
class ALIBABACLOUD_OCR_EXPORT OcrClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::DetectCardScreenshotResult> DetectCardScreenshotOutcome;
typedef std::future<DetectCardScreenshotOutcome> DetectCardScreenshotOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::DetectCardScreenshotRequest&, const DetectCardScreenshotOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectCardScreenshotAsyncHandler;
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
@@ -111,6 +118,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizePassportMRZResult> RecognizePassportMRZOutcome;
typedef std::future<RecognizePassportMRZOutcome> RecognizePassportMRZOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizePassportMRZRequest&, const RecognizePassportMRZOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePassportMRZAsyncHandler;
typedef Outcome<Error, Model::RecognizePoiNameResult> RecognizePoiNameOutcome;
typedef std::future<RecognizePoiNameOutcome> RecognizePoiNameOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizePoiNameRequest&, const RecognizePoiNameOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePoiNameAsyncHandler;
typedef Outcome<Error, Model::RecognizeQrCodeResult> RecognizeQrCodeOutcome;
typedef std::future<RecognizeQrCodeOutcome> RecognizeQrCodeOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeQrCodeRequest&, const RecognizeQrCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeQrCodeAsyncHandler;
@@ -146,6 +156,9 @@ namespace AlibabaCloud
OcrClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
OcrClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~OcrClient();
DetectCardScreenshotOutcome detectCardScreenshot(const Model::DetectCardScreenshotRequest &request)const;
void detectCardScreenshotAsync(const Model::DetectCardScreenshotRequest& request, const DetectCardScreenshotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectCardScreenshotOutcomeCallable detectCardScreenshotCallable(const Model::DetectCardScreenshotRequest& request) const;
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
@@ -182,6 +195,9 @@ namespace AlibabaCloud
RecognizePassportMRZOutcome recognizePassportMRZ(const Model::RecognizePassportMRZRequest &request)const;
void recognizePassportMRZAsync(const Model::RecognizePassportMRZRequest& request, const RecognizePassportMRZAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizePassportMRZOutcomeCallable recognizePassportMRZCallable(const Model::RecognizePassportMRZRequest& request) const;
RecognizePoiNameOutcome recognizePoiName(const Model::RecognizePoiNameRequest &request)const;
void recognizePoiNameAsync(const Model::RecognizePoiNameRequest& request, const RecognizePoiNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizePoiNameOutcomeCallable recognizePoiNameCallable(const Model::RecognizePoiNameRequest& request) const;
RecognizeQrCodeOutcome recognizeQrCode(const Model::RecognizeQrCodeRequest &request)const;
void recognizeQrCodeAsync(const Model::RecognizeQrCodeRequest& request, const RecognizeQrCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeQrCodeOutcomeCallable recognizeQrCodeCallable(const Model::RecognizeQrCodeRequest& request) const;

View File

@@ -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_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT DetectCardScreenshotRequest : public RpcServiceRequest
{
public:
DetectCardScreenshotRequest();
~DetectCardScreenshotRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT DetectCardScreenshotResult : public ServiceResult
{
public:
struct Data
{
struct SpoofResult
{
struct ResultMap
{
float screenScore;
float screenThreshold;
};
ResultMap resultMap;
bool isSpoof;
};
SpoofResult spoofResult;
bool isBlur;
bool isCard;
};
DetectCardScreenshotResult();
explicit DetectCardScreenshotResult(const std::string &payload);
~DetectCardScreenshotResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_

View File

@@ -73,7 +73,7 @@ namespace AlibabaCloud
std::string registerNumber;
QRCode qRCode;
std::string type;
std::string angle;
float angle;
Emblem emblem;
std::string business;
};

View File

@@ -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_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizePoiNameRequest : public RpcServiceRequest
{
public:
RecognizePoiNameRequest();
~RecognizePoiNameRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_

View File

@@ -0,0 +1,73 @@
/*
* 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_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ocr/OcrExport.h>
namespace AlibabaCloud
{
namespace Ocr
{
namespace Model
{
class ALIBABACLOUD_OCR_EXPORT RecognizePoiNameResult : public ServiceResult
{
public:
struct Data
{
struct Summary
{
std::string brand;
float score;
};
struct SignboardsItem
{
struct TextsItem
{
float score;
std::string type;
std::vector<std::string> points;
std::string label;
std::string tag;
};
std::vector<SignboardsItem::TextsItem> texts;
};
std::vector<SignboardsItem> signboards;
Summary summary;
};
RecognizePoiNameResult();
explicit RecognizePoiNameResult(const std::string &payload);
~RecognizePoiNameResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_