浏览代码

修改转换算法

wangchao 4 年之前
父节点
当前提交
06a7c629a7

+ 4 - 4
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/utils/AiIdenUtils.java

46
		try {
46
		try {
47
			BigDecimal boxValue = (BigDecimal) jsonArray.get(0);
47
			BigDecimal boxValue = (BigDecimal) jsonArray.get(0);
48
48
49
			boxLongArr[0] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP).doubleValue();
49
			boxLongArr[0] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP).doubleValue();
50
50
51
			boxValue = (BigDecimal) jsonArray.get(1);
51
			boxValue = (BigDecimal) jsonArray.get(1);
52
			boxLongArr[1] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP)
52
			boxLongArr[1] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP)
53
					.doubleValue();
53
					.doubleValue();
54
			boxValue = (BigDecimal) jsonArray.get(2);
54
			boxValue = (BigDecimal) jsonArray.get(2);
55
			boxLongArr[2] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP)
55
			boxLongArr[2] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP)
56
					.doubleValue();
56
					.doubleValue();
57
			boxValue = (BigDecimal) jsonArray.get(3);
57
			boxValue = (BigDecimal) jsonArray.get(3);
58
			boxLongArr[3] = boxValue.divide(new BigDecimal(getImageParam.get("width")), 4, BigDecimal.ROUND_HALF_UP)
58
			boxLongArr[3] = boxValue.divide(new BigDecimal(getImageParam.get("height")), 4, BigDecimal.ROUND_HALF_UP)
59
					.doubleValue();
59
					.doubleValue();
60
		} catch (Exception e) {
60
		} catch (Exception e) {
61
			log.error("getBoxArray is error: errorMsg=" + e.getMessage() + ", jsonArray=" + jsonArray);
61
			log.error("getBoxArray is error: errorMsg=" + e.getMessage() + ", jsonArray=" + jsonArray);

+ 3 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/SecurityProtectionApp.java

21
@SpringBootApplication
21
@SpringBootApplication
22
public class SecurityProtectionApp {
22
public class SecurityProtectionApp {
23
    public static void main(String[] args) throws Exception {
23
    public static void main(String[] args) throws Exception {
24
        System.setProperty("websocket.port", "7200");
24
     /*   System.setProperty("websocket.port", "7200");
25
25
26
        //注册镜屏服务
26
        //注册镜屏服务
27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
28
        //镜屏服务启动
28
        //镜屏服务启动
29
        ConnectServerStart.start(args, false);
29
        ConnectServerStart.start(args, false);*/
30
30
31
        SpringApplication.run(SecurityProtectionApp.class, args);
31
        SpringApplication.run(SecurityProtectionApp.class, args);
32
    }
32
    }
33
}
33
}