Detection method, device and storage medium of image acquisition device
By using the calibration plate to automatically detect the installation status of the camera in offline supermarkets, the problem of lack of quantitative standards and high labor costs in the existing technology is solved, and the installation accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202410797443.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-20
AI Technical Summary
In the existing technology, there is a lack of quantitative standards for camera installation in offline stores and supermarkets, which results in the installation accuracy not being guaranteed and a large amount of labor cost required to confirm whether the picture is suitable, which affects the human body detection effect.
By setting at least two calibration plates in the target area, using image acquisition equipment to collect images, and automatically analyzing the installation status based on the pixel information of the calibration plates and preset image parameter thresholds, outputting adjustment plans, reducing human participation, and improving the accuracy of installation status detection sex.
It realizes automatic detection and analysis of the installation status of image acquisition equipment, reduces human participation, improves the accuracy and efficiency of installation status detection, and reduces labor costs.
Smart Images

Figure CN118368408B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a detection method, device and storage medium for an image acquisition device. Background Art
[0002] With the continuous breakthroughs and mature implementation of information technology and artificial intelligence technology, offline supermarket business is also constantly developing in the direction of convenience and intelligence. For the intelligence of offline supermarkets, accurate customer flow information and accurate customer portraits are rigid needs of customers. In order to accurately obtain this information, in addition to optimizing the effect of the algorithm itself, camera installation is also crucial. For example, if the focal length is too small or the camera is installed too far away, the target image will be too small, affecting the human body detection effect; for example, if the installation pitch angle is too high, only the top of the person's head can be photographed, which interferes with the recognition of human attributes and makes it impossible to obtain an accurate user portrait; these problems are usually difficult to achieve improved results through post-algorithm optimization.
[0003] To address this problem, the current common solution is to first provide a basic installation specification, such as the distance of the surveillance camera from the passenger entrance and exit, the height at which it needs to be installed, and the focal length of the camera to be used. After the implementation personnel complete the installation according to the regulations, they contact the pre-sales department to make subjective judgments with the naked eye to determine whether the current picture is appropriate and whether the camera angle needs to be adjusted. It can be seen that this solution lacks quantitative standards, subjective judgment cannot guarantee the accuracy of camera installation, and is also very labor-intensive. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide a detection method, device and storage medium for an image acquisition device, which realizes automatic detection and analysis of the installation status of the image acquisition device, reduces human participation, and improves the accuracy of installation status detection.
[0005] In a first aspect, an embodiment of the present application provides a detection method for an image acquisition device, comprising: in response to a detection instruction for the image acquisition device, obtaining a current acquisition image of a target area by the image acquisition device in a current installation state, the target area being preset with at least two calibration plates; identifying pixel information of the at least two calibration plates in the current acquisition image; and determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and an image parameter threshold.
[0006] In one embodiment, before identifying the pixel information of the at least two calibration plates in the current acquired image, it also includes: marking and identifying the current acquired image, and determining whether the number of calibration plates existing in the current acquired image is greater than or equal to 2; if the number of calibration plates existing in the current acquired image is greater than or equal to 2, determining the pixel information of the at least two calibration plates in the current acquired image; if the number of calibration plates existing in the current acquired image is less than 2, issuing a prompt message about the calibration plates.
[0007] In one embodiment, the image parameter threshold includes an aspect ratio threshold range; determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold includes: determining the average imaging aspect ratio of the at least two calibration plates in the current acquired image based on the pixel information of the at least two calibration plates; judging whether the average imaging aspect ratio is within the aspect ratio threshold range; if the average imaging aspect ratio is within the aspect ratio threshold range, determining that the current installation position of the image acquisition device does not need to be adjusted; if the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment plan for the current installation position of the image acquisition device based on the average imaging aspect ratio and the aspect ratio threshold range.
[0008] In one embodiment, the aspect ratio threshold range includes a lower aspect ratio threshold and / or an upper aspect ratio threshold; if the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment plan for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range, including: if the average imaging aspect ratio is less than the aspect ratio lower limit threshold, determining that the adjustment plan is to lower the installation height of the image acquisition device; if the average imaging aspect ratio is greater than the aspect ratio upper limit threshold, determining that the adjustment plan is to raise the installation height of the image acquisition device.
[0009] In one embodiment, the image parameter threshold includes a side length pixel threshold range; determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold includes: determining the side length pixel values of the at least two calibration plates in the current acquired image based on the pixel information of the at least two calibration plates; judging whether the side length pixel values are within the side length pixel threshold range; if the side length pixel values are not within the side length pixel threshold range, determining an installation state adjustment plan for the image acquisition device based on the side length pixel value and the side length pixel threshold range; if the side length pixel values are within the side length pixel threshold range, determining that the focal length setting of the image acquisition device in the current installation state does not need to be adjusted.
[0010] In one embodiment, the edge length pixel threshold range includes an edge length pixel lower limit threshold and / or an edge length pixel upper limit threshold; if the edge length pixel value is not within the edge length pixel threshold range, determining the installation status adjustment plan of the image acquisition device according to the edge length pixel value and the edge length pixel threshold range, including: if the edge length pixel value is less than the edge length pixel lower limit threshold, determining that the adjustment plan is to increase the current focal length of the image acquisition device, and / or, determining that the adjustment plan is to decrease the distance between the current installation position of the image acquisition device and the calibration plate; if the edge length pixel value is greater than the edge length pixel upper limit threshold, determining that the adjustment plan is to decrease the current focal length of the image acquisition device, and / or, determining that the adjustment plan is to increase the distance between the current installation position of the image acquisition device and the calibration plate.
[0011] In one embodiment, the image parameter threshold includes a distance threshold range; determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold includes: determining the distance between the midpoint position of any two calibration plates and the boundary line of the current acquired image based on the pixel information of the at least two calibration plates; judging whether the distance is within the distance threshold range; if the distance is within the distance threshold range, determining that the current installation angle of the image acquisition device does not need to be adjusted; if the distance is not within the distance threshold range, determining the current installation angle adjustment plan of the image acquisition device based on the distance and the distance threshold range.
[0012] In one embodiment, if the distance is not within the distance threshold range, determining the current installation angle adjustment scheme of the image acquisition device according to the distance and the distance threshold range includes: if the minimum value of the distance from the intermediate point position to the first direction boundary line of the current acquisition image is less than the first boundary distance threshold, determining that the adjustment scheme is to rotate the horizontal angle of the image acquisition device toward the first direction, the first direction being parallel to the horizontal line; and / or if the minimum value of the distance from the intermediate point position to the second direction boundary line of the current acquisition image is less than the second boundary distance threshold, determining that the adjustment scheme is to rotate the horizontal angle of the image acquisition device toward the second direction movement, the second direction is parallel to the horizontal line, and the second direction is opposite to the first direction; and / or, if the minimum value of the distance from the intermediate point position to the third direction boundary line of the current acquired image is less than a third boundary distance threshold, it is determined that the adjustment scheme is to rotate the pitch angle of the image acquisition device toward the third direction, and the third direction is parallel to the vertical line; and / or, if the minimum value of the distance from the intermediate point position to the fourth direction boundary line of the current acquired image is less than a fourth boundary distance threshold, it is determined that the adjustment scheme is to rotate the pitch angle of the image acquisition device toward the fourth direction, and the fourth direction is parallel to the vertical line, and the fourth direction is opposite to the third direction shown.
[0013] In one embodiment, the image parameter threshold includes an angle offset threshold; determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold includes: intercepting a regional image including each of the calibration plates from the current acquired image based on the pixel information of the at least two calibration plates; performing edge detection on the regional image to extract straight line segments in the regional image; detecting the angle between the straight line segments and the horizontal direction; and determining an adjustment scheme for the current rotation angle of the image acquisition device based on the angle and the angle offset threshold.
[0014] In one embodiment, the adjustment scheme for the current rotation angle of the image acquisition device is determined based on the included angle and the angle offset threshold, including: if the included angle is less than the difference between 90° and the angle offset threshold, determining that the adjustment scheme is to rotate the image acquisition device to the left; and / or, if the included angle is greater than the sum of 90° and the angle offset threshold, determining that the adjustment scheme is to rotate the image acquisition device to the right and left; and / or, if the included angle is greater than the difference and less than the sum, determining that the rotation angle of the image acquisition device does not need to be adjusted.
[0015] In a second aspect, an embodiment of the present application provides a method for detecting human flow, comprising: in response to a human flow detection instruction for a target area, obtaining a first acquired image of an image acquisition device of the target area in a current installation state, the target area being preset with at least two calibration plates; identifying pixel information of the at least two calibration plates in the first acquired image; determining whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and an image parameter threshold; if it is determined that the current installation state of the image acquisition device does not need to be adjusted, determining the human flow information in the target area based on the first acquired image; if it is determined that the current installation state of the image acquisition device needs to be adjusted, outputting a corresponding adjustment plan; obtaining a second acquired image of the image acquisition device adjusted according to the adjustment plan, and determining the human flow information in the target area based on the second acquired image.
[0016] In a third aspect, an embodiment of the present application provides a detection device for an image acquisition device, comprising:
[0017] An acquisition module, configured to respond to a detection instruction for an image acquisition device and acquire a current acquisition image of a target area by the image acquisition device in a current installation state, wherein the target area is preset with at least two calibration plates;
[0018] An identification module, used for identifying pixel information of the at least two calibration plates in the current collected image;
[0019] A determination module is used to determine whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold.
[0020] In one embodiment, it also includes: a detection module, which is used to mark and identify the current acquired image before identifying the pixel information of the at least two calibration plates in the current acquired image, and determine whether the number of calibration plates existing in the current acquired image is greater than or equal to 2; if the number of calibration plates existing in the current acquired image is greater than or equal to 2, determine the pixel information of the at least two calibration plates in the current acquired image; if the number of calibration plates existing in the current acquired image is less than 2, issue a prompt message about the calibration plates.
[0021] In one embodiment, the image parameter threshold includes an aspect ratio threshold range; the determination module is used to determine the average imaging aspect ratio of the at least two calibration plates in the current acquired image based on the pixel information of the at least two calibration plates; determine whether the average imaging aspect ratio is within the aspect ratio threshold range; if the average imaging aspect ratio is within the aspect ratio threshold range, determine that the current installation position of the image acquisition device does not need to be adjusted; if the average imaging aspect ratio is not within the aspect ratio threshold range, determine an adjustment plan for the current installation position of the image acquisition device based on the average imaging aspect ratio and the aspect ratio threshold range.
[0022] In one embodiment, the aspect ratio threshold range includes a lower aspect ratio threshold and / or an upper aspect ratio threshold; the determination module is used to determine that the adjustment plan is to lower the installation height of the image acquisition device if the average imaging aspect ratio is less than the lower aspect ratio threshold; if the average imaging aspect ratio is greater than the upper aspect ratio threshold, determine that the adjustment plan is to increase the installation height of the image acquisition device.
[0023] In one embodiment, the image parameter threshold includes a side length pixel threshold range; the determination module is used to determine the side length pixel values of the at least two calibration plates in the current acquired image based on the pixel information of the at least two calibration plates; determine whether the side length pixel value is within the side length pixel threshold range; if the side length pixel value is not within the side length pixel threshold range, determine the installation status adjustment plan of the image acquisition device based on the side length pixel value and the side length pixel threshold range; if the side length pixel value is within the side length pixel threshold range, determine that the focal length setting of the image acquisition device in the current installation state does not need to be adjusted.
[0024] In one embodiment, the edge length pixel threshold range includes a edge length pixel lower limit threshold and / or an edge length pixel upper limit threshold; the determination module is used to determine that the adjustment scheme is to increase the current focal length of the image acquisition device, and / or to reduce the distance between the current installation position of the image acquisition device and the calibration plate if the edge length pixel value is less than the edge length pixel lower limit threshold; if the edge length pixel value is greater than the edge length pixel upper limit threshold, determine that the adjustment scheme is to reduce the current focal length of the image acquisition device, and / or to increase the distance between the current installation position of the image acquisition device and the calibration plate.
[0025] In one embodiment, the image parameter threshold includes a distance threshold range; the determination module is used to determine the distance between the midpoint position of any two calibration plates and the boundary line of the current captured image based on the pixel information of the at least two calibration plates; determine whether the distance is within the distance threshold range; if the distance is within the distance threshold range, determine that the current installation angle of the image acquisition device does not need to be adjusted; if the distance is not within the distance threshold range, determine the current installation angle adjustment plan of the image acquisition device based on the distance and the distance threshold range.
[0026] In one embodiment, the determination module is used to determine that the adjustment scheme is to rotate the horizontal angle of the image acquisition device toward the first direction if the minimum value of the distance from the intermediate point position to the first direction boundary line of the current acquisition image is less than a first boundary distance threshold; and / or, if the minimum value of the distance from the intermediate point position to the second direction boundary line of the current acquisition image is less than a second boundary distance threshold, determine that the adjustment scheme is to rotate the horizontal angle of the image acquisition device toward the second direction, the second direction is parallel to the horizontal line, and the second direction is opposite to the first direction; and / or, if the minimum value of the distance from the intermediate point position to the third direction boundary line of the current acquisition image is less than a third boundary distance threshold, determine that the adjustment scheme is to rotate the pitch angle of the image acquisition device toward the third direction, the third direction is parallel to the vertical line; and / or, if the minimum value of the distance from the intermediate point position to the fourth direction boundary line of the current acquisition image is less than a fourth boundary distance threshold, determine that the adjustment scheme is to rotate the pitch angle of the image acquisition device toward the fourth direction, the fourth direction is parallel to the vertical line, and the fourth direction is opposite to the third direction shown.
[0027] In one embodiment, the image parameter threshold includes an angle offset threshold; the determination module is used to intercept a regional image including each of the calibration plates from the current acquired image based on the pixel information of the at least two calibration plates; perform edge detection on the regional image to extract straight line segments in the regional image; detect the angle between the straight line segments and the horizontal direction; and determine an adjustment scheme for the current rotation angle of the image acquisition device based on the angle and the angle offset threshold.
[0028] In one embodiment, the determination module is used to determine that the adjustment scheme is to rotate the image acquisition device to the left if the angle is less than the difference between 90° and the angle offset threshold; and / or, if the angle is greater than the sum of 90° and the angle offset threshold, determine that the adjustment scheme is to rotate the image acquisition device to the right and left; and / or, if the angle is greater than the difference and less than the sum, determine that the rotation angle of the image acquisition device does not need to be adjusted.
[0029] In one embodiment, the apparatus further includes: an output module, configured to output a corresponding adjustment plan when it is determined that the current installation state of the image acquisition device needs to be adjusted.
[0030] In a fourth aspect, an embodiment of the present application provides an electronic device, including:
[0031] at least one processor; and
[0032] a memory communicatively coupled to the at least one processor;
[0033] 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 to enable the electronic device to execute the method described in any one of the above aspects.
[0034] In a fifth aspect, an embodiment of the present application provides a cloud device, including:
[0035] at least one processor; and
[0036] a memory communicatively coupled to the at least one processor;
[0037] 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 to enable the cloud device to execute the method described in any one of the above aspects.
[0038] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any one of the above aspects is implemented.
[0039] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any of the above aspects when executed by a processor.
[0040] The detection method, device and storage medium of the image acquisition device provided in the embodiments of the present application set at least two calibration plates in the target area. When receiving the detection instruction for the image acquisition device, the installed image acquisition device is allowed to acquire images of the target area. The system analyzes the current acquisition image and automatically analyzes whether the current installation status of the image acquisition device is appropriate and whether it needs to be adjusted based on the pixel information of the calibration plate in the current acquisition image and the preset image parameter threshold. In this way, automatic detection and analysis of the installation status of the image acquisition device is realized, human participation is reduced, and the accuracy of installation status detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0042] Figure 1A A schematic diagram of the rotation of the horizontal angle of a camera provided in an embodiment of the present application;
[0043] Figure 1B A schematic diagram of the rotation of a camera pitch angle provided in an embodiment of the present application;
[0044] Figure 1C A schematic diagram of the rotation angle of a camera provided in an embodiment of the present application;
[0045] Figure 2A A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0046] Figure 2B A schematic diagram of an application scenario of a detection system for an image acquisition device provided in an embodiment of the present application;
[0047] Figure 3A A schematic diagram of a local deployment mode of a detection method for an image acquisition device provided in an embodiment of the present application;
[0048] Figure 3B A schematic diagram of a cloud deployment mode of a detection method for an image acquisition device provided in an embodiment of the present application;
[0049] Figure 4A A schematic diagram of a detection system architecture of an image acquisition device provided in an embodiment of the present application;
[0050] Figure 4B A schematic diagram of the placement position of a calibration plate provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of a flow chart of a detection method of an image acquisition device provided in an embodiment of the present application;
[0052] Figure 6 A schematic diagram of a specific functional architecture of a calibration plate placement detection module provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of the architecture of a camera installation detection module provided in an embodiment of the present application;
[0054] Figure 8 A schematic diagram of the distribution of angles between straight line segments and horizontal lines in a camera image provided by an embodiment of the present application;
[0055] Fig. 9 A schematic diagram of an interactive interface provided in an embodiment of the present application;
[0056] Fig.10 A flow chart of a method for detecting human flow provided in an embodiment of the present application;
[0057] Fig.11 A schematic diagram of the structure of a detection device for an image acquisition device provided in an embodiment of the present application;
[0058] Fig.12 A schematic diagram of the structure of a cloud device provided in an embodiment of the present application.
[0059] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0060] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0061] The term "and / or" in this article is used to describe the association relationship of associated objects, specifically indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0062] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0063] In order to clearly describe the technical solution of the embodiment of the present application, the terms involved in the present application are first defined:
[0064] Calibration plate: A flat plate with an array of patterns at fixed intervals. By detecting these plates, the geometric model of the camera can be calculated to obtain high-precision measurement and reconstruction results.
[0065] Implementers: People who are responsible for installing cameras, usually outsourced to a third party
[0066] Pre-sales staff: After the implementation personnel install the camera, they are responsible for communicating with the implementation personnel to determine whether the current camera image meets the algorithm requirements and providing suggestions for adjustments.
[0067] Camera horizontal angle: The camera's horizontal rotation angle. During installation, it is usually indicated by left or right to indicate whether the current angle is appropriate. Figure 1A As shown in (a) and (b).
[0068] Camera pitch angle: The rotation angle of the camera in the vertical direction. During the installation process, it is usually indicated by upward or downward to indicate whether the current angle is appropriate. Figure 1B As shown in (a) and (b).
[0069] Camera rotation angle: The rotation angle of the camera around the optical axis. During installation, the camera is usually rotated left or right to indicate whether the current angle is appropriate. Figure 1C As shown in (a) and (b).
[0070] OpenCV: Open Source Computer Vision Library is an open source computer vision and machine learning software library. OpenCV provides hundreds of computer vision algorithms, covering image processing, video analysis, object recognition, machine learning and other fields. The design goal of OpenCV is to be efficient, easy to use, and to perform well in real-time applications.
[0071] detectMarkers: is a function in OpenCV library used to detect markers in an image. These markers can be a specially designed binary square pattern with a unique ID.
[0072] Hough Transform: Hough transform.
[0073] PC:Personal Computer.
[0074] The detection method of the image acquisition device in the embodiment of the present application can be applied to any field that requires installation status detection of a surveillance camera.
[0075] With the continuous breakthroughs and mature implementation of information technology and artificial intelligence technology, offline supermarket business is also constantly developing in the direction of convenience and intelligence. For the intelligence of offline supermarkets, accurate customer flow information and accurate customer portraits are rigid needs of customers. In order to accurately obtain this information, in addition to optimizing the effect of the algorithm itself, camera installation is also crucial. For example, if the focal length is too small or the camera is installed too far away, the target image will be too small, affecting the human body detection effect. For example, if the installation pitch angle is too high, only the top of the person's head can be photographed, which interferes with the recognition of human attributes and makes it impossible to obtain an accurate user portrait. These problems are usually difficult to improve through post-algorithm optimization.
[0076] To address this problem, the current common solution is to first provide a basic installation specification, such as the distance of the surveillance camera from the passenger entrance and exit, the height at which it needs to be installed, and the focal length of the camera to be used. After the implementation personnel complete the installation according to the regulations, they contact the pre-sales department to make a subjective judgment with the naked eye to determine whether the current picture is appropriate and whether the camera angle needs to be adjusted. This solution has at least the following defects: 1. There are no strong constraints on the implementation personnel, and there is no quantitative standard for whether the picture is appropriate. The installation quality is basically not guaranteed, and usually a lot of adjustments are required later. 2. Large-scale batch deployment requires each camera to be confirmed back and forth, which is very labor-intensive.
[0077] It can be seen that this solution lacks quantitative standards, subjective judgment cannot guarantee the accuracy of camera installation, and is also very labor-intensive.
[0078] Taking the passenger flow detection system in shopping malls as an example, the installation position and installation angle of the camera have a great influence on the accuracy of the final algorithm. For example, if the installation angle is too low, people will block each other seriously, resulting in missed calls. If the installation angle is too high, the human body cannot be fully photographed, making it difficult to perform gender, age and other portrait analysis. In addition, if the installation angle is biased to the left or right, and the installation focal length is inappropriate, the entrance and exit of the picture will be biased to the left or right, too large or too small, which will cause great interference to the accuracy of the algorithm. However, in the passenger flow solutions currently on the market, basically, a basic physical information of the installation position and angle is provided first, and then the subjective judgment of the human eye is used to determine whether the picture meets the standard. This solution lacks quantitative standards and is very labor-intensive.
[0079] In order to solve at least one of the above problems, an embodiment of the present application provides a detection scheme for an image acquisition device, by setting at least two calibration plates in the target area, when receiving a detection instruction for the image acquisition device, the installed image acquisition device is allowed to capture images of the target area, and the system analyzes the current acquisition image, and automatically analyzes whether the current installation status of the image acquisition device is appropriate and whether it needs to be adjusted based on the pixel information of the calibration plate in the current acquisition image and the preset image parameter threshold. In this way, automatic detection and analysis of the installation status of the image acquisition device is achieved, human participation is reduced, and the accuracy of installation status detection is improved.
[0080] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0081] like Figure 2A As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 2A A processor is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11, and the instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the following embodiment to realize automatic detection and analysis of the installation status of the image acquisition device, reduce human participation, and improve the accuracy of installation status detection.
[0082] In one embodiment, the electronic device 1 may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, or a large computing system composed of multiple computers.
[0083] Figure 2B A schematic diagram of an application scenario 200 of a detection system of an image acquisition device provided in an embodiment of the present application. Figure 2B As shown, the system includes: a server 210 and a terminal 220, wherein:
[0084] The server 210 may be a data platform that provides detection services for image acquisition devices, such as a video monitoring platform. In actual scenarios, a video monitoring platform may have multiple servers 210. Figure 2B In the figure, one server 210 is taken as an example.
[0085] The terminal 220 may be a camera, computer, mobile phone, tablet or other device used by the user to log in to the video surveillance platform. There may be multiple terminals 220. Figure 2B Two terminals 220 are taken as an example for illustration.
[0086] The terminal 220 and the server 210 can transmit information via the Internet, so that the terminal 220 can access the data on the server 210. The terminal 220 and / or the server 210 can be implemented by the electronic device 1.
[0087] The detection scheme of the image acquisition device in the embodiment of the present application can be deployed on the server 210, or on the terminal 220, or partially on the server 210 and partially on the terminal 220. In actual scenarios, it can be selected based on actual needs, and this embodiment does not limit it.
[0088] When the detection solution of the image acquisition device is fully or partially deployed on the server 210 , a calling interface may be opened to the terminal 220 to provide algorithm support to the terminal 220 .
[0089] The method provided in the embodiment of the present application can be implemented by executing the corresponding software code by the electronic device 1, and can be implemented by exchanging data with the server. The electronic device 1 can be a local terminal device. When the method is run on the server, the method can be implemented and executed based on the cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0090] In a possible implementation, the method provided in the embodiment of the present application provides a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be the client device in the cloud interaction system mentioned above.
[0091] like Figure 3A As shown, it is a schematic diagram of the local deployment mode of a detection method for an image acquisition device provided in an embodiment of the present application. Taking a surveillance camera as an image acquisition device as an example, the local deployment mode mainly includes a surveillance camera and a local analysis tool. For example, a local terminal may include a PC, a laptop or a tablet computer, etc., and the analysis tool may include a front-end interface, an analysis algorithm module, etc. In the local deployment mode, after obtaining a screenshot of the surveillance camera, the local terminal directly imports the locally deployed analysis tool to obtain the result of whether the installation position and installation angle of the surveillance camera are compliant under the current screen image.
[0092] like Figure 3BAs shown, it is a schematic diagram of a cloud deployment mode of a detection method for an image acquisition device provided in an embodiment of the present application. Taking a monitoring camera as an image acquisition device as an example, the system may include: a monitoring camera, a cloud analysis service, and a browser of a local terminal, wherein the cloud analysis service may include a web service and an analysis algorithm module, and the local terminal may include a PC, a laptop, or a tablet computer, etc. The cloud deployment mode means that after obtaining a camera screenshot, the cloud analysis service is accessed through the browser web page of the local terminal, the screenshot is uploaded, and then the screenshot is analyzed through the cloud analysis service to obtain the result of whether the installation position and installation angle of the monitoring camera are compliant under the current screenshot.
[0093] like Figure 4A As shown, it is a schematic diagram of the detection system architecture of an image acquisition device provided in an embodiment of the present application. Taking a surveillance camera as an image acquisition device, taking the installation status detection scenario of a passenger flow monitoring camera as an example, taking the cloud deployment mode as an example, the system mainly includes: a pre-installed camera, a calibration plate placed at the entrance and exit of the target area, and an analysis tool, wherein:
[0094] First, the construction personnel can carry at least two calibration plates of specified sizes and place them at both ends of the entrance and exit where the flow of people is to be calculated. For example, the example of the specific placement of the calibration plates is shown in the figure below. Figure 4B As shown, calibration plates 601 and 602 can be set on the ground at the entrances and exits of pedestrian traffic. According to the basic installation rule information provided in advance, a surveillance camera is pre-installed. The camera is aimed at the entrances and exits of the target area, and the camera is allowed to take pictures, and the screenshots of the currently taken pictures are uploaded to the cloud analysis tool for analysis.
[0095] The analysis tool may include analysis tool 1 and analysis tool 2, wherein analysis tool 1 is used for calibration plate placement detection, and analysis tool 2 is used for camera installation detection. First, analysis tool 1 runs the calibration plate placement analysis program. If the calibration plate cannot be detected, or only one calibration plate can be detected, etc., the result of incorrect placement of the calibration plate and failure of the verification is returned, so that the construction personnel can re-place the calibration plate in the correct way. After re-placing the calibration plate, the camera needs to re-take the image and re-upload a new screenshot. The calibration version detection process can improve the accuracy of subsequent algorithms. If the calibration plate detection verification fails multiple times, remote manual guidance can be provided to assist in completing the setting and detection of the calibration plate.
[0096] After the calibration plate placement verification is passed, continue to run the camera installation detection analysis program in Analysis Tool 2. Verify the camera's installation position and installation angle at all levels based on the uploaded screenshots, and automatically determine whether the current installation position and angle are compliant. If not, output specific adjustment plan prompts to facilitate construction personnel to readjust the camera installation status according to the output adjustment plan prompts.
[0097] If the camera installation test is also passed, it is considered that the camera installation status, whether in position or angle, meets the algorithm requirements and specifications, and the camera installation task is determined to be completed.
[0098] If the camera fails to pass the inspection and verification of the analysis tool 2 after multiple adjustments, the remote manual guidance service can be automatically switched to assist in completing the installation and inspection of the camera.
[0099] Please see Figure 5 , which is a detection method of an image acquisition device according to an embodiment of the present application, the method can be Figure 2A The electronic device 1 shown is used to perform and can be applied to Figure 2B-4B In the application scenario of camera installation detection shown in , automatic detection and analysis of the installation status of the image acquisition device is realized, human participation is reduced, and the accuracy of installation status detection is improved. In this embodiment, terminal 220 is used as an execution end as an example, and the method includes the following steps:
[0100] Step 501: In response to a detection instruction for an image acquisition device, a current captured image of a target area by the image acquisition device in a current installation state is acquired, and the target area is preset with at least two calibration plates.
[0101] In this step, the target area refers to the area that the image acquisition device needs to monitor, such as the entrance and exit of the shopping mall, the elevator entrance of the subway, and other areas. The image acquisition device can be a surveillance camera, such as a camera installed at the entrance of the shopping mall. The detection instruction can be triggered manually, or it can be triggered automatically periodically, or it can be triggered when the preset conditions are met. When it is necessary to detect the installation status of the image acquisition device, the image acquisition device can first be allowed to capture the image of the target area in the current installation state. By presetting at least two calibration plates in the target area, multiple reference points can be provided during the image acquisition process, and then the installation status of the image acquisition device can be calibrated according to the current captured image. By automatically acquiring the current captured image and calibrating it using the calibration plate, manual intervention can be reduced, the calibration process can be simplified, and work efficiency can be improved. At the same time, the automated calibration process can also reduce errors caused by human operation.
[0102] In one embodiment, there can be multiple calibration plates, and multiple calibration plates provide redundant information. Even if one calibration plate cannot be collected due to occlusion or other reasons, other calibration plates can still provide necessary calibration information, thereby enhancing the robustness and reliability of the system in various complex environments.
[0103] Step 502: Identify pixel information of at least two calibration plates in the current captured image.
[0104] In this step, by identifying the pixel information of the calibration plate in the image, the position and posture of the calibration plate can be accurately determined. This helps to improve the accuracy of image calibration and ensure the accuracy of subsequent image processing and analysis. In actual scenarios, in complex environments, there may be a variety of interference factors in the image. By identifying the pixel information of multiple calibration plates, the interference factors can be effectively filtered out to ensure the accuracy and stability of image processing. And by automatically identifying the pixel information of the calibration plate, the automatic calibration of the image acquisition equipment can be realized, reducing manual intervention, simplifying the operation process, and improving work efficiency.
[0105] In one embodiment, before step 502, the number of calibration plates may be verified, including: performing mark recognition on the current acquired image, and determining whether the number of calibration plates in the current acquired image is greater than or equal to 2. If the number of calibration plates in the current acquired image is greater than or equal to 2, determining pixel information of at least two calibration plates in the current acquired image. If the number of calibration plates in the current acquired image is less than 2, issuing a prompt message about the calibration plates.
[0106] In this embodiment, the system can automatically identify the number of calibration plates and take corresponding actions (such as determining pixel information or issuing prompt information) according to the identification results, thereby improving the intelligence of the system, reducing manual intervention, and improving work efficiency. By judging the number of calibration plates in the current captured image, the system can ensure that pixel information is identified and calibrated only when the number of calibration plates is sufficient. By ensuring the presence of at least two calibration plates, the system can obtain sufficient reference points for calibration, thereby improving the reliability and accuracy of image processing, ensuring the accuracy of subsequent image analysis, and avoiding calibration errors caused by insufficient number of calibration plates. When the number of calibration plates is insufficient, the system can issue prompt information in time to remind the user to make adjustments. This timely feedback mechanism helps users quickly locate problems and make corrections, thereby improving the user experience.
[0107] Optionally, the calibration plate placement detection module can be Figure 5 The analysis tool 1 in is implemented. Figure 6 As shown, it is a schematic diagram of a specific functional architecture of a calibration plate placement detection module provided in an embodiment of the present application. The calibration process of the calibration plate can be specifically as follows:
[0108] First, input a picture with a calibration plate, that is, the current captured image obtained in step 501, and then detect the calibration plate in the current captured image. The default calibration plate detection function detectMarkers in Opencv can be used to detect the calibration plate in the input image, and the number and coordinates of the calibration plates in the output image are output.
[0109] Then the number and coordinates of the calibration plates in the image are analyzed. If the number of calibration plates is less than 2, for example, no calibration plates are detected, or only one calibration plate is detected, it is determined that there is a problem. The corresponding problem is output to prompt the implementation personnel to readjust the calibration plate according to the returned output information.
[0110] If more than two calibration plates can be detected in the image, it is determined that the module has passed the verification, and a prompt message indicating that the detection has passed is output.
[0111] Step 503: Determine whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold.
[0112] In this step, the pixel information includes but is not limited to the pixel coordinates of each calibration plate in the current captured image. The image parameter threshold is used to determine whether the pixel information of the calibration plate is reasonable. The image parameter threshold can be set in advance according to the needs, or it can be determined in real time according to the actual detection situation. By using the pixel information of the calibration plate in the current captured image and the image parameter threshold for judgment, the deviation of the installation status of the image acquisition device can be more accurately identified, and then the installation status of the image acquisition device needs to be automatically detected. Adjustment is required to realize the automatic detection of the image acquisition device, reduce human participation, and improve the accuracy and intelligence of the installation status detection of the image acquisition device.
[0113] like Figure 7 As shown in the figure, it is a schematic diagram of the architecture of a camera installation detection module provided in an embodiment of the present application. Taking the camera installation detection at the entrance and exit of a shopping mall as an example, the aforementioned Figure 5The analysis tool 2 in the image can be used to detect the camera installation status. The pixel coordinate information of each calibration plate obtained in the calibration plate placement detection module of the analysis tool 1 is input into the camera installation detection module. Before analyzing the pixel coordinate information of all calibration plates, false detection filtering can be performed to eliminate the pixel coordinates of the calibration plates that are obviously too small or too large, thereby improving the accuracy of the data. Then, the filtered pixel coordinates of the calibration plate are analyzed in detail to determine whether the current installation status of the camera needs to be adjusted and how to adjust it. For example, by analyzing the aspect ratio of the calibration plate in the image, it can be deduced whether the camera installation height is reasonable, and the installation height adjustment opinion can be output. By analyzing the size of the calibration plate in the image, it can be deduced whether the camera focal length and installation distance are reasonable, and then the focal length adjustment and installation distance adjustment opinions can be output. The entrance and exit lines can be generated by connecting the calibration plates, and the distance between the entrance and exit lines and the edge of the picture can be analyzed to deduce whether the camera pitch angle and horizontal angle are reasonable, and then the horizontal angle and pitch angle adjustment opinions can be output. A certain area can be intercepted near the calibration plate in the image, and Hough transform can be performed on the area to detect straight lines, extract the main straight lines, determine whether they are perpendicular to the ground, and output rotation angle adjustment suggestions.
[0114] In one embodiment, the image parameter threshold includes an aspect ratio threshold range. Step 503 may specifically include: determining the average imaging aspect ratio of the at least two calibration plates in the current captured image based on the pixel information of the at least two calibration plates. Determining whether the average imaging aspect ratio is within the aspect ratio threshold range. If the average imaging aspect ratio is within the aspect ratio threshold range, determining that the current installation position of the image acquisition device does not need to be adjusted. If the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment plan for the current installation position of the image acquisition device based on the average imaging aspect ratio and the aspect ratio threshold range.
[0115] In this embodiment, for the analysis of the camera installation height, by analyzing the aspect ratio of the calibration plate in the image, it can be deduced whether the camera installation height is reasonable, and the installation height adjustment opinion can be output. Specifically, the aspect ratio threshold range can be pre-configured in the image parameter threshold as required. The aspect ratio ratio = cal_board_h / cal_board_w of each calibration plate imaged in the picture is calculated based on the pixel information, and the average imaging aspect ratio ratio_avg of all calibration plates is determined. Where cal_board_h represents the pixel value corresponding to the height of the calibration plate in the current captured image, and cal_board_w represents the pixel value corresponding to the width of the calibration plate in the current captured image.
[0116] Then, it is determined whether the average imaging aspect ratio ratio_avg is within the preset aspect ratio threshold range. If it is, it indicates that the current installation position of the camera meets the requirements and no adjustment is needed. Otherwise, if the average imaging aspect ratio ratio_avg is not within the preset aspect ratio threshold range, it indicates that the current installation position of the camera does not meet the requirements and adjustment is needed. The adjustment plan for the current installation position of the camera can be further determined based on the average imaging aspect ratio and the aspect ratio threshold range. In this way, the verification of the camera installation position is automatically completed, and the corresponding adjustment plan can be output, reducing the errors caused by manual detection, improving the accuracy of the camera installation position detection, and further improving the accuracy of image acquisition.
[0117] In one embodiment, the aspect ratio threshold range includes an aspect ratio lower limit threshold and / or an aspect ratio upper limit threshold. If the average imaging aspect ratio is not within the aspect ratio threshold range, determining the adjustment plan for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range includes: if the average imaging aspect ratio is less than the aspect ratio lower limit threshold, determining the adjustment plan as lowering the installation height of the image acquisition device. If the average imaging aspect ratio is greater than the aspect ratio upper limit threshold, determining the adjustment plan as raising the installation height of the image acquisition device.
[0118] In this embodiment, two aspect ratio thresholds, a high one and a low one, can be set for the aspect ratio threshold range according to requirements, that is, the aspect ratio lower limit threshold ratio_min and the aspect ratio upper limit threshold ratio_max. In the specific judgment process, if the average imaging aspect ratio ratio_avg < ratio_min, it is determined that the installation height of the camera is too high in the current installation state, and the installation height of the camera needs to be lowered. The adjustment plan can be output on the interaction interface as lowering the installation height of the camera. If ratio_avg > ratio_max, it means that the current installation height of the camera is too low and the installation height needs to be raised. The adjustment plan can be output on the interaction interface as raising the installation height of the camera. So that the adjusted installation height of the camera meets the requirements and the image acquisition accuracy is improved.
[0119] The aspect ratio lower limit threshold ratio_min and the aspect ratio upper limit threshold ratio_max can be set according to actual needs or can be empirical values obtained through experiments. For example, the aspect ratio lower limit threshold ratio_min can be 1.2, and the aspect ratio upper limit threshold ratio_max is 1.9.
[0120] In one embodiment, the image parameter threshold includes a side length pixel threshold range. Step 503 may also specifically include: determining the side length pixel values of at least two calibration plates in the current captured image based on the pixel information of at least two calibration plates. Determine whether the side length pixel value is within the side length pixel threshold range. If the side length pixel value is not within the side length pixel threshold range, determine the installation status adjustment scheme of the image acquisition device based on the side length pixel value and the side length pixel threshold range. If the side length pixel value is within the side length pixel threshold range, determine that the focal length setting of the image acquisition device in the current installation state does not need to be adjusted.
[0121] In this embodiment, the size of the calibration plate in the current captured image can be analyzed by pixel information to automatically deduce whether the focal length and installation distance of the camera are reasonable, and then the focal length adjustment and installation distance adjustment opinions can be output. Specifically, the side length pixel threshold range can be pre-configured in the image parameter threshold according to actual needs, and the side length pixel threshold range is used to limit the side length size range of the calibration plate in the image. First, according to the pixel information of at least two calibration plates, the side length pixel value of each calibration plate in the current captured image is determined, and by judging whether the side length pixel value is within the preset side length pixel threshold range, it can be automatically determined whether the image acquisition device needs to adjust the installation state. If the side length pixel value is within the threshold range, the system can determine that the focal length setting in the current installation state does not need to be adjusted. This method ensures that the image acquisition device works at the optimal focal length setting, thereby improving image quality and accuracy. If the side length pixel value is not within the threshold range, the system will automatically generate an adjustment plan based on the side length pixel value and the threshold range. The automated calibration and adjustment process reduces the time and cost of manual operation and improves overall work efficiency. At the same time, the rework and maintenance costs caused by improper equipment installation are reduced.
[0122] Among them, the side length pixel value can use the pixel value of the longer side of the calibration plate in the current captured image. For example, the calibration plate is actually square, but due to the installation parameters of the camera and environmental influences, the calibration plate imaging in the current captured image may not be square. There may be some longer sides and some shorter sides, and the shorter sides have a smaller reference value. In order to improve the calculation accuracy, the pixel value of the longer side can be selected as the side length pixel value of the calibration plate. If there are multiple calibration plates in the current captured image, the average of the side length pixel values of the multiple calibration plates can be used as the final side length pixel value to improve data accuracy.
[0123] In one embodiment, the side length pixel threshold range includes a lower side length pixel threshold and / or an upper side length pixel threshold. If the side length pixel value is not within the side length pixel threshold range, an adjustment scheme for the installation state of the image acquisition device is determined according to the side length pixel value and the side length pixel threshold range, including: if the side length pixel value is less than the lower side length pixel threshold, it is determined that the adjustment scheme is to increase the current focal length of the image acquisition device, and / or it is determined that the adjustment scheme is to decrease the distance between the current installation position of the image acquisition device and the calibration board. If the side length pixel value is greater than the upper side length pixel threshold, it is determined that the adjustment scheme is to decrease the current focal length of the image acquisition device, and / or it is determined that the adjustment scheme is to increase the distance between the current installation position of the image acquisition device and the calibration board.
[0124] In this embodiment, the average pixel size l_avg of the longer side of the calibration board in the currently acquired image can be calculated respectively according to the pixel information and used as the final side length pixel value of the calibration board. Two side length size thresholds, namely a lower side length pixel threshold l_min and an upper side length pixel threshold l_max, are set in advance according to actual requirements. During the judgment process, if l_avg < l_min, it means that the installation focal length of the camera is too small at this time, or the distance between the current installation position of the camera and the calibration board in the target area is too far. The corresponding adjustment scheme can be: if the camera is a fixed-focus camera, the installation distance needs to be adjusted closer. If the camera is a zoom camera, the focal length can be increased. If l_avg > l_max, it means that the installation focal length of the camera is too large at this time, or the installation distance is too close. The adjustment scheme can be: if the camera is a fixed-focus camera, the installation distance needs to be adjusted farther, and if it is a zoom camera, the focal length needs to be decreased. Wherein l_min and l_max can be set according to actual requirements or can be empirical values obtained through experiments. For example, l_min can be 50 pixels and l_max can be 300 pixels.
[0125] In one embodiment, the image parameter threshold includes a distance threshold range. Step 503 may specifically include: determining the distance between the midpoint position of any two calibration boards and the boundary line of the currently acquired image according to the pixel information of at least two calibration boards. Judging whether the distance is within the distance threshold range. If the distance is within the distance threshold range, it is determined that the current installation angle of the image acquisition device does not need to be adjusted. If the distance is not within the distance threshold range, an adjustment scheme for the current installation angle of the image acquisition device is determined according to the distance and the distance threshold range.
[0126] In this embodiment, the entrance and exit lines of the target area can be generated by connecting the middle points of the calibration plate, so as to analyze the distance between the entrance and exit lines and the edge of the image screen, deduce whether the pitch angle and horizontal angle of the camera are reasonable, and then output the adjustment opinions of the horizontal angle and pitch angle. Specifically, the distance threshold range between the middle point of the calibration plate and the image boundary line can be configured in advance according to actual needs, and the distance between any two middle points of the calibration plate in the current captured image and the image boundary line is determined according to the pixel information. If the distance is within the preset distance threshold range, it means that the installation angle of the camera is reasonable and does not need to be adjusted. If the distance is not within the preset distance threshold range, it means that the camera installation angle needs to be adjusted, and the corresponding adjustment plan can be further determined according to the distance and the distance threshold range. By accurately calculating the distance between the middle point position of the calibration plate and the image boundary line, and comparing it with the preset distance threshold range, it is possible to accurately determine whether the installation angle of the image acquisition device is within the allowable error range, thereby improving the accuracy of the installation angle. If it is determined that the distance is not within the distance threshold range, the system can automatically generate the current installation angle adjustment plan of the image acquisition device according to the distance and the distance threshold range, so as to achieve real-time adjustment and ensure that the image acquisition device is always at the optimal installation angle. Automated and precise calibration and adjustment methods can significantly improve the stability and reliability of image acquisition equipment, reduce the time and labor costs of manual calibration and adjustment, and improve overall work efficiency.
[0127] In one embodiment, if the distance is not within the distance threshold range, the current installation angle adjustment scheme of the image acquisition device is determined according to the distance and the distance threshold range, including: if the minimum value of the distance from the middle point position to the first direction boundary line of the current acquisition image is less than the first boundary distance threshold, the adjustment scheme is determined to be rotating the horizontal angle of the image acquisition device in the first direction, and the first direction is parallel to the horizontal line. And / or, if the minimum value of the distance from the middle point position to the second direction boundary line of the current acquisition image is less than the second boundary distance threshold, the adjustment scheme is determined to be rotating the horizontal angle of the image acquisition device in the second direction, and the second direction is parallel to the horizontal line, and the second direction is opposite to the first direction. And / or, if the minimum value of the distance from the middle point position to the third direction boundary line of the current acquisition image is less than the third boundary distance threshold, the adjustment scheme is determined to be rotating the pitch angle of the image acquisition device in the third direction, and the third direction is parallel to the vertical line. And / or, if the minimum value of the distance from the middle point position to the fourth direction boundary line of the current acquisition image is less than the fourth boundary distance threshold, the adjustment scheme is determined to be rotating the pitch angle of the image acquisition device in the fourth direction, and the fourth direction is parallel to the vertical line, and the fourth direction is opposite to the third direction shown.
[0128] In this embodiment, taking the scenario of detecting the pedestrian flow in the target area as an example, the line connecting the midpoints of any two calibration plates in the currently captured image is taken as the entrance and exit line of the pedestrian flow. When the observer faces the currently captured image, assuming the direction is set based on the observer's direction, for example, the left side of the observer is defined as left, and the right side of the observer is defined as right. The first direction can be the left direction, the second direction can be the right direction, the third direction can be up, and the fourth direction can be down. Assuming that the upper left corner point of the currently captured image at this time is the coordinate origin, the left boundary line of the currently captured image is the vertical axis, and the direction along the left boundary line downward is the positive direction of the vertical axis, and the upper boundary line of the currently captured image is the horizontal axis, and the direction to the right along the upper boundary line is the positive direction of the horizontal axis. The image boundary coordinate threshold range includes one or more of the left boundary threshold, the right boundary threshold, the upper boundary threshold, and the lower boundary threshold.
[0129] Let the coordinates of the left edge point of the entrance and exit line (i.e., the midpoint of the calibration plate closer to the left in the image) be (x1, y1), and the coordinates of the right edge point (i.e., the midpoint of the calibration plate closer to the right in the image) be (x2, y2). Let the width of the currently captured image be w and the height be h. Take the minimum value of x1 and x2 as xmin, the maximum value of x1 and x2 as xmax, the minimum value of y1 and y2 as ymin, and the maximum value as ymax. The result of the judgment process can be as follows:
[0130] 1. If (xmin - 0) < x_left_thres, it is considered that the camera angle is biased to the right at this time, and the horizontal angle of the camera needs to be rotated to the left. Where (xmin - 0) is the minimum distance from the position of the midpoint of the calibration plate in the image to the left boundary line of the currently captured image, and x_left_thres is the left boundary distance threshold.
[0131] 2. If (w - xmax) < x_right_thres, it is considered that the camera angle is biased to the left at this time, and the horizontal angle of the camera needs to be rotated to the right. Where (w - xmax) is the minimum distance from the position of the midpoint of the calibration plate in the image to the right boundary line of the currently captured image, and x_right_thres is the right boundary distance threshold.
[0132] 3. If (ymin - 0) < y_top_thres, it is considered that the camera angle is biased downward at this time, and the pitch angle of the camera needs to be rotated upward. Where (ymin - 0) is the minimum distance from the position of the midpoint of the calibration plate in the image to the upper boundary line of the currently captured image, and y_top_thres is the upper boundary distance threshold.
[0133] 4. If (h - ymax) < y_bottom_thres, it is considered that the camera angle is upward at this time, and the camera pitch angle needs to be rotated downward. Among them, (h - ymax) is the minimum distance from the position of the middle point of the calibration board in the image to the lower boundary line of the currently acquired image, and y_bottom_thres is the lower boundary distance threshold.
[0134] Among them, x_left_thres, x_right_thres, y_top_thres, and y_bottom_thres can be set according to actual needs. For example, they can be set to n * l_avg according to the average pixel size l_avg of the long side of the calibration board in the currently acquired image. The specific value of n can be set according to actual needs or can be an empirical value obtained through experiments. For example, the n corresponding to x_left_thres and x_right_thres can be 4, and the n corresponding to y_top_thres and y_bottom_thres can be 8.
[0135] In an embodiment, the image parameter threshold includes an angle offset threshold. Step 503 can specifically include: intercepting region images including each calibration board from the currently acquired image according to the pixel information of at least two calibration boards. Performing edge detection on the region images to extract straight line segments in the region images. Detecting the angle between the straight line segments and the horizontal direction. Determining an adjustment scheme for the current rotation angle of the image acquisition device according to the angle and the angle offset threshold.
[0136] In this embodiment, a certain area can be intercepted near the calibration board in the image, the Hough transform is performed on this area to detect straight lines, the main straight lines are extracted, and it is judged whether they are perpendicular to the ground, and the rotation angle adjustment opinion can be output. The region image refers to a small-range image including the calibration board. The size of the region image is generally smaller than the currently acquired image. For example, taking the center of each calibration board as the center point, a region with a width and height equal to m * the long side of the calibration board is intercepted as the region image, where the multiple m can be set according to actual needs. By intercepting region images including each calibration board from the currently acquired image according to the pixel information, it is possible to effectively focus on the calibration board region, reduce the computational amount and complexity of image processing. Performing edge detection on these region images and extracting straight line segments can accurately identify the edge features of the calibration board, thereby improving the accuracy of image processing. Detecting the angle between these straight line segments and the horizontal direction can accurately obtain the tilt angle of the calibration board, and then the tilt degree of the camera rotation angle can be determined. Determining an adjustment scheme for the current rotation angle of the image acquisition device according to the angle and the preset angle offset threshold can achieve precise calibration of the image acquisition device, ensure the horizontality and stability of the acquired image, and thus improve the accuracy and reliability of subsequent image processing and analysis.
[0137] In one embodiment, the adjustment scheme of the current rotation angle of the image acquisition device is determined according to the included angle and the angle offset threshold, including: if the included angle is less than the difference between 90° and the angle offset threshold, the adjustment scheme is determined to rotate the image acquisition device to the left. And / or, if the included angle is greater than the sum of 90° and the angle offset threshold, the adjustment scheme is determined to rotate the image acquisition device to the right and left. And / or, if the included angle is greater than the difference and less than the sum, it is determined that the rotation angle of the image acquisition device does not need to be adjusted.
[0138] In this embodiment, first, the center of each calibration plate in the current captured image is taken as the center point, and a regional image with a width and height equal to m * the long side of the calibration plate is intercepted. For example, m is 5. Then the color image of the intercepted regional image is converted into a grayscale image, and the edge points in the regional image are extracted using an edge detection algorithm such as the Canny algorithm. Then, Hough transform is used on all edge points to obtain all possible straight line segment information. The straight line segments whose lengths are less than the set threshold are filtered out. The average angle between the remaining straight line segments and the horizontal direction after filtering is calculated to obtain the angle A. The preset angle offset threshold thres_A (for example, 10 degrees) is used. The judgment result is as follows Figure 8 shown.
[0139] like Figure 8 As shown in FIG. 1 , a schematic diagram of the distribution of angles between a straight line segment and a horizontal line in a camera image provided by an embodiment of the present application is shown. If the degree of A is less than 90-thres_A (such as Figure 8 If the degree of A is greater than 90-thres_A and less than 90+thres_A (as shown by the arrow P1 in the middle), the camera image is considered to be right-rotating at this time, and the camera needs to be rotated left. Figure 8 If the degree of A is greater than 90+thres_A (as shown by the arrow P2 in the middle), the camera image is considered to have been adjusted and there is no need to adjust the camera. Figure 8 If the camera image is rotated left, the camera needs to be rotated right.
[0140] In one embodiment, the method may further include:
[0141] Step 504: When it is determined that the current installation state of the image acquisition device needs to be adjusted, a corresponding adjustment plan is output.
[0142] In this step, the adjustment plan can be output on the interactive interface so that relevant personnel can adjust the installation status of the camera according to the adjustment plan. For example, the results of the analysis in the above step 503 can be summarized and output on the interactive interface, and a prompt can be issued to prompt the implementation personnel to make corresponding adjustments.
[0143] Optionally, the interactive interface may be in the form of Fig. 9As shown, the left side of the entire interactive interface is equipped with an input module, which allows users (such as implementation personnel) to input camera device information and upload screenshots of images captured by the camera. In addition, an example module can be configured in the interactive interface to show a detailed example of how to place the calibration plate.
[0144] The output module can be configured on the right side of the interactive interface to output the test results and camera adjustment plan, so that the implementation personnel can intuitively see the test results, specific problems and corresponding adjustment suggestions. In this way, the entire interactive interface is simple and easy to understand, easy to use, and does not require additional training, which makes it easy for implementation personnel to get started quickly.
[0145] The detection method of the above-mentioned image acquisition equipment provides an automatic detection solution for the camera installation angle and installation position based on calibration plate detection. By placing at least two calibration plates of specified sizes at the entrance and exit, and letting the camera take images, it automatically detects whether the installation status is compliant based on the captured images. It can comprehensively and quantitatively analyze whether the installation position (including height and distance) is reasonable, whether the installation angle (including pitch angle, horizontal angle, and rotation angle) is reasonable, and can return the detection results in real time to ensure that the installation of the camera will not affect the subsequent algorithm effect. It can provide a unified quantitative installation standard, and the entire process is automatic and simple to operate, which not only ensures the quality of camera installation, but also significantly reduces the workload of manual image confirmation.
[0146] Please see Fig.10 , which is a flow chart of a method for detecting human flow in an embodiment of the present application. Taking camera detection in a shopping mall passenger flow detection scenario as an example, the solution may include:
[0147] Step 1001: In response to a human flow detection instruction for a target area, a first captured image of an image capture device in the target area in a current installation state is acquired, and the target area is preset with at least two calibration plates.
[0148] Step 1002: Identify pixel information of at least two calibration plates in a first acquired image.
[0149] Step 1003: Determine whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold.
[0150] Step 1004: If it is determined that the current installation state of the image acquisition device does not need to be adjusted, determine the flow of people in the target area based on the first acquired image.
[0151] Step 1005: If it is determined that the current installation state of the image acquisition device needs to be adjusted, a corresponding adjustment plan is output.
[0152] Step 1006: Acquire a second captured image of the image capture device adjusted according to the adjustment scheme, and determine the flow of people in the target area according to the second captured image.
[0153] The solution of the embodiment of the present application can effectively calibrate the installation state of the image acquisition device by presetting at least two calibration plates in the target area and identifying the pixel information of the calibration plates in the first acquisition image. Ensure that the image acquisition device works in the best state, thereby improving the accuracy and stability of image acquisition. The system can automatically determine whether the current installation state of the image acquisition device needs to be adjusted based on the pixel information and the image parameter threshold. If adjustment is required, the system will output the corresponding adjustment plan. This automated adjustment mechanism reduces manual intervention and improves the intelligence level and work efficiency of the system. When it is confirmed that the installation state of the image acquisition device does not need to be adjusted, the system directly uses the first acquisition image to determine the flow of people in the target area. This ensures the accuracy and real-time performance of the flow of people detection. If the installation state of the image acquisition device needs to be adjusted, the system will obtain the adjusted second acquisition image and re-determine the flow of people in the target area based on the image. In this way, through the automated calibration and adjustment mechanism, it is ensured that the image acquisition device works in the best state, thereby improving the accuracy of the flow of people detection and the overall reliability of the system.
[0154] The various steps of the detection method of the above-mentioned image acquisition device can be found in the relevant description of the above-mentioned embodiment in detail, and will not be repeated here.
[0155] Please see Fig.11 , which is a detection device 1100 of an image acquisition device according to an embodiment of the present application, and the device can be applied to Figure 2A The electronic device 1 shown can be applied to Figure 2B-4B In the application scenario of camera installation detection shown in , automatic detection and analysis of the installation status of the image acquisition device is realized, human participation is reduced, and the accuracy of installation status detection is improved. The device includes: an acquisition module 1101, an identification module 1102 and a determination module 1103. The functional principles of each module are as follows:
[0156] The acquisition module 1101 is used to respond to the detection instruction of the image acquisition device and acquire the current acquisition image of the target area by the image acquisition device in the current installation state. The target area is preset with at least two calibration plates.
[0157] The identification module 1102 is used to identify pixel information of at least two calibration plates in the current collected image.
[0158] The determination module 1103 is used to determine whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold.
[0159] In one embodiment, it further includes: a detection module, which is used to mark and identify the current collected image before identifying the pixel information of at least two calibration plates in the current collected image, and determine whether the number of calibration plates in the current collected image is greater than or equal to 2. If the number of calibration plates in the current collected image is greater than or equal to 2, the pixel information of at least two calibration plates in the current collected image is determined. If the number of calibration plates in the current collected image is less than 2, a prompt message about the calibration plate is issued.
[0160] In one embodiment, the image parameter threshold includes an aspect ratio threshold range. The determination module 1103 is used to determine the average imaging aspect ratio of the at least two calibration plates in the current captured image based on the pixel information of the at least two calibration plates. It is judged whether the average imaging aspect ratio is within the aspect ratio threshold range. If the average imaging aspect ratio is within the aspect ratio threshold range, it is determined that the current installation position of the image acquisition device does not need to be adjusted. If the average imaging aspect ratio is not within the aspect ratio threshold range, an adjustment scheme for the current installation position of the image acquisition device is determined based on the average imaging aspect ratio and the aspect ratio threshold range.
[0161] In one embodiment, the aspect ratio threshold range includes an aspect ratio lower threshold and / or an aspect ratio upper threshold. The determination module 1103 is used to determine that the adjustment solution is to lower the installation height of the image acquisition device if the average imaging aspect ratio is less than the aspect ratio lower threshold. If the average imaging aspect ratio is greater than the aspect ratio upper threshold, the adjustment solution is to raise the installation height of the image acquisition device.
[0162] In one embodiment, the image parameter threshold includes a side length pixel threshold range. The determination module 1103 is used to determine the side length pixel values of at least two calibration plates in the current captured image based on the pixel information of the at least two calibration plates. It is judged whether the side length pixel value is within the side length pixel threshold range. If the side length pixel value is not within the side length pixel threshold range, the installation state adjustment scheme of the image acquisition device is determined based on the side length pixel value and the side length pixel threshold range. If the side length pixel value is within the side length pixel threshold range, it is determined that the focal length setting of the image acquisition device in the current installation state does not need to be adjusted.
[0163] In one embodiment, the edge length pixel threshold range includes an edge length pixel lower limit threshold and / or an edge length pixel upper limit threshold. Determination module 1103 is used to determine that if the edge length pixel value is less than the edge length pixel lower limit threshold, the adjustment scheme is to increase the current focal length of the image acquisition device, and / or, to determine that the adjustment scheme is to decrease the distance between the current installation position of the image acquisition device and the calibration plate. If the edge length pixel value is greater than the edge length pixel upper limit threshold, the adjustment scheme is to decrease the current focal length of the image acquisition device, and / or, to determine that the adjustment scheme is to increase the distance between the current installation position of the image acquisition device and the calibration plate.
[0164] In one embodiment, the image parameter threshold includes a distance threshold range. The determination module 1103 is used to determine the distance between the midpoint position of any two calibration plates and the boundary line of the current captured image based on the pixel information of at least two calibration plates. It is judged whether the distance is within the distance threshold range. If the distance is within the distance threshold range, it is determined that the current installation angle of the image acquisition device does not need to be adjusted. If the distance is not within the distance threshold range, the current installation angle adjustment scheme of the image acquisition device is determined according to the distance and the distance threshold range.
[0165] In one embodiment, the determination module 1103 is used to determine that the adjustment scheme is to rotate the horizontal angle of the image acquisition device to the first direction, and the first direction is parallel to the horizontal line, if the minimum value of the distance from the middle point position to the first direction boundary line of the current acquisition image is less than the first boundary distance threshold. And / or, if the minimum value of the distance from the middle point position to the second direction boundary line of the current acquisition image is less than the second boundary distance threshold, the adjustment scheme is to rotate the horizontal angle of the image acquisition device to the second direction, and the second direction is parallel to the horizontal line, and the second direction is opposite to the first direction. And / or, if the minimum value of the distance from the middle point position to the third direction boundary line of the current acquisition image is less than the third boundary distance threshold, the adjustment scheme is to rotate the pitch angle of the image acquisition device to the third direction, and the third direction is parallel to the vertical line. And / or, if the minimum value of the distance from the middle point position to the fourth direction boundary line of the current acquisition image is less than the fourth boundary distance threshold, the adjustment scheme is to rotate the pitch angle of the image acquisition device to the fourth direction, and the fourth direction is parallel to the vertical line, and the fourth direction is opposite to the third direction shown.
[0166] In one embodiment, the image parameter threshold includes an angle offset threshold. The determination module 1103 is used to intercept a region image including each calibration plate from the current acquisition image based on the pixel information of at least two calibration plates. Edge detection is performed on the region image to extract straight line segments in the region image. An angle between the straight line segment and the horizontal direction is detected. An adjustment scheme for the current rotation angle of the image acquisition device is determined based on the angle and the angle offset threshold.
[0167] In one embodiment, the determination module 1103 is used to determine that the adjustment solution is to rotate the image acquisition device to the left if the included angle is less than the difference between 90° and the angle offset threshold. And / or, if the included angle is greater than the sum of 90° and the angle offset threshold, determine that the adjustment solution is to rotate the image acquisition device to the right and left. And / or, if the included angle is greater than the difference and less than the sum, determine that the rotation angle of the image acquisition device does not need to be adjusted.
[0168] In one embodiment, the apparatus further includes: an output module, configured to output a corresponding adjustment plan when it is determined that the current installation state of the image acquisition device needs to be adjusted.
[0169] For a detailed description of the detection device 1100 of the above-mentioned image acquisition device, please refer to the description of the relevant method steps in the above-mentioned embodiment. Its implementation principle and technical effect are similar, and will not be repeated here in this embodiment.
[0170] Fig.12 The following is a schematic diagram of a cloud device 120 provided in an exemplary embodiment of the present application. The cloud device 120 can be used to run the method provided in any of the above embodiments. Fig.12 As shown, the cloud device 120 may include: a memory 1204 and at least one processor 1205, Fig.12 A processor is taken as an example.
[0171] The memory 1204 is used to store computer programs and can be configured to store various other data to support operations on the cloud device 120. The memory 1204 can be an object storage service (OSS).
[0172] The memory 1204 may be implemented by any type of volatile or nonvolatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0173] The processor 1205 is coupled to the memory 1204 and is used to execute the computer program in the memory 1204 to implement the solution provided by any of the above method embodiments. The specific functions and technical effects that can be achieved are not repeated here.
[0174] Furthermore, if Fig.12 The cloud device also includes: a firewall 1201, a load balancer 1202, a communication component 1206, a power supply component 1203 and other components. Fig.12 Only some components are shown schematically, which does not mean that the cloud device only includes Fig.12 Components shown.
[0175] In one embodiment, the above Fig.12The communication component 1206 in the communication component 1206 is configured to facilitate wired or wireless communication between the device where the communication component 1206 is located and other devices. The device where the communication component 1206 is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, LTE (Long Term Evolution, Long Term Evolution, referred to as LTE), 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component 1206 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1206 also includes a near field communication (Near Field Communication, referred to as NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (Radio Frequency Identification, referred to as RFID) technology, Infrared Data Association (Infrared Data Association, referred to as IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, referred to as BT) technology and other technologies.
[0176] In one embodiment, the above Fig.12 The power supply component 1203 provides power to various components of the device where the power supply component 1203 is located. The power supply component 1203 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0177] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented.
[0178] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method of any of the aforementioned embodiments when executed by a processor.
[0179] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0180] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0181] It should be understood that the above-mentioned processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include a high-speed RAM (Random Access Memory) memory, and may also include non-volatile storage NVM (Nonvolatile memory, NVM for short), such as at least one disk storage, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0182] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0183] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0184] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, clothing or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, clothing or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, clothing or device including the element.
[0185] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0186] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0187] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of user data and other information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0188] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A detection method for an image acquisition device, characterized in that: include: In response to a detection instruction for an image acquisition device, obtaining a current acquisition image of a target area by the image acquisition device in a current installation state, wherein at least two calibration plates are preset for the target area; Identifying pixel information of the at least two calibration plates in the current acquired image; Determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold; The image parameter threshold includes an aspect ratio threshold range; and determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold includes: Determining, according to the pixel information of the at least two calibration plates, an average imaging aspect ratio of the at least two calibration plates in the current acquired image; Determining whether the average imaging aspect ratio is within the aspect ratio threshold range; If the average imaging aspect ratio is within the aspect ratio threshold range, determining that the current installation position of the image acquisition device does not need to be adjusted; If the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment scheme for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range; The aspect ratio threshold range includes an aspect ratio lower threshold and / or an aspect ratio upper threshold; if the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment scheme for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range, comprising: If the average imaging aspect ratio is less than the aspect ratio lower limit threshold, determining that the adjustment solution is to lower the installation height of the image acquisition device; If the average imaging aspect ratio is greater than the aspect ratio upper limit threshold, it is determined that the adjustment solution is to increase the installation height of the image acquisition device.
2. The method according to claim 1, characterized in that: Before identifying the pixel information of the at least two calibration plates in the current acquired image, the method further includes: Performing mark recognition on the current collected image to determine whether the number of calibration plates present in the current collected image is greater than or equal to 2; If the number of calibration plates present in the current acquired image is greater than or equal to 2, determining pixel information of the at least two calibration plates in the current acquired image; If the number of calibration plates in the current captured image is less than 2, a prompt message about the calibration plates is issued.
3. The method according to claim 1, characterized in that The image parameter threshold includes a side length pixel threshold range; and determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold includes: Determine, according to the pixel information of the at least two calibration plates, the side length pixel values of the at least two calibration plates in the current acquired image; Determine whether the side length pixel value is within the side length pixel threshold range; If the side length pixel value is not within the side length pixel threshold range, determining an installation state adjustment scheme of the image acquisition device according to the side length pixel value and the side length pixel threshold range; If the side length pixel value is within the side length pixel threshold range, it is determined that the focal length setting of the image acquisition device in the current installation state does not need to be adjusted.
4. The method according to claim 3, characterized in that: The edge length pixel threshold range includes an edge length pixel lower limit threshold and / or an edge length pixel upper limit threshold; if the edge length pixel value is not within the edge length pixel threshold range, determining the installation state adjustment scheme of the image acquisition device according to the edge length pixel value and the edge length pixel threshold range, including: If the side length pixel value is less than the side length pixel lower limit threshold, determining that the adjustment scheme is to increase the current focal length of the image acquisition device, and / or determining that the adjustment scheme is to reduce the distance between the current installation position of the image acquisition device and the calibration plate; If the side length pixel value is greater than the side length pixel upper limit threshold, the adjustment scheme is determined to be to reduce the current focal length of the image acquisition device, and / or, the adjustment scheme is determined to be to increase the distance between the current installation position of the image acquisition device and the calibration plate.
5. The method according to claim 1, characterized in that The image parameter threshold includes a distance threshold range; and determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold includes: Determine the distance between the midpoint position of any two calibration plates and the boundary line of the current captured image according to the pixel information of the at least two calibration plates; Determining whether the distance is within a distance threshold range; If the distance is within the distance threshold range, determining that the current installation angle of the image acquisition device does not need to be adjusted; If the distance is not within the distance threshold range, a current installation angle adjustment scheme of the image acquisition device is determined according to the distance and the distance threshold range.
6. The method according to claim 5, characterized in that If the distance is not within the distance threshold range, determining a current installation angle adjustment scheme of the image acquisition device according to the distance and the distance threshold range includes: If the minimum value of the distance from the intermediate point position to the first direction boundary line of the current captured image is less than the first boundary distance threshold, determining that the adjustment scheme is to rotate the horizontal angle of the image capture device toward the first direction, the first direction being parallel to the horizontal line; and / or, If the minimum value of the distance from the intermediate point position to the second direction boundary line of the current captured image is less than the second boundary distance threshold, determining that the adjustment scheme is to rotate the horizontal angle of the image capture device toward the second direction, the second direction is parallel to the horizontal line, and the second direction is opposite to the first direction; and / or, If the minimum value of the distance from the intermediate point position to the third direction boundary line of the current captured image is less than a third boundary distance threshold, determining that the adjustment scheme is to rotate the pitch angle of the image capture device toward the third direction, and the third direction is parallel to the vertical line; and / or, If the minimum distance from the intermediate point position to the fourth direction boundary line of the currently captured image is less than the fourth boundary distance threshold, the adjustment scheme is determined to rotate the pitch angle of the image capture device toward the fourth direction, the fourth direction is parallel to the vertical line, and the fourth direction is opposite to the third direction shown.
7. The method according to claim 1, characterized in that The image parameter threshold includes an angle offset threshold; and determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold includes: According to the pixel information of the at least two calibration plates, intercepting a regional image including each of the calibration plates from the current acquired image; Performing edge detection on the regional image to extract straight line segments in the regional image; Detecting the angle between the straight line segment and the horizontal direction; An adjustment scheme for the current rotation angle of the image acquisition device is determined according to the included angle and the angle offset threshold.
8. The method according to claim 7, characterized in that The step of determining an adjustment scheme for a current rotation angle of the image acquisition device according to the included angle and the angle offset threshold comprises: If the angle is less than the difference between 90° and the angle offset threshold, determining that the adjustment scheme is to rotate the image acquisition device to the right; and / or, If the angle is greater than the sum of 90° and the angle offset threshold, determining that the adjustment solution is to rotate the image acquisition device to the left; and / or, If the included angle is greater than the difference and less than the sum, it is determined that the rotation angle of the image acquisition device does not need to be adjusted.
9. A method for detecting human flow, characterized in that: include: In response to a human flow detection instruction for a target area, acquiring a first captured image of an image capture device in the target area in a current installation state, wherein the target area is preset with at least two calibration plates; Identifying pixel information of the at least two calibration plates in the first acquired image; Determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold; If it is determined that the current installation state of the image acquisition device does not need to be adjusted, determining the flow of people in the target area according to the first acquired image; If it is determined that the current installation state of the image acquisition device needs to be adjusted, output a corresponding adjustment plan; Acquire a second captured image of the image acquisition device adjusted according to the adjustment scheme, and determine the flow of people in the target area according to the second captured image; The image parameter threshold includes an aspect ratio threshold range; and determining whether the current installation state of the image acquisition device needs to be adjusted according to the pixel information and the image parameter threshold includes: Determining, according to the pixel information of the at least two calibration plates, an average imaging aspect ratio of the at least two calibration plates in the first acquired image; Determining whether the average imaging aspect ratio is within the aspect ratio threshold range; If the average imaging aspect ratio is within the aspect ratio threshold range, determining that the current installation position of the image acquisition device does not need to be adjusted; If the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment scheme for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range; The aspect ratio threshold range includes an aspect ratio lower threshold and / or an aspect ratio upper threshold; if the average imaging aspect ratio is not within the aspect ratio threshold range, determining an adjustment scheme for the current installation position of the image acquisition device according to the average imaging aspect ratio and the aspect ratio threshold range, comprising: If the average imaging aspect ratio is less than the aspect ratio lower limit threshold, determining that the adjustment solution is to lower the installation height of the image acquisition device; If the average imaging aspect ratio is greater than the aspect ratio upper limit threshold, it is determined that the adjustment solution is to increase the installation height of the image acquisition device.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; 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 to enable the electronic device to perform the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
