Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from google.colab.patches import cv2_imshow
- import cv2
- from matplotlib import pyplot as plt
- img = cv2.imread('sir.jpg', 0)
- cv2_imshow(img)
- import numpy as np
- c = 255 / np.log(1 + np.max(img))
- log_image = c * (np.log(img + 1))
- log_image = np.array(log_image, dtype = np.uint8)
- cv2_imshow(log_image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement