I'm thinking to skip saving pre_version image and pass to the next step
So, I'm thinking to get a function to do this but not sure how to do this.
I tried to convert it as unit8 type but the colour is not correct.
I think it's realted to the types and normalization issues.
Could you advise how to get the function to do this? Thanks
img=function(pre_version) img = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1] cv2.imwrite("output.png", img)
I'm thinking to skip saving pre_version image and pass to the next step
So, I'm thinking to get a function to do this but not sure how to do this.
I tried to convert it as unit8 type but the colour is not correct.
I think it's realted to the types and normalization issues.
Could you advise how to get the function to do this? Thanks
img=function(pre_version) img = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1] cv2.imwrite("output.png", img)