python去除噪点_如何使用opencv-python消除图像噪点?

本文介绍了如何使用opencv-python处理皮肤图像,尤其是去除毛发等噪点,以便更准确地识别皮肤斑点。通过图像二值化、形态学操作等步骤,有效地减少了毛发对识别区域的影响,提高了ROI(感兴趣区域)的纯净度。
摘要由CSDN通过智能技术生成

I am working with skin images, in recognition of skin blemishes, and due to the presence of noises, mainly by the presence of hairs, this work becomes more complicated.

I have an image example in which I work in an attempt to highlight only the skin spot, but due to the large number of hairs, the algorithm is not effective. With this, I would like you to help me develop an algorithm to remove or reduce the amount of hair so that I can only highlight my area of ​​interest (ROI), which are the spots.

Algorithm used to highlight skin blemishes:

import numpy as np

import cv2

#Read the image and perform threshold

img = cv2.imread('IMD006.bmp')

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

blur = cv2.medianBlur(gray,5)

_,thresh = cv2.threshold(blur,0,255,cv2.THRESH_BINARY_INV+cv2.THRESH_OTSU)

#Sea

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值