OpenCV开运算(Opening)闭运算(Closing)形态梯度(Gradient)TopHat、BlackHat
《OpenCV系列教程》项目位置OpenCVSample代码位置:15-OpeningClosingGradientTophatBlackhat.pyimportcv2kernel=cv2.getStructuringElement(cv2.MORPH_RECT,(3,3))img=cv2.imread('./res/jeep.jpeg')cv2.imshow('org',img)opening=