# Question about sample script BasicLinearTransforms.py

**URL:** <https://forum.opencv.org/t/question-about-sample-script-basiclineartransforms-py/5246>\
**Category:** Python\
**Tags:** imgproc\
**Created:** [September 16, 2021, 9:54am UTC](https://forum.opencv.org/t/question-about-sample-script-basiclineartransforms-py/5246 "2021-09-16T09:54:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayton\_Tsung](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jayton_tsung/32/3212_2.png) [@Jayton\_Tsung](https://forum.opencv.org/u/Jayton_Tsung)\
**Post date:** [September 16, 2021, 9:54am UTC](https://forum.opencv.org/t/question-about-sample-script-basiclineartransforms-py/5246/1 "2021-09-16T09:54:45Z")

</div>

Python: 3.8.10  
OpenCV: 4.2.0

* * *

The sample python script I used: [BasicLinearTransforms.py](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)  
I have tried both the OpenCV-built-in convertScaleAbs method and numpy.clip method provided in the script, however, they produce two different images.  
I also tried “remove” the limit of numpy.clip by assigning them to extrem numbers, but got a third different iamge.

I have read about the source code, but stucked at [convert\_scale.dispatch.cpp#L99](https://github.com/opencv/opencv/blob/41a2eb5245583403f4a26ca24ec7ba736d2cca5e/modules/core/src/convert_scale.dispatch.cpp#L99), I can’t find which function it really implement.
