简体   繁体   English

评估图像中的点和噪声

[英]Evaluating Dots and Noise in an Image

I have an image that consists of small black dots, and in each dot's vicinity there is some noise that appears as grayish smudge.我有一个由小黑点组成的图像,在每个点的附近都有一些看起来像灰色污迹的噪音。 I'm trying to use some sort of image processing in Python in order to find both the number of (correct) dots and the number of noise smudges, as well as calculate their paramaters (ie size).我正在尝试在 Python 中使用某种图像处理来查找(正确)点的数量和噪声污迹的数量,并计算它们的参数(即大小)。

I was thinking of using some sort of contour detection with a certain threshold, since the dots' borders are more distinct, but perhaps there's a better way that I'm not familiar with.我正在考虑使用某种具有一定阈值的轮廓检测,因为点的边界更加明显,但也许有一种我不熟悉的更好方法。

Thank you for your help!谢谢您的帮助!

示例图像

Use the Pillow module to analyze each pixel color and compare it against whether its RGB values added together (Assuming its only black and white) are:使用Pillow模块分析每个像素颜色,并将其与加在一起的 RGB 值(假设只有黑色和白色)进行比较:
Black: 0黑色:0
Grey: 1-764灰色:1-764
White: 765白色:765
Hope that helps希望有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM