I am attempting to do a normalization on an image set which involves, among other things, adding a constant to every value in the image.
Here is an example, using the image at the following url: https://helpx.adobe.com/content/dam/help/en/stock/how-to/visual-reverse-image-search/jcr_content/main-pars/image/visual-reverse-image-search-v2_intro.jpg
import numpy as np
import cv2
img = cv2.imread("imagepath.jpeg")
arraymin = np.min(img)
print(arraymin)
The value of arraymin is 0. I attempt to add to the entire array by, for example 10. I try this 3 different ways
img = img + 10
img += 10
img2 = np.add(img, 10)
This successfully adds 10 (total 30) to most values in the array, but when i call np.min on the array again, the minimum value is still 0
print(np.min(img))
print(np.min(img2))
I can verify that 0 is in the array by calling 0 in img which produces a True value.
Why do the 0 values not get changed by the addition of the value of 10 to the entire array?