You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
import cv2 as cv
import numpy as np 3
image = cv.imread("butterfly.jpg", 1)
if image is None:
print('Could not open or find the image: ')
exit(0)
try:
bright = int(input('* Enter the brightness value [0-255]: '))
except ValueError:
print('Error, not a number')
new_image = np.zeros(image.shape, image.dtype)
for y in range (image.shape [0]):
for x in range(image.shape[1]):
for z in range(image.shape [2]):
newval image[y,x,z] + bright =
if newVal > 255:
newVal = 255
new_image[y,x,z] = newVal
cv.imshow(Original Image', image)
cv.imshow("Brightness Image', new_image)
cv.waitKey()
Beta Was this translation helpful? Give feedback.
All reactions