简体   繁体   中英

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. 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. Making a machine learning model and find out the similar boxes in the image and count them.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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