OpenCV: Image Segmentation with Distance Transform and ...
docs.opencv.org › 3 › d2Jan 08, 2013 · Use the OpenCV function cv::filter2D in order to perform some laplacian filtering for image sharpening. Use the OpenCV function cv::distanceTransform in order to obtain the derived representation of a binary image, where the value of each pixel is replaced by its distance to the nearest background pixel. Use the OpenCV function cv::watershed in ...
Python Examples of cv2.distanceTransform
www.programcreek.com › python › exampleInputs: img = Binary image data distance_type = Type of distance. It can be CV_DIST_L1, CV_DIST_L2 , or CV_DIST_C which are 1, 2 and 3, respectively. mask_size = Size of the distance transform mask. It can be 3, 5, or CV_DIST_MASK_PRECISE (the latter option is only supported by the first function). In case of the CV_DIST_L1 or CV_DIST_C ...