package demo;
創(chuàng)新互聯(lián)建站2013年開創(chuàng)至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元渝北做網(wǎng)站,已為上家服務(wù),為渝北各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18980820575
import java.util.Scanner;
public class CarCard {
//浙A 杭州,浙B 寧波,浙C 溫州,浙D 紹興,浙E 湖州,浙F 嘉興,浙G 金華,浙H 衢州,浙J 臺(tái)州,浙K 麗水,浙L 舟山
//網(wǎng)上搜的,應(yīng)該是對(duì)的,這個(gè)東西應(yīng)該管你要
public static void main(String[] args) {
System.out.println("請(qǐng)輸入車牌號(hào)");
Scanner sc = new Scanner(System.in);
String carno = sc.next();
String t = carno.substring(0,2);
checkAddressByCarCard(t);
}
private static void checkAddressByCarCard(String no){
String a[]={"浙A","浙B","浙C","浙D","浙E","浙F","浙G","浙H","浙J","浙K","浙L"};
String b[]={"杭州","寧波","溫州","紹興","湖州","嘉興","金華","衢州","臺(tái)州","麗水","舟山"};
int index = 0;
for(int i = 0;i11;i++){
if(no.equalsIgnoreCase(a[i])){
index=i;
System.out.println("車輛所在地為:"+b[i]);
}
}
}
}
//不嚴(yán)謹(jǐn),但是基本功能實(shí)現(xiàn)了
String cph="WJ12345";
Pattern pattern = Pattern.compile("^[\u4e00-\u9fa5|WJ]{1}[A-Z0-9]{6}$");
Matcher matcher = pattern.matcher(cph);
if (!matcher.matches()) {
System.out.println("車牌號(hào)格式不對(duì)!");
}else{
System.out.println("車牌號(hào)格式正確!");
}
能的,比如云脈的車牌識(shí)別系統(tǒng)的API開發(fā)就可以支持Java、C++、C、object pascal及 objective-C等多種語言。
public?static?void?main(String[]?args){
Scanner?sc?=?new?Scanner(System.in);
boolean?flag?=?false;
System.out.println("請(qǐng)輸入車牌號(hào)!");
do{
String?carNumber?=?sc.next();
flag?=?carNumber.matches("(?i)^(CA|AZ|CO)[0-9]{4}$");
if(!flag){
System.out.println("車牌號(hào)不正確,請(qǐng)重新輸入!");
}else{
System.out.println("車牌號(hào)正確!車牌號(hào)為:"+carNumber.toUpperCase());
}
}while(!flag);
}
public?static?void?main(String[]?args)?{
String?str=?"";
int?n=0;
int?c=0;
for?(int?i?=?0;?i??7;?i++)?{
if(flag()){
c++;
str+=c4??charA():charB();
continue;
}
n++;
str+=n5??charB():charA();
}
System.out.println(str);
}
private?static?boolean?flag(){
int?i=(int)?(Math.random()*1000);
return?i%2==0;
}
private?static?String?charA(){
??return?""+(char)(Math.random()*26+'A');
}
private?static?String?charB(){
??return?""+(int)(Math.random()*10);
}
文章標(biāo)題:機(jī)動(dòng)車牌識(shí)別java代碼 機(jī)動(dòng)車牌識(shí)別java代碼
網(wǎng)址分享:http://aaarwkj.com/article6/docpsig.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、網(wǎng)站改版、軟件開發(fā)、營(yíng)銷型網(wǎng)站建設(shè)、域名注冊(cè)、服務(wù)器托管
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)