zoukankan      html  css  js  c++  java
  • paip.验证码识别----判断汉字还是英文

    paip.验证码识别----判断汉字还是英文


    ----作者Attilax , 1466519819@qq.com---  


    在验证码识别中,判断汉字还是英文是非常重要的一个手段,可以大大提高综合识别率


    结合原理就是:去噪后。力度比正常使用大点。汉字一般比英文笔划多,不容易细线去掉。


    然后到得ROI,


    主要是综合断点其PIXNUM和WIDTH就可以识别其是汉字了。


    源码如下


     






    public class Iskipper
        {


           public int pixnum;
           public int imgwidth;
           public string msg;
           public virtual bool isSkip(System.Drawing.Image image)
            {
                imgPedwe c = new imgPedwe();
                int num = c.pixProcess4rrv3((Bitmap)image);
                pixnum = num;
                msg = "<iskiper>picnum:" + pixnum.ToString();
                if (num > 900)
                {
                    imgwidth = image.Width;
                    msg = msg + ";img" + imgwidth.ToString();
                    if (image.Width > 82)
                    {
                        msg += ";pic is maybe hanzi";
                        return true;
                    }else
                
                    return false;


                }


             




                 imgwidth = image.Width;
                 msg = msg + ";img" + imgwidth.ToString();
                //if (image.Width > 82)
                //{
                //    msg += ";pic is maybe hanzi";
                //    return true;
                //}




                if (image.Width < 40)
                {
                    msg += ";pic is maybe jelye";
                    return true;
                }


                return false;












            }
        }
  • 相关阅读:
    利用python数据分析与挖掘相关资料总结
    pandas库学习笔记(一)Series入门学习
    mysql error:You can't specify target table for update in FROM clause
    查询及删除重复记录的SQL语句
    PHP tripos()函数使用需要注意的问题
    如何用git上传代码到github详细步骤
    这是我的第一篇博客
    html link js
    BOM与DOM
    创建简单的表单
  • 原文地址:https://www.cnblogs.com/attilax/p/15199725.html
Copyright © 2011-2022 走看看