You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.1 KiB

https://www.bilibili.com/video/BV19L4y1T7sE https://www.bilibili.com/video/BV19L4y1T7sE?p=6 https://gist.github.com/ohko/5fd4f294c89d4f11ede58255c5f625aa 【golang】身份证号码识别

最关键的定位和识别 没有深度,图片可能位置不一样有失真,变形。角度不可能和照片垂直,所以图像不可能这样简单被定位出来 大致的思路就是1.二值化 2.腐蚀(让黑的地方变粗、变粗、变粗) ,就会形成一些黑块 3.找到长宽比例是身份证长宽比例的黑块 4.把这个黑块切割出来。

var Signs = map[string]string{
"0": "0000000001000010000000000000000000000000000000000100001000011000",
"1": "0000000000000000010000000100000001000000010010100100001001100000",
"2": "0000000000000100000000011000100100000000000100000100000000100000",
"3": "0000000000000000000000000001000000010000010000000100101000000100",
"5": "0000000001100000000000000000000000000000000100100000110000000100",
"9": "0010000001000000000010000000000000000000000011000100100000000000",
"6": "0000000000001010000100000000000001000000000000000000101000000000",
}