python 3.x - image segmentation using watershed algorithm -


i have image me, grey scale image obtained colour image has near grey background. want apply watershed algorithm image count no objects in image.

what best way apply thresholding grey image such objects best separated background.

edit: thinking of changing background using grabcut algo , apply thresholding.someone me this.

gray.jpg

in case think simple global auto thresh holding (otsu's algorithm) working fine since region of interest quite together. may use cv2.threshold(img,127,255,cv2.thresh_binary) in opencv or can implement otsu's algorithm yourself. see link


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -