6 changed files with 218 additions and 1 deletions
			
			
		@ -0,0 +1,31 @@ | 
				
			|||||
 | 
					package com.visual.open.anpr.server.domain.extend; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public enum PlateColor { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    BLACK("黑色"), | 
				
			||||
 | 
					    BLUE("蓝色"), | 
				
			||||
 | 
					    GREEN("绿色"), | 
				
			||||
 | 
					    WHITE("白色"), | 
				
			||||
 | 
					    YELLOW("黄色"), | 
				
			||||
 | 
					    UNKNOWN("未知"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private String name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    PlateColor(String name){ | 
				
			||||
 | 
					        this.name = name; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public String getName(){ | 
				
			||||
 | 
					        return this.name; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static PlateColor valueOfName(String name){ | 
				
			||||
 | 
					        for (PlateColor item : PlateColor.values()){ | 
				
			||||
 | 
					            if(item.name.equals(name)){ | 
				
			||||
 | 
					                return item; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return UNKNOWN; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					package com.visual.open.anpr.server.domain.extend; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public enum PlateLayout { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    SINGLE,     //单排
 | 
				
			||||
 | 
					    DOUBLE,     //双排
 | 
				
			||||
 | 
					    UNKNOWN;    //未知
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,72 @@ | 
				
			|||||
 | 
					package com.visual.open.anpr.server.domain.extend; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import io.swagger.annotations.ApiModelProperty; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class PlateLocation implements Serializable { | 
				
			||||
 | 
					    /**左上角x坐标**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="左上角x坐标", position = 1, required = true) | 
				
			||||
 | 
					    private int x; | 
				
			||||
 | 
					    /**左上角y坐标**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="左上角y坐标", position = 2, required = true) | 
				
			||||
 | 
					    private int y; | 
				
			||||
 | 
					    /**宽度**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌宽度", position = 3, required = true) | 
				
			||||
 | 
					    private int w; | 
				
			||||
 | 
					    /**高度**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌高度", position = 4, required = true) | 
				
			||||
 | 
					    private int h; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 构建坐标 | 
				
			||||
 | 
					     * @param x | 
				
			||||
 | 
					     * @param y | 
				
			||||
 | 
					     * @param w | 
				
			||||
 | 
					     * @param h | 
				
			||||
 | 
					     * @return | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    public static PlateLocation build(int x, int y, int w, int h){ | 
				
			||||
 | 
					        return new PlateLocation().setX(x).setY(y).setW(w).setH(h); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static PlateLocation build(float x, float y, float w, float h){ | 
				
			||||
 | 
					        return new PlateLocation().setX((int) x).setY((int) y).setW((int) w).setH((int) h); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public int getX() { | 
				
			||||
 | 
					        return x; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLocation setX(int x) { | 
				
			||||
 | 
					        this.x = x; | 
				
			||||
 | 
					        return this; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public int getY() { | 
				
			||||
 | 
					        return y; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLocation setY(int y) { | 
				
			||||
 | 
					        this.y = y; | 
				
			||||
 | 
					        return this; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public int getW() { | 
				
			||||
 | 
					        return w; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLocation setW(int w) { | 
				
			||||
 | 
					        this.w = w; | 
				
			||||
 | 
					        return this; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public int getH() { | 
				
			||||
 | 
					        return h; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLocation setH(int h) { | 
				
			||||
 | 
					        this.h = h; | 
				
			||||
 | 
					        return this; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,41 @@ | 
				
			|||||
 | 
					package com.visual.open.anpr.server.domain.extend; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import io.swagger.annotations.ApiModelProperty; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class RecognitionInfo implements Serializable { | 
				
			||||
 | 
					    /**车牌布局,单排还是双排**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌布局,单排还是双排", position = 1, required = true) | 
				
			||||
 | 
					    private PlateLayout layout; | 
				
			||||
 | 
					    /**车牌文本信息**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌文本信息", position = 3, required = true) | 
				
			||||
 | 
					    private String plateNo; | 
				
			||||
 | 
					    /**车牌的颜色信息**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌的颜色信息", position = 5, required = true) | 
				
			||||
 | 
					    private PlateColor plateColor; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLayout getLayout() { | 
				
			||||
 | 
					        return layout; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setLayout(PlateLayout layout) { | 
				
			||||
 | 
					        this.layout = layout; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public String getPlateNo() { | 
				
			||||
 | 
					        return plateNo; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setPlateNo(String plateNo) { | 
				
			||||
 | 
					        this.plateNo = plateNo; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateColor getPlateColor() { | 
				
			||||
 | 
					        return plateColor; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setPlateColor(PlateColor plateColor) { | 
				
			||||
 | 
					        this.plateColor = plateColor; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -1,8 +1,46 @@ | 
				
			|||||
package com.visual.open.anpr.server.domain.response; | 
					package com.visual.open.anpr.server.domain.response; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.visual.open.anpr.server.domain.extend.PlateLocation; | 
				
			||||
 | 
					import com.visual.open.anpr.server.domain.extend.RecognitionInfo; | 
				
			||||
 | 
					import io.swagger.annotations.ApiModelProperty; | 
				
			||||
 | 
					
 | 
				
			||||
import java.io.Serializable; | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
public class PlateInfoRepVo implements Serializable { | 
					public class PlateInfoRepVo implements Serializable { | 
				
			||||
 | 
					    /**车牌置信分数**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌置信分数:[0,100]", position = 1, required = true) | 
				
			||||
 | 
					    private Float plateScore; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /**车牌位置信息**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌位置信息", position = 3, required = true) | 
				
			||||
 | 
					    private PlateLocation location; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /**车牌识别信息**/ | 
				
			||||
 | 
					    @ApiModelProperty(value="车牌识别信息", position = 5, required = true) | 
				
			||||
 | 
					    private RecognitionInfo recognition; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public Float getPlateScore() { | 
				
			||||
 | 
					        return plateScore; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setPlateScore(Float plateScore) { | 
				
			||||
 | 
					        this.plateScore = plateScore; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public PlateLocation getLocation() { | 
				
			||||
 | 
					        return location; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setLocation(PlateLocation location) { | 
				
			||||
 | 
					        this.location = location; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public RecognitionInfo getRecognition() { | 
				
			||||
 | 
					        return recognition; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setRecognition(RecognitionInfo recognition) { | 
				
			||||
 | 
					        this.recognition = recognition; | 
				
			||||
 | 
					    } | 
				
			||||
} | 
					} | 
				
			||||
 | 
				
			|||||
					Loading…
					
					
				
		Reference in new issue