[ 河东楼[htd项目] ]


一. setting.json配置文件

  • 检测视频配置开关
    • 鼠标检测开关
    • 屏幕全屏检测开关
    • 图片检测开关
    • 脱机检测开关
"Abnormal_Screen": {
            "Enabled": true,  // 视频检查
            "Detect_Cursor": {
                "Enabled": true,  // 鼠标检测开关
                "Enable_Mask": false,  // 开启后会使用图1和图2
                "Templates": "./swd_templates/cursor_bin_latest.png", // 鼠标样本图片1
                "Masks": "./swd_templates/cursor_mask_latest.png", // 鼠标样本图片2
                "Color": {
                    "Lower": [ 0, 0, 0 ],
                    "Upper": [ 180, 255, 50 ]
                },
                "Area": [
                    [ [ 139, 345 ], [ 34, 283 ] ],
                    [ [ 161, 376 ], [ 267, 523 ] ],
                    [ [ 359, 529 ], [ 309, 411 ] ],
                    [ [ 359, 611 ], [ 394, 523 ] ],
                    [ [ 594, 811 ], [ 426, 523 ] ],
                    [ [ 161, 376 ], [ 507, 971 ] ],
                    [ [ 359, 574 ], [ 507, 971 ] ],
                    [ [ 557, 772 ], [ 507, 971 ] ],
                    [ [ 755, 936 ], [ 507, 971 ] ],
                    [ [ 125, 376 ], [ 955, 1419 ] ],
                    [ [ 359, 574 ], [ 955, 1419 ] ],
                    [ [ 557, 772 ], [ 955, 1419 ] ],
                    [ [ 755, 899 ], [ 955, 1419 ] ],
                    [ [ 278, 487 ], [ 1401, 1526 ] ],
                    [ [ 472, 637 ], [ 1401, 1611 ] ],
                    [ [ 622, 846 ], [ 1401, 1704 ] ],
                    [ [ 790, 974 ], [ 1549, 1892 ] ]
                ],
                "Threshold": {
                    "Min": 0.15,  // 鼠标匹配度, 改大了更容易触发
                    "Max": 0.65   // 鼠标匹配度, 改小了更容易触发
                }
            },
            "Detect_MMI_Window": {
                "Enabled": true, // 全屏检测开关(以视频四角来定位检测)
                "Templates": {
                    "Top_Left_Corner": {
                        "Gray": "./swd_templates/top_left_gray_corner.png",
                        "Blue": "./swd_templates/top_left_blue_corner.png"
                    },

                    "Top_Right_Corner": {
                        "Gray": "./swd_templates/top_right_gray_corner.png",
                        "Blue": "./swd_templates/top_right_blue_corner.png"
                    },

                    "Bottom_Left_Corner": {
                        "Gray": "./swd_templates/bottom_left_gray_corner.png",
                        "Blue": "./swd_templates/bottom_left_blue_corner.png"
                    },

                    "Bottom_Right_Corner": {
                        "Gray": "./swd_templates/bottom_right_gray_corner.png",
                        "Blue": "./swd_templates/bottom_right_blue_corner.png"
                    }
                },
                "Area": {
                    "Top_Left_Corner": [ [ 0, 25 ], [ 0, 28 ] ],
                    "Top_Right_Corner": [ [ 0, 25 ], [ 1892, 1920 ] ],
                    "Bottom_Left_Corner": [ [ 1055, 1080 ], [ 0, 28 ] ],
                    "Bottom_Right_Corner": [ [ 1055, 1080 ], [ 1892, 1920 ] ]
                },

                "Threshold": {
                    "Corner_Count": 2,
                    "SSIM": 0.9
                }
            },
            "Detect_Depot_Layout": {
                "Enabled": true,  // 检测图片to_fot, fo_tan开关
                "Templates": {
                    "Icon_1": "./swd_templates/to_fot_template.png",
                    "Icon_2": "./swd_templates/fo_tan_template.png"
                },
                "Area": {
                    "Icon_1": [ [ 324, 335 ], [ 161, 212 ] ],
                    "Icon_2": [ [ 956, 968 ], [ 1525, 1571 ] ]
                },
                "Threshold": {
                    "Icon_Count": 2,
                    "SSIM": 0.9
                }
            },
            "Detect_MMI_Offline": {
                "Enabled": false, // 脱机检测开关

                "Templates": {
                    "Gray_Title": "./swd_templates/mmi_title_gray_template.png",
                    "Blue_Title": "./swd_templates/mmi_title_blue_template.png"
                },

                "Location": [
                    [ [ 51, 55 ], [ 8, 12 ] ],
                    [ [ 1045, 1049 ], [ 8, 12 ] ],
                    [ [ 1045, 1049 ], [ 1908, 1912 ] ],
                    [ [ 51, 55 ], [ 1908, 1912 ] ]
                ],

                "Color_Range": {
                    "Red": {
                        "Lower": [ [ 0, 60, 30 ], [ 165, 60, 60 ] ],
                        "Upper": [ [ 15, 255, 255 ], [ 180, 255, 255 ] ]
                    }
                },

                "Area": [ [ 7, 24 ], [ 903, 1029 ] ],
                "Threshold": {
                    "Corner_Count": 1,
                    "Color": 90
                }
            }
        },

检测是否全屏