Mounting method of camera device and electronic equipment
The image analysis and prompt information of the camera device assists users in adjusting the installation position, solving the problem of difficult to judge the rationality of the installation position, and improving the shooting effect and installation efficiency.
Patent Information
- Application Number
- CN202310859282.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
During the installation process, due to the diversified application scenarios and environmental differences in the camera device, it is difficult for users to judge whether the installation position is reasonable, which will affect the shooting effect and installation efficiency.
By acquiring the scene image captured by the camera device for image analysis and processing, obtaining the installation position parameters, determining whether the preset conditions are met, and outputting a prompt message to assist the user in adjusting the installation position.
It improves the shooting effect and installation efficiency of the camera device, simplifies the installation process of users, and ensures reasonable installation posture.
Smart Images

Figure CN119313741A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of security equipment, and in particular to an installation method of a camera device and electronic equipment. Background Art
[0002] With the rapid development of science and technology, various intelligent electronic devices have been applied in all walks of life. In the field of security equipment, people use cameras to observe the monitoring scene, which greatly meets people's safety needs and provides favorable protection for people's personal and property safety.
[0003] However, the application scenarios of camera devices are very diverse, and the installation environments of camera devices will be quite different accordingly. It is difficult to give a unified installation suggestion for the installation posture of all camera devices at the factory stage. When users install camera devices, it is not easy to judge whether the installation posture of the camera device is reasonable, which leads to low installation efficiency on the one hand, and often leads to unreasonable installation posture of the camera device on the other hand, resulting in poor shooting effect of the camera device. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an installation method of a camera device and an electronic device.
[0005] In order to solve the above technical problems, the first technical solution adopted in the present application is: to provide a method for installing a camera device, comprising: obtaining a current scene image obtained by shooting a scene to be monitored by the camera device. Performing image analysis processing on the current scene image to obtain installation posture parameters of the camera device. The installation posture parameters are used to indicate the installation posture of the camera device relative to the scene to be monitored. Determine whether the installation posture parameters meet the preset installation conditions. If the installation posture parameters do not meet the preset installation conditions, output prompt information for assisting the adjustment of the camera device, and the prompt information is used to prompt the user to adjust the installation posture of the camera device relative to the scene to be monitored.
[0006] To solve the above technical problems, the second technical solution adopted in this application is: to provide an electronic device, including a memory, a processor and a communication circuit, the memory stores a computer program, and the processor is used to execute the computer program to implement the method provided by the first technical solution.
[0007] The beneficial effects of the present application are: different from the prior art, by acquiring a current scene image obtained by photographing the scene to be monitored by a camera device, image analysis processing is performed on the current scene image to obtain installation posture parameters of the camera device, the installation posture parameters are used to indicate the installation posture of the camera device relative to the scene to be monitored, and it is determined whether the installation posture parameters meet the preset installation conditions; if the installation posture parameters do not meet the preset installation conditions, prompt information for assisting the adjustment of the camera device is output, the prompt information is used to prompt the user to adjust the installation posture of the camera device relative to the scene to be monitored, and when the user installs the camera device, prompt information corresponding to the application scenario can be obtained according to different application scenarios, and installation guidance is given to the user through the prompt information to assist the user in adjusting the installation posture of the camera device, thereby improving the shooting effect of the camera device, while realizing the rapid installation of the camera device and improving the installation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is a schematic block diagram of the circuit structure of the camera device of the present application;
[0009] Figure 2 A schematic diagram of a flow chart of an embodiment of a method for installing a camera device of the present application;
[0010] Figure 3 A parallel state machine obtained according to an embodiment of the method for installing a camera device of the present application;
[0011] Figure 4 A serial state machine obtained according to an embodiment of the method for installing a camera device of the present application;
[0012] Figure 5 An operation flow chart of an embodiment of the method for installing a camera device of the present application for a user;
[0013] Figure 6 A schematic diagram of a display interface of a display device displaying prompt information through an APP;
[0014] Figure 7 It is another schematic diagram of a display interface of a display device displaying prompt information through an APP;
[0015] Figure 8 Another schematic diagram of a display interface of a display device displaying prompt information through an APP;
[0016] Fig. 9 A schematic block diagram of the circuit structure of an electronic device embodiment of the present application;
[0017] Fig.10 This is a schematic diagram of the display interface of the display device when the user opens the APP. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] After long-term research, the inventors have found that the application scenarios of camera devices are very diverse, the installation environments of camera devices vary greatly, and manufacturers cannot give unified suggestions for the installation positions of camera devices for all users. It is not easy for users to judge whether the installation position of camera devices is reasonable, which leads to unreasonable installation positions of camera devices and poor shooting effects of camera devices. In order to solve the above technical problems, the present application provides the following embodiments.
[0020] like Figure 1 As shown, the camera device 1 described in the embodiment of the installation method of the camera device 1 of the present application includes a camera 310. The camera 310 can be used to shoot the scene to be monitored and obtain the current scene image of the scene to be monitored. In some embodiments, the camera 310 can be connected to a power cord, and the power cord is used to power the camera 310. In other embodiments, the camera device 1 includes a battery assembly, and the battery assembly is used to power the various electrical components of the camera device 1, so that the camera device 1 does not need to be connected to a power cord. By providing a battery assembly, the adaptability of the camera device 1 to various application scenarios can be improved, and it is also convenient to adjust the installation position of the camera device 1.
[0021] The camera device 1 is commonly used in the fields of security, smart home, etc. For example, the camera device 1 can be used for face recognition.
[0022] The camera device 1 may further include an infrared component 320. The infrared component 320 may be used to receive infrared rays. When a person or object in the monitored scene radiates heat in the form of infrared rays, the infrared component 320 may sense the infrared rays emitted by the person or object and changes in the infrared rays, thereby sensing the movement of the person or object. Furthermore, the infrared component 320 is a passive infrared sensor (PIR sensor).
[0023] The infrared component 320 has an infrared detection distance. The infrared detection distance is the distance at which the infrared component 320 can effectively sense people and objects. Specifically, by receiving infrared rays emitted by people and objects within the infrared detection distance, the infrared component 320 can effectively sense people and objects within the infrared detection distance. For example, within the infrared detection distance of the camera device 1, when a person passes by, the person's infrared radiation can be received by the infrared component 320 so that the infrared component 320 can sense the person's movement. For objects and people whose distance from the camera device 1 exceeds the infrared detection distance, the infrared component 320 cannot sense them, or the sensing effect is poor.
[0024] The infrared detection distance is related to the infrared component 320. The following factors may be used to determine the infrared component 320:
[0025] 1. Field of View (FOV) of the infrared component 320: The field of view refers to the range that the infrared component 320 can detect. If the field of view is too small, the infrared component 320 can only detect objects that are very close to it, while objects that are far away cannot be detected. Therefore, when selecting the infrared component 320, it is necessary to determine the required field of view size based on the actual usage scenario.
[0026] 2. Sensitivity of infrared component 320: Sensitivity refers to the degree of response of infrared component 320 to changes in thermal radiation. The higher the sensitivity, the easier it is for infrared component 320 to detect small changes in thermal radiation, but it is also more susceptible to interference from "noise". For example, when infrared component 320 is used to detect whether a person is approaching outdoors, if a vehicle passes by, the infrared radiation of the vehicle will interfere with the operation of infrared component 320. The infrared component is set to medium sensitivity by default when it leaves the factory.
[0027] 3. Response time of infrared component 320: Response time refers to the time from when infrared component 320 detects a change in thermal radiation to when an alarm is triggered. The shorter the response time, the faster the infrared component 320 can respond, but it is also more susceptible to interference from "noise".
[0028] The infrared component 320 may be a low-energy component, and the camera 310 consumes more power than the infrared component 320. When the camera device 1 is in use, the camera 310 may be in a constant standby state. When the infrared component 320 senses the movement of a person or an object, it may warn the camera 310, and the camera 310 starts to start functions such as shooting and recording. For the camera device 1 powered by a battery component, the infrared component 320 can be provided to increase the battery life of the camera device 1 without missing any abnormal situation.
[0029] The infrared component 320 also has an infrared detection area. The infrared component 320 can sense infrared radiation from objects and people located in the infrared detection area. For objects and people outside the infrared detection area, the infrared component 320 cannot sense them, or the sensing effect is poor. The infrared detection area is within the infrared detection distance of the infrared component 320. The shape of the infrared detection area is often fan-shaped.
[0030] In some embodiments, the infrared component 320 and the camera 310 may be fixedly connected. The infrared detection area of the infrared component 320 and the shooting field of view of the camera 310 may also be relatively fixedly arranged. Further, during the installation and operation of the camera device 1, the infrared component 320 is arranged below the camera 310, so that the infrared detection area of the infrared component 320 can be closer to the bottom of the shooting field of view of the camera 310, which is conducive to the infrared component 320 sensing people, animals and objects in a lower position. In other embodiments, the infrared component 320 and the camera 310 may be connected to move relative to each other. The infrared detection area of the infrared component 320 and the shooting field of view of the camera 310 may also move relative to each other.
[0031] The camera device 1 may also be coupled to the display device 20 in a wired or wireless manner. The current scene image captured by the camera device 1 may be displayed on the display device 20, so that the user can monitor the scene to be monitored.
[0032] like Figure 2 As shown, the installation method described in the embodiment of the installation method of the camera device of the present application includes: S100: Acquire the current scene image obtained by photographing the scene to be monitored by the camera device. S200: Perform image analysis processing on the current scene image to obtain the installation posture parameters of the camera device. The installation posture parameters are used to indicate the installation posture of the camera device relative to the scene to be monitored. S300: Determine whether the installation posture parameters meet the preset installation conditions. S400: If the installation posture parameters do not meet the preset installation conditions, output prompt information for assisting the adjustment of the camera device, and the prompt information is used to prompt the user to adjust the installation posture of the camera device relative to the scene to be monitored.
[0033] The scene to be monitored may refer to an area that needs to be observed. In some embodiments, there is a target that needs to be observed in the area. In other embodiments, the target that needs to be observed may enter the area or leave the area.
[0034] The installation position and posture of the camera device may include the installation position and installation posture of the camera device. During the installation of the camera device, it is necessary to confirm whether the installation position and installation posture of the camera device relative to the scene to be monitored meet the use requirements of the camera device. If the installation position and installation posture of the camera device relative to the scene to be monitored do not meet the use requirements, it is often necessary to adjust the installation position and installation posture of the camera device.
[0035] The installation posture parameters can be used to indicate the installation position and installation posture of the camera device relative to the scene to be monitored. The preset installation conditions can be used to indicate the current installation conditions that meet the use requirements of the camera device. By judging whether the installation posture parameters meet the preset installation conditions, it can be confirmed whether the installation position and installation posture of the camera device relative to the scene to be monitored meet the current use requirements of the camera device. When the installation position and installation posture of the camera device relative to the scene to be monitored do not meet the current use requirements, prompt information can be output to assist the user in adjusting the installation position and installation posture of the camera device, which can improve the installation efficiency and installation effect of the camera device and reduce the burden of the installation work on the user.
[0036] The current scene image obtained by capturing the scene to be monitored by a camera device is acquired, and image analysis processing is performed on the current scene image to obtain installation posture parameters of the camera device. The installation posture parameters are used to indicate the installation posture of the camera device relative to the scene to be monitored, and it is determined whether the installation posture parameters meet the preset installation conditions. If the installation posture parameters do not meet the preset installation conditions, prompt information for assisting the adjustment of the camera device is output. The prompt information is used to prompt the user to adjust the installation posture of the camera device relative to the scene to be monitored. When the user installs the camera device, prompt information corresponding to the application scenario can be obtained according to different application scenarios. The user is given installation guidance through the prompt information to assist the user in adjusting the installation posture of the camera device, thereby improving the shooting effect of the camera device, while realizing rapid installation of the camera device and improving installation efficiency.
[0037] The following is a detailed description of an embodiment of a method for installing the camera device of the present application.
[0038] S100: Acquire a current scene image obtained by photographing a scene to be monitored by a camera device.
[0039] Specifically, the camera device may include a camera, which is used to shoot the scene to be monitored and obtain the current scene image.
[0040] The current scene image is a mapping of the scene to be monitored on the camera device. After the camera device is installed, the current scene image can effectively reflect the scene to be monitored. The current scene image can change with the changes of the scene to be monitored itself, and can also change with the changes of the installation position and installation posture of the camera device. When adjusting the installation position and installation posture of the camera device, the scene to be monitored itself can be set not to change, and the area to be observed in the scene to be monitored can be made to appear in the current scene image.
[0041] Optionally, after acquiring the current scene image obtained by the camera device shooting the scene to be monitored, the following steps may be specifically referred to after S100:
[0042] S110: Outputting the current scene image to a display device to display the current scene image on the display device.
[0043] The camera device and the display device may be connected in a wired manner or a wireless manner. For example, the connection between the camera device and the display device may include a Wi-Fi connection and a Bluetooth connection.
[0044] During the installation of the camera device, the current scene image is output to the display device, which can intuitively display the shooting field of the camera device. The user can observe the scene to be monitored by observing the current scene image on the display device, thereby confirming whether the shooting field of the camera device is reasonable.
[0045] S200: Perform image analysis on the current scene image to obtain installation posture parameters of the camera device. The installation posture parameters are used to indicate the installation posture of the camera device relative to the scene to be monitored.
[0046] Reasonable installation posture and installation position play a decisive role in maintaining a good working state of the camera device. By setting the installation posture parameters, it is helpful to judge whether the installation posture and installation position of the camera device are reasonable.
[0047] Specifically, the installation posture parameters include distance parameters, attitude parameters and light intensity parameters. The distance parameter is used to characterize the distance state of the camera device relative to the scene to be monitored. The attitude parameter is used to characterize the pitch state of the camera device relative to the scene to be monitored. The light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device.
[0048] The obtained distance parameter can be used to confirm whether the distance between the camera device and the target in the scene to be monitored is reasonable. When the distance between the camera device and the target in the scene to be monitored is greater than the infrared detection distance, the user can adjust the installation position of the camera device so that the distance between the camera device and the scene to be monitored is less than or equal to the infrared detection distance.
[0049] The installation posture of the camera device includes the pitch state of the camera device relative to the scene to be monitored. The pitch state of the camera device relative to the scene to be monitored can be represented by a pitch angle. Through the obtained posture parameters, the user can adjust the pitch posture of the camera device to match the shooting field of view of the camera device with the application scene. For example, when using a suspended camera device for face recognition, the camera device has a better face recognition effect when the pitch angle of the camera device is 10 degrees to 15 degrees. The pitch angle of the camera device is the angle between the shooting direction of the camera device and the ground when the camera device is facing the ground.
[0050] The lighting state of the scene to be monitored sensed by the camera device affects the imaging quality of the camera device. A reasonable lighting state is conducive to the camera device capturing clear and easily recognizable images of the current scene, thereby improving the working effect of the camera device. For example, after converting the current scene image into a grayscale image, the grayscale value ranges from 0 to 255 (0 is completely black, and 255 is completely white). When performing face recognition, the face recognition model has a better recognition effect on the face when the light intensity is between 160 and 200.
[0051] Through the obtained light intensity parameters, the user can adjust the installation position and installation posture of the camera device to make the current scene image clear and easy to identify. For example, if the camera device senses that the light state of the scene to be monitored is overexposed or too dark, when the light state is too dark, the user can adjust the installation position and installation posture of the camera device towards a direction with stronger light; when the light state is overexposed, the user can adjust the installation position and installation posture of the camera device towards a direction with darker light.
[0052] Optionally, the installation posture parameter may also include a height parameter. The height parameter may be used to characterize the installation height of the camera device relative to the ground in the scene to be monitored. The installation height of the camera device may affect the shooting field of view of the camera device together with the pitch state of the camera device. Specifically, the smaller the pitch angle, the farther the shooting field of view of the camera device is from the camera device. The higher the installation height of the camera device, the farther the shooting field of the camera device is from the camera device. Before adjusting the pitch angle of the camera device, the installation height of the camera device may be determined and maintained unchanged, so as to facilitate adjusting the pitch angle of the camera device to an appropriate size.
[0053] Optionally, the installation posture parameters may also include distortion parameters. The distortion parameters can be used to characterize the degree of distortion of the target to be observed after being imaged by the camera device. Specifically, the camera has a wide-angle lens, and the distortion area of the wide-angle lens is generally located around the current scene image. The farther away from the center of the current scene image, the greater the degree of distortion. When performing face recognition, lens distortion will limit the function of the face recognition model and affect the effect of the face recognition model. Through the obtained distortion parameters, the user can adjust the installation position and installation posture of the camera device so that the target to be observed is close to the center of the current scene image, thereby alleviating the adverse effects caused by lens distortion.
[0054] Optionally, image analysis processing is performed on the current scene image to obtain installation posture parameters of the camera device, and details may refer to the following steps included after S200:
[0055] S210: Determine the distance state of the camera device relative to the scene to be monitored based on the current scene image, and obtain a distance parameter representing the distance state.
[0056] Specifically, the scene to be monitored may include multiple scene objects as targets to be observed, and the distance state of the camera device relative to the scene to be monitored may include the degree of conformity of the physical distance between each target in the scene to be monitored and the camera device with the infrared detection distance.
[0057] Optionally, the distance state of the camera device relative to the monitored scene is calculated based on the current scene image to obtain a distance parameter representing the distance state. For details, see the following steps included after S210:
[0058] S211: Calculate the physical distance between the camera device and the scene object captured in the scene to be monitored based on the current scene image.
[0059] The scene objects captured in the scene to be monitored will appear in the current scene image. The AI algorithm can be used to analyze and process the current scene image to calculate the distance between each scene object captured in the scene to be monitored and the camera device. For example, a monocular AI algorithm can be used to analyze and process the current scene image. The scene objects may include people, animals, and objects. The scene objects may be moving or fixed.
[0060] Optionally, the physical distance between the camera device and the scene object captured in the scene to be monitored is calculated based on the current scene image. For details, see the following steps included after S211:
[0061] S2111: Identify the location of scene objects in the current scene image.
[0062] Specifically, the position and shape of scene objects in the current scene image can be identified through algorithms such as image segmentation and feature extraction.
[0063] S2112: Convert the position of the scene object using the internal and external parameters of the camera device to obtain the physical distance between the scene object and the camera device.
[0064] The internal parameters of the camera device refer to the internal parameters of the camera lens, including focal length, aperture, distortion, etc. Focal length refers to the focal distance that the lens can adjust, which affects the depth of field of the shooting; aperture refers to the size of the light entering the lens that the lens can adjust, which affects the exposure and depth of field; distortion refers to the image deformation caused by the lens during the imaging process.
[0065] The external parameters of the camera device include the camera's resolution, sensitivity and other parameters. Resolution refers to the number of image pixels that can be captured, which affects the clarity of the image; sensitivity refers to the sensitivity to light, which affects the exposure and image noise.
[0066] The position of the scene object in the image can be represented in the form of coordinates, and the intrinsic and extrinsic parameters of the camera device can be represented in the form of a matrix, so that the position of the scene object in the image can be converted into the distance between the camera device and the scene object in the real scene by calculation.
[0067] Optionally, the intrinsic parameters and extrinsic parameters of the camera device may be obtained by calibrating the camera device.
[0068] S212: Compare the physical distance with the infrared detection distance of the camera device, and determine the image area where the scene objects whose physical distances are less than or equal to the infrared detection distance in the current scene image are located as the infrared effective detection area.
[0069] The infrared component can effectively sense the scene objects and their surroundings within the infrared effective detection area. When a person approaches a scene object within the infrared effective detection area during use of the camera device, the infrared component can sense the person's movement and issue an alarm. Scene objects outside the infrared effective detection area cannot be effectively sensed by the infrared component, or the sensing effect is poor.
[0070] S213: Calculate the distance parameter based on the relative size relationship between the infrared effective detection area and the current scene image.
[0071] The larger the relative area between the infrared effective detection area and the current scene image, the better the overall sensing effect of the infrared component on all scene objects in the current scene image. In some embodiments, the larger the relative area between the infrared effective detection area and the current scene image, the more scene objects the infrared component can effectively sense. In other embodiments, the larger the relative area between the infrared effective detection area and the current scene image, the more complete and accurate the infrared component's sensing of the area where the scene objects are located is.
[0072] In some embodiments, the larger the relative area between the infrared effective detection area and the current scene image, the smaller the distance parameter. In other embodiments, the larger the relative area between the infrared effective detection area and the current scene image, the larger the distance parameter.
[0073] Optionally, the distance parameter is calculated based on the relative size relationship between the infrared effective detection area and the current scene image. For details, see the following steps included after S213:
[0074] S2131: Calculate the ratio of the area of the infrared effective detection area to the area of the current scene image, and use the ratio as a distance parameter.
[0075] Using the ratio of the area of the infrared effective detection area to the area of the current scene image as the distance parameter can intuitively reflect the relative size relationship between the infrared effective detection area and the current scene image.
[0076] The area of the infrared effective detection area can be represented by S(PIR), the area of the current scene image can be represented by S(Pic), and the distance parameter can be represented by W1. That is, W1 = S(PIR) / S(Pic). The calculated W1 value range is 0-1. For example, the calculated W1 is 0.5, 0.6, 0.7 or 0.8. The calculated W1 is 1, which means that all scene objects in the current scene image can be effectively sensed by the infrared component, and the area of the infrared effective detection area reaches the ideal state.
[0077] Furthermore, the distance parameter can be output as prompt information. Using the ratio of the area of the infrared effective detection area to the area of the current scene image as the distance parameter can help users understand the relative size relationship between the infrared effective detection area and the current scene image, thereby improving the installation efficiency of the camera device.
[0078] Optionally, image analysis processing is performed on the current scene image to obtain installation posture parameters of the camera device, and details may refer to the following steps included after S200:
[0079] S220: Determine the pitch state of the camera device relative to the monitored scene based on the current scene image, and obtain a posture parameter representing the pitch state.
[0080] The pitch state of the camera device relative to the monitored scene affects the shooting angle of the camera device, thereby affecting the formation of the current scene image. When the camera device performs some functions, such as face recognition, there will be requirements for the shooting angle of the camera device. Different pitch states of the camera device will obtain different current scene images. The current pitch state of the camera device can be determined based on the current scene image, so that the pitch state of the camera device can be adjusted when the current pitch state of the camera device does not meet the use requirements.
[0081] Optionally, the pitch state of the camera device relative to the monitored scene is determined based on the current scene image, and a posture parameter characterizing the pitch state is obtained. For details, see the following steps included after S220:
[0082] S221: Calculate the pitch angle of the camera device relative to the monitored scene based on the current scene image.
[0083] In some application scenarios, the camera device is suspended at a higher position facing the ground. The pitch angle is the angle between the shooting direction of the camera device and the ground when the camera device is facing the ground. The pitch angle of the camera device affects the shooting angle of the camera device, thereby affecting the formation of the current scene image. Different pitch angles correspond to different current scene images. The AI algorithm can be used to calculate the pitch angle of the camera device according to the current scene image, so as to adjust the pitch angle of the camera device when the pitch angle of the camera device does not meet the use requirements.
[0084] For example, visual SLAM (Simultaneous Localization and Mapping) technology can be used to estimate the installation position and installation posture of the camera device through image matching and tracking. The installation position of the camera device may include the installation height of the camera device. The installation posture of the camera device may include the pitch angle of the camera device.
[0085] Optionally, the pitch angle of the camera device relative to the scene to be monitored is calculated based on the current scene image. For details, see the following steps included after S221:
[0086] S2211: Perform feature extraction on the multiple current scene images forming a sequence respectively to obtain feature objects and descriptors matching the feature objects.
[0087] The multiple current scene images forming a sequence may be captured by a camera or acquired by other image acquisition equipment.
[0088] Feature extraction refers to extracting representative points or regions from multiple current scene images that form a sequence. These points or regions belong to feature objects. These points or regions have certain uniqueness and can be used to distinguish different scenes or objects. Descriptors are used to represent the uniqueness of these points or regions. Common feature extraction algorithms include SIFT, SURF, ORB, FAST, etc. In the process of SLAM calculation, the selection of feature points usually takes into account factors such as their robustness, speed, and quantity in order to achieve real-time calculation.
[0089] S2212: Perform feature matching between feature objects of multiple current scene images according to the descriptors to calculate the three-dimensional positions of feature objects with the same descriptors.
[0090] Feature matching refers to finding the corresponding feature points or feature areas in multiple current scene images in order to calculate the distance or relative position relationship between them. The accuracy and robustness of feature matching will directly affect the calculation results of triangulation. Common feature matching algorithms include matching based on descriptors (such as SIFT descriptors, SURF descriptors), matching based on optical flow, matching based on geometric transformation, etc. In SLAM, the selection of feature matching needs to take into account factors such as the accuracy, robustness, and computational complexity of the algorithm in order to achieve real-time calculations.
[0091] S2213: Using the internal and external parameters of the camera device to convert and calculate the three-dimensional position to obtain the pitch angle.
[0092] Feature extraction and feature matching are important steps in calculating the pitch angle. The purpose of these steps is to extract representative features from the images taken by the camera device and find the correspondence between these features in different images in order to perform triangulation calculations. Correctly selecting and using appropriate algorithms can improve the accuracy and robustness of the calculations. At the same time, in practical applications, it is also necessary to properly handle the quality of the image and interference factors to improve the stability and practicality of the calculations.
[0093] The triangulation calculation is based on the position of the same spatial point projected onto the imaging plane of the camera device at different times to determine the depth of the point at these two times. For a camera device with a single camera, the depth of the spatial point in the monitored scene needs to be estimated through triangulation calculation.
[0094] Furthermore, the pitch angle can be output as prompt information. When the pitch angle does not meet the use requirements, it is convenient for the user to adjust the camera device according to the output pitch angle, thereby improving the installation efficiency of the camera device.
[0095] S222: Calculate a first matching result between the pitch angle and the preset angle range, and determine the posture parameter in a first preset association relationship using the first matching result. The first preset association relationship represents the association relationship between the first matching result and the posture parameter.
[0096] The preset angle range is an angle value range set according to the function and application scenario of the camera device. If the pitch angle falls within the preset angle range, it is beneficial for the camera device to maintain a suitable shooting angle and improve the working effect of the camera device. For example, when the camera device is used for face recognition, the camera device has a better face recognition effect when the pitch angle of the camera device is 10 degrees to 15 degrees.
[0097] In some embodiments, the first matching result is positively correlated with the posture parameter. In other embodiments, the first matching result is negatively correlated with the posture parameter. For example, the first matching result can be represented by distance(angle), the posture parameter can be represented by W2, and the correlation between the first matching result and the posture parameter is W2=1-(distance(angle)×0.02). In this formula, distance(angle) represents the degree of deviation of the pitch angle from the preset angle range, and 0.02 is the value obtained by experiment. The calculated W2 has a value range of 0-1. For example, the calculated W2 is 0.5, 0.6, 0.7 or 0.8. When distance(angle) is 0, the calculated W2 is 1, indicating that the pitch angle falls within the preset angle range, and the pitch angle is in an ideal state at this time.
[0098] Optionally, a first matching result between the pitch angle and the preset angle range is calculated, and details may refer to the following steps included after S222:
[0099] S2221: Determine whether the pitch angle is greater than or equal to a first angle threshold and less than or equal to a second angle threshold. The first angle threshold to the second angle threshold form a preset angle range.
[0100] For example, when using a camera device for face recognition, the first angle threshold and the second angle threshold are values obtained through experiments using a face recognition model on the camera device. The first angle threshold may be 10 degrees, and the second angle threshold may be 15 degrees, and then it is determined whether the pitch angle is greater than or equal to 10 degrees and less than or equal to 15 degrees.
[0101] The first angle threshold may be represented by Perfect_angle(min), the second angle threshold may be represented by Perfect_angle(max), and the pitch angle may be represented by angle(Real).
[0102] S2222: If the pitch angle is greater than or equal to the first angle threshold and less than or equal to the second angle threshold, the first fixed preset value is used as the first matching result.
[0103] For example, the first angle threshold may be 10 degrees, and the second angle threshold may be 15 degrees. If the pitch angle is between 10 degrees and 15 degrees, the first fixed preset value is used as the first matching result.
[0104] For example, the value of angle(Real) is 11 degrees, 12 degrees or 13 degrees. At this time, the relationship: Perfect_angle(min)<=angle(Real)<=Perfect_angle(max) can be obtained, and the first fixed preset value is used as the first matching result.
[0105] Optionally, the first matching result may be represented by distance(angle), and the first fixed preset value may be 0. That is, distance(angle)=0. The first fixed preset value being 0 can simplify the operation. Further, the first matching result and the posture parameter can be output as prompt information, and the first fixed preset value being 0 can facilitate the user to quickly determine whether the pitch angle falls within the preset angle range according to the first matching result.
[0106] S2223: If the pitch angle is less than the first angle threshold or greater than the second angle threshold, the smaller one of the absolute value of the difference between the pitch angle and the first angle threshold and the absolute value of the difference between the pitch angle and the second angle threshold is taken as the first matching result.
[0107] For example, the first angle threshold can be 10 degrees, and the second angle threshold can be 15 degrees. If the pitch angle is less than 10 degrees or greater than 15 degrees, the smaller one of the absolute value of the difference between the pitch angle and the first angle threshold and the absolute value of the difference between the pitch angle and the second angle threshold is taken as the first matching result.
[0108] For example, if the value of angle(Real) is 5 degrees, 20 degrees, or 25 degrees, then distance(angle)=min(abs(Angle(Real)-Perfect_angle(min)),abs(Angle(Real)-Perfect_angle(max))), and the calculated values of distance(angle) are 5, 5, and 10, respectively. abs represents the absolute value function.
[0109] Optionally, image analysis processing is performed on the current scene image to obtain installation posture parameters of the camera device, and details may refer to the following steps included after S200:
[0110] S230: Determine the lighting state of the scene to be monitored sensed by the camera device in the current scene image, and obtain a light intensity parameter representing the lighting state.
[0111] Appropriate lighting conditions can make the current scene image clear and easy to identify. For the same scene to be monitored, as the installation position and installation posture of the camera device change, the lighting conditions felt by the camera device often change, and the current scene image will also change accordingly. It can be determined based on the current scene image whether the lighting conditions felt by the camera device are within the appropriate range.
[0112] Optionally, the illumination state of the scene to be monitored sensed by the camera device is calculated in the current scene image to obtain a light intensity parameter representing the illumination state. For details, see the following steps included after S230:
[0113] S231: Obtain the light intensity of the scene to be monitored in the current scene image.
[0114] Specifically, the lighting state felt by the camera device will be reflected in the current scene image, and the lighting intensity in the current scene image can be used to represent the lighting state felt by the camera device.
[0115] Optionally, the illumination intensity of the scene to be monitored in the current scene image is obtained, and details may refer to the following steps included after S231:
[0116] S2311: Convert the current scene image into a grayscale image, and calculate the grayscale value of each pixel of the grayscale image.
[0117] S2312: Calculate the average grayscale value of all pixels in the grayscale image to obtain the light intensity.
[0118] Specifically, the mean grayscale method can be used to obtain the light intensity in the current scene image. A grayscale image consists of multiple pixels. The grayscale value of each pixel in the grayscale image represents the light intensity at the corresponding position of the pixel. The average grayscale value of all pixels in the grayscale image represents the light intensity of the current scene image. The grayscale value ranges from 0 to 255 (0 is completely black, 255 is completely white).
[0119] The grayscale value of a grayscale image can be calculated according to the following formula: n represents the number of pixels, and Ci represents the grayscale value of each pixel.
[0120] Optionally, the grayscale value of each pixel of the grayscale image is calculated. For details, see the following steps included after S2311:
[0121] S2313: Calculate the average value of the red, green and blue channels of each pixel to obtain the grayscale value.
[0122] Specifically, the average value of the three channel values of red (R), green (G), and blue (B) of each pixel can be calculated as the grayscale value of each pixel.
[0123] The grayscale value of each pixel can be calculated according to the following formula: 1≤i≤n, n represents the number of pixels.
[0124] S232: Calculate a second matching result between the illumination intensity and the preset light intensity range, and determine the light intensity parameter in a second preset association relationship using the second matching result. The second preset association relationship represents the association relationship between the second matching result and the light intensity parameter.
[0125] The preset light intensity range is a value range of light intensity set according to the function and application scenario of the camera device. When the light intensity falls within the preset light intensity range, it is beneficial for the camera device to obtain clear and easy-to-recognize images and improve the working effect of the camera device. For example, when using the camera device for face recognition, the camera device has a better face recognition effect when the light intensity of the camera device is 160-200.
[0126] In some embodiments, the second matching result is positively correlated with the light intensity parameter. In other embodiments, the second matching result is negatively correlated with the light intensity parameter. For example, the second matching result can be represented by distance(light), the light intensity parameter can be represented by W3, and the correlation between the second matching result and the light intensity parameter is W3=1-(distance(light)×0.01). In this formula, distance(light) represents the degree of deviation of the light intensity from the preset light intensity range, and 0.01 is the value obtained experimentally. The calculated W3 value range is 0-1. For example, the calculated W3 is 0.5, 0.6, 0.7 or 0.8. When distance(light) is 0, the calculated W3 is 1, indicating that the light intensity falls within the preset light intensity range, and the light intensity is in an ideal state at this time.
[0127] Optionally, a second matching result between the illumination state and the preset light intensity range is calculated, and details may refer to the following steps included after S232:
[0128] S2321: Determine whether the light intensity is greater than or equal to a first light intensity threshold and less than or equal to a second light intensity threshold. The first light intensity threshold to the second light intensity threshold form a preset light intensity range.
[0129] For example, when using a camera device for face recognition, the first light intensity threshold and the second light intensity threshold are values obtained through experiments using a face recognition model on the camera device. The first light intensity threshold can be 160, and the second light intensity threshold can be 200, then it is determined whether the light intensity is greater than or equal to 160 and less than or equal to 200.
[0130] The first light intensity threshold can be represented by Perfect_light(min), the second light intensity threshold can be represented by Perfect_light(max), and the light intensity can be represented by light(Real).
[0131] S2322: If the light intensity is greater than or equal to the first light intensity threshold and less than the second light intensity threshold, the second matching result is set as a second fixed preset value.
[0132] For example, the first light intensity threshold may be 160, and the second light intensity threshold may be 200. If the light intensity is between 160 degrees and 200 degrees, the second fixed preset value is used as the second matching result.
[0133] For example, the value of light(Real) is 170, 180 or 190, and the relationship: Perfect_light(min)<=light(Real)<=Perfect_light(max) can be obtained, and the second fixed preset value is used as the second matching result.
[0134] Optionally, the second matching result can be represented by distance(light), and the second fixed preset value can be 0. That is, distance(light)=0. The second fixed preset value being 0 can simplify the operation. Further, the second matching result and the light intensity parameter can be output as prompt information, and the second fixed preset value being 0 can facilitate the user to quickly determine whether the light intensity falls within the preset light intensity range based on the second matching result.
[0135] S2323: If the light intensity is less than the first light intensity threshold or greater than the second light intensity threshold, the smaller one of the absolute value of the difference between the light intensity and the first light intensity threshold and the absolute value of the difference between the light intensity and the second light intensity threshold is taken as the second matching result.
[0136] For example, the first light intensity threshold can be 160, and the second light intensity threshold can be 200. If the light intensity is less than 160 or greater than 200, the smaller one of the absolute value of the difference between the light intensity and the first light intensity threshold and the absolute value of the difference between the light intensity and the second light intensity threshold is taken as the second matching result.
[0137] For example, light(Real) can be 150, 210 or 220, then the relationship distance(light)=min(abs(light(Real)-Perfect_light(min)),abs(light(Real)-Perfect_light(max))) is executed, and the values of distance(light) are calculated to be 10, 10 and 20 respectively. Wherein, abs represents the absolute value function.
[0138] S300: Determine whether the installation posture parameters meet the preset installation conditions.
[0139] If the installation posture parameters meet the preset installation conditions, it means that the installation position and installation posture of the camera device can meet the current use requirements of the camera device. If the installation posture parameters do not meet the preset installation conditions, it means that at least one of the installation position and installation posture of the camera device does not meet the current use requirements of the camera device.
[0140] Optionally, the installation posture parameter includes a distance parameter, and the distance parameter is used to characterize the distance state of the camera device relative to the scene to be monitored. The preset installation condition includes a distance installation condition.
[0141] Determine whether the installation posture parameters meet the preset installation conditions. For details, refer to the following steps after S300:
[0142] S310: Determine whether the distance parameter meets the distance installation condition.
[0143] Specifically, the distance parameter can be represented by W1, and the distance installation condition is that the W1 value is greater than or equal to 0.7, so it is necessary to determine whether the current W1 value is greater than or equal to 0.7. Here, 0.7 is a value obtained by experiment, which represents the critical value of the acceptable distance parameter.
[0144] S320: If the distance parameter does not meet the distance installation condition, it is determined that the installation posture parameter does not meet the preset installation condition.
[0145] Specifically, if the W1 value is less than 0.7, it means that the installation posture parameters do not meet the preset installation conditions, so the installation position of the camera device is adjusted, and then the W1 value is calculated again until the W1 value is greater than or equal to 0.7. If the W1 value is greater than or equal to 0.7, the current W1 value is obtained.
[0146] Optionally, the installation posture parameter includes a posture parameter. The posture parameter is used to characterize the pitch state of the camera device relative to the scene to be monitored. The preset installation condition includes a posture installation condition. To determine whether the installation posture parameter meets the preset installation condition, please refer to the following steps included after S300:
[0147] S330: Determine whether the posture parameters meet the posture installation conditions.
[0148] Specifically, the posture parameter can be represented by W2, and the posture installation condition is that the W2 value is greater than or equal to 0.6. It is necessary to determine whether the current W2 value is greater than or equal to 0.6. Here, 0.6 is an experimentally obtained value, which represents the critical value of the acceptable posture parameter.
[0149] S340: If the posture parameters do not meet the posture installation conditions, it is determined that the installation posture parameters do not meet the preset installation conditions.
[0150] Specifically, if the W2 value is less than 0.6, it means that the installation posture parameters do not meet the preset installation conditions, and the installation posture of the camera device needs to be adjusted, and then the W2 value is calculated again until the W2 value is greater than or equal to 0.6. If the W2 value is greater than or equal to 0.6, the current W2 value is obtained.
[0151] When the attitude installation condition is that the W2 value is greater than or equal to 0.6, the formula W2=1-(distance(angle)×0.02) means as follows: if the pitch angle deviates from the preset angle range by more than 20 degrees, the attitude parameters do not meet the attitude installation condition; if the pitch angle deviates from the preset angle range by less than or equal to 20 degrees, the attitude parameters meet the attitude installation condition.
[0152] Optionally, the installation posture parameter includes a light intensity parameter, which is used to characterize the lighting state of the scene to be monitored sensed by the camera device. The preset installation condition includes a light intensity installation condition. To determine whether the installation posture parameter meets the preset installation condition, please refer to the following steps included after S300:
[0153] S350: Determine whether the light intensity parameters meet the light intensity installation conditions.
[0154] Specifically, the light intensity parameter can be represented by W3, and the light intensity installation condition is that the W3 value is greater than or equal to 0.5. It is necessary to determine whether the current W3 value is greater than or equal to 0.5. Here, 0.5 is a value obtained by experiment, which represents the critical value of the acceptable light intensity parameter.
[0155] S360: If the light intensity parameters do not meet the light intensity installation conditions, it is determined that the installation posture parameters do not meet the preset installation conditions.
[0156] Specifically, if the W3 value is less than 0.5, it means that the installation posture parameters do not meet the preset installation conditions, and it is necessary to adjust the installation position and / or installation posture of the camera device, and then calculate the W3 value again until the W3 value is greater than or equal to 0.5. If the W3 value is greater than or equal to 0.5, the current W3 value is obtained.
[0157] When the light intensity installation condition is that the W3 value is greater than or equal to 0.5, the formula W3=1-(distance(light)×0.01) means as follows: if the light intensity deviates from the preset light intensity range by more than 50, the light intensity parameters do not meet the light intensity installation conditions; if the light intensity deviates from the preset light intensity range by less than or equal to 50, the light intensity parameters meet the light intensity installation conditions.
[0158] Alternatively, if Figure 3 As shown, the installation posture parameters include distance parameters, posture parameters and light intensity parameters. The distance parameter is used to characterize the distance state between the camera device and the scene to be monitored. The posture parameter is used to characterize the posture state of the camera device relative to the scene to be monitored. The light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device. The preset installation conditions include distance installation conditions, posture installation conditions and light intensity installation conditions. To determine whether the installation posture parameters meet the preset installation conditions, please refer to the following steps included after S300:
[0159] S370: respectively determining whether the distance parameter meets the distance installation condition, determining whether the posture parameter meets the posture installation condition, and determining whether the light intensity parameter meets the light intensity installation condition.
[0160] S371: If the distance parameter satisfies the distance installation condition, the posture parameter satisfies the posture installation condition, and the light intensity parameter satisfies the light intensity installation condition, it is determined that the installation posture parameter satisfies the preset installation condition.
[0161] The three judgment actions are in parallel relationship and can be performed simultaneously.
[0162] S372: If the distance parameter does not meet the distance installation condition, or the posture parameter does not meet the posture installation condition, or the light intensity parameter does not meet the light intensity installation condition, it is determined that the installation posture parameter does not meet the preset installation condition.
[0163] Alternatively, if Figure 4 As shown, the installation posture parameters include distance parameters, posture parameters and light intensity parameters. The distance parameter is used to characterize the distance state of the camera device relative to the scene to be monitored. The posture parameter is used to characterize the pitch state of the camera device relative to the scene to be monitored. The light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device. The preset installation conditions include distance installation conditions, posture installation conditions and light intensity installation conditions. To determine whether the installation posture parameters meet the preset installation conditions, please refer to the following steps included after S300:
[0164] S380: Determine whether the distance parameter meets the distance installation condition.
[0165] S381: If the distance parameter satisfies the distance installation condition, it is further determined whether the posture parameter satisfies the posture installation condition.
[0166] S382: If the posture parameters meet the posture installation conditions, further determine whether the light intensity parameters meet the light intensity installation conditions.
[0167] S383: If the light intensity parameters meet the light intensity installation conditions, it is determined that the installation posture parameters meet the preset installation conditions.
[0168] S384: If the distance parameter does not meet the distance installation condition, or the posture parameter does not meet the posture installation condition, or the light intensity parameter does not meet the light intensity installation condition, it is determined that the installation posture parameter does not meet the preset installation condition.
[0169] The three judgment actions are in a serial relationship and need to be performed in sequence. From the calculation formulas of the distance parameter, attitude parameter and light intensity parameter, it can be obtained that the weights of the distance parameter, attitude parameter and light intensity parameter decrease in sequence. Therefore, it is necessary to judge whether the distance parameter meets the distance installation condition, whether the attitude parameter meets the attitude installation condition and whether the light intensity parameter meets the light intensity installation condition in sequence.
[0170] In some embodiments, after executing step S380 and determining that the distance parameters meet the distance installation conditions, W2 and W3 and the real-time face detection rate may be calculated first. If the real-time face detection rate meets the use requirements, it is not necessary to execute steps S382 to S384, and it can be determined that the installation posture parameters meet the preset installation conditions. If the real-time face detection rate does not meet the use requirements, steps S382 to S384 are executed, and when the installation posture parameters do not meet the preset installation conditions, the installation posture of the camera device is adjusted so that the installation posture parameters finally meet the preset installation conditions.
[0171] In some embodiments, after executing step S380 and determining that the distance parameters meet the distance installation conditions, the user can decide whether to calculate W2 and W3 and the real-time face detection rate. If the user decides not to calculate W2 and W3 and the real-time face detection rate, the camera device is installed.
[0172] Optionally, after determining whether the installation posture parameters meet the preset installation conditions, the following steps are included:
[0173] S390: If the installation posture parameter meets the preset installation condition, an installation deviation parameter is generated based on the distance parameter, the posture parameter and the light intensity parameter. The installation deviation parameter is used to indicate the deviation between the installation posture of the camera device and the preset ideal installation posture.
[0174] In the working process of the camera device, the distance parameter, the posture parameter and the light intensity parameter often work together. Setting the installation deviation parameter can comprehensively consider the distance parameter, the posture parameter and the light intensity parameter, so as to further judge whether the distance parameter, the posture parameter and the light intensity parameter are reasonable.
[0175] Optionally, an installation deviation parameter is generated based on the distance parameter, the posture parameter, and the light intensity parameter. For details, see the following steps included after S390:
[0176] S391: Multiply the distance parameter, the posture parameter and the light intensity parameter to obtain the installation deviation parameter.
[0177] In this way, the installation deviation parameters can comprehensively reflect the difference between the actual distance parameters, posture parameters and light intensity parameters and the ideal distance parameters, posture parameters and light intensity parameters, that is, the installation deviation parameters can comprehensively reflect the difference between the actual area, pitch angle and light intensity of the infrared effective detection area and the ideal area, pitch angle and light intensity of the infrared effective detection area.
[0178] The installation deviation parameter can be expressed by Gap, then Gap = W1 × W2 × W3. For example, if W1, W2 and W3 are all 0.9, then Gap = 0.9 × 0.9 × 0.9 = 0.729.
[0179] Optionally, after generating the installation deviation parameter based on the distance parameter, the posture parameter and the light intensity parameter, the method further includes:
[0180] S392: Calculate a real-time face detection rate based on the installation deviation parameter and a preset ideal face detection rate.
[0181] The real-time face detection rate is the face detection rate calculated by taking into account the installation deviation parameters. The preset ideal face detection rate is the result obtained by experiment under ideal conditions. If the actual area, pitch angle and light intensity of the infrared effective detection area do not reach the ideal state, the real-time face detection rate will be lower than the preset ideal face detection rate.
[0182] Furthermore, the product of the installation deviation parameter and the preset ideal face detection rate can be output as the real-time face detection rate. The real-time face detection rate can be represented by Real_recall, and the preset ideal face detection rate can be represented by Perfect_recall, then Real_recall = Perfect_recall × Gap.
[0183] For example, Perfect_recall may be 90% or 100%, etc. For example, Perfect_recall is equal to 95%, Gap=0.9, then Real_recall=95%×0.9=85.5%.
[0184] S393: Output the real-time monitoring image and the real-time face detection rate to the display device, and display the real-time monitoring image and the real-time face detection rate on the display device.
[0185] like Figure 5 As shown, the display device may be a smart phone, a tablet computer, etc. An application program (APP) may be installed on the display device. The user can view the real-time monitoring image and the real-time face detection rate taken by the camera device through the application program on the display device. The real-time face detection rate can be used by the user to determine whether the camera device meets the use requirements.
[0186] Furthermore, the preset face detection rate range can be output to the display device for the user to view, and the preset face detection rate range represents the face detection rate of the recommended camera device, so that the user can judge whether the real-time face detection rate meets the use requirements. If the real-time face detection rate does not meet the use requirements, the installation posture of the camera device is further adjusted to obtain W2 and W3 with values closer to 1 again, so as to improve the final real-time face detection rate.
[0187] In some embodiments, the user can input the value of the infrared detection distance through the APP.
[0188] S400: If the installation posture parameters do not meet the preset installation conditions, outputting prompt information for assisting the adjustment of the camera device, where the prompt information is used to prompt the user to adjust the installation posture of the camera device relative to the monitored scene.
[0189] The prompt information can be output in various ways, such as to a display device, a speaker, etc. The prompt information can be in various forms, including images, sounds, text, numbers, etc. The prompt information can include various data obtained during the installation process, and can also include suggestions for the installation process.
[0190] Alternatively, if Figure 6 As shown, the prompt information includes a mask area 24, and the mask area 24 is used to prompt the user the size of the area that can be effectively detected by infrared, and the area of the mask area 24 is positively correlated with the distance parameter. Outputting the prompt information for assisting the adjustment of the camera device can be specifically referred to the following steps after S400:
[0191] S410: Determine a mask area in the infrared effective detection area, and display the mask area on the current scene image on a display device.
[0192] The mask area 24 is a form of prompt information, which is used to suggest the user to move the shooting field of the camera device to the mask area 24 by moving the installation posture of the camera device, so as to increase the area of the infrared effective detection area.
[0193] The mask area 24 can be generated from the infrared effective detection area. The larger the area of the infrared effective detection area is, the larger the area of the mask area 24 is. When the infrared effective detection area is discontinuous or irregular, a continuous and regular mask area 24 can be generated as a prompt information to the user.
[0194] Optionally, on the display device, the mask area 24 divides the current scene image into two parts. Further, the mask area 24 and the area outside the mask area 24 have a color difference, for example, the mask area 24 is blue, and the area outside the mask area 24 is red. Of course, the blue and red are set to be transparent and will not block the display of the current scene image.
[0195] Optionally, the prompt information includes angle prompt information, and the angle prompt information is used to prompt the user of the pitch state of the camera device. Outputting the prompt information for assisting the camera device in adjusting the camera device may refer to the following steps after S400:
[0196] S420: Figure 7 As shown, the current scene image is displayed in the first area 21 of the display device, and the angle prompt information is displayed in the second area 22 which is spaced apart from the first area.
[0197] For example, the pitch angle can be output as angle prompt information. The angle prompt information can also include the adjustment direction of the camera device, and the user can achieve a better pitch state after adjusting the camera device according to the adjustment direction. In other embodiments, the second area 22 is displayed on the upper layer of the first area 21.
[0198] Optionally, the prompt information includes light intensity prompt information. The light intensity prompt information is used to prompt the user of the light state of the scene to be monitored sensed by the camera device. Outputting the prompt information for assisting the camera device in adjusting the camera device may refer to the following steps after S400 for details:
[0199] S430: Figure 8 As shown, the current scene image is displayed in the first area 21 of the display device, and the light intensity prompt information is displayed in the third area 23 spaced apart from the first area 21 .
[0200] For example, the light intensity can be output as angle prompt information. The light intensity prompt information can also include the adjustment direction of the camera device, and the user can achieve a better lighting state after adjusting the camera device according to the adjustment direction. In other embodiments, the third area 23 is displayed on the upper layer of the first area 21.
[0201] In some embodiments, the second area 22 and the third area 23 are the same area. In other embodiments, the second area 22 and the third area 23 are different areas.
[0202] Optionally, the prompt information includes an adjustment direction, and the adjustment direction is used to instruct the user to adjust the installation posture of the camera device. Outputting the prompt information for assisting the camera device in adjusting the camera device may refer to the following steps after S400:
[0203] S440: Outputting the adjustment direction to the display device to display the adjustment direction on the display device, so that the user can adjust the installation posture of the camera device according to the direction indicated by the adjustment direction.
[0204] The adjustment direction can have various forms, including images, text, symbols, etc.
[0205] Optionally, the adjustment direction is used to reduce or even eliminate the difference between the current lighting state and the ideal lighting state. The adjustment direction can be calculated based on the current scene image using an algorithm.
[0206] Optionally, the adjustment direction is used to reduce or even eliminate the difference between the current pitch state and the ideal pitch state. The adjustment direction can be calculated based on the current scene image using an AI algorithm.
[0207] Optionally, the adjustment direction is used to reduce or even eliminate the difference between the current distance parameter and the ideal distance parameter. The adjustment direction can be calculated based on the current scene image using an AI algorithm.
[0208] Optionally, the adjustment direction is used to reduce or even eliminate the difference between the real-time face detection rate and the preset ideal face detection rate, that is, to reduce or even eliminate the installation deviation parameter. The adjustment direction can be obtained by comprehensively considering the illumination state, the pitch state and the distance parameter.
[0209] like Fig. 9 As shown, the electronic device 2 described in the electronic device embodiment of the present application includes a memory 100, a processor 200 and a communication circuit 400, the memory 100 stores a computer program, and the processor 200 is used to execute the computer program to implement the installation method described in the installation method embodiment of the camera device of the present application.
[0210] The processor 200 is used to control the operation of the electronic device 2. The processor 200 may also be referred to as a CPU (Central Processing Unit). The processor 200 may be an integrated circuit chip having the ability to process signals. The processor 200 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0211] The processor 200 supports functions such as outgoing streaming, streaming media compression, and packetization. The processor 200 also supports AI processing, thereby supporting the installation method described in the embodiment of the installation method of the camera device of the present application.
[0212] The memory 100 is used to store computer programs, and may be a RAM, a ROM, or other types of storage devices. Specifically, the memory 100 may include one or more computer-readable storage media, which may be non-transitory. The memory 100 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 100 is used to store at least one program code.
[0213] The electronic device 2 can perform data transmission with other electronic devices 2 via the communication circuit 400. The communication circuit 400 can implement wireless communication or wired communication.
[0214] In some embodiments, the electronic device 2 further includes a display device 20 and a camera device 1. The camera device 1 sends the captured image to the processor 200, and the processor 200 can send the data to the display device 20.
[0215] Furthermore, an application program (APP) is installed on the display device 20. After the user opens the APP, the interface of the display device 20 will display prompt information for guiding the user to install and the image captured by the camera device 1. Specifically, the prompt information displayed on the interface of the display device 20 can directly tell the user which position is suitable for detection and which position is not suitable for detection. The user can also make judgments based on the prompt information and adjust the installation posture of the camera device 1 by himself. The guidance information may include the real-time installation status of the camera device 1. If the installation posture of the camera device 1 is not suitable, or the lighting state felt by the camera device 1 is not suitable, the prompt information displayed on the interface of the display device 20 can prompt the user to make corresponding adjustments, such as the light intensity at the current installation position is too large, exceeding the maximum range of the light perception of the camera device 1, prompting the user to adjust the position of the camera device 1. The guidance information may also include suggestions for increasing or decreasing the installation height, suggestions for pitch angle deflection, and suggestions for lighting status, so that the scene objects that need to be paid attention to can be placed in a suitable imaging area.
[0216] In this way, the AI algorithm assists the user in finding a suitable installation posture for the camera device 1 , and the user can install and adjust the camera device 1 more conveniently.
[0217] In some embodiments, Fig.10 As shown, after the user opens the APP, the interface of the display device 20 will display an option of "Start Installation Guide" for the user to click to start the installation guide of the camera device 1. The specific process is as follows:
[0218] 1. The user preliminarily installs the camera device 1 and clicks “Start Installation Guide” on the display device 20 .
[0219] 2. After opening the installation guide, calculate the W1, W2, and W3 values in real time and make a judgment.
[0220] If the values of W1, W2 and W3 all meet the requirements, the value of the real-time face detection rate is output. At the same time, the APP can form a blue mask area 24 on the current scene image displayed on the display interface, and the non-mask area 24 on the current scene image is presented in red. The mask area 24 is the recommended shooting field of view. In some embodiments, the mask area 24 changes with the change of the value of W1. In other embodiments, the mask area 24 changes with the change of the values of W1, W2 and W3.
[0221] If W2 does not meet the requirements, it indicates that the current illumination state does not meet the requirements, and please move the camera device 1 to adjust. If W3 does not meet the requirements, it indicates that the pitch state does not meet the requirements, and please move the camera device 1 to adjust.
[0222] 3. Such as Figure 6 As shown, after the user confirms that the installation is complete, click the "Finish Installation" option to exit the installation wizard.
[0223] When the camera device 1 is used for face recognition, the real-time face detection rate can be calculated through the installation instructions of the App, so that the camera device 1 can better capture face information during use and improve the accuracy of face recognition.
[0224] Optionally, the processor 200 sends data to the display device 20 through a server or a cloud server.
[0225] Optionally, the electronic device 2 is specifically a computer host or a server, etc.
[0226] Optionally, the electronic device 2 is a camera device 1. Figure 1 As shown, the camera device 1 includes a memory 100, a processor 200 and a communication circuit 400. The memory 100 stores a computer program, and the processor 200 is used to execute the computer program to implement the installation method described in the embodiment of the camera device installation method of the present application.
[0227] The camera device 1 may further include a camera head 310 and an infrared component 320. The camera head 310 may be in a normal standby state, and the infrared component 320 may send an electrical signal to the processor 200 when detecting an abnormality, and the processor 200 may control the camera head 310 to start shooting.
[0228] To sum up, this embodiment can obtain installation prompt information through the AI algorithm when the user installs the camera device 1, give the user installation guidance, improve the shooting effect of the camera device 1 by adjusting the installation position of the camera device 1, realize the rapid installation of the camera device 1, and improve the installation efficiency.
[0229] The above are merely 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 method for installing a camera device, characterized in that: include: Acquire a current scene image obtained by photographing the scene to be monitored by a camera device; Performing image analysis processing on the current scene image to obtain installation posture parameters of the camera device; The installation posture parameter is used to indicate the installation posture of the camera device relative to the scene to be monitored; Determining whether the installation posture parameters meet the preset installation conditions; If the installation posture parameter does not meet the preset installation condition, a prompt message for assisting the adjustment of the camera device is output, wherein the prompt message is used to prompt the user to adjust the installation posture of the camera device relative to the scene to be monitored.
2. The method according to claim 1, characterized in that The installation posture parameter includes a distance parameter, and the distance parameter is used to characterize the distance state of the camera device relative to the scene to be monitored; The preset installation conditions include distance installation conditions; Determining whether the installation posture parameters meet the preset installation conditions includes: Determining whether the distance parameter satisfies the distance installation condition; If the distance parameter does not satisfy the distance installation condition, it is determined that the installation posture parameter does not satisfy the preset installation condition.
3. The method according to claim 2, characterized in that The performing image analysis processing on the current scene image to obtain the installation posture parameters of the camera device includes: The distance state of the camera device relative to the scene to be monitored is determined based on the current scene image, and the distance parameter representing the distance state is obtained.
4. The installation method according to claim 3, characterized in that: The calculating, based on the current scene image, the distance state of the camera device relative to the scene to be monitored, and obtaining the distance parameter characterizing the distance state includes: Calculating the physical distance between the camera device and the scene object captured in the scene to be monitored based on the current scene image; Comparing the physical distance with the infrared detection distance of the camera device, determining the image area where the scene object whose physical distance in the current scene image is less than or equal to the infrared detection distance is located as the infrared effective detection area; The distance parameter is calculated based on the relative size relationship between the infrared effective detection area and the current scene image.
5. The method according to claim 4, characterized in that The calculating the distance parameter based on the relative size relationship between the infrared effective detection area and the current scene image includes: The ratio of the area of the infrared effective detection area to the area of the current scene image is calculated, and the ratio is used as the distance parameter.
6. The method according to claim 4, characterized in that The calculating the physical distance between the camera device and the scene object photographed in the scene to be monitored based on the current scene image includes: Identifying a location of the scene object in the current scene image; The position of the scene object is converted using the intrinsic and extrinsic parameters of the camera device to obtain the physical distance between the scene object and the camera device.
7. The method according to claim 4, characterized in that The prompt information includes a mask area, and the mask area is used to prompt the user the size of the area that can be effectively detected by infrared, and the area of the mask area is positively correlated with the distance parameter; After the camera device captures the current scene image to be monitored, the method includes: Outputting the current scene image to a display device to display the current scene image on the display device; The output is used to assist the camera device in adjusting the prompt information, including: The mask area is determined in the infrared effective detection area, and the mask area is displayed on the current scene image on the display device.
8. The method according to claim 1, characterized in that The installation posture parameters include attitude parameters; the attitude parameters are used to characterize the pitch state of the camera device relative to the scene to be monitored; The preset installation conditions include posture installation conditions; Determining whether the installation posture parameters meet the preset installation conditions includes: Determining whether the posture parameters meet the posture installation conditions; If the posture parameters do not meet the posture installation conditions, it is determined that the installation posture parameters do not meet the preset installation conditions.
9. The method according to claim 8, characterized in that The performing image analysis processing on the current scene image to obtain the installation posture parameters of the camera device includes: The pitch state of the camera device relative to the scene to be monitored is determined based on the current scene image, and the posture parameter characterizing the pitch state is obtained.
10. The method according to claim 9, characterized in that Determining the pitch state of the camera device relative to the scene to be monitored based on the current scene image, and obtaining the posture parameter characterizing the pitch state, includes: Calculating the pitch angle of the camera device relative to the scene to be monitored based on the current scene image; A first matching result between the pitch angle and a preset angle range is calculated, and the posture parameter is determined in a first preset association relationship using the first matching result; the first preset association relationship represents an association relationship between the first matching result and the posture parameter.
11. The method according to claim 10, characterized in that The calculating a first matching result between the pitch angle and a preset angle range includes: Determine whether the pitch angle is greater than or equal to a first angle threshold and less than or equal to a second angle threshold; the first angle threshold to the second angle threshold form the preset angle range; If the pitch angle is greater than or equal to the first angle threshold and less than or equal to the second angle threshold, taking the first fixed preset value as the first matching result; If the pitch angle is less than the first angle threshold or greater than the second angle threshold, the smaller one of the absolute value of the difference between the pitch angle and the first angle threshold and the absolute value of the difference between the pitch angle and the second angle threshold is taken as the first matching result.
12. The method according to claim 10, characterized in that The step of calculating the pitch angle of the camera device relative to the scene to be monitored based on the current scene image includes: Performing feature extraction on the plurality of current scene images forming a sequence respectively to obtain feature objects and descriptors matching the feature objects; Performing feature matching among the feature objects of the plurality of current scene images according to the descriptors to calculate the three-dimensional positions of the feature objects having the same descriptors; The three-dimensional position is converted and calculated using the internal and external parameters of the camera device to obtain the pitch angle.
13. The method according to claim 8, characterized in that The prompt information includes angle prompt information, and the angle prompt information is used to prompt the user of the pitch state of the camera device; After the camera device captures the current scene image to be monitored, the method includes: Outputting the current scene image to a display device to display the current scene image on the display device; The output is used to assist the camera device in adjusting the prompt information, including: The current scene image is displayed in a first area of the display device, and the angle prompt information is displayed in a second area spaced apart from the first area.
14. The method according to claim 1, characterized in that The installation posture parameter includes a light intensity parameter, and the light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device; The preset installation conditions include light intensity installation conditions; Determining whether the installation posture parameters meet the preset installation conditions includes: Determining whether the light intensity parameter meets the light intensity installation condition; If the light intensity parameters do not meet the light intensity installation conditions, it is determined that the installation posture parameters do not meet the preset installation conditions.
15. The method according to claim 14, characterized in that The performing image analysis processing on the current scene image to obtain the installation posture parameters of the camera device includes: The lighting state of the scene to be monitored sensed by the camera device is determined in the current scene image to obtain the light intensity parameter representing the lighting state.
16. The method according to claim 15, characterized in that The step of calculating the illumination state of the scene to be monitored sensed by the camera device in the current scene image to obtain the light intensity parameter representing the illumination state includes: Obtaining the illumination intensity of the scene to be monitored in the current scene image; A second matching result between the illumination intensity and a preset light intensity range is calculated, and the light intensity parameter is determined in a second preset association relationship using the second matching result; the second preset association relationship represents an association relationship between the second matching result and the light intensity parameter.
17. The method according to claim 16, characterized in that The obtaining of the illumination intensity of the scene to be monitored in the current scene image includes: Converting the current scene image into a grayscale image, and calculating the grayscale value of each pixel of the grayscale image; The average value of the grayscale values of all pixels of the grayscale image is calculated to obtain the light intensity.
18. The method according to claim 17, characterized in that Calculating the grayscale value of each pixel of the grayscale image includes: The average value of the red, green and blue channel values of each pixel is calculated to obtain the grayscale value.
19. The method according to claim 17, characterized in that The calculating a second matching result between the illumination state and the preset light intensity range includes: Determine whether the light intensity is greater than or equal to a first light intensity threshold and less than or equal to a second light intensity threshold; the first light intensity threshold to the second light intensity threshold form the preset light intensity range; If the light intensity is greater than or equal to the first light intensity threshold and less than the second light intensity threshold, setting the second matching result to a second fixed preset value; If the light intensity is less than the first light intensity threshold or greater than the second light intensity threshold, the smaller one of the absolute value of the difference between the light intensity and the first light intensity threshold and the absolute value of the difference between the light intensity and the second light intensity threshold is taken as the second matching result.
20. The method according to claim 14, characterized in that The prompt information includes light intensity prompt information; the light intensity prompt information is used to prompt the user of the light state of the scene to be monitored sensed by the camera device; After the camera device captures the current scene image to be monitored, the method includes: Outputting the current scene image to a display device to display the current scene image on the display device; The output is used to assist the camera device in adjusting the prompt information, including: The current scene image is displayed in a first area of the display device, and the light intensity prompt information is displayed in a third area spaced apart from the first area.
21. The method according to claim 1, characterized in that The installation posture parameters include distance parameters, posture parameters and light intensity parameters; the distance parameters are used to characterize the distance state between the camera device and the scene to be monitored; the posture parameters are used to characterize the posture state of the camera device relative to the scene to be monitored; The light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device; The preset installation conditions include distance installation conditions, posture installation conditions and light intensity installation conditions; The determining whether the installation posture parameters meet the preset installation conditions includes: Respectively judging whether the distance parameter satisfies the distance installation condition, judging whether the posture parameter satisfies the posture installation condition, and judging whether the light intensity parameter satisfies the light intensity installation condition; If the distance parameter satisfies the distance installation condition, the posture parameter satisfies the posture installation condition, and the light intensity parameter satisfies the light intensity installation condition, then it is determined that the installation posture parameter satisfies the preset installation condition; If the distance parameter does not meet the distance installation condition, or the posture parameter does not meet the posture installation condition, or the light intensity parameter does not meet the light intensity installation condition, it is determined that the installation posture parameter does not meet the preset installation condition.
22. The method according to claim 1, characterized in that The installation posture parameters include distance parameters, attitude parameters and light intensity parameters; the distance parameters are used to characterize the distance state of the camera device relative to the scene to be monitored; the attitude parameters are used to characterize the pitch state of the camera device relative to the scene to be monitored; The light intensity parameter is used to characterize the lighting state of the scene to be monitored sensed by the camera device; The preset installation conditions include distance installation conditions, posture installation conditions and light intensity installation conditions; The determining whether the installation posture parameters meet the preset installation conditions includes: Determining whether the distance parameter satisfies the distance installation condition; If the distance parameter satisfies the distance installation condition, then further determining whether the posture parameter satisfies the posture installation condition; If the posture parameter satisfies the posture installation condition, then further determining whether the light intensity parameter satisfies the light intensity installation condition; If the light intensity parameter satisfies the light intensity installation condition, then determining that the installation posture parameter satisfies the preset installation condition; If the distance parameter does not meet the distance installation condition, or the posture parameter does not meet the posture installation condition, or the light intensity parameter does not meet the light intensity installation condition, it is determined that the installation posture parameter does not meet the preset installation condition.
23. The method according to claim 21 or 22, characterized in that After determining whether the installation posture parameters meet the preset installation conditions, the method further comprises: If the installation posture parameter meets the preset installation condition, an installation deviation parameter is generated based on the distance parameter, the posture parameter and the light intensity parameter; the installation deviation parameter is used to indicate the deviation between the installation posture of the camera device and the preset ideal installation posture.
24. The method according to claim 23, characterized in that The generating of the installation deviation parameter based on the distance parameter, the posture parameter and the light intensity parameter comprises: The installation deviation parameter is obtained by multiplying the distance parameter, the posture parameter and the light intensity parameter.
25. The method according to claim 23, characterized in that After generating the installation deviation parameter based on the distance parameter, the posture parameter and the light intensity parameter, the method further comprises: Calculating a real-time face detection rate based on the installation deviation parameter and a preset ideal face detection rate; The real-time monitoring image and the real-time face detection rate are output to a display device, and the real-time monitoring image and the real-time face detection rate are displayed on the display device.
26. The method according to claim 1, characterized in that The prompt information includes an adjustment direction, and the adjustment direction is used to instruct the user to adjust the installation posture of the camera device; The output is used to assist the camera device in adjusting the prompt information, including: The adjustment direction is output to a display device to display the adjustment direction on the display device, so that a user can adjust the installation posture of the camera device according to the direction indicated by the adjustment direction.
27. An electronic device, characterized in that: The method comprises a memory, a processor and a communication circuit, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 26.
28. The electronic device according to claim 27, characterized in that: The electronic device is a camera device.
Citation Information
Cited By
Auxiliary installation method and system for audio and video acquisition terminal
CN120825610A
Audio and video acquisition terminal site auxiliary installation method and system
CN120825610B