diff --git a/src/main/java/com/yuxue/constant/Constant.java b/src/main/java/com/yuxue/constant/Constant.java index bdab0c4b..7133983a 100644 --- a/src/main/java/com/yuxue/constant/Constant.java +++ b/src/main/java/com/yuxue/constant/Constant.java @@ -11,10 +11,10 @@ public class Constant { public static final String UTF8 = "UTF-8"; // 车牌识别, 默认车牌图片保存路径 - public static String DEFAULT_DIR = "D:/PlateDetect/"; + public static String DEFAULT_DIR = "./PlateDetect/"; // 车牌识别, 默认车牌图片处理过程temp路径 - public static String DEFAULT_TEMP_DIR = "D:/PlateDetect/temp/"; + public static String DEFAULT_TEMP_DIR = "./PlateDetect/temp/"; // 车牌识别,默认处理图片类型 public static String DEFAULT_TYPE = "png,jpg,jpeg"; diff --git a/src/main/java/com/yuxue/easypr/core/PlateLocate.java b/src/main/java/com/yuxue/easypr/core/PlateLocate.java index b87fc442..33ba33d4 100644 --- a/src/main/java/com/yuxue/easypr/core/PlateLocate.java +++ b/src/main/java/com/yuxue/easypr/core/PlateLocate.java @@ -5,6 +5,7 @@ import java.util.Vector; import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; +import com.yuxue.constant.Constant; import org.bytedeco.javacpp.opencv_imgcodecs; import org.bytedeco.javacpp.opencv_core.CvPoint2D32f; @@ -69,7 +70,7 @@ public class PlateLocate { protected boolean debug = true; // 开启调试模式之后,切图文件保存路径 - protected String tempPath = "d:/PlateDetect/temp/" + System.currentTimeMillis() + "/"; + protected String tempPath = Constant.DEFAULT_TEMP_DIR + System.currentTimeMillis() + "/";