Skip to content

Commit

Permalink
copy input to output in poseNet.Overlay()
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Apr 27, 2023
1 parent 8bcbbe0 commit 022e240
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions c/poseNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,15 @@ bool poseNet::Overlay( void* input, void* output, uint32_t width, uint32_t heigh
if( overlay == OVERLAY_NONE )
return true;

if( input != output )
{
if( CUDA_FAILED(cudaMemcpy(output, input, imageFormatSize(format, width, height), cudaMemcpyDeviceToDevice)) )
{
LogError(LOG_TRT "poseNet -- Overlay() failed to copy input image to output image\n");
return false;
}
}

const uint32_t numObjects = poses.size();

const float line_width = MAX(MAX(width,height) * mLinkScale, 1.5f);
Expand Down

0 comments on commit 022e240

Please sign in to comment.