.
资料
# -*- coding: utf-8 -*-
__author__ = 'd1bysj'
import pymysql
db = pymysql.connect(host = '', #
远程主机的
ip
地址,
user = '', # MySQL
用户名
db = '', # database
名
passwd = '', #
数据库密码
port = 3306, #
数据库监听端口,默认
3306
charset = "utf8") #
指定
utf8
编码的连接
cur= db.cursor()
sql="select * from sex"
try:
cur.execute(sql)
re=cur.fetchall()
for it in re:
name = it[0]
num = it[1]
print(name,num)
except Exception as e:
raise e
finally:
db.close()
import cv2
import numpy as np
from numpy.linalg import norm
import sys
import os
import json
SZ = 20 #
训练图片长宽
MAX_WIDTH = 1000 #
原始图片最大宽度
Min_Area = 2000 #
车牌区域允许最大面积
PROVINCE_START = 1000
#
读取图片文件
def imreadex(filename):
return
cv2.imdecode(np.fromfile(filename,
dtype=np.uint8),
cv2.IMREAD_COLOR)
def point_limit(point):