# how to combine python and deepstream-test1 python app?

**URL:** <https://forums.developer.nvidia.com/t/how-to-combine-python-and-deepstream-test1-python-app/109171>\
**Category:** DeepStream SDK\
**Created:** [December 16, 2019, 9:49am UTC](https://forums.developer.nvidia.com/t/how-to-combine-python-and-deepstream-test1-python-app/109171 "2019-12-16T09:49:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.billson16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@m.billson16](https://forums.developer.nvidia.com/u/m.billson16)\
**Post date:** [December 16, 2019, 9:49am UTC](https://forums.developer.nvidia.com/t/how-to-combine-python-and-deepstream-test1-python-app/109171/1 "2019-12-16T09:49:55Z")

</div>

Hello NVIDIA developers, do you have an idea and tutorial on how to combine between OpenCV and deepstream-test1 python app?  
my OpenCV code is running a hough circle program, I want to extract the object’s centroid that is detected in the bounding box by using U. I’m a little confused about how to combine these two codes.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [December 17, 2019, 3:15am UTC](https://forums.developer.nvidia.com/t/how-to-combine-python-and-deepstream-test1-python-app/109171/2 "2019-12-17T03:15:35Z")

</div>

Hi,

Sorry that we don’t have a python version OpenCV+Deepstream sample right now.  
You can check this comment for the C++ version, and apply the similar change in python interface.  
[https://devtalk.nvidia.com/default/topic/1047620/deepstream-sdk/how-to-create-opencv-gpumat-from-nvstream-/post/5397368/#5397368](https://devtalk.nvidia.com/default/topic/1047620/deepstream-sdk/how-to-create-opencv-gpumat-from-nvstream-/post/5397368/#5397368)

Please noticed that if you are using CPU buffer with OpenCV (cvMat), you might need to apply memory copy between buffers.  
It’s more recommended to use GPU based OpenCV API (GpuMat).  
However, you will need to check if hough circle detector have GPU implementation or not first.

Thanks.

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [April 27, 2020, 1:07am UTC](https://forums.developer.nvidia.com/t/how-to-combine-python-and-deepstream-test1-python-app/109171/3 "2020-04-27T01:07:19Z")

</div>


