Update TaggingImage.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2021-08-02 Version: 1.36.836
|
||||||
|
- Update TaggingImage.
|
||||||
|
|
||||||
2021-08-02 Version: 1.36.835
|
2021-08-02 Version: 1.36.835
|
||||||
- Support upgrade.
|
- Support upgrade.
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ namespace AlibabaCloud
|
|||||||
TaggingImageRequest();
|
TaggingImageRequest();
|
||||||
~TaggingImageRequest();
|
~TaggingImageRequest();
|
||||||
|
|
||||||
|
std::string getMode()const;
|
||||||
|
void setMode(const std::string& mode);
|
||||||
int getImageType()const;
|
int getImageType()const;
|
||||||
void setImageType(int imageType);
|
void setImageType(int imageType);
|
||||||
bool getAsync()const;
|
bool getAsync()const;
|
||||||
@@ -43,6 +45,7 @@ namespace AlibabaCloud
|
|||||||
void setImageURL(const std::string& imageURL);
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string mode_;
|
||||||
int imageType_;
|
int imageType_;
|
||||||
bool async_;
|
bool async_;
|
||||||
std::string imageURL_;
|
std::string imageURL_;
|
||||||
|
|||||||
@@ -44,18 +44,18 @@ void RecognizeFoodResult::parse(const std::string &payload)
|
|||||||
for (auto dataNodeTopFivesTopFivesItem : allTopFivesNode)
|
for (auto dataNodeTopFivesTopFivesItem : allTopFivesNode)
|
||||||
{
|
{
|
||||||
Data::TopFivesItem topFivesItemObject;
|
Data::TopFivesItem topFivesItemObject;
|
||||||
if(!dataNodeTopFivesTopFivesItem["Calorie"].isNull())
|
|
||||||
topFivesItemObject.calorie = dataNodeTopFivesTopFivesItem["Calorie"].asString();
|
|
||||||
if(!dataNodeTopFivesTopFivesItem["Score"].isNull())
|
|
||||||
topFivesItemObject.score = std::stof(dataNodeTopFivesTopFivesItem["Score"].asString());
|
|
||||||
if(!dataNodeTopFivesTopFivesItem["Category"].isNull())
|
if(!dataNodeTopFivesTopFivesItem["Category"].isNull())
|
||||||
topFivesItemObject.category = dataNodeTopFivesTopFivesItem["Category"].asString();
|
topFivesItemObject.category = dataNodeTopFivesTopFivesItem["Category"].asString();
|
||||||
|
if(!dataNodeTopFivesTopFivesItem["Score"].isNull())
|
||||||
|
topFivesItemObject.score = std::stof(dataNodeTopFivesTopFivesItem["Score"].asString());
|
||||||
|
if(!dataNodeTopFivesTopFivesItem["Calorie"].isNull())
|
||||||
|
topFivesItemObject.calorie = dataNodeTopFivesTopFivesItem["Calorie"].asString();
|
||||||
data_.topFives.push_back(topFivesItemObject);
|
data_.topFives.push_back(topFivesItemObject);
|
||||||
}
|
}
|
||||||
if(!value["Message"].isNull())
|
|
||||||
message_ = value["Message"].asString();
|
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ void RecognizeSceneResult::parse(const std::string &payload)
|
|||||||
for (auto dataNodeTagsTag : allTagsNode)
|
for (auto dataNodeTagsTag : allTagsNode)
|
||||||
{
|
{
|
||||||
Data::Tag tagObject;
|
Data::Tag tagObject;
|
||||||
if(!dataNodeTagsTag["Confidence"].isNull())
|
|
||||||
tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString());
|
|
||||||
if(!dataNodeTagsTag["Value"].isNull())
|
if(!dataNodeTagsTag["Value"].isNull())
|
||||||
tagObject.value = dataNodeTagsTag["Value"].asString();
|
tagObject.value = dataNodeTagsTag["Value"].asString();
|
||||||
|
if(!dataNodeTagsTag["Confidence"].isNull())
|
||||||
|
tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString());
|
||||||
data_.tags.push_back(tagObject);
|
data_.tags.push_back(tagObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,17 @@ TaggingImageRequest::TaggingImageRequest() :
|
|||||||
TaggingImageRequest::~TaggingImageRequest()
|
TaggingImageRequest::~TaggingImageRequest()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
std::string TaggingImageRequest::getMode()const
|
||||||
|
{
|
||||||
|
return mode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TaggingImageRequest::setMode(const std::string& mode)
|
||||||
|
{
|
||||||
|
mode_ = mode;
|
||||||
|
setBodyParameter("Mode", mode);
|
||||||
|
}
|
||||||
|
|
||||||
int TaggingImageRequest::getImageType()const
|
int TaggingImageRequest::getImageType()const
|
||||||
{
|
{
|
||||||
return imageType_;
|
return imageType_;
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ void TaggingImageResult::parse(const std::string &payload)
|
|||||||
for (auto dataNodeTagsTag : allTagsNode)
|
for (auto dataNodeTagsTag : allTagsNode)
|
||||||
{
|
{
|
||||||
Data::Tag tagObject;
|
Data::Tag tagObject;
|
||||||
if(!dataNodeTagsTag["Confidence"].isNull())
|
|
||||||
tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString());
|
|
||||||
if(!dataNodeTagsTag["Value"].isNull())
|
if(!dataNodeTagsTag["Value"].isNull())
|
||||||
tagObject.value = dataNodeTagsTag["Value"].asString();
|
tagObject.value = dataNodeTagsTag["Value"].asString();
|
||||||
|
if(!dataNodeTagsTag["Confidence"].isNull())
|
||||||
|
tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString());
|
||||||
data_.tags.push_back(tagObject);
|
data_.tags.push_back(tagObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user