Update objectdet.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2020-11-16 Version: patch
|
||||||
|
- Update objectdet.
|
||||||
|
|
||||||
2020-11-16 Version: patch
|
2020-11-16 Version: patch
|
||||||
- Update imgsearch.
|
- Update imgsearch.
|
||||||
|
|
||||||
|
|||||||
126
objectdet/CMakeLists.txt
Normal file
126
objectdet/CMakeLists.txt
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
|
||||||
|
set(objectdet_public_header
|
||||||
|
include/alibabacloud/objectdet/ObjectdetClient.h
|
||||||
|
include/alibabacloud/objectdet/ObjectdetExport.h )
|
||||||
|
|
||||||
|
set(objectdet_public_header_model
|
||||||
|
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceResult.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectMainBodyRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectMainBodyResult.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectObjectRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectObjectResult.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectTransparentImageRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectTransparentImageResult.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectVehicleRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectVehicleResult.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectWhiteBaseImageRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/DetectWhiteBaseImageResult.h
|
||||||
|
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanResult.h
|
||||||
|
include/alibabacloud/objectdet/model/GetVehicleRepairPlanRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/GetVehicleRepairPlanResult.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehicleDamageRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehicleDamageResult.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehicleDashboardRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehicleDashboardResult.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehiclePartsRequest.h
|
||||||
|
include/alibabacloud/objectdet/model/RecognizeVehiclePartsResult.h )
|
||||||
|
|
||||||
|
set(objectdet_src
|
||||||
|
src/ObjectdetClient.cc
|
||||||
|
src/model/ClassifyVehicleInsuranceRequest.cc
|
||||||
|
src/model/ClassifyVehicleInsuranceResult.cc
|
||||||
|
src/model/DetectMainBodyRequest.cc
|
||||||
|
src/model/DetectMainBodyResult.cc
|
||||||
|
src/model/DetectObjectRequest.cc
|
||||||
|
src/model/DetectObjectResult.cc
|
||||||
|
src/model/DetectTransparentImageRequest.cc
|
||||||
|
src/model/DetectTransparentImageResult.cc
|
||||||
|
src/model/DetectVehicleRequest.cc
|
||||||
|
src/model/DetectVehicleResult.cc
|
||||||
|
src/model/DetectWhiteBaseImageRequest.cc
|
||||||
|
src/model/DetectWhiteBaseImageResult.cc
|
||||||
|
src/model/GenerateVehicleRepairPlanRequest.cc
|
||||||
|
src/model/GenerateVehicleRepairPlanResult.cc
|
||||||
|
src/model/GetVehicleRepairPlanRequest.cc
|
||||||
|
src/model/GetVehicleRepairPlanResult.cc
|
||||||
|
src/model/RecognizeVehicleDamageRequest.cc
|
||||||
|
src/model/RecognizeVehicleDamageResult.cc
|
||||||
|
src/model/RecognizeVehicleDashboardRequest.cc
|
||||||
|
src/model/RecognizeVehicleDashboardResult.cc
|
||||||
|
src/model/RecognizeVehiclePartsRequest.cc
|
||||||
|
src/model/RecognizeVehiclePartsResult.cc )
|
||||||
|
|
||||||
|
add_library(objectdet ${LIB_TYPE}
|
||||||
|
${objectdet_public_header}
|
||||||
|
${objectdet_public_header_model}
|
||||||
|
${objectdet_src})
|
||||||
|
|
||||||
|
set_target_properties(objectdet
|
||||||
|
PROPERTIES
|
||||||
|
LINKER_LANGUAGE CXX
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}objectdet
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||||
|
set_target_properties(objectdet
|
||||||
|
PROPERTIES
|
||||||
|
DEFINE_SYMBOL ALIBABACLOUD_OBJECTDET_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(objectdet
|
||||||
|
PRIVATE include
|
||||||
|
${CMAKE_SOURCE_DIR}/core/include
|
||||||
|
)
|
||||||
|
target_link_libraries(objectdet
|
||||||
|
core)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||||
|
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||||
|
add_dependencies(objectdet
|
||||||
|
jsoncpp)
|
||||||
|
target_include_directories(objectdet
|
||||||
|
PRIVATE ${jsoncpp_install_dir}/include)
|
||||||
|
target_link_libraries(objectdet
|
||||||
|
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||||
|
set_target_properties(objectdet
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/bigobj")
|
||||||
|
else()
|
||||||
|
target_include_directories(objectdet
|
||||||
|
PRIVATE /usr/include/jsoncpp)
|
||||||
|
target_link_libraries(objectdet
|
||||||
|
jsoncpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${objectdet_public_header}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/objectdet)
|
||||||
|
install(FILES ${objectdet_public_header_model}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/objectdet/model)
|
||||||
|
install(TARGETS objectdet
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
134
objectdet/include/alibabacloud/objectdet/ObjectdetClient.h
Normal file
134
objectdet/include/alibabacloud/objectdet/ObjectdetClient.h
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_OBJECTDETCLIENT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_OBJECTDETCLIENT_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#include "ObjectdetExport.h"
|
||||||
|
#include "model/ClassifyVehicleInsuranceRequest.h"
|
||||||
|
#include "model/ClassifyVehicleInsuranceResult.h"
|
||||||
|
#include "model/DetectMainBodyRequest.h"
|
||||||
|
#include "model/DetectMainBodyResult.h"
|
||||||
|
#include "model/DetectObjectRequest.h"
|
||||||
|
#include "model/DetectObjectResult.h"
|
||||||
|
#include "model/DetectTransparentImageRequest.h"
|
||||||
|
#include "model/DetectTransparentImageResult.h"
|
||||||
|
#include "model/DetectVehicleRequest.h"
|
||||||
|
#include "model/DetectVehicleResult.h"
|
||||||
|
#include "model/DetectWhiteBaseImageRequest.h"
|
||||||
|
#include "model/DetectWhiteBaseImageResult.h"
|
||||||
|
#include "model/GenerateVehicleRepairPlanRequest.h"
|
||||||
|
#include "model/GenerateVehicleRepairPlanResult.h"
|
||||||
|
#include "model/GetVehicleRepairPlanRequest.h"
|
||||||
|
#include "model/GetVehicleRepairPlanResult.h"
|
||||||
|
#include "model/RecognizeVehicleDamageRequest.h"
|
||||||
|
#include "model/RecognizeVehicleDamageResult.h"
|
||||||
|
#include "model/RecognizeVehicleDashboardRequest.h"
|
||||||
|
#include "model/RecognizeVehicleDashboardResult.h"
|
||||||
|
#include "model/RecognizeVehiclePartsRequest.h"
|
||||||
|
#include "model/RecognizeVehiclePartsResult.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT ObjectdetClient : public RpcServiceClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Outcome<Error, Model::ClassifyVehicleInsuranceResult> ClassifyVehicleInsuranceOutcome;
|
||||||
|
typedef std::future<ClassifyVehicleInsuranceOutcome> ClassifyVehicleInsuranceOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::ClassifyVehicleInsuranceRequest&, const ClassifyVehicleInsuranceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyVehicleInsuranceAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DetectMainBodyResult> DetectMainBodyOutcome;
|
||||||
|
typedef std::future<DetectMainBodyOutcome> DetectMainBodyOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::DetectMainBodyRequest&, const DetectMainBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectMainBodyAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DetectObjectResult> DetectObjectOutcome;
|
||||||
|
typedef std::future<DetectObjectOutcome> DetectObjectOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::DetectObjectRequest&, const DetectObjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectObjectAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DetectTransparentImageResult> DetectTransparentImageOutcome;
|
||||||
|
typedef std::future<DetectTransparentImageOutcome> DetectTransparentImageOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::DetectTransparentImageRequest&, const DetectTransparentImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectTransparentImageAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DetectVehicleResult> DetectVehicleOutcome;
|
||||||
|
typedef std::future<DetectVehicleOutcome> DetectVehicleOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleRequest&, const DetectVehicleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DetectWhiteBaseImageResult> DetectWhiteBaseImageOutcome;
|
||||||
|
typedef std::future<DetectWhiteBaseImageOutcome> DetectWhiteBaseImageOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::DetectWhiteBaseImageRequest&, const DetectWhiteBaseImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectWhiteBaseImageAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::GenerateVehicleRepairPlanResult> GenerateVehicleRepairPlanOutcome;
|
||||||
|
typedef std::future<GenerateVehicleRepairPlanOutcome> GenerateVehicleRepairPlanOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::GenerateVehicleRepairPlanRequest&, const GenerateVehicleRepairPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateVehicleRepairPlanAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::GetVehicleRepairPlanResult> GetVehicleRepairPlanOutcome;
|
||||||
|
typedef std::future<GetVehicleRepairPlanOutcome> GetVehicleRepairPlanOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::GetVehicleRepairPlanRequest&, const GetVehicleRepairPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetVehicleRepairPlanAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::RecognizeVehicleDamageResult> RecognizeVehicleDamageOutcome;
|
||||||
|
typedef std::future<RecognizeVehicleDamageOutcome> RecognizeVehicleDamageOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehicleDamageRequest&, const RecognizeVehicleDamageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehicleDamageAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::RecognizeVehicleDashboardResult> RecognizeVehicleDashboardOutcome;
|
||||||
|
typedef std::future<RecognizeVehicleDashboardOutcome> RecognizeVehicleDashboardOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehicleDashboardRequest&, const RecognizeVehicleDashboardOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehicleDashboardAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::RecognizeVehiclePartsResult> RecognizeVehiclePartsOutcome;
|
||||||
|
typedef std::future<RecognizeVehiclePartsOutcome> RecognizeVehiclePartsOutcomeCallable;
|
||||||
|
typedef std::function<void(const ObjectdetClient*, const Model::RecognizeVehiclePartsRequest&, const RecognizeVehiclePartsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehiclePartsAsyncHandler;
|
||||||
|
|
||||||
|
ObjectdetClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
ObjectdetClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
|
ObjectdetClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
|
~ObjectdetClient();
|
||||||
|
ClassifyVehicleInsuranceOutcome classifyVehicleInsurance(const Model::ClassifyVehicleInsuranceRequest &request)const;
|
||||||
|
void classifyVehicleInsuranceAsync(const Model::ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ClassifyVehicleInsuranceOutcomeCallable classifyVehicleInsuranceCallable(const Model::ClassifyVehicleInsuranceRequest& request) const;
|
||||||
|
DetectMainBodyOutcome detectMainBody(const Model::DetectMainBodyRequest &request)const;
|
||||||
|
void detectMainBodyAsync(const Model::DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectMainBodyOutcomeCallable detectMainBodyCallable(const Model::DetectMainBodyRequest& request) const;
|
||||||
|
DetectObjectOutcome detectObject(const Model::DetectObjectRequest &request)const;
|
||||||
|
void detectObjectAsync(const Model::DetectObjectRequest& request, const DetectObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectObjectOutcomeCallable detectObjectCallable(const Model::DetectObjectRequest& request) const;
|
||||||
|
DetectTransparentImageOutcome detectTransparentImage(const Model::DetectTransparentImageRequest &request)const;
|
||||||
|
void detectTransparentImageAsync(const Model::DetectTransparentImageRequest& request, const DetectTransparentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectTransparentImageOutcomeCallable detectTransparentImageCallable(const Model::DetectTransparentImageRequest& request) const;
|
||||||
|
DetectVehicleOutcome detectVehicle(const Model::DetectVehicleRequest &request)const;
|
||||||
|
void detectVehicleAsync(const Model::DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectVehicleOutcomeCallable detectVehicleCallable(const Model::DetectVehicleRequest& request) const;
|
||||||
|
DetectWhiteBaseImageOutcome detectWhiteBaseImage(const Model::DetectWhiteBaseImageRequest &request)const;
|
||||||
|
void detectWhiteBaseImageAsync(const Model::DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectWhiteBaseImageOutcomeCallable detectWhiteBaseImageCallable(const Model::DetectWhiteBaseImageRequest& request) const;
|
||||||
|
GenerateVehicleRepairPlanOutcome generateVehicleRepairPlan(const Model::GenerateVehicleRepairPlanRequest &request)const;
|
||||||
|
void generateVehicleRepairPlanAsync(const Model::GenerateVehicleRepairPlanRequest& request, const GenerateVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
GenerateVehicleRepairPlanOutcomeCallable generateVehicleRepairPlanCallable(const Model::GenerateVehicleRepairPlanRequest& request) const;
|
||||||
|
GetVehicleRepairPlanOutcome getVehicleRepairPlan(const Model::GetVehicleRepairPlanRequest &request)const;
|
||||||
|
void getVehicleRepairPlanAsync(const Model::GetVehicleRepairPlanRequest& request, const GetVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
GetVehicleRepairPlanOutcomeCallable getVehicleRepairPlanCallable(const Model::GetVehicleRepairPlanRequest& request) const;
|
||||||
|
RecognizeVehicleDamageOutcome recognizeVehicleDamage(const Model::RecognizeVehicleDamageRequest &request)const;
|
||||||
|
void recognizeVehicleDamageAsync(const Model::RecognizeVehicleDamageRequest& request, const RecognizeVehicleDamageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
RecognizeVehicleDamageOutcomeCallable recognizeVehicleDamageCallable(const Model::RecognizeVehicleDamageRequest& request) const;
|
||||||
|
RecognizeVehicleDashboardOutcome recognizeVehicleDashboard(const Model::RecognizeVehicleDashboardRequest &request)const;
|
||||||
|
void recognizeVehicleDashboardAsync(const Model::RecognizeVehicleDashboardRequest& request, const RecognizeVehicleDashboardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
RecognizeVehicleDashboardOutcomeCallable recognizeVehicleDashboardCallable(const Model::RecognizeVehicleDashboardRequest& request) const;
|
||||||
|
RecognizeVehiclePartsOutcome recognizeVehicleParts(const Model::RecognizeVehiclePartsRequest &request)const;
|
||||||
|
void recognizeVehiclePartsAsync(const Model::RecognizeVehiclePartsRequest& request, const RecognizeVehiclePartsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
RecognizeVehiclePartsOutcomeCallable recognizeVehiclePartsCallable(const Model::RecognizeVehiclePartsRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_OBJECTDETCLIENT_H_
|
||||||
32
objectdet/include/alibabacloud/objectdet/ObjectdetExport.h
Normal file
32
objectdet/include/alibabacloud/objectdet/ObjectdetExport.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_OBJECTDETEXPORT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_OBJECTDETEXPORT_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#if defined(ALIBABACLOUD_SHARED)
|
||||||
|
# if defined(ALIBABACLOUD_OBJECTDET_LIBRARY)
|
||||||
|
# define ALIBABACLOUD_OBJECTDET_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define ALIBABACLOUD_OBJECTDET_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ALIBABACLOUD_OBJECTDET_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_OBJECTDETEXPORT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT ClassifyVehicleInsuranceRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ClassifyVehicleInsuranceRequest();
|
||||||
|
~ClassifyVehicleInsuranceRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCEREQUEST_H_
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT ClassifyVehicleInsuranceResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Label
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string name;
|
||||||
|
};
|
||||||
|
std::vector<Label> labels;
|
||||||
|
float threshold;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceResult();
|
||||||
|
explicit ClassifyVehicleInsuranceResult(const std::string &payload);
|
||||||
|
~ClassifyVehicleInsuranceResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_CLASSIFYVEHICLEINSURANCERESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectMainBodyRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectMainBodyRequest();
|
||||||
|
~DetectMainBodyRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectMainBodyResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Location
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int height;
|
||||||
|
int width;
|
||||||
|
};
|
||||||
|
Location location;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectMainBodyResult();
|
||||||
|
explicit DetectMainBodyResult(const std::string &payload);
|
||||||
|
~DetectMainBodyResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTMAINBODYRESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectObjectRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectObjectRequest();
|
||||||
|
~DetectObjectRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTREQUEST_H_
|
||||||
@@ -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_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectObjectResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string type;
|
||||||
|
std::vector<std::string> boxes;
|
||||||
|
};
|
||||||
|
int height;
|
||||||
|
std::vector<Element> elements;
|
||||||
|
int width;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectObjectResult();
|
||||||
|
explicit DetectObjectResult(const std::string &payload);
|
||||||
|
~DetectObjectResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTOBJECTRESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectTransparentImageRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectTransparentImageRequest();
|
||||||
|
~DetectTransparentImageRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGEREQUEST_H_
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectTransparentImageResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
int transparentImage;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectTransparentImageResult();
|
||||||
|
explicit DetectTransparentImageResult(const std::string &payload);
|
||||||
|
~DetectTransparentImageResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTTRANSPARENTIMAGERESULT_H_
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectVehicleRequest();
|
||||||
|
~DetectVehicleRequest();
|
||||||
|
|
||||||
|
int getImageType()const;
|
||||||
|
void setImageType(int imageType);
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
int imageType_;
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEREQUEST_H_
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct DetectObjectInfo
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string type;
|
||||||
|
int id;
|
||||||
|
std::vector<std::string> boxes;
|
||||||
|
};
|
||||||
|
std::vector<DetectObjectInfo> detectObjectInfoList;
|
||||||
|
int height;
|
||||||
|
int width;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectVehicleResult();
|
||||||
|
explicit DetectVehicleResult(const std::string &payload);
|
||||||
|
~DetectVehicleResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLERESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectWhiteBaseImageRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectWhiteBaseImageRequest();
|
||||||
|
~DetectWhiteBaseImageRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGEREQUEST_H_
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT DetectWhiteBaseImageResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
int whiteBase;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectWhiteBaseImageResult();
|
||||||
|
explicit DetectWhiteBaseImageResult(const std::string &payload);
|
||||||
|
~DetectWhiteBaseImageResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTWHITEBASEIMAGERESULT_H_
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT GenerateVehicleRepairPlanRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct DamageImageList
|
||||||
|
{
|
||||||
|
std::string imageUrl;
|
||||||
|
std::string createTimeStamp;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
GenerateVehicleRepairPlanRequest();
|
||||||
|
~GenerateVehicleRepairPlanRequest();
|
||||||
|
|
||||||
|
std::vector<DamageImageList> getDamageImageList()const;
|
||||||
|
void setDamageImageList(const std::vector<DamageImageList>& damageImageList);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<DamageImageList> damageImageList_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANREQUEST_H_
|
||||||
@@ -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_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT GenerateVehicleRepairPlanResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
std::string taskId;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanResult();
|
||||||
|
explicit GenerateVehicleRepairPlanResult(const std::string &payload);
|
||||||
|
~GenerateVehicleRepairPlanResult();
|
||||||
|
int getHttpCode()const;
|
||||||
|
Data getData()const;
|
||||||
|
std::string getErrorMessage()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
int httpCode_;
|
||||||
|
Data data_;
|
||||||
|
std::string errorMessage_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GENERATEVEHICLEREPAIRPLANRESULT_H_
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT GetVehicleRepairPlanRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
GetVehicleRepairPlanRequest();
|
||||||
|
~GetVehicleRepairPlanRequest();
|
||||||
|
|
||||||
|
std::string getVinCodeImage()const;
|
||||||
|
void setVinCodeImage(const std::string& vinCodeImage);
|
||||||
|
std::string getCarNumberImage()const;
|
||||||
|
void setCarNumberImage(const std::string& carNumberImage);
|
||||||
|
std::string getTaskId()const;
|
||||||
|
void setTaskId(const std::string& taskId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string vinCodeImage_;
|
||||||
|
std::string carNumberImage_;
|
||||||
|
std::string taskId_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANREQUEST_H_
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT GetVehicleRepairPlanResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct RepairItems
|
||||||
|
{
|
||||||
|
bool partNameMatch;
|
||||||
|
std::string partsStdCode;
|
||||||
|
std::string outStandardPartsName;
|
||||||
|
std::string repairType;
|
||||||
|
std::string relationType;
|
||||||
|
std::string repairFee;
|
||||||
|
std::string garageType;
|
||||||
|
std::string partsStdName;
|
||||||
|
std::string outStandardPartsId;
|
||||||
|
std::string repairTypeName;
|
||||||
|
bool oeMatch;
|
||||||
|
};
|
||||||
|
std::string frameNo;
|
||||||
|
std::vector<RepairItems> repairParts;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GetVehicleRepairPlanResult();
|
||||||
|
explicit GetVehicleRepairPlanResult(const std::string &payload);
|
||||||
|
~GetVehicleRepairPlanResult();
|
||||||
|
int getHttpCode()const;
|
||||||
|
Data getData()const;
|
||||||
|
std::string getErrorMessage()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
int httpCode_;
|
||||||
|
Data data_;
|
||||||
|
std::string errorMessage_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_GETVEHICLEREPAIRPLANRESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDamageRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
RecognizeVehicleDamageRequest();
|
||||||
|
~RecognizeVehicleDamageRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGEREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDamageResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string type;
|
||||||
|
std::vector<std::string> scores;
|
||||||
|
std::vector<std::string> boxes;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
RecognizeVehicleDamageResult();
|
||||||
|
explicit RecognizeVehicleDamageResult(const std::string &payload);
|
||||||
|
~RecognizeVehicleDamageResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDAMAGERESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDashboardRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
RecognizeVehicleDashboardRequest();
|
||||||
|
~RecognizeVehicleDashboardRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehicleDashboardResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string className;
|
||||||
|
std::string label;
|
||||||
|
std::vector<std::string> boxes;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardResult();
|
||||||
|
explicit RecognizeVehicleDashboardResult(const std::string &payload);
|
||||||
|
~RecognizeVehicleDashboardResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEDASHBOARDRESULT_H_
|
||||||
@@ -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_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehiclePartsRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
RecognizeVehiclePartsRequest();
|
||||||
|
~RecognizeVehiclePartsRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/objectdet/ObjectdetExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Objectdet
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OBJECTDET_EXPORT RecognizeVehiclePartsResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string type;
|
||||||
|
std::vector<std::string> boxes;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
std::vector<std::string> originShapes;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
RecognizeVehiclePartsResult();
|
||||||
|
explicit RecognizeVehiclePartsResult(const std::string &payload);
|
||||||
|
~RecognizeVehiclePartsResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_RECOGNIZEVEHICLEPARTSRESULT_H_
|
||||||
449
objectdet/src/ObjectdetClient.cc
Normal file
449
objectdet/src/ObjectdetClient.cc
Normal file
@@ -0,0 +1,449 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/ObjectdetClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud;
|
||||||
|
using namespace AlibabaCloud::Location;
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::string SERVICE_NAME = "objectdet";
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::ObjectdetClient(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, "objectdet");
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::ObjectdetClient(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, "objectdet");
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::ObjectdetClient(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, "objectdet");
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::~ObjectdetClient()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ObjectdetClient::ClassifyVehicleInsuranceOutcome ObjectdetClient::classifyVehicleInsurance(const ClassifyVehicleInsuranceRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ClassifyVehicleInsuranceOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ClassifyVehicleInsuranceOutcome(ClassifyVehicleInsuranceResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ClassifyVehicleInsuranceOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::classifyVehicleInsuranceAsync(const ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, classifyVehicleInsurance(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::ClassifyVehicleInsuranceOutcomeCallable ObjectdetClient::classifyVehicleInsuranceCallable(const ClassifyVehicleInsuranceRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ClassifyVehicleInsuranceOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->classifyVehicleInsurance(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectMainBodyOutcome ObjectdetClient::detectMainBody(const DetectMainBodyRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectMainBodyOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectMainBodyOutcome(DetectMainBodyResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectMainBodyOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::detectMainBodyAsync(const DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectMainBody(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectMainBodyOutcomeCallable ObjectdetClient::detectMainBodyCallable(const DetectMainBodyRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectMainBodyOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectMainBody(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectObjectOutcome ObjectdetClient::detectObject(const DetectObjectRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectObjectOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectObjectOutcome(DetectObjectResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectObjectOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::detectObjectAsync(const DetectObjectRequest& request, const DetectObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectObject(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectObjectOutcomeCallable ObjectdetClient::detectObjectCallable(const DetectObjectRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectObjectOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectObject(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectTransparentImageOutcome ObjectdetClient::detectTransparentImage(const DetectTransparentImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectTransparentImageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectTransparentImageOutcome(DetectTransparentImageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectTransparentImageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::detectTransparentImageAsync(const DetectTransparentImageRequest& request, const DetectTransparentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectTransparentImage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectTransparentImageOutcomeCallable ObjectdetClient::detectTransparentImageCallable(const DetectTransparentImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectTransparentImageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectTransparentImage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectVehicleOutcome ObjectdetClient::detectVehicle(const DetectVehicleRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectVehicleOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectVehicleOutcome(DetectVehicleResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectVehicleOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::detectVehicleAsync(const DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectVehicle(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectVehicleOutcomeCallable ObjectdetClient::detectVehicleCallable(const DetectVehicleRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectVehicleOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectVehicle(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectWhiteBaseImageOutcome ObjectdetClient::detectWhiteBaseImage(const DetectWhiteBaseImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectWhiteBaseImageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectWhiteBaseImageOutcome(DetectWhiteBaseImageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectWhiteBaseImageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::detectWhiteBaseImageAsync(const DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectWhiteBaseImage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::DetectWhiteBaseImageOutcomeCallable ObjectdetClient::detectWhiteBaseImageCallable(const DetectWhiteBaseImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectWhiteBaseImageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectWhiteBaseImage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::GenerateVehicleRepairPlanOutcome ObjectdetClient::generateVehicleRepairPlan(const GenerateVehicleRepairPlanRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return GenerateVehicleRepairPlanOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return GenerateVehicleRepairPlanOutcome(GenerateVehicleRepairPlanResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return GenerateVehicleRepairPlanOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::generateVehicleRepairPlanAsync(const GenerateVehicleRepairPlanRequest& request, const GenerateVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, generateVehicleRepairPlan(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::GenerateVehicleRepairPlanOutcomeCallable ObjectdetClient::generateVehicleRepairPlanCallable(const GenerateVehicleRepairPlanRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<GenerateVehicleRepairPlanOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->generateVehicleRepairPlan(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::GetVehicleRepairPlanOutcome ObjectdetClient::getVehicleRepairPlan(const GetVehicleRepairPlanRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return GetVehicleRepairPlanOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return GetVehicleRepairPlanOutcome(GetVehicleRepairPlanResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return GetVehicleRepairPlanOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::getVehicleRepairPlanAsync(const GetVehicleRepairPlanRequest& request, const GetVehicleRepairPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, getVehicleRepairPlan(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::GetVehicleRepairPlanOutcomeCallable ObjectdetClient::getVehicleRepairPlanCallable(const GetVehicleRepairPlanRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<GetVehicleRepairPlanOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->getVehicleRepairPlan(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehicleDamageOutcome ObjectdetClient::recognizeVehicleDamage(const RecognizeVehicleDamageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return RecognizeVehicleDamageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return RecognizeVehicleDamageOutcome(RecognizeVehicleDamageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return RecognizeVehicleDamageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::recognizeVehicleDamageAsync(const RecognizeVehicleDamageRequest& request, const RecognizeVehicleDamageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, recognizeVehicleDamage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehicleDamageOutcomeCallable ObjectdetClient::recognizeVehicleDamageCallable(const RecognizeVehicleDamageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<RecognizeVehicleDamageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->recognizeVehicleDamage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehicleDashboardOutcome ObjectdetClient::recognizeVehicleDashboard(const RecognizeVehicleDashboardRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return RecognizeVehicleDashboardOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return RecognizeVehicleDashboardOutcome(RecognizeVehicleDashboardResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return RecognizeVehicleDashboardOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::recognizeVehicleDashboardAsync(const RecognizeVehicleDashboardRequest& request, const RecognizeVehicleDashboardAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, recognizeVehicleDashboard(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehicleDashboardOutcomeCallable ObjectdetClient::recognizeVehicleDashboardCallable(const RecognizeVehicleDashboardRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<RecognizeVehicleDashboardOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->recognizeVehicleDashboard(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehiclePartsOutcome ObjectdetClient::recognizeVehicleParts(const RecognizeVehiclePartsRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return RecognizeVehiclePartsOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return RecognizeVehiclePartsOutcome(RecognizeVehiclePartsResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return RecognizeVehiclePartsOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectdetClient::recognizeVehiclePartsAsync(const RecognizeVehiclePartsRequest& request, const RecognizeVehiclePartsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, recognizeVehicleParts(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectdetClient::RecognizeVehiclePartsOutcomeCallable ObjectdetClient::recognizeVehiclePartsCallable(const RecognizeVehiclePartsRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<RecognizeVehiclePartsOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->recognizeVehicleParts(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/ClassifyVehicleInsuranceRequest.cc
Normal file
40
objectdet/src/model/ClassifyVehicleInsuranceRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/ClassifyVehicleInsuranceRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::ClassifyVehicleInsuranceRequest;
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceRequest::ClassifyVehicleInsuranceRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "ClassifyVehicleInsurance")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceRequest::~ClassifyVehicleInsuranceRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string ClassifyVehicleInsuranceRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClassifyVehicleInsuranceRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
62
objectdet/src/model/ClassifyVehicleInsuranceResult.cc
Normal file
62
objectdet/src/model/ClassifyVehicleInsuranceResult.cc
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/ClassifyVehicleInsuranceResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceResult::ClassifyVehicleInsuranceResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceResult::ClassifyVehicleInsuranceResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceResult::~ClassifyVehicleInsuranceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ClassifyVehicleInsuranceResult::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["Threshold"].isNull())
|
||||||
|
data_.threshold = std::stof(dataNode["Threshold"].asString());
|
||||||
|
auto allLabelsNode = dataNode["Labels"]["Label"];
|
||||||
|
for (auto dataNodeLabelsLabel : allLabelsNode)
|
||||||
|
{
|
||||||
|
Data::Label labelObject;
|
||||||
|
if(!dataNodeLabelsLabel["Score"].isNull())
|
||||||
|
labelObject.score = std::stof(dataNodeLabelsLabel["Score"].asString());
|
||||||
|
if(!dataNodeLabelsLabel["Name"].isNull())
|
||||||
|
labelObject.name = dataNodeLabelsLabel["Name"].asString();
|
||||||
|
data_.labels.push_back(labelObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ClassifyVehicleInsuranceResult::Data ClassifyVehicleInsuranceResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/DetectMainBodyRequest.cc
Normal file
40
objectdet/src/model/DetectMainBodyRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectMainBodyRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::DetectMainBodyRequest;
|
||||||
|
|
||||||
|
DetectMainBodyRequest::DetectMainBodyRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "DetectMainBody")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectMainBodyRequest::~DetectMainBodyRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string DetectMainBodyRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectMainBodyRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
59
objectdet/src/model/DetectMainBodyResult.cc
Normal file
59
objectdet/src/model/DetectMainBodyResult.cc
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectMainBodyResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
DetectMainBodyResult::DetectMainBodyResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectMainBodyResult::DetectMainBodyResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectMainBodyResult::~DetectMainBodyResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectMainBodyResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto locationNode = dataNode["Location"];
|
||||||
|
if(!locationNode["X"].isNull())
|
||||||
|
data_.location.x = std::stoi(locationNode["X"].asString());
|
||||||
|
if(!locationNode["Y"].isNull())
|
||||||
|
data_.location.y = std::stoi(locationNode["Y"].asString());
|
||||||
|
if(!locationNode["Width"].isNull())
|
||||||
|
data_.location.width = std::stoi(locationNode["Width"].asString());
|
||||||
|
if(!locationNode["Height"].isNull())
|
||||||
|
data_.location.height = std::stoi(locationNode["Height"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectMainBodyResult::Data DetectMainBodyResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/DetectObjectRequest.cc
Normal file
40
objectdet/src/model/DetectObjectRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectObjectRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::DetectObjectRequest;
|
||||||
|
|
||||||
|
DetectObjectRequest::DetectObjectRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "DetectObject")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectObjectRequest::~DetectObjectRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string DetectObjectRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectObjectRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
67
objectdet/src/model/DetectObjectResult.cc
Normal file
67
objectdet/src/model/DetectObjectResult.cc
Normal 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/objectdet/model/DetectObjectResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
DetectObjectResult::DetectObjectResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectObjectResult::DetectObjectResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectObjectResult::~DetectObjectResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectObjectResult::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["Width"].isNull())
|
||||||
|
data_.width = std::stoi(dataNode["Width"].asString());
|
||||||
|
if(!dataNode["Height"].isNull())
|
||||||
|
data_.height = std::stoi(dataNode["Height"].asString());
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["Score"].isNull())
|
||||||
|
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
|
||||||
|
if(!dataNodeElementsElement["Type"].isNull())
|
||||||
|
elementObject.type = dataNodeElementsElement["Type"].asString();
|
||||||
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
|
for (auto value : allBoxes)
|
||||||
|
elementObject.boxes.push_back(value.asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectObjectResult::Data DetectObjectResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/DetectTransparentImageRequest.cc
Normal file
40
objectdet/src/model/DetectTransparentImageRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectTransparentImageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::DetectTransparentImageRequest;
|
||||||
|
|
||||||
|
DetectTransparentImageRequest::DetectTransparentImageRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "DetectTransparentImage")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectTransparentImageRequest::~DetectTransparentImageRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string DetectTransparentImageRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectTransparentImageRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
58
objectdet/src/model/DetectTransparentImageResult.cc
Normal file
58
objectdet/src/model/DetectTransparentImageResult.cc
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectTransparentImageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
DetectTransparentImageResult::DetectTransparentImageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectTransparentImageResult::DetectTransparentImageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectTransparentImageResult::~DetectTransparentImageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectTransparentImageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["TransparentImage"].isNull())
|
||||||
|
elementObject.transparentImage = std::stoi(dataNodeElementsElement["TransparentImage"].asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectTransparentImageResult::Data DetectTransparentImageResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
51
objectdet/src/model/DetectVehicleRequest.cc
Normal file
51
objectdet/src/model/DetectVehicleRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectVehicleRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::DetectVehicleRequest;
|
||||||
|
|
||||||
|
DetectVehicleRequest::DetectVehicleRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicle")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectVehicleRequest::~DetectVehicleRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
int DetectVehicleRequest::getImageType()const
|
||||||
|
{
|
||||||
|
return imageType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectVehicleRequest::setImageType(int imageType)
|
||||||
|
{
|
||||||
|
imageType_ = imageType;
|
||||||
|
setBodyParameter("ImageType", std::to_string(imageType));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DetectVehicleRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectVehicleRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
69
objectdet/src/model/DetectVehicleResult.cc
Normal file
69
objectdet/src/model/DetectVehicleResult.cc
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectVehicleResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
DetectVehicleResult::DetectVehicleResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectVehicleResult::DetectVehicleResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectVehicleResult::~DetectVehicleResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectVehicleResult::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["Width"].isNull())
|
||||||
|
data_.width = std::stoi(dataNode["Width"].asString());
|
||||||
|
if(!dataNode["Height"].isNull())
|
||||||
|
data_.height = std::stoi(dataNode["Height"].asString());
|
||||||
|
auto allDetectObjectInfoListNode = dataNode["DetectObjectInfoList"]["DetectObjectInfo"];
|
||||||
|
for (auto dataNodeDetectObjectInfoListDetectObjectInfo : allDetectObjectInfoListNode)
|
||||||
|
{
|
||||||
|
Data::DetectObjectInfo detectObjectInfoObject;
|
||||||
|
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Score"].isNull())
|
||||||
|
detectObjectInfoObject.score = std::stof(dataNodeDetectObjectInfoListDetectObjectInfo["Score"].asString());
|
||||||
|
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Type"].isNull())
|
||||||
|
detectObjectInfoObject.type = dataNodeDetectObjectInfoListDetectObjectInfo["Type"].asString();
|
||||||
|
if(!dataNodeDetectObjectInfoListDetectObjectInfo["Id"].isNull())
|
||||||
|
detectObjectInfoObject.id = std::stoi(dataNodeDetectObjectInfoListDetectObjectInfo["Id"].asString());
|
||||||
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
|
for (auto value : allBoxes)
|
||||||
|
detectObjectInfoObject.boxes.push_back(value.asString());
|
||||||
|
data_.detectObjectInfoList.push_back(detectObjectInfoObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectVehicleResult::Data DetectVehicleResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/DetectWhiteBaseImageRequest.cc
Normal file
40
objectdet/src/model/DetectWhiteBaseImageRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectWhiteBaseImageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::DetectWhiteBaseImageRequest;
|
||||||
|
|
||||||
|
DetectWhiteBaseImageRequest::DetectWhiteBaseImageRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "DetectWhiteBaseImage")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectWhiteBaseImageRequest::~DetectWhiteBaseImageRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string DetectWhiteBaseImageRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectWhiteBaseImageRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
58
objectdet/src/model/DetectWhiteBaseImageResult.cc
Normal file
58
objectdet/src/model/DetectWhiteBaseImageResult.cc
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/DetectWhiteBaseImageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
DetectWhiteBaseImageResult::DetectWhiteBaseImageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectWhiteBaseImageResult::DetectWhiteBaseImageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectWhiteBaseImageResult::~DetectWhiteBaseImageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectWhiteBaseImageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["WhiteBase"].isNull())
|
||||||
|
elementObject.whiteBase = std::stoi(dataNodeElementsElement["WhiteBase"].asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectWhiteBaseImageResult::Data DetectWhiteBaseImageResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
45
objectdet/src/model/GenerateVehicleRepairPlanRequest.cc
Normal file
45
objectdet/src/model/GenerateVehicleRepairPlanRequest.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/objectdet/model/GenerateVehicleRepairPlanRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::GenerateVehicleRepairPlanRequest;
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanRequest::GenerateVehicleRepairPlanRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "GenerateVehicleRepairPlan")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanRequest::~GenerateVehicleRepairPlanRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::vector<GenerateVehicleRepairPlanRequest::DamageImageList> GenerateVehicleRepairPlanRequest::getDamageImageList()const
|
||||||
|
{
|
||||||
|
return damageImageList_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenerateVehicleRepairPlanRequest::setDamageImageList(const std::vector<DamageImageList>& damageImageList)
|
||||||
|
{
|
||||||
|
damageImageList_ = damageImageList;
|
||||||
|
for(int dep1 = 0; dep1!= damageImageList.size(); dep1++) {
|
||||||
|
auto damageImageListObj = damageImageList.at(dep1);
|
||||||
|
std::string damageImageListObjStr = "DamageImageList." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(damageImageListObjStr + ".ImageUrl", damageImageListObj.imageUrl);
|
||||||
|
setParameter(damageImageListObjStr + ".CreateTimeStamp", damageImageListObj.createTimeStamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
80
objectdet/src/model/GenerateVehicleRepairPlanResult.cc
Normal file
80
objectdet/src/model/GenerateVehicleRepairPlanResult.cc
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/GenerateVehicleRepairPlanResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanResult::GenerateVehicleRepairPlanResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanResult::GenerateVehicleRepairPlanResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanResult::~GenerateVehicleRepairPlanResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void GenerateVehicleRepairPlanResult::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["TaskId"].isNull())
|
||||||
|
data_.taskId = dataNode["TaskId"].asString();
|
||||||
|
if(!value["HttpCode"].isNull())
|
||||||
|
httpCode_ = std::stoi(value["HttpCode"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["ErrorMessage"].isNull())
|
||||||
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int GenerateVehicleRepairPlanResult::getHttpCode()const
|
||||||
|
{
|
||||||
|
return httpCode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateVehicleRepairPlanResult::Data GenerateVehicleRepairPlanResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GenerateVehicleRepairPlanResult::getErrorMessage()const
|
||||||
|
{
|
||||||
|
return errorMessage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GenerateVehicleRepairPlanResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GenerateVehicleRepairPlanResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
62
objectdet/src/model/GetVehicleRepairPlanRequest.cc
Normal file
62
objectdet/src/model/GetVehicleRepairPlanRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/GetVehicleRepairPlanRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::GetVehicleRepairPlanRequest;
|
||||||
|
|
||||||
|
GetVehicleRepairPlanRequest::GetVehicleRepairPlanRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "GetVehicleRepairPlan")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetVehicleRepairPlanRequest::~GetVehicleRepairPlanRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string GetVehicleRepairPlanRequest::getVinCodeImage()const
|
||||||
|
{
|
||||||
|
return vinCodeImage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetVehicleRepairPlanRequest::setVinCodeImage(const std::string& vinCodeImage)
|
||||||
|
{
|
||||||
|
vinCodeImage_ = vinCodeImage;
|
||||||
|
setBodyParameter("VinCodeImage", vinCodeImage);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetVehicleRepairPlanRequest::getCarNumberImage()const
|
||||||
|
{
|
||||||
|
return carNumberImage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetVehicleRepairPlanRequest::setCarNumberImage(const std::string& carNumberImage)
|
||||||
|
{
|
||||||
|
carNumberImage_ = carNumberImage;
|
||||||
|
setBodyParameter("CarNumberImage", carNumberImage);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetVehicleRepairPlanRequest::getTaskId()const
|
||||||
|
{
|
||||||
|
return taskId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetVehicleRepairPlanRequest::setTaskId(const std::string& taskId)
|
||||||
|
{
|
||||||
|
taskId_ = taskId;
|
||||||
|
setBodyParameter("TaskId", taskId);
|
||||||
|
}
|
||||||
|
|
||||||
108
objectdet/src/model/GetVehicleRepairPlanResult.cc
Normal file
108
objectdet/src/model/GetVehicleRepairPlanResult.cc
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/GetVehicleRepairPlanResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
GetVehicleRepairPlanResult::GetVehicleRepairPlanResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
GetVehicleRepairPlanResult::GetVehicleRepairPlanResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetVehicleRepairPlanResult::~GetVehicleRepairPlanResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void GetVehicleRepairPlanResult::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["FrameNo"].isNull())
|
||||||
|
data_.frameNo = dataNode["FrameNo"].asString();
|
||||||
|
auto allRepairPartsNode = dataNode["RepairParts"]["RepairItems"];
|
||||||
|
for (auto dataNodeRepairPartsRepairItems : allRepairPartsNode)
|
||||||
|
{
|
||||||
|
Data::RepairItems repairItemsObject;
|
||||||
|
if(!dataNodeRepairPartsRepairItems["GarageType"].isNull())
|
||||||
|
repairItemsObject.garageType = dataNodeRepairPartsRepairItems["GarageType"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["OeMatch"].isNull())
|
||||||
|
repairItemsObject.oeMatch = dataNodeRepairPartsRepairItems["OeMatch"].asString() == "true";
|
||||||
|
if(!dataNodeRepairPartsRepairItems["OutStandardPartsId"].isNull())
|
||||||
|
repairItemsObject.outStandardPartsId = dataNodeRepairPartsRepairItems["OutStandardPartsId"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["OutStandardPartsName"].isNull())
|
||||||
|
repairItemsObject.outStandardPartsName = dataNodeRepairPartsRepairItems["OutStandardPartsName"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["PartNameMatch"].isNull())
|
||||||
|
repairItemsObject.partNameMatch = dataNodeRepairPartsRepairItems["PartNameMatch"].asString() == "true";
|
||||||
|
if(!dataNodeRepairPartsRepairItems["PartsStdCode"].isNull())
|
||||||
|
repairItemsObject.partsStdCode = dataNodeRepairPartsRepairItems["PartsStdCode"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["PartsStdName"].isNull())
|
||||||
|
repairItemsObject.partsStdName = dataNodeRepairPartsRepairItems["PartsStdName"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["RelationType"].isNull())
|
||||||
|
repairItemsObject.relationType = dataNodeRepairPartsRepairItems["RelationType"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["RepairFee"].isNull())
|
||||||
|
repairItemsObject.repairFee = dataNodeRepairPartsRepairItems["RepairFee"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["RepairType"].isNull())
|
||||||
|
repairItemsObject.repairType = dataNodeRepairPartsRepairItems["RepairType"].asString();
|
||||||
|
if(!dataNodeRepairPartsRepairItems["RepairTypeName"].isNull())
|
||||||
|
repairItemsObject.repairTypeName = dataNodeRepairPartsRepairItems["RepairTypeName"].asString();
|
||||||
|
data_.repairParts.push_back(repairItemsObject);
|
||||||
|
}
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["ErrorMessage"].isNull())
|
||||||
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
if(!value["HttpCode"].isNull())
|
||||||
|
httpCode_ = std::stoi(value["HttpCode"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetVehicleRepairPlanResult::getHttpCode()const
|
||||||
|
{
|
||||||
|
return httpCode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetVehicleRepairPlanResult::Data GetVehicleRepairPlanResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetVehicleRepairPlanResult::getErrorMessage()const
|
||||||
|
{
|
||||||
|
return errorMessage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetVehicleRepairPlanResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetVehicleRepairPlanResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/RecognizeVehicleDamageRequest.cc
Normal file
40
objectdet/src/model/RecognizeVehicleDamageRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/RecognizeVehicleDamageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::RecognizeVehicleDamageRequest;
|
||||||
|
|
||||||
|
RecognizeVehicleDamageRequest::RecognizeVehicleDamageRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "RecognizeVehicleDamage")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDamageRequest::~RecognizeVehicleDamageRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string RecognizeVehicleDamageRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RecognizeVehicleDamageRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
66
objectdet/src/model/RecognizeVehicleDamageResult.cc
Normal file
66
objectdet/src/model/RecognizeVehicleDamageResult.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/objectdet/model/RecognizeVehicleDamageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
RecognizeVehicleDamageResult::RecognizeVehicleDamageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
RecognizeVehicleDamageResult::RecognizeVehicleDamageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDamageResult::~RecognizeVehicleDamageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RecognizeVehicleDamageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["Score"].isNull())
|
||||||
|
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
|
||||||
|
if(!dataNodeElementsElement["Type"].isNull())
|
||||||
|
elementObject.type = dataNodeElementsElement["Type"].asString();
|
||||||
|
auto allScores = value["Scores"]["Score"];
|
||||||
|
for (auto value : allScores)
|
||||||
|
elementObject.scores.push_back(value.asString());
|
||||||
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
|
for (auto value : allBoxes)
|
||||||
|
elementObject.boxes.push_back(value.asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDamageResult::Data RecognizeVehicleDamageResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/RecognizeVehicleDashboardRequest.cc
Normal file
40
objectdet/src/model/RecognizeVehicleDashboardRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/RecognizeVehicleDashboardRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::RecognizeVehicleDashboardRequest;
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardRequest::RecognizeVehicleDashboardRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "RecognizeVehicleDashboard")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardRequest::~RecognizeVehicleDashboardRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string RecognizeVehicleDashboardRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RecognizeVehicleDashboardRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
65
objectdet/src/model/RecognizeVehicleDashboardResult.cc
Normal file
65
objectdet/src/model/RecognizeVehicleDashboardResult.cc
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/RecognizeVehicleDashboardResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardResult::RecognizeVehicleDashboardResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardResult::RecognizeVehicleDashboardResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardResult::~RecognizeVehicleDashboardResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RecognizeVehicleDashboardResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["Score"].isNull())
|
||||||
|
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
|
||||||
|
if(!dataNodeElementsElement["ClassName"].isNull())
|
||||||
|
elementObject.className = dataNodeElementsElement["ClassName"].asString();
|
||||||
|
if(!dataNodeElementsElement["Label"].isNull())
|
||||||
|
elementObject.label = dataNodeElementsElement["Label"].asString();
|
||||||
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
|
for (auto value : allBoxes)
|
||||||
|
elementObject.boxes.push_back(value.asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehicleDashboardResult::Data RecognizeVehicleDashboardResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
objectdet/src/model/RecognizeVehiclePartsRequest.cc
Normal file
40
objectdet/src/model/RecognizeVehiclePartsRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* 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/objectdet/model/RecognizeVehiclePartsRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Objectdet::Model::RecognizeVehiclePartsRequest;
|
||||||
|
|
||||||
|
RecognizeVehiclePartsRequest::RecognizeVehiclePartsRequest() :
|
||||||
|
RpcServiceRequest("objectdet", "2019-12-30", "RecognizeVehicleParts")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehiclePartsRequest::~RecognizeVehiclePartsRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string RecognizeVehiclePartsRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RecognizeVehiclePartsRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
66
objectdet/src/model/RecognizeVehiclePartsResult.cc
Normal file
66
objectdet/src/model/RecognizeVehiclePartsResult.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/objectdet/model/RecognizeVehiclePartsResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Objectdet;
|
||||||
|
using namespace AlibabaCloud::Objectdet::Model;
|
||||||
|
|
||||||
|
RecognizeVehiclePartsResult::RecognizeVehiclePartsResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
RecognizeVehiclePartsResult::RecognizeVehiclePartsResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehiclePartsResult::~RecognizeVehiclePartsResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RecognizeVehiclePartsResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["Score"].isNull())
|
||||||
|
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
|
||||||
|
if(!dataNodeElementsElement["Type"].isNull())
|
||||||
|
elementObject.type = dataNodeElementsElement["Type"].asString();
|
||||||
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
|
for (auto value : allBoxes)
|
||||||
|
elementObject.boxes.push_back(value.asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
auto allOriginShapes = dataNode["OriginShapes"]["OriginShape"];
|
||||||
|
for (auto value : allOriginShapes)
|
||||||
|
data_.originShapes.push_back(value.asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizeVehiclePartsResult::Data RecognizeVehiclePartsResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user