|
|
|
@ -40,7 +40,7 @@ public class PlateRecoTest {
|
|
|
|
|
*/
|
|
|
|
|
@Test
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
@ -79,17 +79,18 @@ public class PlateRecoTest {
|
|
|
|
|
System.out.println("数据库连接成功!");
|
|
|
|
|
|
|
|
|
|
// 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.executeUpdate(SQL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String time1=null,time2=null;
|
|
|
|
|
String SQL = "SELECT * FROM Parking_in";
|
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
|
while(rs.next())
|
|
|
|
|
time1=rs.getString("time_in");
|
|
|
|
|
System.out.println("您的进入时间:");
|
|
|
|
|
System.out.println(time1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -97,14 +98,15 @@ public class PlateRecoTest {
|
|
|
|
|
rs = stmt.executeQuery(SQL);
|
|
|
|
|
while(rs.next())
|
|
|
|
|
time2=rs.getString("time_in");
|
|
|
|
|
System.out.println("您的离开时间:");
|
|
|
|
|
System.out.println(time2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Count count=new Count();
|
|
|
|
|
double cost=count.charging(time1, time2);
|
|
|
|
|
System.out.println(palte+"车主您的停车费用为:");
|
|
|
|
|
System.out.println(cost+"元");
|
|
|
|
|
|
|
|
|
|
System.out.println(String.format("%.1f", cost)+"元");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|