You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
do u know how can i keep only the page number area ?
the page number usually is top left , top right , bottom left , bottom right or in the middle down
do u know how can i white everything outside the black boxes inside the image and keep anything inside
The text was updated successfully, but these errors were encountered:
i used this
import sys
import cv2
from matplotlib import pyplot as plt
def GetBoundingRectangles(IMG_PATH, output_path):
img = cv2.imread(IMG_PATH)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray2 = gray.copy()
ret, thresh = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
contours, hier = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
image_path = 'a.jpg'
output_path = 'processed_image.jpg'
GetBoundingRectangles(image_path, output_path)
on that
the result is like that
do u know how can i keep only the page number area ?
the page number usually is top left , top right , bottom left , bottom right or in the middle down
do u know how can i white everything outside the black boxes inside the image and keep anything inside
The text was updated successfully, but these errors were encountered: