Update RecognizeCharacter.

This commit is contained in:
sdk-team
2021-11-23 06:55:48 +00:00
parent 14dc74bf6a
commit a34003466f
24 changed files with 682 additions and 281 deletions

View File

@@ -74,6 +74,8 @@
#include "model/RecognizeVINCodeResult.h"
#include "model/RecognizeVerificationcodeRequest.h"
#include "model/RecognizeVerificationcodeResult.h"
#include "model/RecognizeVideoCharacterRequest.h"
#include "model/RecognizeVideoCharacterResult.h"
#include "model/TrimDocumentRequest.h"
#include "model/TrimDocumentResult.h"
@@ -163,6 +165,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecognizeVerificationcodeResult> RecognizeVerificationcodeOutcome;
typedef std::future<RecognizeVerificationcodeOutcome> RecognizeVerificationcodeOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeVerificationcodeRequest&, const RecognizeVerificationcodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVerificationcodeAsyncHandler;
typedef Outcome<Error, Model::RecognizeVideoCharacterResult> RecognizeVideoCharacterOutcome;
typedef std::future<RecognizeVideoCharacterOutcome> RecognizeVideoCharacterOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::RecognizeVideoCharacterRequest&, const RecognizeVideoCharacterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVideoCharacterAsyncHandler;
typedef Outcome<Error, Model::TrimDocumentResult> TrimDocumentOutcome;
typedef std::future<TrimDocumentOutcome> TrimDocumentOutcomeCallable;
typedef std::function<void(const OcrClient*, const Model::TrimDocumentRequest&, const TrimDocumentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TrimDocumentAsyncHandler;
@@ -249,6 +254,9 @@ namespace AlibabaCloud
RecognizeVerificationcodeOutcome recognizeVerificationcode(const Model::RecognizeVerificationcodeRequest &request)const;
void recognizeVerificationcodeAsync(const Model::RecognizeVerificationcodeRequest& request, const RecognizeVerificationcodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVerificationcodeOutcomeCallable recognizeVerificationcodeCallable(const Model::RecognizeVerificationcodeRequest& request) const;
RecognizeVideoCharacterOutcome recognizeVideoCharacter(const Model::RecognizeVideoCharacterRequest &request)const;
void recognizeVideoCharacterAsync(const Model::RecognizeVideoCharacterRequest& request, const RecognizeVideoCharacterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeVideoCharacterOutcomeCallable recognizeVideoCharacterCallable(const Model::RecognizeVideoCharacterRequest& request) const;
TrimDocumentOutcome trimDocument(const Model::TrimDocumentRequest &request)const;
void trimDocumentAsync(const Model::TrimDocumentRequest& request, const TrimDocumentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TrimDocumentOutcomeCallable trimDocumentCallable(const Model::TrimDocumentRequest& request) const;

View File

@@ -34,8 +34,8 @@ namespace AlibabaCloud
public:
struct Data
{
std::string bankName;
std::string cardNumber;
std::string bankName;
std::string validDate;
};

View File

@@ -34,7 +34,7 @@ namespace AlibabaCloud
public:
struct Data
{
struct Emblem
struct Stamp
{
int left;
int top;
@@ -48,7 +48,7 @@ namespace AlibabaCloud
int height;
int width;
};
struct Stamp
struct Emblem
{
int left;
int top;

View File

@@ -35,20 +35,29 @@ namespace AlibabaCloud
RecognizeCharacterRequest();
~RecognizeCharacterRequest();
bool getFormatResultToJson()const;
void setFormatResultToJson(bool formatResultToJson);
int getMinHeight()const;
void setMinHeight(int minHeight);
std::string getOssFile()const;
void setOssFile(const std::string& ossFile);
int getImageType()const;
void setImageType(int imageType);
std::string getRequestProxyBy()const;
void setRequestProxyBy(const std::string& requestProxyBy);
bool getOutputProbability()const;
void setOutputProbability(bool outputProbability);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
int getMinHeight()const;
void setMinHeight(int minHeight);
private:
bool formatResultToJson_;
int minHeight_;
std::string ossFile_;
int imageType_;
std::string requestProxyBy_;
bool outputProbability_;
std::string imageURL_;
int minHeight_;
};
}

View File

@@ -39,8 +39,8 @@ namespace AlibabaCloud
struct TextRectangles
{
int left;
int angle;
int top;
int angle;
int height;
int width;
};

View File

@@ -34,19 +34,6 @@ namespace AlibabaCloud
public:
struct Data
{
struct FaceResult
{
std::string plateNumber;
std::string owner;
std::string engineNumber;
std::string address;
std::string vehicleType;
std::string model;
std::string registerDate;
std::string issueDate;
std::string vin;
std::string useCharacter;
};
struct BackResult
{
std::string approvedPassengerCapacity;
@@ -57,8 +44,21 @@ namespace AlibabaCloud
std::string approvedLoad;
std::string inspectionRecord;
std::string unladenMass;
std::string fileNumber;
std::string overallDimension;
std::string fileNumber;
};
struct FaceResult
{
std::string owner;
std::string plateNumber;
std::string engineNumber;
std::string address;
std::string vehicleType;
std::string model;
std::string registerDate;
std::string issueDate;
std::string vin;
std::string useCharacter;
};
FaceResult faceResult;
BackResult backResult;

View File

@@ -34,30 +34,36 @@ namespace AlibabaCloud
public:
struct Data
{
struct BackResult
{
std::string startDate;
std::string issue;
std::string endDate;
};
struct FrontResult
{
struct FaceRectangle
{
struct Center
{
float x;
float y;
};
struct Size
{
float height;
float width;
};
struct Center
{
float x;
float y;
};
Center center;
float angle;
Size size;
};
struct CardArea
struct FaceRectVertice
{
float x;
float y;
};
struct FaceRectVertice
struct CardArea
{
float x;
float y;
@@ -68,15 +74,9 @@ namespace AlibabaCloud
std::vector<CardArea> cardAreas;
std::string gender;
std::string nationality;
std::string birthDate;
std::string name;
std::string iDNumber;
std::string birthDate;
};
struct BackResult
{
std::string startDate;
std::string issue;
std::string endDate;
};
FrontResult frontResult;
BackResult backResult;

View File

@@ -34,28 +34,6 @@ namespace AlibabaCloud
public:
struct Data
{
struct Content
{
std::string checker;
std::string payeeAddress;
std::string payeeName;
std::string payerAddress;
std::string antiFakeCode;
std::string payerBankName;
std::string invoiceNo;
std::string payerRegisterNo;
std::string payerName;
std::string withoutTaxAmount;
std::string invoiceAmount;
std::string taxAmount;
std::string payeeBankName;
std::string clerk;
std::string invoiceCode;
std::string payeeRegisterNo;
std::string invoiceDate;
std::string sumAmount;
std::string payee;
};
struct Box
{
std::vector<std::string> payerRegisterNoes;
@@ -66,18 +44,40 @@ namespace AlibabaCloud
std::vector<std::string> clerks;
std::vector<std::string> withoutTaxAmounts;
std::vector<std::string> checkers;
std::vector<std::string> invoiceCodes;
std::vector<std::string> taxAmounts;
std::vector<std::string> invoiceCodes;
std::vector<std::string> sumAmounts;
std::vector<std::string> payerNames;
std::vector<std::string> invoiceFakeCodes;
std::vector<std::string> payeeNames;
std::vector<std::string> payeeBankNames;
std::vector<std::string> payeeNames;
std::vector<std::string> payees;
std::vector<std::string> invoiceNoes;
std::vector<std::string> payerBankNames;
std::vector<std::string> payeeRegisterNoes;
};
struct Content
{
std::string checker;
std::string payeeAddress;
std::string payeeName;
std::string payerAddress;
std::string antiFakeCode;
std::string payerBankName;
std::string invoiceNo;
std::string payerRegisterNo;
std::string withoutTaxAmount;
std::string invoiceAmount;
std::string payerName;
std::string taxAmount;
std::string payeeBankName;
std::string clerk;
std::string payeeRegisterNo;
std::string invoiceCode;
std::string invoiceDate;
std::string sumAmount;
std::string payee;
};
Content content;
Box box;
};

View File

@@ -0,0 +1,60 @@
/*
* 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_RECOGNIZEVIDEOCHARACTERREQUEST_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCHARACTERREQUEST_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 RecognizeVideoCharacterRequest : public RpcServiceRequest
{
public:
RecognizeVideoCharacterRequest();
~RecognizeVideoCharacterRequest();
bool getFormatResultToJson()const;
void setFormatResultToJson(bool formatResultToJson);
std::string getOssFile()const;
void setOssFile(const std::string& ossFile);
std::string getRequestProxyBy()const;
void setRequestProxyBy(const std::string& requestProxyBy);
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
bool formatResultToJson_;
std::string ossFile_;
std::string requestProxyBy_;
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCHARACTERREQUEST_H_

View File

@@ -0,0 +1,76 @@
/*
* 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_RECOGNIZEVIDEOCHARACTERRESULT_H_
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCHARACTERRESULT_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 RecognizeVideoCharacterResult : public ServiceResult
{
public:
struct Data
{
struct Frame
{
struct Element
{
struct TextRectangle
{
long left;
long angle;
long top;
long height;
long width;
};
std::vector<Element::TextRectangle> textRectangles;
float score;
std::string text;
};
std::vector<Frame::Element> elements;
long timestamp;
};
std::vector<Frame> frames;
long height;
long width;
};
RecognizeVideoCharacterResult();
explicit RecognizeVideoCharacterResult(const std::string &payload);
~RecognizeVideoCharacterResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCHARACTERRESULT_H_