# Differences between the same functions in Python and C++

**URL:** <https://forum.opencv.org/t/differences-between-the-same-functions-in-python-and-c/9103>\
**Category:** C++\
**Created:** [June 9, 2022, 11:36am UTC](https://forum.opencv.org/t/differences-between-the-same-functions-in-python-and-c/9103 "2022-06-09T11:36:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PPawel](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PPawel](https://forum.opencv.org/u/PPawel)\
**Post date:** [June 9, 2022, 11:36am UTC](https://forum.opencv.org/t/differences-between-the-same-functions-in-python-and-c/9103/1 "2022-06-09T11:36:32Z")

</div>

Hello. I need to port Python algorithm to C++ and some of the operations (I’ve noticed GaussianBlur and Laplacian) give different results. Of course the inputs are identical images (otherwise why would I ask). I’ve managed to correct it in GaussianBlur by converting the input image from CV\_8U to CV\_64F, but Laplacian with 5x5 kernel and CV\_64F required result is still stubborn.  
Clearly the Python functions do something inside with their parameters that I don’t have in plain C++ passing. What is it and how can I repeat it in C++?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [June 9, 2022, 12:56pm UTC](https://forum.opencv.org/t/differences-between-the-same-functions-in-python-and-c/9103/2 "2022-06-09T12:56:53Z")

</div>

Closed on June 9, 2022, 12:56pm UTC

please do not duplicate topics here, thank you
