An algorithm that has been plagued for several days. how can this problem be solved?

Source: Internet
Author: User
An algorithm that has been plagued for several days. at last, shenyulv edited an algorithm & nbsp; idea from 2013-05-010. for example, it is probably an & nbsp; "against, it is composed of "1", and there are scattered "1" around it. I want to worry about an algorithm that has been plagued for several days.
At the end of this post, shenyulv edited an algorithm idea at 01:13:36 on.



For example, it is probably an "against", which is composed of "1", and there are scattered "1" around it ", I want to remove these scattered "1. My idea is to calculate the number of "1" connected together. when the number of "1" does not exceed a constant, set them to 0 to get the stored block.

Simply put, I want to obtain the number of "1" in a pattern composed of "1", which is composed of "1" in. . How to write this algorithm? the algorithm is so bad that the Color of the algorithm is shared:
------ Solution --------------------
Gaussian noise reduction algorithm
------ Solution --------------------
Take the surrounding area of each point to see if it is three consecutive steps (there can be one shift ). No, it must be deleted.
------ Solution --------------------
I think we can only use graphics-related algorithms and mathematical algorithms to avoid the mistaken removal of vertices on I in against.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.