mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-12 20:30:20 +00:00
Improve Python API including enabled AsynchronousOut mode (#1593)
* Move producer configuration into configure(...) method of Python API * Enable output from OpenPose in Python API by making VectorDatum an opaque STL type * Return empty arrays as None in Python API * Add type_caster for Array<long long> for datum.poseIds in Python API * Add ThreadManagerMode enum to Python interface * Update Python tutorial in line with updated interface and add demo of AsynchronousOut mode * Remove static_cast of ThreadManagerMode which is no longer needed * Only set up producer in Python API when SynchronousIn is set * Fix up memory handling in emplaceAndPop * Pass AsynchronousOut in async out example
This commit is contained in:
@@ -86,7 +86,7 @@ try:
|
||||
datum.handRectangles = handRectangles
|
||||
|
||||
# Process and display image
|
||||
opWrapper.emplaceAndPop([datum])
|
||||
opWrapper.emplaceAndPop(op.VectorDatum([datum]))
|
||||
print("Left hand keypoints: \n" + str(datum.handKeypoints[0]))
|
||||
print("Right hand keypoints: \n" + str(datum.handKeypoints[1]))
|
||||
cv2.imshow("OpenPose 1.6.0 - Tutorial Python API", datum.cvOutputData)
|
||||
|
||||
Reference in New Issue
Block a user