Skip to content

Commit 6debad9

Browse files
author
Roman Donchenko
authored
Merge pull request openvinotoolkit#1042 from Wovchena/improve-pose_extractor
human_pose_estimation_3d: improve pose_extractor
2 parents 46f3b20 + d8e4e67 commit 6debad9

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

demos/python_demos/human_pose_estimation_3d_demo/pose_extractor/CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
# SPDX-License-Identifier: Apache-2.0
33
#
44

5-
find_package(OpenCV 4 REQUIRED)
5+
find_package(OpenCV 4 REQUIRED COMPONENTS core imgproc)
66

77
set(target_name pose_extractor)
88
add_library(${target_name} MODULE wrapper.cpp
99
src/extract_poses.hpp src/extract_poses.cpp
1010
src/human_pose.hpp src/human_pose.cpp
1111
src/peak.hpp src/peak.cpp)
12-
target_include_directories(${target_name} PRIVATE src/ ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS})
13-
target_link_libraries(${target_name} ${PYTHON_LIBRARIES} ${OpenCV_LIBS})
14-
set_target_properties(${target_name} PROPERTIES PREFIX "" OUTPUT_NAME "${target_name}")
12+
target_include_directories(${target_name} PRIVATE src/ ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR})
13+
target_link_libraries(${target_name} ${PYTHON_LIBRARIES} opencv_core opencv_imgproc)
14+
set_target_properties(${target_name} PROPERTIES PREFIX "")
1515
if(WIN32)
1616
set_target_properties(${target_name} PROPERTIES SUFFIX ".pyd")
1717
endif()
18-

demos/python_demos/human_pose_estimation_3d_demo/pose_extractor/wrapper.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,9 @@ PyModuleDef pose_extractor_module = {
7979
};
8080

8181
PyMODINIT_FUNC PyInit_pose_extractor(void) {
82-
PyObject* module = PyModule_Create(&pose_extractor_module);
83-
if (module == nullptr) {
84-
return nullptr;
85-
}
8682
import_array();
8783
if (PyErr_Occurred()) {
8884
return nullptr;
8985
}
90-
91-
return module;
86+
return PyModule_Create(&pose_extractor_module);
9287
}

0 commit comments

Comments
 (0)