# 验证码识别的一些方法（未完成）

## 爬虫程序

### 二值化

#### 简单阈值法

• cv2.THRESH_BINARY
• cv2.THRESH_BINARY_INV
• cv2.THRESH_TRUNC
• cv2.THRESH_TOZERO
• cv2.THRESH_TOZERO_INV

Two outputs are obtained. First one is a retval which will be explained later. Second output is our thresholded image.

#### 自适应阈值法

It has three ‘special’ input params and only one output argument.

• Adaptive Method - It decides how thresholding value is calculated.

cv2.ADAPTIVE_THRESH_MEAN_C : threshold value is the mean of neighbourhood area.cv2.ADAPTIVE_THRESH_GAUSSIAN_C : threshold value is the weighted sum of neighbourhood values where weights are a gaussian window.

• Block Size - It decides the size of neighbourhood area.

• C - It is just a constant which is subtracted from the mean or weighted mean calculated.

### 评论

###### Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×