简体   繁体   English

Python中的图像处理-这个问题有通用的解决方案吗?

[英]Image Processing in Python- Is there a general solution to this problem?

I have been going over this for days now and have hit a road block as I am too scared to try out my hypothesis.我已经研究了好几天了,并且遇到了障碍,因为我太害怕尝试我的假设了。

I would like to find out the number of grayed rectangular boxes in this image.我想找出这张图片中灰色矩形框的数量。 However, I am not sure how I can do that.但是,我不确定我该怎么做。 I was thinking of two ways: i.我在想两种方法:i。 Getting area of the connected components, calculating their median and getting the number of components between a certain percentile of the area (may sound pretty strange).获取连接组件的面积,计算它们的中位数并获取该区域某个百分位数之间的组件数量(听起来可能很奇怪)。 ii. ii. Making a machine learning model and find out the similar boxes in the image and count them.制作机器学习 model 并找出图像中相似的框并计数。

However, I would like them to be more generalized so that I will need to be able to make the solution fit other images that I would need to be processed.但是,我希望它们更通用,以便我需要能够使解决方案适合我需要处理的其他图像。

Here is my source Image:这是我的源图片: 在此处输入图像描述

Any sort of help/suggestions and even solutions would be greatly appreciated.任何形式的帮助/建议甚至解决方案都将不胜感激。

Thanks in advance!提前致谢!

Maybe you are losing a lot of image information with filtering...Do you have an unfiltered source image too?也许您通过过滤丢失了很多图像信息......您是否也有未过滤的源图像? I suppose ML approach would work pretty nice then.我想那时机器学习方法会很好用。

I noticed you could achieve better resolution if your camera is 90 rotated (If you could affect this)我注意到如果您的相机旋转 90 度,您可以获得更好的分辨率(如果您可以影响这一点)

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

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