A method for matching people and bags during security inspection
By detecting the grayscale dispersed reference values of face images and image, and adjusting the detection parameters and processing methods, the problem of increasing image recognition difficulty in the prior art is solved, and security inspection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411226229.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The existing security inspection technology cannot perform targeted processing based on the different states of the X-ray image of the target detector, which increases the difficulty of image recognition, and thus leads to errors in the security inspection packet matching process.
By detecting the periodic similarity of face images and the image grayscale dispersion reference value, the acquisition number and acquisition range are determined, and the detection tube voltage or filtering processing parameters are adjusted according to the image imaging status, and the image processing method is determined based on the image feature conditions, including the analysis of the most Optimal global threshold and key point analysis, setting areas to improve image recognition accuracy.
The accuracy and security inspection efficiency of X-ray image detection results are improved, and the problem of difficult to identify low-contrast areas caused by poor image segmentation effect is avoided, which is enhanced.
Smart Images

Figure CN118762200B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of security inspection, and in particular to a method for matching people and bags during security inspection. Background Art
[0002] Security check refers to the safety inspection of people and their luggage to prevent people from carrying prohibited and dangerous goods into specific areas or taking public transportation. It is an indispensable part of maintaining public safety. Determining whether there are prohibited and dangerous goods in the luggage based on X-ray images is the main security check method currently used. Matching people and their luggage can enable security personnel to promptly identify the people carrying prohibited and dangerous goods and provide effective proof. However, the current existing security check person-bag matching and X-ray security check image detection methods have not been able to determine targeted image processing methods based on the different states of the X-ray image of the target detection object, resulting in some areas being unable to be identified, which in turn leads to omissions in security check results or low security check efficiency.
[0003] Chinese patent publication number CN117746020A discloses a method for detecting prohibited items in X-ray security inspection images, which includes the following steps: obtaining a security inspection data set, preprocessing the obtained security inspection data set, randomly dividing the preprocessed data set into a training set and a validation set in proportion, and building a model; inputting the training set into the constructed model, training the model, and obtaining a trained model; using the trained model, performing prohibited item detection on X-ray images containing prohibited items collected during the security inspection process; It can be seen that the above scheme has the following problems: It is impossible to perform targeted processing on the image according to the different states of the X-ray image of the target detection object, which increases the difficulty of image recognition, and thus leads to erroneous human-bag alarms in the security inspection human-bag matching process. Summary of the invention
[0004] To this end, the present invention provides a method for security inspection person-bag matching to overcome the problem in the prior art that it is impossible to perform targeted processing on the image according to the different states of the X-ray image of the target detection object, which increases the difficulty of image recognition and further leads to the problem that erroneous person-bag alarms are prone to occur during the security inspection person-bag matching process.
[0005] To achieve the above object, the present invention provides a method for matching a person with a bag during security inspection, comprising:
[0006] Detect the periodic similarity of the face image, determine the number and range of acquisitions based on the periodic similarity, and set an identification code for the detection body of the corresponding identification person;
[0007] Acquire multiple detection images for the target detection object, and determine the image imaging state according to the image grayscale dispersion reference value and the image interference reference value of the target detection object;
[0008] Determining a detection adjustment mode according to the image imaging state of the target detection object, the detection adjustment mode includes adjusting the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process;
[0009] When the target detection object is in three preset image imaging states, the image feature conditions are determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image, and the image processing method is determined according to the image feature conditions of the target security inspection image. The image processing method includes analyzing the optimal global threshold of the target security inspection image, or performing key point analysis on each low-contrast area in the target security inspection image.
[0010] and determining a region setting method according to a grayscale difference reference value of each low-contrast region in the target security inspection image, the region setting method including determining a collection region of each center point according to a preset radius, or setting a collection region radius according to a grayscale difference value of each center point;
[0011] Under the preset alarm conditions, the corresponding face collection image is determined according to the identification code of the target detection object, and the person carried by the target detection object is determined according to the face collection image.
[0012] Furthermore, a plurality of detection images are acquired for the target detection object, and the image imaging state is determined according to the image grayscale dispersion reference value and the image interference reference value of the target detection object. The image imaging state includes:
[0013] A type of preset image imaging state in which the image grayscale dispersion reference value is less than a preset grayscale dispersion reference value;
[0014] Two types of preset image imaging states in which the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is greater than the preset interference reference value;
[0015] There are three types of preset image imaging states: the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is less than or equal to the preset interference reference value.
[0016] Further, the detection adjustment mode is determined according to the image imaging state of the target detection object, and the detection adjustment mode includes increasing the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process;
[0017] When the target detection object is in a preset image imaging state, the detection tube voltage is increased and adjusted during the image acquisition process;
[0018] The increase value of the detection tube voltage is negatively correlated with the image grayscale dispersion reference value of the target detection object.
[0019] Furthermore, the target detection object is in the second type of preset image imaging state, and the filtering processing parameters in the image acquisition process are adjusted;
[0020] Detect the interference signal frequency, adjust the filter cutoff frequency according to the interference signal frequency, and set the number of filter combinations according to the type of interference signal frequency;
[0021] The filtering processing parameters include the number of filter combinations and the filter cutoff frequency.
[0022] Furthermore, when the target detection object is in three types of preset image imaging states, the image feature conditions of the target security inspection image are detected, and the image processing method is determined according to the image feature conditions of the target security inspection image. The image processing method includes analyzing the optimal global threshold of the target security inspection image, or performing key point analysis on each low contrast area in the target security inspection image.
[0023] Furthermore, the image feature condition is determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image, and the image feature condition of the target security inspection image includes:
[0024] A first preset image feature condition that the complex reference value is less than or equal to a preset complex reference value and the grayscale similarity coefficient is greater than a preset grayscale similarity coefficient;
[0025] A second preset image feature condition that the complex reference value is greater than a preset complex reference value and the grayscale similarity coefficient is less than or equal to a preset grayscale similarity coefficient.
[0026] Further, when the target security inspection image is under the first preset image feature condition, an optimal global threshold of the target security inspection image is analyzed, and the target security inspection image is processed according to the optimal global threshold;
[0027] The optimal global threshold is determined according to the inter-class variance of each gray level.
[0028] Further, when the target security inspection image is under the second preset image feature condition, key point analysis is performed on each low contrast area in the target security inspection image, and a region setting method is determined according to a grayscale difference reference value of each low contrast area in the target security inspection image, the region setting method includes determining a collection area of each center point according to a preset radius, or setting a collection area radius according to a grayscale difference value of each center point;
[0029] The grayscale difference reference value is the average value of the grayscale difference values of each center point in each low contrast area;
[0030] The center point is determined according to the gray level of the pixel points in each low contrast area of the target security inspection image, and among the pixel points with the maximum gray level in each low contrast area, a preset number of center points are randomly selected as the center points of the corresponding low contrast area.
[0031] Further, if the grayscale difference reference value is less than the preset grayscale difference reference value, the collection area of each center point is determined according to the preset area radius; if the grayscale difference reference value is greater than or equal to the preset grayscale difference reference value, the collection area radius is set according to the grayscale difference value of each center point;
[0032] The radius of the set area is negatively correlated with the grayscale difference value of each center point.
[0033] Furthermore, when performing face image recognition, the periodic similarity of the face image is detected, and the number of acquisitions and the acquisition range are determined according to the periodic similarity;
[0034] The collection quantity and the cycle similarity are positively correlated;
[0035] The acquisition range is positively correlated with the cycle similarity.
[0036] Compared with the prior art, the beneficial effect of the present invention lies in that the present invention determines the image feature conditions according to the complex reference value and grayscale similarity coefficient of the target security inspection image and determines the corresponding image processing method according to the image feature conditions of the X-ray image of the target detection object, so that the determined image processing method is more in line with the complexity of the detection image and the grayscale similarity, avoiding the poor image segmentation effect caused by the use of a single image processing method, and further resulting in the difficulty in identifying targets in low-contrast areas. The present invention improves the accuracy of X-ray image detection results and security inspection efficiency.
[0037] Furthermore, the present invention determines the image imaging state according to the image grayscale dispersion reference value and the image interference reference value of the target detection object, and determines the detection adjustment method according to the image imaging state of the target detection object, thereby ensuring the effectiveness of the detection adjustment method, thereby improving the quality of the image obtained by the detection, and further improving the accuracy of the target security inspection image detection results and the image processing efficiency in the present invention.
[0038] Furthermore, when the target detection object is in a type I image imaging state, the present invention increases and adjusts the detection tube voltage during the image acquisition process, thereby avoiding uneven grayscale distribution of the detection image due to different thicknesses or volumes of the target detection object, thereby improving the contrast of the detection image. When the target detection object is in a type II image imaging state, the filtering processing parameters during the image acquisition process are adjusted to ensure the effectiveness of the interference signal filtering process, and a suitable detection adjustment method is selected according to the actual image conditions to ensure the quality of the acquired image, thereby improving the efficiency and accuracy of subsequent image processing.
[0039] Furthermore, the present invention determines the collection quantity and collection range according to the periodic similarity of the currently recognized facial image. If the periodic similarity is greater than the preset periodic similarity, more image information is obtained for the corresponding person to avoid the problem of incorrect person-package matching. The present invention improves the accuracy of the person-package matching results during the security inspection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a method for matching a person with a bag for security inspection according to the present invention;
[0041] Figure 2 It is a flow chart of determining the detection adjustment method according to the image imaging state of the detection image of the target detection object in the present invention;
[0042] Figure 3 This is a flow chart of the present invention for determining an image processing method according to image feature conditions of a target security inspection image;
[0043] Figure 4 The present invention is a flow chart of determining a region setting method according to a grayscale difference reference value of a target security inspection image. DETAILED DESCRIPTION
[0044] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0045] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0046] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0047] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0048] See also Figures 1 to 4 As shown, the present invention provides a method for matching a person and a bag during security inspection, comprising:
[0049] Detect the periodic similarity of the face image, determine the number and range of acquisitions based on the periodic similarity, and set an identification code for the detection body of the corresponding identification person;
[0050] Acquire multiple detection images for the target detection object, and determine the image imaging state according to the image grayscale dispersion reference value and the image interference reference value of the target detection object;
[0051] Determining a detection adjustment mode according to the image imaging state of the target detection object, the detection adjustment mode includes adjusting the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process;
[0052] When the target detection object is in three preset image imaging states, the image feature conditions are determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image, and the image processing method is determined according to the image feature conditions of the target security inspection image. The image processing method includes analyzing the optimal global threshold of the target security inspection image, or performing key point analysis on each low-contrast area in the target security inspection image.
[0053] and determining a region setting method according to a grayscale difference reference value of each low-contrast region in the target security inspection image, the region setting method including determining a collection region of each center point according to a preset radius, or setting a collection region radius according to a grayscale difference value of each center point;
[0054] Under the preset alarm conditions, the corresponding face collection image is determined according to the identification code of the target detection object, and the person carried by the target detection object is determined according to the face collection image.
[0055] Among them, the specific model and installation position of the X-ray emitter used for detecting the target detection object and the camera used for collecting the face image in the present invention can be adaptively selected by the user according to the actual detection situation. The detection object is the object that needs to be subjected to X-ray security inspection, the target detection object is the detection object that is currently undergoing X-ray inspection, the identification personnel are the personnel who need to undergo security inspection and complete face image collection, the preset alarm condition is that the target security inspection image has completed image processing and it is determined that the target security inspection image contains contraband or dangerous goods, and an alarm prompts the user, and the image processing method used is determined by the image feature conditions of the corresponding target security inspection image. In the invention, while collecting facial images, an identification code is set for the detection body for identifying the person, and the identification code contains the identity information of the identified person. The identification code is set on the detection body through RFID technology. While performing X-ray detection, the information in the RFID chip is identified and the corresponding personnel information is queried. This is content that is easy for technical personnel in the field to understand and will not be elaborated here. In the present invention, the grayscale value of the pixel points in each detection image is detected, and a grayscale histogram is generated. A grayscale value interval in the horizontal axis of the grayscale histogram is a grayscale level. How to perform grayscale value detection on the pixel points of the detection image and how to obtain the grayscale histogram are content that is easy for technical personnel in the field to understand and will not be elaborated here.
[0056] Specifically, a plurality of detection images are acquired for the target detection object, and the image imaging state is determined according to the image grayscale dispersion reference value and the image interference reference value of the target detection object. The image imaging state includes:
[0057] A type of preset image imaging state in which the image grayscale dispersion reference value is less than a preset grayscale dispersion reference value;
[0058] Two types of preset image imaging states in which the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is greater than the preset interference reference value;
[0059] There are three types of preset image imaging states: the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is less than or equal to the preset interference reference value.
[0060] The grayscale dispersion reference value of the image is the average value of the grayscale dispersion values of each detection image. , n is the number of gray levels of the corresponding detection image, is the number of pixels contained in the i-th gray level, is the average value of the number of pixels contained in each gray level, the image interference reference value is the average value of the number of abnormal pixels in each detection image of the target detection object, the abnormal pixel is the pixel in the abnormal area, the abnormal area is the area where noise and stripes exist, and the switching threshold method is used in the present invention to determine the abnormal area where noise exists, and the area where stripes exist is determined by analyzing the periodic changes of different areas of the image in the frequency domain. This is easy to understand for those skilled in the art and will not be elaborated here;
[0061] The user can set the preset grayscale dispersion reference value and the preset interference reference value according to actual needs and historical records. The higher the user's requirements for the clarity of the detected image, the smaller the value of the preset grayscale dispersion reference value, and the smaller the value of the preset interference reference value. A method for obtaining the preset grayscale dispersion reference value is provided, and the average value of the grayscale dispersion value of the target security inspection image in the historical records is recorded as the preset grayscale dispersion reference value. A method for obtaining the preset interference reference value is provided, and the minimum value of the number of abnormal pixels in the target security inspection image in the historical records is recorded as the preset interference reference value. A value for the preset interference reference value is provided, and the value of the preset interference reference value is 5% of the total number of pixels in the detected image.
[0062] Specifically, the detection adjustment mode is determined according to the image imaging state of the target detection object, and the detection adjustment mode includes increasing the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process;
[0063] When the target detection object is in a type of image imaging state, the voltage of the detection tube in the image acquisition process is increased and adjusted;
[0064] The increase value of the detection tube voltage is negatively correlated with the image grayscale dispersion reference value of the target detection object.
[0065] Among them, the detection tube voltage is the peak value of the working voltage between the positive and negative electrodes of the X-ray tube during the image acquisition process. The detection tube voltage is increased and adjusted to avoid uneven grayscale distribution of the detection image due to different thicknesses or volumes of the target detection object, and to improve the contrast of the detection image to facilitate subsequent image processing.
[0066] Specifically, the target detection object is in the second-class image imaging state, and the filtering processing parameters in the image acquisition process are adjusted;
[0067] Detect the interference signal frequency, adjust the filter cutoff frequency according to the interference signal frequency, and set the number of filter combinations according to the type of interference signal frequency;
[0068] The filtering processing parameters include the number of filter combinations and the filter cutoff frequency.
[0069] Among them, the filtering processing in the present invention adopts a band-stop filter and uses a multi-stage filtering method to avoid the influence of complex interference signals. The cutoff frequency of each single filter in the multi-stage filtering method is set according to the corresponding interference signal frequency to be processed. This is easy for technical personnel in this field to understand and will not be elaborated here.
[0070] Specifically, when the target detection object is in three types of image imaging states, the image feature conditions of the target security inspection image are detected, and the image processing method is determined according to the image feature conditions of the target security inspection image. The image processing method includes determining the optimal global threshold of the target security inspection image according to the inter-class variance of each gray level, or determining the key points of the target security inspection image.
[0071] The target security inspection image is determined according to the imaging effect coefficients of the detection images of the target detection object. The target security inspection image is the detection image corresponding to the maximum imaging effect coefficient. , V is the grayscale dispersion value of each detection image of the target detection object, is the weight coefficient corresponding to the grayscale dispersion value, E is the number of abnormal pixels in each detection image of the target detection object, is the weight coefficient corresponding to the number of abnormal pixels. The user can set the weight coefficient corresponding to the grayscale dispersion value and the number of abnormal pixels according to actual needs. A value of the weight coefficient corresponding to the grayscale dispersion value and the number of abnormal pixels is provided. The value of the weight coefficient corresponding to the grayscale dispersion value is 50%, and the value of the weight coefficient corresponding to the number of abnormal pixels is 50%.
[0072] Specifically, the image feature conditions are determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image. The image feature conditions of the target security inspection image include:
[0073] A first preset image feature condition that the complex reference value is less than or equal to a preset complex reference value and the grayscale similarity coefficient is greater than a preset grayscale similarity coefficient;
[0074] A second preset image feature condition that the complex reference value is greater than a preset complex reference value or the grayscale similarity coefficient is less than or equal to a preset grayscale similarity coefficient.
[0075] The complex reference value is the number of gray levels of the target security inspection image, and the gray similarity coefficient is determined according to the proportion of similar sub-regions in the target security inspection image. Two sub-image regions whose regional grayscale difference value is less than a preset regional grayscale difference value are recorded as similar sub-regions, and the region occupied by interconnected similar sub-regions is recorded as a low-contrast region. Any two low-contrast regions are not interconnected, and the gray similarity coefficient is positively correlated with the proportion of similar sub-regions in the target security inspection image.
[0076] The target security inspection image is evenly divided into several sub-image areas of equal area and rectangular shape. The regional grayscale difference value is the absolute value of the difference between the grayscale average values of two adjacent sub-image areas. Grayscale average value = the sum of the grayscale values corresponding to each pixel in the sub-image area / the number of pixels in the sub-image area. The value of the preset regional grayscale difference value can be set by the user according to actual needs and historical records. The higher the user's requirements for image processing effects, the smaller the preset regional grayscale difference value. A preset regional grayscale difference value is provided. The preset regional grayscale difference value is 1% of the difference between the maximum grayscale value and the minimum grayscale value in the target detection image.
[0077] The user can set the preset complex reference value and the preset grayscale similarity coefficient according to actual needs and historical records. The higher the user's requirements for the image processing effect, the smaller the value of the preset complex reference value and the smaller the value of the preset grayscale similarity coefficient. A method for taking the preset complex reference value is provided, and the maximum value of each complex reference value in the historical record that performs image segmentation according to the optimal global threshold and meets the user's requirements for the image processing effect is recorded as the preset complex reference value. A method for taking the preset grayscale similarity coefficient is provided, and the average value of each grayscale similarity coefficient in the historical record that performs image segmentation according to the optimal global threshold and meets the user's requirements for the image processing effect is recorded as the preset grayscale similarity coefficient.
[0078] Specifically, when the target security inspection image is under the first preset image feature condition, an optimal global threshold of the target security inspection image is analyzed, and the target security inspection image is processed according to the optimal global threshold;
[0079] The optimal global threshold is determined according to the inter-class variance of each gray level.
[0080] Wherein, the analysis method of the optimal global threshold includes:
[0081] The median of each gray level of the target security inspection image is set as the threshold, and the target security inspection image is divided into one type of area and two types of areas according to each threshold of the target security inspection image, and the inter-class variance of the one type of area and the two types of areas under each threshold is calculated, and the threshold corresponding to the maximum value of the inter-class variance is recorded as the optimal global threshold. The one type of area is the area in the target security inspection image where the gray value is less than the corresponding threshold, and the two types of area are the areas in the target security inspection image where the gray value is greater than the corresponding threshold. The inter-class variance L , A1 is the average grayscale value of a type of area, is the area ratio of the first type of area, A2 is the grayscale average value of the second type of area, is the area ratio of the second-category area, the grayscale average value = the sum of the grayscale values corresponding to each pixel in the area / the number of pixels in the area, the area ratio of the first-category area = the area of the first-category area / the area of the target security inspection image, and the area ratio of the second-category area = the area of the second-category area / the area of the target security inspection image;
[0082] The target security inspection image is segmented according to the optimal global threshold, and the area with a gray value greater than the optimal global threshold is recorded as the target area, and the area with a gray value less than or equal to the optimal global threshold is recorded as the background area.
[0083] Specifically, when the target security inspection image is under the second preset image feature condition, key point analysis is performed on each low-contrast area in the target security inspection image, and a region setting method is determined according to a grayscale difference reference value of each low-contrast area in the target security inspection image. The region setting method includes determining a collection area of each center point according to a preset radius, or setting a collection area radius according to a grayscale difference value of each center point;
[0084] The grayscale difference reference value is the average value of the grayscale difference values of each center point in each low contrast area;
[0085] The center point is determined according to the gray level of the pixel points in each low contrast area of the target security inspection image, and among the pixel points with the maximum gray level in each low contrast area, a preset number of center points are randomly selected as the center points of the corresponding low contrast area.
[0086] The key point analysis includes:
[0087] For a single low-contrast area, randomly select a preset number of sample points;
[0088] The offset mean of the corresponding center point is calculated based on the grayscale difference between each center point and the sample points in the corresponding collection area. , z is the number of sample points in the set area corresponding to the center point, gt is the grayscale difference between the tth sample point and the corresponding center point, and the grayscale difference is the absolute value of the grayscale difference between the two pixels. is the offset vector of the tth sample point relative to the corresponding center point;
[0089] Update the position of each center point according to the offset mean and offset coefficient, and recalculate the offset mean of each center point;
[0090] Repeatedly update the center point position and recalculate the offset mean of each center point;
[0091] When the offset vector modulus values of each center point and all sample points in the corresponding set area relative to the corresponding center point are all less than the preset offset vector modulus value, the center point position is determined;
[0092] After the positions of each center point are determined, the center point with the largest gray value in each low-contrast area is recorded as the key point;
[0093] The maximum grayscale is the grayscale where the minimum grayscale value is greater than the grayscale value of other grayscales. The values of the preset number of center points and the preset number of sample points are set by the user according to actual needs and historical records. The higher the accuracy of the key point determination result required by the user, the more the number of preset center points and the more the number of preset sample points. A value of the preset number of center points is provided, and the value of the preset number of center points is 50. A value of the preset number of sample points is provided, and the value of the preset number of sample points is 500.
[0094] The calculation of the offset vector modulus is a content that technicians in this field have already mastered and will not be elaborated here. The values of the offset coefficient and the preset offset vector modulus can be set by the user according to the actual situation and historical records of the target security inspection image. The higher the user's requirements for the accuracy of the key point determination results, the smaller the value of the offset coefficient and the smaller the preset offset vector modulus. A method for determining the value of the offset coefficient is provided, and the average value of the offset coefficient in the historical records that meet the user's requirements for the accuracy of the key point determination results and have the same specifications of the target security inspection image is recorded as the offset coefficient. A preset offset vector modulus is provided, and the average value of the offset vector modulus of all sample points in each set area relative to the corresponding center point in the historical records that meet the user's requirements for the accuracy of the key point determination results and have the same specifications of the target security inspection image is recorded as the preset offset vector modulus.
[0095] Specifically, if the grayscale difference reference value is less than the preset grayscale difference reference value, the collection area of each center point is determined according to the preset area radius; if the grayscale difference reference value is greater than or equal to the preset grayscale difference reference value, the collection area radius is set according to the grayscale difference value of each center point;
[0096] The radius of the set area is negatively correlated with the grayscale difference value of each center point.
[0097] The grayscale difference reference value is the average grayscale difference value of the center point in each low contrast area. , m is the number of pixels in the preset area of the center point, is the gray value of the u-th pixel, It is the average value of the grayscale values of each pixel point in the preset area. The user can set the preset grayscale difference reference value according to actual needs and historical records. The higher the user's requirements for the accuracy of the key point determination result, the smaller the preset grayscale difference reference value. A method for obtaining the preset grayscale difference reference value is provided, and the average value of the grayscale difference values of each central point in the historical records of the user's requirements for the accuracy of the key point determination result is recorded as the preset grayscale difference reference value;
[0098] The preset area is a circular area with a radius length equal to the preset area radius. The value of the preset area radius can be set by the user according to the historical records. The average value of the collective area radius of each center point in the historical records is recorded as the preset area radius.
[0099] Determine the threshold value based on the gray value characteristics of the pixel points in the low-contrast area, take the key point as the starting point, perform region growth based on the corresponding threshold value, and complete the image region division;
[0100] For the target security inspection image that has completed the area division using the corresponding method, unique and stable pixel points are extracted from the target security inspection image and recorded as feature points, and image feature extraction is performed. The image features include but are not limited to color, shape, and texture. Descriptors are generated by calculating information such as the gradient direction and brightness contrast of the feature points. The generated feature descriptors are compared with the feature descriptors in the prohibited goods feature library to determine whether there are prohibited goods or dangerous goods in the target security inspection image. The prohibited goods feature library is set by the user according to the dangerous goods and prohibited goods specified in the actual usage scenario.
[0101] Specifically, when performing face image recognition, the periodic similarity of the face image is detected, and the number and range of acquisition are determined based on the periodic similarity;
[0102] The collection quantity and the cycle similarity are positively correlated;
[0103] The acquisition range is positively correlated with the cycle similarity.
[0104] Among them, the periodic similarity is the similarity between the currently recognized face image and the reference image, the reference image is the face image within the detection period before the current face image recognition moment, the collection quantity is the number of images collected for the currently recognized person, and the collection range is the body shooting range of the camera for the recognized person when collecting the face image of the currently recognized person.
[0105] The method for confirming the similarity between the face image and the reference image includes:
[0106] S1, extract the feature vector corresponding to the face image and the reference image through the deep learning model.
[0107] S2, converts the extracted features into numerical vectors;
[0108] S3, normalize each feature vector to make its length 1;
[0109] S4, calculating cosine similarity, where the cosine similarity is obtained by calculating the dot product of two normalized vectors and then dividing by the product of the moduli of the two vectors;
[0110] S5, similarity score, the value range of the cosine similarity is [-1, 1]. It can be understood that a similarity close to 1 indicates that the directions of the two vectors are very similar, that is, the images are similar, and a similarity close to -1 indicates that the directions of the two vectors are opposite, that is, the images are not similar;
[0111] The above-mentioned method of obtaining the similarity between two images is already known to those skilled in the art and will not be elaborated here.
[0112] The duration of the detection cycle can be set by the user according to actual needs and historical records. The higher the user's requirements for the accuracy of face recognition, the longer the detection cycle duration. A method for determining the value of the detection cycle duration is provided, and the average value of the detection cycle durations in the historical records that meet the user's requirements for the accuracy of face recognition is set as the detection cycle duration.
[0113] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for matching people and bags during security inspection, characterized in that: include: Detect the periodic similarity of the face image, determine the number and range of acquisitions based on the periodic similarity, and set an identification code for the detection body of the corresponding identification person; Acquire multiple detection images for the target detection object, and determine the image imaging state according to the image grayscale dispersion reference value and the image interference reference value of the target detection object; Determining a detection adjustment mode according to the image imaging state of the target detection object, the detection adjustment mode includes adjusting the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process; When the target detection object is in three preset image imaging states, the image feature conditions are determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image, and the image processing method is determined according to the image feature conditions of the target security inspection image. The image processing method includes analyzing the optimal global threshold of the target security inspection image, or performing key point analysis on each low-contrast area in the target security inspection image. and determining a region setting method according to a grayscale difference reference value of each low-contrast region in the target security inspection image, the region setting method including determining a collection region of each center point according to a preset radius, or setting a collection region radius according to a grayscale difference value of each center point; Under the preset alarm conditions, the corresponding face collection image is determined according to the identification code of the target detection object, and the person carried by the target detection object is determined according to the face collection image.
2. The method for matching security personnel and bags according to claim 1, characterized in that: Acquire multiple detection images for the target detection object, and determine the image imaging state according to the image grayscale dispersion reference value and the image interference reference value of the target detection object. The image imaging state includes: A type of preset image imaging state in which the image grayscale dispersion reference value is less than a preset grayscale dispersion reference value; Two types of preset image imaging states in which the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is greater than the preset interference reference value; There are three types of preset image imaging states: the image grayscale dispersion reference value is greater than or equal to the preset grayscale dispersion reference value and the image interference reference value is less than or equal to the preset interference reference value.
3. The method for matching security personnel and bags according to claim 2, characterized in that: Determining a detection adjustment mode according to the image imaging state of the target detection object, the detection adjustment mode includes increasing the detection tube voltage during the image acquisition process, or adjusting the filter processing parameters during the image acquisition process; When the target detection object is in a preset image imaging state, the voltage of the detection tube is increased and adjusted during the image acquisition process; The increase value of the detection tube voltage is negatively correlated with the image grayscale dispersion reference value of the target detection object.
4. The method for matching security personnel and bags according to claim 3, characterized in that: The target detection object is in the second type of preset image imaging state, and the filtering processing parameters in the image acquisition process are adjusted; Detect the interference signal frequency, adjust the filter cutoff frequency according to the interference signal frequency, and set the number of filter combinations according to the type of interference signal frequency; The filtering processing parameters include the number of filter combinations and the filter cutoff frequency.
5. The method for matching security personnel and bags according to claim 1, characterized in that: The image feature conditions are determined according to the complex reference value and grayscale similarity coefficient of the target security inspection image. The image feature conditions of the target security inspection image include: A first preset image feature condition that the complex reference value is less than or equal to a preset complex reference value and the grayscale similarity coefficient is greater than a preset grayscale similarity coefficient; A second preset image feature condition that the complex reference value is greater than a preset complex reference value and the grayscale similarity coefficient is less than or equal to a preset grayscale similarity coefficient.
6. The method for matching people and bags during security inspection according to claim 5, characterized in that: When the target security inspection image is under the first preset image feature condition, an optimal global threshold of the target security inspection image is analyzed, and the target security inspection image is processed according to the optimal global threshold; The optimal global threshold is determined according to the inter-class variance of each gray level.
7. The method for matching security personnel and bags according to claim 6, characterized in that: When the target security inspection image is under the second preset image feature condition, key point analysis is performed on each low contrast area in the target security inspection image, and a region setting method is determined according to a grayscale difference reference value of each low contrast area in the target security inspection image, the region setting method includes determining a collection area of each center point according to a preset radius, or setting a collection area radius according to a grayscale difference value of each center point; The grayscale difference reference value is the average value of the grayscale difference values of each center point in each low contrast area; The center point is determined according to the gray level of the pixel points in each low contrast area of the target security inspection image, and among the pixel points with the maximum gray level in each low contrast area, a preset number of center points are randomly selected as the center points of the corresponding low contrast area.
8. The method for matching security personnel and bags according to claim 7, characterized in that: If the grayscale difference reference value is less than the preset grayscale difference reference value, the collection area of each center point is determined according to the preset area radius; if the grayscale difference reference value is greater than or equal to the preset grayscale difference reference value, the collection area radius is set according to the grayscale difference value of each center point; The radius of the set area is negatively correlated with the grayscale difference value of each center point.
9. The method for matching security personnel and bags according to claim 1, characterized in that: When performing face image recognition, the periodic similarity of the face image is detected, and the number and range of acquisition are determined based on the periodic similarity; The collection quantity and the cycle similarity are positively correlated; The acquisition range is positively correlated with the cycle similarity.
