Thresholding images

Hey! Thresholding doesn’t work in the following code. It just returns the initial image:

import cv2 as cv
img = cv.imread(#my image)
img = cv.cvtColor(img, cv.COLOR_BGR2RGB)
ret, image = cv.threshold(img, 127, 255, cv.THRESH_BINARY)
cv.imshow(image)

please provide code that can run. that requires proper arguments to imshow and a call to waitKey

the code, with obvious fixes, should exactly result in a binary image being shown

I think you were a little too pseudo with your pseudo code, and you might have mixed up variable names