After changing the pixel values 255 to 1 on original image copy, seems that original image pixels are also changed and image is displayed as complete black.
#Load the image
img = cv.imread('img/test.png', 0)
ret2, binarizedImage = cv.threshold(img, 127, 255, cv.THRESH_BINARY+cv.THRESH_OTSU)
cv.imshow('Binarized', binarizedImage) #This one displayes the image as expected
imageCopy= binarizedImage
imageCopy[imageCopy==255]=1
cv.imshow('Binarized2', binarizedImage) # This one shows only black image
Can you please advise how can i manipulate imageCopy pixels without affecting original image pixel values?