darker
This commit is contained in:
parent
6bc878930d
commit
5fd063f6df
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ def preprocess_image(image_path):
|
|||
gray = enhance_text(image_path)
|
||||
resampled = bicubic(gray)
|
||||
# Convert grayscale to 3-channel RGB by duplicating the gray channel
|
||||
img = contrast_stretch(adjust_gamma(cv2.cvtColor(resampled, cv2.COLOR_GRAY2RGB),gamma=1.68,alpha=1.75,beta=-5)) # perfect tunning
|
||||
img = contrast_stretch(adjust_gamma(cv2.cvtColor(resampled, cv2.COLOR_GRAY2RGB),gamma=1.6,alpha=1.75,beta=-15)) # perfect tunning
|
||||
plt.imshow(img)
|
||||
plt.axis("off")
|
||||
plt.savefig("/tmp/output.png", bbox_inches="tight", pad_inches=0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue