Regional safety inspection methods and related equipment
Through visual sensors, image collection, pixel points are marked, model and database are matched, and the regional security inspection results are determined, which solves the problem of low reliability of regional security inspection results in the prior art, and achieves more accurate regional security inspection.
Patent Information
- Application Number
- CN202411646051.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the access control device can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional safety inspection results in the workplace.
By receiving the current image collected by the visual sensor, marking the pixel points, determining the target image, matching the database using the preset target matching model, obtaining the target's attribute information, and determining the area security inspection results based on the pass permissions and attribute information.
Real-time detection of various goals in the area is achieved, the reliability of regional safety inspection results is improved, and the safety of the workplace is ensured.
Smart Images

Figure CN119763082A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of regional safety inspection, and in particular to a regional safety inspection method and related equipment. Background Art
[0002] With the rapid development of science and technology, regional safety inspection is crucial to ensure the safety of the workplace. In the workplace, outsiders or vehicles may affect the safety of the workplace. Therefore, checking whether there are outsiders or vehicles in the area is an important step in regional safety inspection.
[0003] In the existing regional safety inspection technology, staff use access control devices to restrict outsiders or vehicles from entering the workplace. The access control device can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional safety inspection results in the workplace.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a regional security inspection method and related equipment, aiming to solve the technical problem that the access control device can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional security inspection results in the workplace.
[0006] To achieve the above objectives, the present application proposes a regional safety inspection method, the method comprising:
[0007] Receiving a current image captured by a visual sensor, wherein the current image includes a target image;
[0008] Marking pixels in the current image, confirming target pixels in the current image marked as target pixels based on the marked pixels, and determining a target image in the current image based on the target pixels;
[0009] Using a preset target matching model, matching the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle;
[0010] Obtain the access authority set for the area where the target is currently located, and determine the area security inspection result based on the access authority and the attribute information.
[0011] In one embodiment, the step of marking the pixels in the current image, confirming the target pixels in the current image marked as the target pixels based on the marked pixels, and determining the target image in the current image based on the target pixels further includes:
[0012] Acquire a historical image, and mark all pixels in the historical image as background pixels, wherein the historical image does not contain a target image, and the historical image data and the current image data are image data collected by the same sensor at the same position;
[0013] Determine a first pixel in the current image and a second pixel in the historical image at a position corresponding to the first pixel;
[0014] Determine whether a grayscale value difference between the first pixel and the second pixel is greater than a preset grayscale threshold;
[0015] If it is greater, the first pixel is marked as a target pixel point, and a target image in the current image is determined based on the target pixel point.
[0016] In one embodiment, the step of determining the target image in the current image based on the target pixel point further includes:
[0017] Setting an area adjacent to the target pixel as a first area, and determining the number of target pixels in the first area;
[0018] If the number is greater than a preset number threshold, the image in the first area is set as a target image.
[0019] In one embodiment, the step of obtaining the access authority set for the area where the target is currently located, and determining the area security inspection result based on the access authority and the attribute information, further includes:
[0020] Obtain the access permissions set for the area where the target is currently located;
[0021] Based on the access authority, determine the information of people and vehicles allowed to pass in the area where the target is currently located;
[0022] Determine whether the person and vehicle information contains the attribute information. If so, determine that the regional safety inspection result is normal; if not, determine that the regional safety inspection result is abnormal.
[0023] In one embodiment, before the step of using the preset target matching model, the method further includes:
[0024] Acquire multiple groups of sample target images and a preset target matching database, wherein the preset target matching database contains feature matching data of the multiple groups of sample target images, and matching results between the data of the multiple groups of sample target images and the data in the preset target matching database are first matching results;
[0025] Determine the current target matching model;
[0026] Based on the current target matching model, the multiple groups of sample target images and the preset target matching database, matching the data of the multiple groups of sample target images with the data in the preset target matching database to obtain a second matching result;
[0027] Determining a matching error value based on the first matching result and the second matching result;
[0028] Determine whether the error value is greater than a preset matching error threshold, and if so, adjust the parameters of the current target matching model;
[0029] Based on the current target matching model after adjusting the parameters, return to the current target matching model, multiple groups of sample target image data and the preset target matching database, match the data of the multiple groups of sample target images with the data in the preset target matching database, and obtain the second matching result step until the error value is less than or equal to the preset matching error threshold, and obtain the preset target matching model.
[0030] In one embodiment, before the step of obtaining the access authority set for the area where the target is currently located and determining the area security inspection result based on the access authority and the attribute information, the step further includes:
[0031] An interface for displaying the regional security inspection result is constructed, wherein the interface displays the regional security inspection result, the target image, and the attribute information of the target.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a regional safety inspection device, which includes:
[0033] A receiving module, the receiving module is used to receive a current image collected by a visual sensor, wherein the current image includes a target image;
[0034] A marking module, the marking module is used to mark the pixel points in the current image, confirm the target pixel points marked as the target pixel in the current image based on the marked pixel points, and determine the target image in the current image based on the target pixel points;
[0035] A matching module, the matching module is used to use a preset target matching model to match the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle;
[0036] A determination module is used to obtain the access permission set for the area where the target is currently located, and determine the area security inspection result based on the access permission and the attribute information.
[0037] In one embodiment, the marking module includes:
[0038] A first acquisition unit is used to acquire a historical image and mark all pixels in the historical image as background pixels, wherein the historical image does not contain a target image, and the historical image data and the current image data are image data collected by the same sensor at the same position;
[0039] A first determining unit, configured to determine a first pixel in the current image and a second pixel in the historical image at a position corresponding to the first pixel;
[0040] A first judging unit, configured to judge whether a grayscale value difference between the first pixel and the second pixel is greater than a preset grayscale threshold;
[0041] The marking unit marks the first pixel as a target pixel if it is greater than, and determines the target image in the current image based on the target pixel.
[0042] In one embodiment, the marking module further includes:
[0043] A first setting unit, configured to set an area adjacent to a target pixel as a first area, and determine the number of target pixels in the first area;
[0044] The second setting unit sets the image in the first area as a target image if the number is greater than a preset number threshold.
[0045] In one embodiment, the determining module includes:
[0046] A second acquisition unit is used to acquire the access authority set for the area where the target is currently located;
[0047] A second determining unit, configured to determine, based on the access authority, information on persons and vehicles that are allowed to pass through the area where the target is currently located;
[0048] The third determination unit is used to determine whether the personnel and vehicle information contains the attribute information. If so, the regional safety inspection result is determined to be normal; if not, the regional safety inspection result is determined to be abnormal.
[0049] In one embodiment, the matching module includes:
[0050] A third acquisition unit is used to acquire multiple groups of sample target images and a preset target matching database, wherein the preset target matching database contains feature matching data of the multiple groups of sample target images, and a matching result between the data of the multiple groups of sample target images and the data in the preset target matching database is a first matching result;
[0051] A third determination unit, used to determine a current target matching model;
[0052] a matching unit, configured to match the data of the multiple groups of sample target images with the data in the preset target matching database based on the current target matching model, the multiple groups of sample target images and the preset target matching database, to obtain a second matching result;
[0053] a fourth determining unit, configured to determine a matching error value based on the first matching result and the second matching result;
[0054] A second judgment unit, used to judge whether the error value is greater than a preset matching error threshold, and if so, adjust the parameters of the current target matching model;
[0055] A training unit is used to return to the current target matching model, multiple groups of sample target image data and a preset target matching database based on the current target matching model after adjusting the parameters, and match the data of the multiple groups of sample target images with the data in the preset target matching database to obtain a second matching result, until the error value is less than or equal to a preset matching error threshold, thereby obtaining the preset target matching model.
[0056] In one embodiment, the determining module further includes:
[0057] A construction unit is used to construct an interface for displaying the regional security inspection result, wherein the interface displays the regional security inspection result, the target image, and the attribute information of the target.
[0058] In addition, to achieve the above-mentioned purpose, the present application also proposes a regional safety inspection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the regional safety inspection method described above.
[0059] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the regional safety inspection method described above are implemented.
[0060] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the regional safety inspection method described above are implemented.
[0061] One or more technical solutions proposed in this application have at least the following technical effects:
[0062] The present application proposes a regional security inspection method and related equipment. In the related technology, staff use access control devices to restrict outsiders or vehicles from entering the workplace. The access control devices can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional security inspection results in the workplace. In the present application, first, a current image captured by a visual sensor is received, wherein the current image contains a target image, and then, pixel points in the current image are marked, and based on the marked pixel points, target pixel points marked as target pixels in the current image are confirmed, and based on the target pixel points, the target image in the current image is determined, and further, a preset target matching model is used to match the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to personnel and vehicles, and finally, the access permission set for the current area where the target is located is obtained, and the regional security inspection result is determined based on the access permission and the attribute information.
[0063] It can be understood that in the present application, the regional safety inspection equipment detects each target in the area in real time, performs real-time inspection on each target, obtains more accurate regional safety inspection results, and improves the reliability of the regional safety inspection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0066] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the regional safety inspection method of the present application;
[0067] Figure 2 A flow chart of the second embodiment of the regional safety inspection method of the present application;
[0068] Figure 3 A flowchart of the third embodiment of the regional safety inspection method of the present application is provided;
[0069] Figure 4 This is a schematic diagram of the module structure of the regional safety inspection device according to an embodiment of the present application;
[0070] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the regional security inspection method in the embodiment of the present application.
[0071] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0073] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0074] In this embodiment, for ease of description, the following description is made with the identification area safety inspection device as the execution entity.
[0075] Due to the existing technology, staff use access control devices to restrict outsiders or vehicles from entering the workplace. The access control devices can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional safety inspection results in the workplace.
[0076] The present application provides a solution, which includes: first, receiving a current image captured by a visual sensor, wherein the current image includes a target image; then, marking pixels in the current image; based on the marked pixels, confirming target pixels in the current image that are marked as target pixels; based on the target pixels, determining the target image in the current image; further, using a preset target matching model, matching data of the target image with data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to personnel and vehicles; finally, obtaining access permissions set for the area where the target is currently located; and determining an area security inspection result based on the access permissions and the attribute information.
[0077] It can be understood that in the present application, the regional safety inspection equipment detects each target in the area in real time, performs real-time inspection on each target, obtains more accurate regional safety inspection results, and improves the reliability of the regional safety inspection results.
[0078] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a regional security inspection device, etc. The following takes the regional security inspection device as an example to illustrate this embodiment and the following embodiments.
[0079] Based on this, the present application embodiment provides a regional security inspection method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the regional safety inspection method of the present application.
[0080] In this embodiment, the area safety inspection method includes steps S100 to S400:
[0081] Step S100, receiving a current image captured by a visual sensor, wherein the current image includes a target image;
[0082] In this embodiment, the execution entity is a regional security inspection device, which can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device that can realize the above functions.
[0083] It should be noted that, in this embodiment, the target refers to the people and vehicles in the area, and the target image is the image of the people and vehicles in the area collected by the visual sensor.
[0084] In this embodiment, the specific application scenario may be:
[0085] In a workplace (area), the staff needs to monitor the personnel and vehicles in the workplace and determine the access rights of the personnel and vehicles in the workplace to ensure the safety of the workplace. Furthermore, after the staff clicks the "area safety inspection" button, the area safety inspection device detects that the staff clicks the "area safety inspection" button, and the area safety inspection device receives the current image of the workplace collected by the visual sensor in real time. Among them, the visual sensor includes a video camera, a camera, etc.
[0086] Step S200, marking pixel points in the current image, confirming target pixel points marked as target pixels in the current image based on the marked pixel points, and determining a target image in the current image based on the target pixel points;
[0087] It is understandable that after the regional safety inspection device receives the current image of the workplace collected by the visual sensor in real time, the regional safety inspection device marks the pixels in the current image, and based on the marked pixels, the regional safety inspection device confirms the target pixels marked as target pixels in the current image. Further, based on the target pixels, the target image in the current image is determined.
[0088] Specifically, the step of marking the pixel points in the current image, confirming the target pixel points marked as the target pixel in the current image based on the marked pixel points, and determining the target image in the current image based on the target pixel points further includes steps S210 to S240:
[0089] Step S210, acquiring a historical image, marking all pixels in the historical image as background pixels, wherein the historical image does not contain a target image, and the historical image data and the current image data are image data collected by the same sensor at the same position;
[0090] In this embodiment, the same sensor refers to the same visual sensor.
[0091] Step S220, determining a first pixel in the current image and a second pixel at a position corresponding to the first pixel in the historical image;
[0092] It can be understood that if the target pixel does not exist in the first image, the pixel points corresponding to the same position of the first image and the historical image should be similar.
[0093] It should be noted that as time changes and light is affected, the pixel value of the same pixel at the same position is constantly changing, but the amplitude of the change is very small.
[0094] Step S230, determining whether the grayscale value difference between the first pixel and the second pixel is greater than a preset grayscale threshold;
[0095] It can be understood that when the pixel value change difference of the same pixel point at the same position is less than or equal to the preset grayscale threshold, it can be approximately regarded as that the pixel point has not changed, and then, it is determined that the pixel point is the same as the pixel point in the historical image. Further, the pixel point is set as a background pixel point. When the pixel value change difference of the same pixel point at the same position is greater than the preset grayscale threshold, it can be regarded as that the pixel point has changed, and then, it is determined that the pixel point is exactly the same as the pixel point in the historical image. Further, the pixel point is set as a target pixel point.
[0096] Step S240: If greater than, mark the first pixel as a target pixel, and determine a target image in the current image based on the target pixel.
[0097] Specifically, the step of determining the target image in the current image based on the target pixel point further includes steps S241 to S242:
[0098] Step S241, setting an area adjacent to the target pixel as a first area, and determining the number of target pixels in the first area;
[0099] It should be noted that there may be an obstructed image in the current image, but not the target image. The obstructed image occupies a smaller image area, and thus the number of obstructed pixels is also smaller. For the target pixel adjacent area, it is further determined whether the adjacent area is an obstructed image area or a target image area.
[0100] Step S242: if the number is greater than a preset number threshold, the image in the first area is set as a target image.
[0101] It can be understood that the target image is much larger than the occluded image. Furthermore, if the number of target pixels in the area adjacent to the target pixel is greater than the preset data threshold, the adjacent area is determined to be the target image area. If the number of target pixels in the area adjacent to the target pixel is less than or equal to the preset data threshold, the adjacent area is determined to be the occluded image area.
[0102] Step S300, using a preset target matching model, matching the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle;
[0103] It should be noted that, in this embodiment, the preset target matching model is obtained after the current target matching model is trained. The preset target matching model is used to match the data of the target image with the data in the preset target matching database, and then obtain the attribute information of the target.
[0104] Step S400, obtaining the access authority set for the area where the target is currently located, and determining the area security inspection result based on the access authority and the attribute information.
[0105] In this embodiment, after the regional security inspection device obtains the attribute information of the target, the regional security inspection device obtains the access authority set for the area where the target is currently located, and determines the regional security inspection result based on the access authority and the attribute information.
[0106] Specifically, the step of obtaining the access authority set for the area where the target is currently located and determining the area security inspection result based on the access authority and the attribute information further includes steps S410 to S430:
[0107] Step S410, obtaining the access authority set for the area where the target is currently located;
[0108] In this embodiment, first, the regional security inspection device obtains the access authority set for the area where the target is currently located.
[0109] It should be noted that the access authority includes persons or vehicles allowed to pass through the area.
[0110] It is understandable that access permissions are set in advance by staff.
[0111] Step S420, based on the access authority, determining the information of people and vehicles allowed to pass through the area where the target is currently located;
[0112] In this embodiment, the regional security inspection device confirms the information of people and vehicles allowed to pass through the area where the target is currently located based on the access authority.
[0113] Step S430, determining whether the personnel and vehicle information contains the attribute information, if so, determining that the regional safety inspection result is normal; if not, determining that the regional safety inspection result is abnormal.
[0114] In this embodiment, after the regional security inspection device confirms the information of people and vehicles allowed to pass through the area where the target is currently located based on the access permission, the regional security inspection device determines whether the person and vehicle information contains the attribute information. If so, the regional security inspection result is determined to be normal; if not, the regional security inspection result is determined to be abnormal.
[0115] The present application proposes a regional security inspection method and related equipment. In the related technology, staff use access control devices to restrict outsiders or vehicles from entering the workplace. The access control devices can only detect whether outsiders or vehicles enter the workplace, resulting in low reliability of real-time regional security inspection results in the workplace. In the present application, first, a current image captured by a visual sensor is received, wherein the current image contains a target image, and then, pixel points in the current image are marked, and based on the marked pixel points, target pixel points marked as target pixels in the current image are confirmed, and based on the target pixel points, the target image in the current image is determined, and further, a preset target matching model is used to match the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to personnel and vehicles, and finally, the access permission set for the current area where the target is located is obtained, and the regional security inspection result is determined based on the access permission and the attribute information.
[0116] It can be understood that in the present application, the regional safety inspection equipment detects each target in the area in real time, performs real-time inspection on each target, obtains more accurate regional safety inspection results, and improves the reliability of the regional safety inspection results.
[0117] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 Before step S300, the area safety inspection method further includes steps S310 to S360:
[0118] Step S310, obtaining a plurality of groups of sample target images and a preset target matching database, wherein the preset target matching database contains feature matching data of the plurality of groups of sample target images, and a matching result between the data of the plurality of groups of sample target images and the data in the preset target matching database is a first matching result;
[0119] In this embodiment, the regional safety inspection device obtains multiple sets of sample target images and matches them with a preset target database, wherein the sample target images refer to vehicle images and personnel images.
[0120] Additionally, it should be noted that the preset target matching database contains feature matching data of the multiple groups of sample target images, and the matching result between the data of the multiple groups of sample target images and the data in the preset target matching database is the first matching result.
[0121] Step S320, determining the current target matching model;
[0122] In this embodiment, first, the regional safety inspection device determines the current target matching model, and then trains the current target matching model until the expected effect is achieved.
[0123] Step S330, based on the current target matching model, the multiple groups of sample target images and the preset target matching database, matching the data of the multiple groups of sample target images with the data in the preset target matching database to obtain a second matching result;
[0124] In this embodiment, based on the second matching result, the regional safety inspection device determines the matching effect of the current target matching model.
[0125] Step S340, determining a matching error value based on the first matching result and the second matching result;
[0126] Step S350, determining whether the error value is greater than a preset matching error threshold, and if so, adjusting the parameters of the current target matching model;
[0127] It is understandable that if the error value is greater than the preset matching error threshold, it indicates that the current target matching model does not meet the requirements and needs to be trained. If the error value is less than or equal to the preset matching error threshold, it indicates that the current target matching model meets the requirements, and the current target matching model is the preset target matching model.
[0128] Step S360, based on the current target matching model after adjusting the parameters, returns to the current target matching model, multiple groups of sample target image data and the preset target matching database, matches the data of the multiple groups of sample target images with the data in the preset target matching database, and obtains the second matching result, until the error value is less than or equal to the preset matching error threshold, and obtains the preset target matching model.
[0129] In this embodiment, the current target matching model is trained until the current target matching model meets the target matching requirements, thereby obtaining a preset target matching model. By training the model, the accuracy and reliability of target matching are improved, thereby improving the reliability of regional safety inspection results.
[0130] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 3 Before step S400, the area safety inspection method further includes step A10:
[0131] Step A10, constructing an interface for displaying the regional security inspection result, wherein the interface displays the regional security inspection result, the target image, and the attribute information of the target.
[0132] In this embodiment, the area inspection results are displayed in real time, so that the staff can find the specific information of the outsiders and vehicles in the area.
[0133] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the regional safety inspection method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0134] This application also provides a regional safety inspection device, please refer to Figure 4 , the regional safety inspection device comprises:
[0135] A receiving module 10, the receiving module is used to receive a current image collected by a visual sensor, wherein the current image includes a target image;
[0136] A marking module 20, the marking module is used to mark the pixel points in the current image, confirm the target pixel points marked as the target pixel in the current image based on the marked pixel points, and determine the target image in the current image based on the target pixel points;
[0137] A matching module 30, which is used to use a preset target matching model to match the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle;
[0138] The determination module 40 is used to obtain the access authority set for the area where the target is currently located, and determine the area security inspection result based on the access authority and the attribute information.
[0139] In one embodiment, the marking module includes:
[0140] A first acquisition unit is used to acquire a historical image and mark all pixels in the historical image as background pixels, wherein the historical image does not contain a target image, and the historical image data and the current image data are image data collected by the same sensor at the same position;
[0141] A first determining unit, configured to determine a first pixel in the current image and a second pixel in the historical image at a position corresponding to the first pixel;
[0142] A first judging unit, configured to judge whether a grayscale value difference between the first pixel and the second pixel is greater than a preset grayscale threshold;
[0143] The marking unit marks the first pixel as a target pixel if it is greater than, and determines the target image in the current image based on the target pixel.
[0144] In one embodiment, the marking module further includes:
[0145] A first setting unit, configured to set an area adjacent to a target pixel as a first area, and determine the number of target pixels in the first area;
[0146] The second setting unit sets the image in the first area as a target image if the number is greater than a preset number threshold.
[0147] In one embodiment, the determining module includes:
[0148] A second acquisition unit is used to acquire the access authority set for the area where the target is currently located;
[0149] A second determining unit, configured to determine, based on the access authority, information on persons and vehicles that are allowed to pass through the area where the target is currently located;
[0150] The third determination unit is used to determine whether the personnel and vehicle information contains the attribute information. If so, the regional safety inspection result is determined to be normal; if not, the regional safety inspection result is determined to be abnormal.
[0151] In one embodiment, the matching module includes:
[0152] A third acquisition unit is used to acquire multiple groups of sample target images and a preset target matching database, wherein the preset target matching database contains feature matching data of the multiple groups of sample target images, and a matching result between the data of the multiple groups of sample target images and the data in the preset target matching database is a first matching result;
[0153] A third determination unit, used to determine a current target matching model;
[0154] a matching unit, configured to match the data of the multiple groups of sample target images with the data in the preset target matching database based on the current target matching model, the multiple groups of sample target images and the preset target matching database, to obtain a second matching result;
[0155] a fourth determining unit, configured to determine a matching error value based on the first matching result and the second matching result;
[0156] A second judgment unit, used to judge whether the error value is greater than a preset matching error threshold, and if so, adjust the parameters of the current target matching model;
[0157] A training unit is used to return to the current target matching model, multiple groups of sample target image data and a preset target matching database based on the current target matching model after adjusting the parameters, and match the data of the multiple groups of sample target images with the data in the preset target matching database to obtain a second matching result, until the error value is less than or equal to a preset matching error threshold, thereby obtaining the preset target matching model.
[0158] In one embodiment, the determining module further includes:
[0159] A construction unit is used to construct an interface for displaying the regional security inspection result, wherein the interface displays the regional security inspection result, the target image, and the attribute information of the target.
[0160] The regional safety inspection device provided by the present application adopts the regional safety inspection method in the above embodiment, which can solve the technical problem of regional safety inspection. Compared with the prior art, the beneficial effects of the regional safety inspection device provided by the present application are the same as the beneficial effects of the regional safety inspection method provided by the above embodiment, and other technical features in the regional safety inspection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0161] The present application provides an area security inspection device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the area security inspection method in the above-mentioned embodiment one.
[0162] Reference below Figure 5 , which shows a schematic diagram of the structure of a regional security inspection device suitable for implementing the embodiment of the present application. The regional security inspection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The regional safety inspection equipment shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0163] like Figure 5As shown, the regional security inspection device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the regional security inspection device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the regional security inspection device to communicate with other devices wirelessly or by wire to exchange data. Although the regional security inspection device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0164] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0165] The regional safety inspection device provided by the present application adopts the regional safety inspection method in the above embodiment, which can solve the technical problem of regional safety inspection. Compared with the prior art, the beneficial effects of the regional safety inspection device provided by the present application are the same as the beneficial effects of the regional safety inspection method provided by the above embodiment, and the other technical features in the regional safety inspection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0166] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0167] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0168] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the regional safety verification method in the above-mentioned embodiment.
[0169] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0170] The computer-readable storage medium may be included in the regional safety inspection device; or may exist independently without being assembled into the regional safety inspection device.
[0171] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the regional security inspection device, the regional security inspection device:
[0172] Receiving a current image captured by a visual sensor, wherein the current image includes a target image;
[0173] Marking pixels in the current image, confirming target pixels in the current image marked as target pixels based on the marked pixels, and determining a target image in the current image based on the target pixels;
[0174] Using a preset target matching model, matching the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle;
[0175] Obtain the access authority set for the area where the target is currently located, and determine the area security inspection result based on the access authority and the attribute information.
[0176] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0177] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0178] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0179] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned regional safety inspection method, and can solve the technical problem of regional safety inspection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the regional safety inspection method provided in the above-mentioned embodiment, and will not be repeated here.
[0180] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned regional safety verification method when executed by a processor.
[0181] The computer program product provided by this application can solve the technical problem of regional security inspection. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the regional security inspection method provided by the above embodiment, which will not be repeated here.
[0182] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for regional safety inspection, characterized in that: The regional safety inspection method comprises: Receiving a current image captured by a visual sensor, wherein the current image includes a target image; Marking pixels in the current image, confirming target pixels in the current image marked as target pixels based on the marked pixels, and determining a target image in the current image based on the target pixels; Using a preset target matching model, matching the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle; Obtain access permissions set for the area where the target is currently located, and determine an area security inspection result based on the access permissions and the attribute information.
2. The regional safety inspection method according to claim 1, characterized in that: The step of marking the pixel points in the current image, confirming the target pixel points marked as the target pixel in the current image based on the marked pixel points, and determining the target image in the current image based on the target pixel points, further includes: Acquire a historical image, and mark all pixels in the historical image as background pixels, wherein the historical image does not contain a target image, and the historical image data and the current image data are image data collected by the same sensor at the same position; Determine a first pixel in the current image and a second pixel in the historical image at a position corresponding to the first pixel; Determine whether a grayscale value difference between the first pixel and the second pixel is greater than a preset grayscale threshold; If it is greater, the first pixel is marked as a target pixel point, and a target image in the current image is determined based on the target pixel point.
3. The regional safety inspection method according to claim 2, characterized in that: The step of determining the target image in the current image based on the target pixel point further includes: Setting an area adjacent to the target pixel as a first area, and determining the number of target pixels in the first area; If the number is greater than a preset number threshold, the image in the first area is set as a target image.
4. The regional safety inspection method according to claim 1, characterized in that: The step of obtaining the access authority set for the area where the target is currently located, and determining the area security inspection result based on the access authority and the attribute information, further includes: Obtain the access permissions set for the area where the target is currently located; Based on the access authority, determine the information of people and vehicles allowed to pass in the area where the target is currently located; Determine whether the person and vehicle information contains the attribute information. If so, determine that the regional safety inspection result is normal; if not, determine that the regional safety inspection result is abnormal.
5. The regional safety inspection method according to claim 1, characterized in that: Before the step of using the preset target matching model, the method further includes: Acquire multiple groups of sample target images and a preset target matching database, wherein the preset target matching database contains feature matching data of the multiple groups of sample target images, and matching results between the data of the multiple groups of sample target images and the data in the preset target matching database are first matching results; Determine the current target matching model; Based on the current target matching model, the multiple groups of sample target images and the preset target matching database, matching the data of the multiple groups of sample target images with the data in the preset target matching database to obtain a second matching result; Determining a matching error value based on the first matching result and the second matching result; Determine whether the error value is greater than a preset matching error threshold, and if so, adjust the parameters of the current target matching model; Based on the current target matching model after adjusting the parameters, return to the current target matching model, multiple groups of sample target image data and the preset target matching database, match the data of the multiple groups of sample target images with the data in the preset target matching database, and obtain the second matching result step until the error value is less than or equal to the preset matching error threshold, and obtain the preset target matching model.
6. The regional safety inspection method according to claim 1, characterized in that: Before the step of obtaining the access authority set for the area where the target is currently located and determining the area security inspection result based on the access authority and the attribute information, the step further includes: An interface for displaying the regional security inspection result is constructed, wherein the interface displays the regional security inspection result, the target image, and the attribute information of the target.
7. A regional safety inspection device, characterized in that: The device comprises: A receiving module, the receiving module is used to receive a current image collected by a visual sensor, wherein the current image includes a target image; A marking module, the marking module is used to mark the pixel points in the current image, confirm the target pixel points marked as the target pixel in the current image based on the marked pixel points, and determine the target image in the current image based on the target pixel points; A matching module, the matching module is used to use a preset target matching model to match the data of the target image with the data in a preset target matching database to obtain attribute information of the target, wherein the target includes but is not limited to a person and a vehicle; A determination module is used to obtain the access permission set for the area where the target is currently located, and determine the area security inspection result based on the access permission and the attribute information.
8. A regional safety inspection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the area safety inspection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the regional safety inspection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the area safety verification method according to any one of claims 1 to 6 are implemented.