src = cv2.imread('rose.bmp', cv2.IMREAD_GRAYSCALE)
src_f = src.astype(np.float32)
blr = cv2.GaussianBlur(src_f, (0, 0), 2.0)
dst = np.clip(2. * src_f - blr, 0, 255).astype(np.uint8)
src = cv2.imread('rose.bmp')
src_ycrcb = cv2.cvtColor(src, cv2.COLOR_BGR2YCrCb)
src_f = src_ycrcb[:, :, 0].astype(np.float32)
blr = cv2.GaussianBlur(src_f, (0, 0), 2.0)
src_ycrcb[:, :, 0] = np.clip(2. * src_f - blr, 0, 255).astype(np.uint8)
dst = cv2.cvtColor(src_ycrcb, cv2.COLOR_YCrCb2BGR)