airob0t/idcardgenerator

能否自动寻找背景色

Closed this issue · 2 comments

diff = [5, 30, 30]
gb = hsv[0, 0]
lower_blue = np.array(gb - diff)
upper_blue = np.array(gb + diff)
mask = cv2.inRange(hsv, lower_blue, upper_blue)

如何?

可以,对于单色背景容易处理,我想做得是复杂背景,等有时间时尝试一下

已添加