使用 OpenCV 使图像线条变暗

Darking image lines using OpenCV

如何使用OpenCV将下图中的网格线加黑,使其更加突出?我尝试了阈值处理,但它会冲掉网格线。

您需要使用Adaptive Gaussian Thresholding

import cv2 

image1 = cv2.imread('Naw6P.png') 
img = cv2.cvtColor(image1, cv2.COLOR_BGR2GRAY)

thresh = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
                                          cv2.THRESH_BINARY, 51, 5)
cv2.imshow('Adaptive Gaussian', thresh)
cv2.waitKey(0)