find the middle of the document in the image opencv 1

find the middle of the document in the image opencv

# Thresholding:
_, binaryImage = cv2.threshold(imageRoi, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)

Here is what the above code is Doing:
1. We are using the cv2.threshold() function to apply Otsu’s thresholding.
2. The first argument is the source image, which should be a grayscale image.
3. The second argument is the threshold value which is used to classify the pixel values.
4. The third argument is the maximum value which is assigned to pixel values exceeding the threshold.
5. The fourth argument is the type of thresholding.

Similar Posts