# How to automatically pick parameters for OpenCV adaptive binarization?

**URL:** <https://forum.opencv.org/t/how-to-automatically-pick-parameters-for-opencv-adaptive-binarization/6532>\
**Category:** Python\
**Tags:** imgproc\
**Created:** [December 2, 2021, 1:27pm UTC](https://forum.opencv.org/t/how-to-automatically-pick-parameters-for-opencv-adaptive-binarization/6532 "2021-12-02T13:27:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![111](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/111/32/332_2.png) [@111](https://forum.opencv.org/u/111)\
**Post date:** [December 2, 2021, 1:27pm UTC](https://forum.opencv.org/t/how-to-automatically-pick-parameters-for-opencv-adaptive-binarization/6532/1 "2021-12-02T13:27:53Z")

</div>

0

I’m talking about

```auto
adaptiveThreshold (InputArray src,
OutputArray dst,
double maxValue,
int adaptiveMethod,
int thresholdType,
int blockSize,
double C) 

```

Is it possible to somehow figure out the optimal blockSize and C parameters? For example, relying on image resolution or something like that.
