Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

skimage local threshold

import cv2
from skimage.filters import threshold_local

image = cv2.imread("path/to/image")

# block size must be odd
thresh = threshold_local(image, block_size = 3, offset = 0.02)
binary_image = image > thresh
 
PREVIOUS NEXT
Tagged: #skimage #local #threshold
ADD COMMENT
Topic
Name
1+4 =