Answers for "perform zero crossing using openCV"

0

perform zero crossing using openCV

LoG = cv2.Laplacian(src, cv2.CV_16S)
minLoG = cv2.morphologyEx(LoG, cv2.MORPH_ERODE, np.ones((3,3)))
maxLoG = cv2.morphologyEx(LoG, cv2.MORPH_DILATE, np.ones((3,3)))
zeroCross = np.logical_or(np.logical_and(minLoG < 0,  LoG > 0), np.logical_and(maxLoG > 0, LoG < 0))
Posted by: Guest on April-22-2021

Browse Popular Code Answers by Language