I am trying to extract region of interest in the following image with otsu thresholding.
img = cv2.imread("IM_00024.TIF", 0)
ret, imgf = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
cv2.imwrite('imgobsu.png', imgf)
Based on my understanding of THRESH_BINARY
option , my region of interest will be the white section of the obsu image.
How can i apply the segmented obsu image to the original image so that i can segment it in such as way that i obtain both the foreground and the background