|
|
@ -40,7 +40,7 @@ public class PlateRecoTest {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testPlateRecognise() {
|
|
|
|
public void testPlateRecognise() {
|
|
|
|
String imgPath = "res/image/test_image/E.D3098.jpg";
|
|
|
|
String imgPath = "res/image/test_image/plate_recognize.jpg";
|
|
|
|
|
|
|
|
|
|
|
|
Mat src = opencv_imgcodecs.imread(imgPath);
|
|
|
|
Mat src = opencv_imgcodecs.imread(imgPath);
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +79,7 @@ public class PlateRecoTest {
|
|
|
|
System.out.println("数据库连接成功!");
|
|
|
|
System.out.println("数据库连接成功!");
|
|
|
|
|
|
|
|
|
|
|
|
// String SQL = "INSERT INTO Parking_in(number,color) VALUES('"+palte+"','"+col+"' )";
|
|
|
|
// String SQL = "INSERT INTO Parking_in(number,color) VALUES('"+palte+"','"+col+"' )";
|
|
|
|
// String SQL = "INSERT INTO Parking_out(number,color,time_in) VALUES('"+palte+"','"+col+"','2020-08-17 12:50:00')";
|
|
|
|
// String SQL = "INSERT INTO Parking_out(number,color,time_in) VALUES('"+palte+"','"+col+"','2020-08-17 18:50:00')";
|
|
|
|
stmt = con.createStatement();
|
|
|
|
stmt = con.createStatement();
|
|
|
|
// stmt.executeUpdate(SQL);
|
|
|
|
// stmt.executeUpdate(SQL);
|
|
|
|
|
|
|
|
|
|
|
@ -90,6 +90,7 @@ public class PlateRecoTest {
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
while(rs.next())
|
|
|
|
while(rs.next())
|
|
|
|
time1=rs.getString("time_in");
|
|
|
|
time1=rs.getString("time_in");
|
|
|
|
|
|
|
|
System.out.println("您的进入时间:");
|
|
|
|
System.out.println(time1);
|
|
|
|
System.out.println(time1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -97,13 +98,14 @@ public class PlateRecoTest {
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
while(rs.next())
|
|
|
|
while(rs.next())
|
|
|
|
time2=rs.getString("time_in");
|
|
|
|
time2=rs.getString("time_in");
|
|
|
|
|
|
|
|
System.out.println("您的离开时间:");
|
|
|
|
System.out.println(time2);
|
|
|
|
System.out.println(time2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Count count=new Count();
|
|
|
|
Count count=new Count();
|
|
|
|
double cost=count.charging(time1, time2);
|
|
|
|
double cost=count.charging(time1, time2);
|
|
|
|
System.out.println(palte+"车主您的停车费用为:");
|
|
|
|
System.out.println(palte+"车主您的停车费用为:");
|
|
|
|
System.out.println(cost+"元");
|
|
|
|
System.out.println(String.format("%.1f", cost)+"元");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|