Release EstimateMonocularVideoDepth.
This commit is contained in:
269
threedvision/src/ThreedvisionClient.cc
Normal file
269
threedvision/src/ThreedvisionClient.cc
Normal file
@@ -0,0 +1,269 @@
|
||||
/*
|
||||
* 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/threedvision/ThreedvisionClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "threedvision";
|
||||
}
|
||||
|
||||
ThreedvisionClient::ThreedvisionClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "threedvision");
|
||||
}
|
||||
|
||||
ThreedvisionClient::ThreedvisionClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "threedvision");
|
||||
}
|
||||
|
||||
ThreedvisionClient::ThreedvisionClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "threedvision");
|
||||
}
|
||||
|
||||
ThreedvisionClient::~ThreedvisionClient()
|
||||
{}
|
||||
|
||||
ThreedvisionClient::EstimateMonocularImageDepthOutcome ThreedvisionClient::estimateMonocularImageDepth(const EstimateMonocularImageDepthRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EstimateMonocularImageDepthOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EstimateMonocularImageDepthOutcome(EstimateMonocularImageDepthResult(outcome.result()));
|
||||
else
|
||||
return EstimateMonocularImageDepthOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::estimateMonocularImageDepthAsync(const EstimateMonocularImageDepthRequest& request, const EstimateMonocularImageDepthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, estimateMonocularImageDepth(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::EstimateMonocularImageDepthOutcomeCallable ThreedvisionClient::estimateMonocularImageDepthCallable(const EstimateMonocularImageDepthRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EstimateMonocularImageDepthOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->estimateMonocularImageDepth(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ThreedvisionClient::EstimateMonocularVideoDepthOutcome ThreedvisionClient::estimateMonocularVideoDepth(const EstimateMonocularVideoDepthRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EstimateMonocularVideoDepthOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EstimateMonocularVideoDepthOutcome(EstimateMonocularVideoDepthResult(outcome.result()));
|
||||
else
|
||||
return EstimateMonocularVideoDepthOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::estimateMonocularVideoDepthAsync(const EstimateMonocularVideoDepthRequest& request, const EstimateMonocularVideoDepthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, estimateMonocularVideoDepth(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::EstimateMonocularVideoDepthOutcomeCallable ThreedvisionClient::estimateMonocularVideoDepthCallable(const EstimateMonocularVideoDepthRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EstimateMonocularVideoDepthOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->estimateMonocularVideoDepth(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ThreedvisionClient::EstimateStereoImageDepthOutcome ThreedvisionClient::estimateStereoImageDepth(const EstimateStereoImageDepthRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EstimateStereoImageDepthOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EstimateStereoImageDepthOutcome(EstimateStereoImageDepthResult(outcome.result()));
|
||||
else
|
||||
return EstimateStereoImageDepthOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::estimateStereoImageDepthAsync(const EstimateStereoImageDepthRequest& request, const EstimateStereoImageDepthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, estimateStereoImageDepth(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::EstimateStereoImageDepthOutcomeCallable ThreedvisionClient::estimateStereoImageDepthCallable(const EstimateStereoImageDepthRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EstimateStereoImageDepthOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->estimateStereoImageDepth(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ThreedvisionClient::GetAsyncJobResultOutcome ThreedvisionClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAsyncJobResultOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAsyncJobResultOutcome(GetAsyncJobResultResult(outcome.result()));
|
||||
else
|
||||
return GetAsyncJobResultOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::getAsyncJobResultAsync(const GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAsyncJobResult(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::GetAsyncJobResultOutcomeCallable ThreedvisionClient::getAsyncJobResultCallable(const GetAsyncJobResultRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAsyncJobResultOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAsyncJobResult(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ThreedvisionClient::ReconstructBodyBySingleImageOutcome ThreedvisionClient::reconstructBodyBySingleImage(const ReconstructBodyBySingleImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReconstructBodyBySingleImageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReconstructBodyBySingleImageOutcome(ReconstructBodyBySingleImageResult(outcome.result()));
|
||||
else
|
||||
return ReconstructBodyBySingleImageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::reconstructBodyBySingleImageAsync(const ReconstructBodyBySingleImageRequest& request, const ReconstructBodyBySingleImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, reconstructBodyBySingleImage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::ReconstructBodyBySingleImageOutcomeCallable ThreedvisionClient::reconstructBodyBySingleImageCallable(const ReconstructBodyBySingleImageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReconstructBodyBySingleImageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->reconstructBodyBySingleImage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ThreedvisionClient::ReconstructThreeDMultiViewOutcome ThreedvisionClient::reconstructThreeDMultiView(const ReconstructThreeDMultiViewRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReconstructThreeDMultiViewOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReconstructThreeDMultiViewOutcome(ReconstructThreeDMultiViewResult(outcome.result()));
|
||||
else
|
||||
return ReconstructThreeDMultiViewOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ThreedvisionClient::reconstructThreeDMultiViewAsync(const ReconstructThreeDMultiViewRequest& request, const ReconstructThreeDMultiViewAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, reconstructThreeDMultiView(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ThreedvisionClient::ReconstructThreeDMultiViewOutcomeCallable ThreedvisionClient::reconstructThreeDMultiViewCallable(const ReconstructThreeDMultiViewRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReconstructThreeDMultiViewOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->reconstructThreeDMultiView(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
36
threedvision/src/model/EstimateMonocularImageDepthRequest.cc
Normal file
36
threedvision/src/model/EstimateMonocularImageDepthRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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/threedvision/model/EstimateMonocularImageDepthRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::EstimateMonocularImageDepthRequest;
|
||||
|
||||
EstimateMonocularImageDepthRequest::EstimateMonocularImageDepthRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "EstimateMonocularImageDepth") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EstimateMonocularImageDepthRequest::~EstimateMonocularImageDepthRequest() {}
|
||||
|
||||
std::string EstimateMonocularImageDepthRequest::getImageURL() const {
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void EstimateMonocularImageDepthRequest::setImageURL(const std::string &imageURL) {
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter(std::string("ImageURL"), imageURL);
|
||||
}
|
||||
|
||||
68
threedvision/src/model/EstimateMonocularImageDepthResult.cc
Normal file
68
threedvision/src/model/EstimateMonocularImageDepthResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/threedvision/model/EstimateMonocularImageDepthResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
EstimateMonocularImageDepthResult::EstimateMonocularImageDepthResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EstimateMonocularImageDepthResult::EstimateMonocularImageDepthResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EstimateMonocularImageDepthResult::~EstimateMonocularImageDepthResult()
|
||||
{}
|
||||
|
||||
void EstimateMonocularImageDepthResult::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["DepthMapUrl"].isNull())
|
||||
data_.depthMapUrl = dataNode["DepthMapUrl"].asString();
|
||||
if(!dataNode["DepthToColorUrl"].isNull())
|
||||
data_.depthToColorUrl = dataNode["DepthToColorUrl"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EstimateMonocularImageDepthResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
EstimateMonocularImageDepthResult::Data EstimateMonocularImageDepthResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string EstimateMonocularImageDepthResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
54
threedvision/src/model/EstimateMonocularVideoDepthRequest.cc
Normal file
54
threedvision/src/model/EstimateMonocularVideoDepthRequest.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/threedvision/model/EstimateMonocularVideoDepthRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::EstimateMonocularVideoDepthRequest;
|
||||
|
||||
EstimateMonocularVideoDepthRequest::EstimateMonocularVideoDepthRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "EstimateMonocularVideoDepth") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EstimateMonocularVideoDepthRequest::~EstimateMonocularVideoDepthRequest() {}
|
||||
|
||||
std::string EstimateMonocularVideoDepthRequest::getSampleRate() const {
|
||||
return sampleRate_;
|
||||
}
|
||||
|
||||
void EstimateMonocularVideoDepthRequest::setSampleRate(const std::string &sampleRate) {
|
||||
sampleRate_ = sampleRate;
|
||||
setBodyParameter(std::string("SampleRate"), sampleRate);
|
||||
}
|
||||
|
||||
bool EstimateMonocularVideoDepthRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void EstimateMonocularVideoDepthRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string EstimateMonocularVideoDepthRequest::getVideoURL() const {
|
||||
return videoURL_;
|
||||
}
|
||||
|
||||
void EstimateMonocularVideoDepthRequest::setVideoURL(const std::string &videoURL) {
|
||||
videoURL_ = videoURL;
|
||||
setBodyParameter(std::string("VideoURL"), videoURL);
|
||||
}
|
||||
|
||||
68
threedvision/src/model/EstimateMonocularVideoDepthResult.cc
Normal file
68
threedvision/src/model/EstimateMonocularVideoDepthResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/threedvision/model/EstimateMonocularVideoDepthResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
EstimateMonocularVideoDepthResult::EstimateMonocularVideoDepthResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EstimateMonocularVideoDepthResult::EstimateMonocularVideoDepthResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EstimateMonocularVideoDepthResult::~EstimateMonocularVideoDepthResult()
|
||||
{}
|
||||
|
||||
void EstimateMonocularVideoDepthResult::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["DepthUrl"].isNull())
|
||||
data_.depthUrl = dataNode["DepthUrl"].asString();
|
||||
if(!dataNode["DepthVisUrl"].isNull())
|
||||
data_.depthVisUrl = dataNode["DepthVisUrl"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EstimateMonocularVideoDepthResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
EstimateMonocularVideoDepthResult::Data EstimateMonocularVideoDepthResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string EstimateMonocularVideoDepthResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
45
threedvision/src/model/EstimateStereoImageDepthRequest.cc
Normal file
45
threedvision/src/model/EstimateStereoImageDepthRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/threedvision/model/EstimateStereoImageDepthRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::EstimateStereoImageDepthRequest;
|
||||
|
||||
EstimateStereoImageDepthRequest::EstimateStereoImageDepthRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "EstimateStereoImageDepth") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EstimateStereoImageDepthRequest::~EstimateStereoImageDepthRequest() {}
|
||||
|
||||
std::string EstimateStereoImageDepthRequest::getRightImageURL() const {
|
||||
return rightImageURL_;
|
||||
}
|
||||
|
||||
void EstimateStereoImageDepthRequest::setRightImageURL(const std::string &rightImageURL) {
|
||||
rightImageURL_ = rightImageURL;
|
||||
setBodyParameter(std::string("RightImageURL"), rightImageURL);
|
||||
}
|
||||
|
||||
std::string EstimateStereoImageDepthRequest::getLeftImageURL() const {
|
||||
return leftImageURL_;
|
||||
}
|
||||
|
||||
void EstimateStereoImageDepthRequest::setLeftImageURL(const std::string &leftImageURL) {
|
||||
leftImageURL_ = leftImageURL;
|
||||
setBodyParameter(std::string("LeftImageURL"), leftImageURL);
|
||||
}
|
||||
|
||||
68
threedvision/src/model/EstimateStereoImageDepthResult.cc
Normal file
68
threedvision/src/model/EstimateStereoImageDepthResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/threedvision/model/EstimateStereoImageDepthResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
EstimateStereoImageDepthResult::EstimateStereoImageDepthResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EstimateStereoImageDepthResult::EstimateStereoImageDepthResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EstimateStereoImageDepthResult::~EstimateStereoImageDepthResult()
|
||||
{}
|
||||
|
||||
void EstimateStereoImageDepthResult::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["DisparityMapURL"].isNull())
|
||||
data_.disparityMapURL = dataNode["DisparityMapURL"].asString();
|
||||
if(!dataNode["DisparityVisURL"].isNull())
|
||||
data_.disparityVisURL = dataNode["DisparityVisURL"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EstimateStereoImageDepthResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
EstimateStereoImageDepthResult::Data EstimateStereoImageDepthResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string EstimateStereoImageDepthResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
45
threedvision/src/model/GetAsyncJobResultRequest.cc
Normal file
45
threedvision/src/model/GetAsyncJobResultRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/threedvision/model/GetAsyncJobResultRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::GetAsyncJobResultRequest;
|
||||
|
||||
GetAsyncJobResultRequest::GetAsyncJobResultRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "GetAsyncJobResult") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAsyncJobResultRequest::~GetAsyncJobResultRequest() {}
|
||||
|
||||
std::string GetAsyncJobResultRequest::getJobId() const {
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void GetAsyncJobResultRequest::setJobId(const std::string &jobId) {
|
||||
jobId_ = jobId;
|
||||
setBodyParameter(std::string("JobId"), jobId);
|
||||
}
|
||||
|
||||
bool GetAsyncJobResultRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void GetAsyncJobResultRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
60
threedvision/src/model/GetAsyncJobResultResult.cc
Normal file
60
threedvision/src/model/GetAsyncJobResultResult.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/threedvision/model/GetAsyncJobResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
GetAsyncJobResultResult::GetAsyncJobResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAsyncJobResultResult::GetAsyncJobResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAsyncJobResultResult::~GetAsyncJobResultResult()
|
||||
{}
|
||||
|
||||
void GetAsyncJobResultResult::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["Status"].isNull())
|
||||
data_.status = dataNode["Status"].asString();
|
||||
if(!dataNode["ErrorMessage"].isNull())
|
||||
data_.errorMessage = dataNode["ErrorMessage"].asString();
|
||||
if(!dataNode["Result"].isNull())
|
||||
data_.result = dataNode["Result"].asString();
|
||||
if(!dataNode["ErrorCode"].isNull())
|
||||
data_.errorCode = dataNode["ErrorCode"].asString();
|
||||
if(!dataNode["JobId"].isNull())
|
||||
data_.jobId = dataNode["JobId"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetAsyncJobResultResult::Data GetAsyncJobResultResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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/threedvision/model/ReconstructBodyBySingleImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::ReconstructBodyBySingleImageRequest;
|
||||
|
||||
ReconstructBodyBySingleImageRequest::ReconstructBodyBySingleImageRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "ReconstructBodyBySingleImage") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReconstructBodyBySingleImageRequest::~ReconstructBodyBySingleImageRequest() {}
|
||||
|
||||
std::string ReconstructBodyBySingleImageRequest::getImageURL() const {
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void ReconstructBodyBySingleImageRequest::setImageURL(const std::string &imageURL) {
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter(std::string("ImageURL"), imageURL);
|
||||
}
|
||||
|
||||
68
threedvision/src/model/ReconstructBodyBySingleImageResult.cc
Normal file
68
threedvision/src/model/ReconstructBodyBySingleImageResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/threedvision/model/ReconstructBodyBySingleImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
ReconstructBodyBySingleImageResult::ReconstructBodyBySingleImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReconstructBodyBySingleImageResult::ReconstructBodyBySingleImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReconstructBodyBySingleImageResult::~ReconstructBodyBySingleImageResult()
|
||||
{}
|
||||
|
||||
void ReconstructBodyBySingleImageResult::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["DepthURL"].isNull())
|
||||
data_.depthURL = dataNode["DepthURL"].asString();
|
||||
if(!dataNode["MeshURL"].isNull())
|
||||
data_.meshURL = dataNode["MeshURL"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ReconstructBodyBySingleImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ReconstructBodyBySingleImageResult::Data ReconstructBodyBySingleImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ReconstructBodyBySingleImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
54
threedvision/src/model/ReconstructThreeDMultiViewRequest.cc
Normal file
54
threedvision/src/model/ReconstructThreeDMultiViewRequest.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/threedvision/model/ReconstructThreeDMultiViewRequest.h>
|
||||
|
||||
using AlibabaCloud::Threedvision::Model::ReconstructThreeDMultiViewRequest;
|
||||
|
||||
ReconstructThreeDMultiViewRequest::ReconstructThreeDMultiViewRequest()
|
||||
: RpcServiceRequest("threedvision", "2021-01-31", "ReconstructThreeDMultiView") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReconstructThreeDMultiViewRequest::~ReconstructThreeDMultiViewRequest() {}
|
||||
|
||||
std::string ReconstructThreeDMultiViewRequest::getMode() const {
|
||||
return mode_;
|
||||
}
|
||||
|
||||
void ReconstructThreeDMultiViewRequest::setMode(const std::string &mode) {
|
||||
mode_ = mode;
|
||||
setBodyParameter(std::string("Mode"), mode);
|
||||
}
|
||||
|
||||
std::string ReconstructThreeDMultiViewRequest::getZipFileUrl() const {
|
||||
return zipFileUrl_;
|
||||
}
|
||||
|
||||
void ReconstructThreeDMultiViewRequest::setZipFileUrl(const std::string &zipFileUrl) {
|
||||
zipFileUrl_ = zipFileUrl;
|
||||
setBodyParameter(std::string("ZipFileUrl"), zipFileUrl);
|
||||
}
|
||||
|
||||
bool ReconstructThreeDMultiViewRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void ReconstructThreeDMultiViewRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
66
threedvision/src/model/ReconstructThreeDMultiViewResult.cc
Normal file
66
threedvision/src/model/ReconstructThreeDMultiViewResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/threedvision/model/ReconstructThreeDMultiViewResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Threedvision;
|
||||
using namespace AlibabaCloud::Threedvision::Model;
|
||||
|
||||
ReconstructThreeDMultiViewResult::ReconstructThreeDMultiViewResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReconstructThreeDMultiViewResult::ReconstructThreeDMultiViewResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReconstructThreeDMultiViewResult::~ReconstructThreeDMultiViewResult()
|
||||
{}
|
||||
|
||||
void ReconstructThreeDMultiViewResult::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["PointCloudURL"].isNull())
|
||||
data_.pointCloudURL = dataNode["PointCloudURL"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ReconstructThreeDMultiViewResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ReconstructThreeDMultiViewResult::Data ReconstructThreeDMultiViewResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ReconstructThreeDMultiViewResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user