ソースを参照

修改转换算法

wangchao 4 年 前
コミット
06a7c629a7

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

@ -46,16 +46,16 @@ public class AiIdenUtils {
46 46
		try {
47 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 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 53
					.doubleValue();
54 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 56
					.doubleValue();
57 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 59
					.doubleValue();
60 60
		} catch (Exception e) {
61 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,13 +21,13 @@ import org.springframework.scheduling.annotation.EnableAsync;
21 21
@SpringBootApplication
22 22
public class SecurityProtectionApp {
23 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 27
        ConnectServerManager.registerServer("websocket.port", new WebSocketStompServer("/stomp"));
28 28
        //镜屏服务启动
29
        ConnectServerStart.start(args, false);
29
        ConnectServerStart.start(args, false);*/
30 30
31 31
        SpringApplication.run(SecurityProtectionApp.class, args);
32 32
    }
33
}
33
}