An algorithm that has been plagued for several days

Source: Internet
Author: User
An algorithm that has plagued several days to find an idea



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? my algorithm is so bad.


Reply to discussion (solution)

Gaussian noise reduction algorithm

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.

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.

At the beginning, recursive continuous checks are used. The results show that the efficiency is too low...

Gaussian noise reduction algorithm

Baidu and Google have little information. can I provide a link to the instance code?

I think we can only use graphics-related algorithms and mathematical algorithms to avoid the mistaken removal of vertices on I in against.

I think we can only use graphics-related algorithms and mathematical algorithms to avoid the mistaken removal of vertices on I in against.

Are you recommended?

Wood, not familiar with graphics
Can go to graphic images/machine vision http://bbs.csdn.net/forums/ST_Image ask

All I think is to generate an against image in a font, which is different from the source image, but it does not seem to be a good solution.

Wood, not familiar with graphics
Can go to graphic images/machine vision http://bbs.csdn.net/forums/ST_Image ask

All I think is to generate an against image in a font, which is different from the source image, but it does not seem to be a good solution.


Oh, anyway, thx

Your requirement may be related to this http://bbs.csdn.net/topics/390438979

This is exactly the same as your idea. I use it as an array, scan each character row by row, and then count the percentage. In fact, the efficiency is low and scary.

Your requirement may be related to this http://bbs.csdn.net/topics/390438979

Worship!


Your requirement may be related to this http://bbs.csdn.net/topics/390438979

Worship!

The principle is probably the same. the learning mentioned in the software is nothing more than adding a verification code library. I think the main difficulty is to remove interference from the front and extract relatively pure word blocks.

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.