Saree-Design-App / utils /sharpen.py
MBG0903's picture
Update utils/sharpen.py
59a3ee6 verified
Raw
History Blame Contribute Delete
367 Bytes
import cv2
def sharpen_image(img):
# No sharpening required.
# Return image exactly as generated.
return img
def upscale_image(img, scale=2):
height = int(img.shape[0] * scale)
width = int(img.shape[1] * scale)
upscaled = cv2.resize(
img,
(width, height),
interpolation=cv2.INTER_NEAREST
)
return upscaled