Python - Tophat

 
Vista:

Tophat

Publicado por Geomata (21 intervenciones) el 12/01/2021 10:06:03
1
2
3
4
5
6
7
8
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt
img1 = cv.imread('semillas.jpg',0)
ret,img1 = cv.threshold (img1,0,255,cv.THRESH_OTSU)
kernel = np.ones((6,6),np.uint8)
tophat = cv.morphologyEx(img1,cv.MORPH_TOPHAT,kernel)
plt.imshow(tophat,cmap='gray')
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder