Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh19y9 authored Jul 13, 2020
1 parent 56a41f9 commit ceb3943
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Bright & Contrast Addition, Mul.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import numpy as np
import cv2

img = cv2.imread("input.jpg", cv2.IMREAD_UNCHANGED)

brightness = 100 #-127 to 127
contrast = 100 #-127 to 127

print("gamma =",(contrast/127+1) - contrast + brightness)

img = np.int16(img)
img = img * (contrast/127+1) - contrast + brightness
img = np.clip(img, 0, 255)
img = np.uint8(img)


cv2.imshow("water", img)
cv2.waitKey(0)
Binary file added input.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ceb3943

Please sign in to comment.