全国企业信息中心几个城市处理结果

		/*********** 江苏省的图片处理****************/
		public static BufferedImage handleForJiangsu(BufferedImage src){
			BufferedImage src1 = null;
			src = ImageUtil.ThresholdFilter(src, 0xbc);
			src1 = ImageUtil.MedianFilter(src, 4, 3);
			return src1;
		}
		
		/****************北京市的图片处理*************************/
		public static BufferedImage handleForBeijing(BufferedImage src){
			src = ImageUtil.ThresholdFilter(src, 0xaa);
			int width = src.getWidth();
			int height = src.getHeight();
			src = src.getSubimage(8, 2, width-8, height-4);
			width -= 8;
			height -=4;
				/*for(int i = 0; i <height; i++)
									{
										image.setRGB(0, i, intBack);
										image.setRGB(width-1, i, intBack);
									}*/
							for(int i = 0; i< width; i++)
							{		
								src.setRGB(i, 0, intBack);
								src.setRGB(i, height-1, intBack);
							}
			src = ImageUtil.MedianFilter(src, 10, 3);
			return src;
		}
		
		/*********** 四川省/陕西省的图片处理****************/
		public static BufferedImage handleForSichuan(BufferedImage src){
			src = ImageUtil.ThresholdFilter(src, 0x80);
			//src = ImageUtil.MedianFilter(src, 4, 3);
			return src;
		}
		
		/*********** 辽宁省的图片处理****************/
		public static BufferedImage handleForLiaoning(BufferedImage src){
			src = ImageUtil.ThresholdConventFilter(src, 0x80);
			//src = ImageUtil.MedianFilter(src, 1, 3);
			return src;
		}
		
		/***********江西省的图片处理****************/
		public static BufferedImage handleForJiangxi(BufferedImage src){
			src = ImageUtil.ThresholdFilter(src, 0x80);
			//src = ImageUtil.MedianFilter(src, 4, 3);
			return src;
		}
		
		/***********宁夏省的图片处理****************/
		public static BufferedImage handleForNingxia(BufferedImage src){
			src = ImageUtil. ThresholdFilter(src, 0x80);
			int width = src.getWidth();
			int height = src.getHeight();
			src = src.getSubimage(4, 2, width-8, height-4);
			width -= 8;
			height -=4;
				for(int i = 0; i <height; i++){
							src.setRGB(0, i, intBack);
							src.setRGB(width-1, i, intBack);
			  }
			for(int i = 0; i< width; i++){		
							src.setRGB(i, 0, intBack);
							src.setRGB(i, height-1, intBack);
				}
			src = ImageUtil.MedianFilter(src, 1, 3);
			return src;
		}
		
		/***********山东省/吉林省的图片处理****************/
		public static BufferedImage handleForShandong(BufferedImage src){
			src = ImageUtil. ThresholdFilter(src, 0x80);
			//src = ImageUtil.MedianFilter(src, 4, 3);
			return src;
		}
		
		/***********天津市的图片处理****************/
		public static BufferedImage handleForTianjing(BufferedImage src){
			src = ImageUtil. ThresholdFilter(src, 0x64);
			//src = ImageUtil.MedianFilter(src, 4, 3);
			int width = src.getWidth();
			int height = src.getHeight();
			src = src.getSubimage(4, 2, width-8, height-4);
			width -= 8;
			height -=4;
				for(int i = 0; i <height; i++){
							src.setRGB(0, i, intBack);
							src.setRGB(width-1, i, intBack);
			  }
			for(int i = 0; i< width; i++){		
							src.setRGB(i, 0, intBack);
							src.setRGB(i, height-1, intBack);
				}
			return src;
		}
		
		/********** 重庆市的图片处理****************/
		public static BufferedImage handleForChongqing(BufferedImage src){
			src = ImageUtil. ThresholdFilter(src, 0x50);
			src = ImageUtil.MedianFilter(src, 2, 3);
			return src;
		}
		
		/********** 湖南省的图片处理****************/
		public static BufferedImage handleForHunan(BufferedImage src){
			src = ImageUtil. ThresholdFilter(src, 0xaa);
			src = ImageUtil.MedianFilter(src, 1, 3);
			return src;
		}
}
通过调用相同的方法,来对全国企业信息中心中的不同种类省份的验证码进行识别。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值