Image information acquisition method based on community access control terminal equipment
By pre-acquisitioning and recognition time measurement of face images of different resolutions, the optimal recognition resolution is determined, and downsampling or focal adjustment is performed based on the real-time image resolution, the balance between image clarity, transmission time and recognition accuracy in the image recognition system is solved, and the overall efficiency and user satisfaction of the system are improved.
Patent Information
- Application Number
- CN202510249693.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-04
AI Technical Summary
In an image recognition system, how to find the most appropriate balance point between image clarity, transmission time and recognition accuracy to improve the overall efficiency of the system.
By pre-acquisitioning and recognition time measurements on face images of different resolutions, the relationship between recognition time and resolution and the relationship between transmission time and resolution are fitted using the least squares method, and the objective function is constructed to determine the optimal recognition resolution. Based on the comparison of the image resolution acquired in real time and the optimal recognition resolution, downsampling or adjusting the focal length and reacquisition to achieve the best recognition efficiency.
On the premise of ensuring recognition accuracy, the waiting time for users to wait for the access control to open the door is reduced, and the passage efficiency and user satisfaction are improved.
Smart Images

Figure CN120071489A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image acquisition, and particularly relates to an image information acquisition method based on a community access control terminal device. Background Art
[0002] With the continuous development of computer vision technology, image recognition systems are widely used in various fields, such as community access control security. For these systems, the clarity of images directly affects the balance between recognition accuracy and system performance. However, in practical applications, there is a certain trade-off relationship between image clarity and processing efficiency.
[0003] In traditional image processing and recognition systems, it is generally considered that the clearer the image, the higher the recognition accuracy. However, improving image clarity usually comes with a larger data transmission volume and higher computing resource requirements. Especially in scenarios of wireless transmission or real-time processing, high-resolution images may lead to longer transmission times, thereby affecting the system response speed and efficiency. In the process of image recognition, the processing power and algorithm optimization of the system also have a greater impact on the recognition time. Improving image clarity does not necessarily significantly shorten the recognition time, and may even lead to reduced efficiency due to processing power bottlenecks.
[0004] Therefore, in some cases, moderate image clarity may find a better balance between recognition accuracy and computing resources, thereby improving the overall system efficiency. By controlling image clarity and processing methods, it is possible to reduce data transmission time and computing resource consumption while maintaining sufficient recognition accuracy. Therefore, how to find the most suitable balance point among image clarity, transmission time, and recognition accuracy has become a key issue in the design of image recognition systems. Summary of the Invention
[0005] The purpose of the present invention is to provide an image information acquisition method based on a community access control terminal device to solve the following technical problems:
[0006] Therefore, in some cases, moderate image clarity may find a better balance between recognition accuracy and computing resources, thereby improving the overall system efficiency. By controlling image clarity and processing methods, it is possible to reduce data transmission time and computing resource consumption while maintaining sufficient recognition accuracy. Therefore, how to find the most suitable balance point among image clarity, transmission time, and recognition accuracy has become a key issue in the design of image recognition systems.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] An image information acquisition method based on a community access control terminal device, characterized by comprising the following steps:
[0009] S1. Pre - collect the same face image at different resolutions, and label each pre - collected image as F1, F2, ..., Fn respectively; perform face recognition on each pre - collected image in turn and record the recognition time each time; take the resolution as the abscissa and the recognition time as the ordinate, generate corresponding data points in the coordinate system, and fit the data points by the least - squares method. The fitting formula is T(F).
[0010] Obtain the transmission time of any pre - collected image from the camera acquisition device to the cloud platform. Take the resolution as the abscissa and the transmission time as the ordinate, generate corresponding data points in the coordinate system, and fit the data points by the least - squares method. The fitting formula is H(F).
[0011] S2. Construct the objective function Total(F)=T(F)+H(F) to determine the best recognition resolution BestF. Real - time obtain the face image to be recognized and perform pre - processing, and obtain the resolution ReaF of the pre - processed face image to be recognized.
[0012] S3. If ReaF is greater than BestF, sample the pre - processed face image to be recognized and send the sampled face image to the cloud platform for face recognition; if ReaF is less than BestF, adjust the focal length of the camera acquisition device and re - collect the face image to be recognized, and send the re - collected face image to the cloud platform for face recognition.
[0013] As a further scheme of the present invention: In S2, the specific calculation process of the best recognition resolution is as follows:
[0014] Generate a corresponding target curve according to the objective function Total(F)=T(F)+H(F), and find the minimum value of this target curve. Obtain the resolution corresponding to the minimum value and calibrate this resolution as the best recognition resolution BestF.
[0015] As a further scheme of the present invention: If there are two or more minimum values in the target curve, obtain the resolution corresponding to any minimum value and select the maximum resolution MaxF from them as the best recognition resolution BestF.
[0016] As a further scheme of the present invention: In S2, the specific process of pre - processing is as follows:
[0017] Input the face image to be recognized into a preset OpenCV recognition model, extract the face area in the face image to be recognized, take the horizontal direction length as the length and the vertical direction length as the width, obtain the minimum circumscribed rectangle of the face area, and crop the face image to be recognized according to the minimum circumscribed rectangle to obtain the cropped face image.
[0018] As a further solution of the present invention: in the step S3, the specific process of resampling is as follows:
[0019] Calculate according to the calculation formula Calculate the adjustment coefficient K. Establish a rectangular coordinate system with the pixel point at the center of the preprocessed face image to be recognized as the origin, and generate the coordinates (x, y) of all pixel points in the face image to be recognized. For any pixel point (xi, yi), calculate the corresponding position (xi', yi') of this pixel point in the resampled image according to the calculation formula xi' = xi * K; yi = yi * K. Obtain the four pixel points (x1, y1), (x1, y2), (x2, y1), and (x2, y2) that are closest to the pixel point (xi', yi'), where x1 is the largest integer less than or equal to x', x2 is the smallest integer greater than x', y1 is the largest integer less than or equal to y', and y2 is the smallest integer greater than y'; respectively calculate the horizontal distance weights and vertical distance weights between (x', y') and these four pixel points, and calculate the pixel value f(x, y) of this pixel (xi, yi) after sampling according to the horizontal distance weights and vertical distance weights;
[0020] The specific calculation process is as follows:
[0021] w1 = x2 - x', w2 = x' - x1;
[0022] h1 = y2 - y', h2 = y' - y1;
[0023] f(x', y') = w1 × h1 × f(x1, y1) + w1 × h2 × f(x1, y2) + w2 × h1 × f(x2, y1)
[0024] + w2 × h2 × f(x2, y2);
[0025] Among them, both w1 and w2 are horizontal distance weights, both h1 and h2 are vertical distance weights, and f(x, y) represents the pixel value of the pixel point (x, y).
[0026] As a further solution of the present invention: in the step S3, the specific process of focal length correction is as follows:
[0027] According to the calculation formula Calculate the adjustment coefficient A, mark the focal length when the camera acquisition device takes pictures as f, calculate the value of A * f and round it up to get the corrected focal length f'.
[0028] As a further solution of the present invention: the step S3 further includes:
[0029] When the adjustment coefficient K is less than or equal to the preset threshold, sampling is not performed, and the preprocessed face image to be recognized is directly sent to the cloud platform for face recognition.
[0030] As a further solution of the present invention: in S1, it further includes that during the pre-acquisition process, the focal length and lens settings of the camera acquisition device remain unchanged, and the shooting angle of the face image remains unchanged during the acquisition process.
[0031] Advantages of the present invention:
[0032] The present invention first obtains face images with different resolutions and records the recognition time, then uses the least squares method to fit the relationship T(F) between the recognition time and the resolution. At the same time, the transmission time is also measured, and the relationship H(F) between the transmission time and the resolution is also fitted by the least squares method. According to the relationship between the recognition time and the transmission time and the resolution, an objective function is constructed. It can be understood that the higher the image resolution, the larger the image data volume, and the longer the transmission time in the actual application scenario. At the same time, during the face recognition process, high-definition images contain more details and pixel information. Although it can improve the recognition accuracy, it also means that more time is required for calculation and processing. When processing high-definition images, the algorithm needs more computing resources to extract and analyze the features in the image, resulting in an increase in the recognition time. Too low a resolution will cause the image to be blurred and require more time to compensate for the accuracy through other technical means. Therefore, the optimal recognition resolution BestF can be determined according to the objective function. At the same time, considering that the shooting distance of the face image captured by the camera acquisition device is dynamically changing in the actual scenario, the resolution of the face image is also constantly changing. Therefore, in the present invention, the real-time acquired image resolution ReaF is compared with BestF. If ReaF is greater than BestF, downsampling is performed. When the actual resolution is too high, both the recognition time and the transmission time will increase. Therefore, through downsampling, the waiting time for the user to wait for the access control to open the door is greatly reduced on the premise of ensuring the recognition accuracy, the passing efficiency is improved, and the user satisfaction is increased; if it is less than, the focal length is adjusted to re-acquire. It can be understood that if the resolution is too low, on the one hand, the recognition accuracy may decrease, and on the other hand, other technical means are required to compensate for the accuracy, which greatly increases the recognition time. Therefore, it is necessary to adjust the focal length to obtain a higher-resolution image and reduce the waiting time for the access control to open the door on the premise of ensuring the recognition accuracy. The present invention improves the access control passing efficiency and enhances the user satisfaction. Description of the Drawings
[0033] The present invention will be further described below with reference to the accompanying drawings.
[0034] Figure 1 It is a schematic flow chart of an image information acquisition method based on a community access control terminal device of the present invention. Detailed Embodiments
[0035] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0036] Please refer to Figure 1 As shown, the present invention is an image information acquisition method based on a community access control terminal device, including the following steps:
[0037] S1, pre-collect the same face image at different resolutions, and mark each pre-collected image as F1, F2,..., Fn respectively; perform face recognition on each image in turn and record the recognition time each time and mark them as t1, t2,..., tn respectively; use the resolution as the abscissa and the recognition time as the ordinate to generate corresponding data points in the coordinate system, and fit the data points by the least square method, and the fitting formula is T(F);
[0038] Obtain the transmission time of any pre-collected image from the camera acquisition device to the cloud platform, use the resolution as the abscissa and the transmission time as the ordinate to generate corresponding data points in the coordinate system, and fit the data points by the least square method, and the fitting formula is H(F);
[0039] S2, construct the objective function Total(F) = T(F) + H(F), determine the best recognition resolution BestF according to the objective function, use the camera acquisition device to obtain the face image to be recognized in real time, preprocess the face image to be recognized, and obtain the resolution ReaF of the preprocessed face image to be recognized;
[0040] S3, if ReaF is greater than BestF, sample the preprocessed face image to be recognized, and send the sampled face image to be recognized to the cloud platform for face recognition; if ReaF is less than BestF, correct the focal length of the current camera acquisition device and re-collect the face image to be recognized, preprocess the face image to be recognized, and send the preprocessed face image to be recognized to the cloud platform for face recognition.
[0041] The present invention first obtains face images with different resolutions and records the recognition time, and then uses the least squares method to fit the relationship T(F) between the recognition time and the resolution. At the same time, the transmission time is also measured, and the least squares method is also used to fit the relationship H(F) between the transmission time and the resolution. According to the relationships between the recognition time, the transmission time and the resolution, an objective function is constructed. It can be understood that the higher the image resolution, the larger the amount of image data, and the longer the transmission time will be in the actual application scenario. At the same time, in the process of face recognition, high-definition images contain more details and pixel information. Although it can improve the recognition accuracy, it also means that more time is required for calculation and processing. When processing high-definition images, the algorithm requires more computing resources to extract and analyze the features in the images, resulting in an increase in the recognition time. Too low a resolution will cause the image to be blurred and more time is required to compensate for the accuracy through other technical means. Therefore, the optimal recognition resolution BestF can be determined according to the objective function. At the same time, considering that the shooting distance of the face image captured by the camera acquisition device is dynamically changing in the actual scenario, the resolution of the face image is also constantly changing. Therefore, in the present invention, the real-time acquired image resolution ReaF is compared with BestF. If ReaF is greater than BestF, downsampling is performed. When the actual resolution is too high, both the recognition time and the transmission time will increase. Therefore, through downsampling, the waiting time of the user for the access control to open the door is greatly reduced on the premise of ensuring the recognition accuracy, the passing efficiency is improved, and the user satisfaction is increased; if it is less than, the focal length is adjusted to re-acquire. It can be understood that if the resolution is too low, on the one hand, the recognition accuracy may decrease, and on the other hand, other technical means are required to compensate for the accuracy, which greatly increases the recognition time. Therefore, it is necessary to adjust the focal length to obtain an image with a higher resolution, and the waiting time for the access control to open the door is reduced on the premise of ensuring the recognition accuracy. The present invention improves the access control passing efficiency and enhances the user satisfaction.
[0042] In another preferred embodiment of the present invention, in S2, the specific calculation process of the optimal recognition resolution is as follows:
[0043] Generate a corresponding objective curve according to the objective function Total(F)=T(F)+H(F), and find the minimum value of the objective curve, obtain the resolution corresponding to the minimum value and calibrate this resolution as the optimal recognition resolution BestF.
[0044] The objective function Total(F) = T(F) + H(F) comprehensively considers the face recognition time T(F) and the image transmission time H(F). By generating the objective curve, the comprehensive variation of these two time factors at different resolutions can be visually observed, and the resolution corresponding to the minimum value of the objective curve is obtained as the best recognition resolution BestF. It can be understood that at this resolution, the face recognition time and the transmission time reach a relatively optimal balance. For example, at a low resolution, the transmission time is very short, but the face recognition time may be relatively long because the lack of image details may cause the recognition algorithm to take more time to process operations such as feature extraction. At a high resolution, although the face recognition may be more accurate and fast, the transmission time will increase significantly. By determining BestF, while ensuring a certain recognition accuracy, the overall efficiency can be prevented from being affected by an overly long transmission time.
[0045] In another preferred embodiment of the present invention, it is characterized in that if there are two or more minimum values in the objective curve, the resolution corresponding to any one of the minimum values is obtained, and the maximum resolution MaxF is selected from them as the best recognition resolution BestF.
[0046] It can be understood that selecting the maximum resolution MaxF can, while ensuring the recognition accuracy, make full use of the existing computing resources, and avoid sacrificing the recognition quality by overly pursuing a low resolution to reduce the transmission time. It can be understood that the development of modern technology has significantly improved the processing power of computing devices, but resources still need to be reasonably allocated on the premise of ensuring the efficient operation of the system. Selecting the maximum resolution MaxF is not blindly pursuing a high resolution, but an optimal resolution determined after comprehensive evaluation and analysis that can not only meet the recognition accuracy requirements but also be within the range that the existing computing resources can bear. If overly pursuing a low resolution, although the amount of calculation is reduced to a certain extent, the recognition quality is sacrificed, which may lead to the inability to accurately recognize faces and affect the security and reliability of the system. On the contrary, if blindly pursuing an overly high resolution, not only will the computing cost be greatly increased, but also resource waste may occur.
[0047] In another preferred embodiment of the present invention, in S2, the specific process of preprocessing is as follows:
[0048] The to-be-recognized face image is input into a preset OpenCV recognition model, the face region in the to-be-recognized face image is extracted, the minimum circumscribed rectangle frame of the face region is obtained with the horizontal direction length as the length and the vertical direction length as the width, and the to-be-recognized face image is cropped according to the minimum circumscribed rectangle frame to obtain the cropped face image.
[0049] In another preferred embodiment of the present invention, in S3, the specific process of resampling is as follows:
[0050] Calculate according to the calculation formula Calculate the adjustment coefficient K. Establish a rectangular coordinate system with the central pixel point of the preprocessed face image to be recognized as the origin, generate the coordinates (x, y) of all pixel points in the face image to be recognized. For any pixel point (xi, yi), calculate the corresponding position (xi', yi') of this pixel point in the sampled image according to the calculation formula xi' = xi * K; yi = yi * K. Obtain the four pixel points (x1, y1), (x1, y2), (x2, y1) and (x2, y2) closest to the pixel point (xi', yi'), where x1 is the largest integer less than or equal to x', x2 is the smallest integer greater than x', y1 is the largest integer less than or equal to y', and y2 is the smallest integer greater than y'; Calculate the horizontal distance weight and vertical distance weight between (x', y') and these four pixel points respectively, and calculate the pixel value f(x, y) of this pixel (xi, yi) after sampling according to the horizontal distance weight and vertical distance weight;
[0051] The specific calculation process is as follows:
[0052] w1 = x2 - x', w2 = x' - x1;
[0053] h1 = y2 - y', h2 = y' - y1;
[0054] f(x', y') = w1 × h1 × f(x1, y1) + w1 × h2 × f(x1, y2) + w2 × h1 × f(x2, y1)
[0055] + w2 × h2 × f(x2, y2);
[0056] Among them, both w1 and w2 are horizontal distance weights, both h1 and h2 are vertical distance weights, and f(x, y) represents the pixel value of the pixel point (x, y).
[0057] In another preferred embodiment of the present invention, in S3, the specific process of focal length correction is as follows:
[0058] According to the calculation formula Calculate the adjustment coefficient A, mark the focal length when the camera acquisition device takes pictures as f, calculate the value of A * f and round up to obtain the corrected focal length f'.
[0059] In another preferred embodiment of the present invention, S3 further includes:
[0060] When the adjustment coefficient K is less than or equal to the preset threshold, no sampling is performed and the preprocessed face image to be recognized is directly sent to the cloud platform for face recognition.
[0061] In another preferred embodiment of the present invention, in the step S1, it further includes that during the pre-acquisition process, the focal length and lens settings of the camera acquisition device remain unchanged, and during the acquisition process, the shooting angle of the face image remains unchanged.
[0062] The above has described an embodiment of the present invention in detail, but the content described is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the application of the present invention should still fall within the scope covered by the patent of the present invention.
Claims
1. A method for collecting image information based on community access control terminal equipment, characterized in that: The following steps are involved: S1, pre-collecting the same face image with different resolutions and marking each pre-collected image as F1, F2, ..., Fn; performing face recognition on each pre-collected image in turn and recording each recognition time; With resolution as the horizontal coordinate and recognition time as the vertical coordinate, the corresponding data points are generated in the coordinate system, and the data points are fitted by the least squares method. The fitting formula is T(F); Obtain the transmission time of any pre-collected image from the camera acquisition device to the cloud platform, with resolution as the horizontal coordinate and transmission time as the vertical coordinate, generate corresponding data points in the coordinate system, and fit the data points by the least squares method. The fitting formula is H(F); S2, constructing the objective function Total(F)=T(F)+H(F) to determine the best recognition resolution BestF, acquiring the face image to be recognized in real time and preprocessing it, and obtaining the resolution ReaF of the face image to be recognized after preprocessing; S3, if ReaF is greater than BestF, the preprocessed face image to be identified is sampled, and the sampled face image to be identified is sent to the cloud platform for face recognition; if ReaF is less than BestF, the focal length of the camera acquisition device is adjusted and the face image to be identified is re-captured, and the re-captured face image is sent to the cloud platform for face recognition.
2. According to claim 1, a method for collecting image information based on a community access control terminal device is characterized in that: In S2, the specific calculation process of the optimal recognition resolution is: According to the objective function Total(F)=T(F)+H(F), a corresponding target curve is generated, and the minimum value of the target curve is obtained, and the resolution corresponding to the minimum value is obtained and calibrated as the best recognition resolution BestF.
3. The image information collection method based on community access control terminal equipment according to claim 2 is characterized in that: It also includes obtaining the resolution corresponding to any minimum value and selecting the maximum resolution MaxF as the best recognition resolution BestF if there are two or more minimum values in the target curve.
4. According to claim 1, the image information collection method based on community access control terminal equipment is characterized in that: In S2, the specific process of preprocessing is: The face image to be identified is input into a preset OpenCV recognition model, the face area in the face image to be identified is extracted, the horizontal length is taken as the length, and the vertical length is taken as the width, the minimum bounding rectangular frame of the face area is obtained, and the face image to be identified is cropped according to the minimum bounding rectangular frame to obtain a cropped face image.
5. The image information collection method based on community access control terminal equipment according to claim 1 is characterized in that: In S3, the specific process of resampling is: Calculation according to the formula Calculate the adjustment coefficient K, establish a rectangular coordinate system with the image center pixel of the preprocessed face image to be identified as the origin, generate the coordinates (x, y) of all pixel points in the face image to be identified, and for any pixel point (xi, yi), calculate the corresponding position (xi', yi') of the pixel point in the sampled image according to the calculation formula xi'=xi*K; yi=yi*K, and obtain the four pixel points (x1, y1), (x1, y2), (x2, y1) and (x2, y2) closest to the pixel point (xi', yi'), where x1 is the largest integer less than or equal to x', x2 is the smallest integer greater than x', y1 is the largest integer less than or equal to y', and y2 is the smallest integer greater than y'; respectively calculate the horizontal distance weight and the vertical distance weight between (x', y') and the four pixel points, and calculate the pixel value f(x, y) of the pixel (xi, yi) after sampling according to the horizontal distance weight and the vertical distance weight; The specific calculation process is: w1=x2-x', w2=x'-x1; h1=y2-y', h2=y'-y1; f(x',y')=w1×h1×f(x1,y1)+w1×h2×f(x1,y2)+w2×h1×f(x2,y1)+w2×h2×f(x2,y2); Among them, w1 and w2 are horizontal distance weights, h1 and h2 are vertical distance weights, and f(x, y) represents the pixel value of the pixel point (x, y).
6. The image information collection method based on community access control terminal equipment according to claim 1 is characterized in that: In S3, the specific process of focal length correction is: According to the calculation formula The adjustment coefficient A is calculated, the focal length of the camera acquisition device when shooting is marked as f, the value of A*f is calculated and rounded up to obtain the corrected focal length f'.
7. The image information collection method based on community access control terminal equipment according to claim 5 is characterized in that: The S3 also includes: When the adjustment coefficient K is less than or equal to the preset threshold, no sampling is performed and the preprocessed face image to be recognized is directly sent to the cloud platform for face recognition.
8. The image information collection method based on community access control terminal equipment according to claim 1 is characterized in that: In the S1, the focal length and lens setting of the camera acquisition device are kept unchanged during the pre-acquisition process, and the shooting angle of the face image is kept unchanged during the acquisition process.
Citation Information
Patent Citations
Intelligent identification system for access control
CN118155269A
Image pickup device
JP2000354198A
Communication terminal
JP2007312089A
Obstacle recognition method for autonomous robots
US20220066456A1