I have an image, and would like to modify the image based on a given threshold. The function such as
binary = image > threshold
will create a binary image. What I want is the image pixels will remain the same if it is higher than the threshold. Are there any convenient function to do that?
image[image < threshold] = 0
will clip every pixel below the threshold to 0 and will leave the rest intact