Method, device and equipment for setting preset bit parameters of camera and medium
By automatically detecting and rating user images taken by network cameras and adjusting their parameters, the problem of relying on manual setting of preset bit parameters in the prior art is solved, and better imaging effects and unified setting standards are achieved.
Patent Information
- Application Number
- CN202311280921.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
The existing camera preset bit parameter setting method relies on manual labor and the setting standards are not uniform, resulting in poor imaging results.
By setting the preset position action, the user image captured by the network camera is received, and the preset position action is detected in the image. If there is, the image features are extracted, and the camera configuration is automatically scored according to the characteristics. If the score is lower than the threshold, adjustment commands are generated and sent to the network camera, and its parameters are adjusted until the imaging effect reaches the preset standard.
Automatic preset bit parameter settings are realized, which improves the unity and objectivity of imaging effects, reduces manual intervention, and avoids the problem of inconsistent setting standards.
Smart Images

Figure CN119729188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera setting, and in particular to a method, device, equipment and medium for setting preset position parameters of a camera. Background Art
[0002] With the development of mobile communication technology, recording and broadcasting has been widely used in various industries. At present, recording and broadcasting generally uses network cameras for image acquisition. The recording and broadcasting terminal obtains the acquired images by pulling the network stream of the network camera, and then performs recording and broadcasting based on the acquired images.
[0003] Preset position is an important concept related to network cameras. Preset position refers to the pre-set position of the network camera to collect images. The preset position parameters include viewing angle, focal length and aperture. Setting the preset position parameters in advance and adjusting the network camera to the preset position according to the preset position parameters before recording and broadcasting can facilitate recording and broadcasting.
[0004] The existing method for setting the preset position parameters is to log in to the network camera backend through a computer, adjust the viewing angle and focal length of the network camera, and save the preset position parameters in the recording terminal. This method relies on manual labor, and the standard for setting the preset position parameters is not unified. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for setting preset position parameters of a camera, so as to solve the problem that the preset position parameter setting method in the background art relies on manual work and the standard for setting the preset position parameters is not unified.
[0006] In a first aspect, an embodiment of the present invention provides a method for setting preset position parameters of a camera, comprising:
[0007] Setting a preset position action to receive a first user image captured by a network camera;
[0008] detecting whether the preset position action exists in the first user image, and if so, extracting image features of the first user image;
[0009] Automatically scoring the first camera configuration according to the image feature to obtain a first configuration score;
[0010] If the first configuration score is less than the score threshold, an adjustment instruction is generated according to the image feature, and the adjustment instruction is sent to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera;
[0011] receiving a second user image captured by the network camera, and automatically scoring a second camera configuration according to the second user image to obtain a second configuration score;
[0012] If the second configuration score is greater than or equal to the score threshold, the adjustment amount of each parameter of the network camera is used as a preset position parameter.
[0013] Preferably, extracting image features of the first user image includes:
[0014] Positioning the user in the first user image to obtain a user coordinate set;
[0015] Dividing a human body area and a background area based on the user coordinate set;
[0016] Detecting the clarity of the human body area;
[0017] HDR parameters of the human body area and the background area are detected.
[0018] Preferably, automatically scoring the first camera configuration according to the image features to obtain a first configuration score includes:
[0019] Filtering the user center coordinates from the user coordinate set;
[0020] Calculating the distance between the user center coordinates and the image center coordinates in the first user image to obtain a deviation distance;
[0021] A weighted sum is performed on the deviation distance, the clarity, and the HDR parameter to obtain a first configuration score.
[0022] Preferably, a lens adjustment amount is generated based on the definition, and the lens adjustment amount includes a lens zoom-in amount, a lens zoom-out amount and a focal length adjustment amount;
[0023] Using the difference between the HDR parameter and the standard HDR parameter as the HDR parameter adjustment amount;
[0024] The deviation distance, the lens adjustment amount and the HDR parameter adjustment amount are combined into an adjustment instruction.
[0025] Preferably, after taking the adjustment amount of each parameter of the network camera as the preset position parameter, the method further comprises:
[0026] Detecting whether the automatic call preset position mode is entered, and if so, obtaining the third user image captured by the network camera at the current moment;
[0027] The image features of the third user image are extracted, and it is detected whether the image features of the third user image are the same as the image features of the first user image. If so, the preset position parameters are sent to the network camera.
[0028] Preferably, after the detection of whether to enter the automatic call preset position mode, the method further includes:
[0029] If you enter the manual call preset position mode, you will receive the preset position options;
[0030] It is detected whether the preset position option is an option corresponding to the first camera configuration, and if so, the preset position parameters are sent to the network camera.
[0031] Preferably, after automatically scoring the first camera configuration according to the image features to obtain the first configuration score, the method further comprises:
[0032] If the first configuration score is greater than or equal to the score threshold, using the parameters corresponding to the first camera configuration as the preset position parameters;
[0033] The image features and the preset position parameters of the first user image are saved.
[0034] In a second aspect, an embodiment of the present invention provides a device for setting preset position parameters of a camera, comprising:
[0035] A first user image receiving module, used to set a preset position action and receive a first user image taken by a network camera;
[0036] A first image feature extraction module, used to detect whether the preset position action exists in the first user image, and if so, extract image features of the first user image;
[0037] A first scoring module, configured to automatically score the first camera configuration according to the image feature to obtain a first configuration score;
[0038] an adjustment instruction sending module, configured to generate an adjustment instruction according to the image feature if the first configuration score is less than a score threshold, and send the adjustment instruction to the network camera; wherein the adjustment instruction includes an adjustment amount of each parameter of the network camera;
[0039] A second scoring module is used to receive a second user image taken by the network camera, and automatically score the second camera configuration according to the second user image to obtain a second configuration score;
[0040] The preset position parameter determination module is used to use the adjustment amount of each parameter of the network camera as the preset position parameter if the second configuration score is greater than or equal to the score threshold.
[0041] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0042] at least one processor; and
[0043] a memory communicatively connected to the at least one processor; wherein,
[0044] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the preset position parameter setting method of the camera described in any one of the first aspects of the present invention.
[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the preset position parameter setting method of a camera described in any one of the first aspects of the present invention when executed.
[0046] A method for setting preset parameters of a camera provided by an embodiment of the present invention includes setting a preset action and receiving a first user image captured by a network camera. Detecting whether there is a preset action in the first user image, and if so, extracting image features of the first user image. If the user makes a preset action, it means that the preset parameters of the network camera need to be set, and the preset action exists in the first user image captured by the network camera. Automatically scoring the first camera configuration according to the image features to obtain a first configuration score. The image features can reflect the imaging effect of the network camera under the first camera configuration. If the first configuration score is less than the score threshold, it means that the imaging effect of the network camera under the first camera configuration is poor, generating an adjustment instruction according to the image features, and sending the adjustment instruction to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera. The network camera captures again, receives a second user image captured by the network camera, and automatically scores the second camera configuration according to the second user image to obtain a second configuration score. If the second configuration score is greater than or equal to the score threshold, it means that the network camera has a good imaging effect under the second camera configuration after being adjusted according to the adjustment instruction, and the adjustment amount of each parameter of the network camera is used as the preset parameter. The above method automatically scores the first camera configuration and the second camera configuration, and has a unified scoring standard. When the image feature objectively reflects the imaging effect of the first camera configuration, generating an adjustment instruction based on the image feature has the effect of objectively adjusting the first camera configuration, and the imaging effect of the network camera under the second camera configuration is better.
[0047] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0049] Figure 1 is a flowchart of a method for setting preset position parameters of a camera provided in Embodiment 1 of the present invention;
[0050] Figure 2 is a flow chart of a method for setting preset position parameters of a camera provided in accordance with Embodiment 2 of the present invention;
[0051] Figure 3 It is a structural schematic diagram of a preset position parameter setting device for a camera provided in Embodiment 3 of the present invention;
[0052] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing the method for setting the preset position parameters of a camera according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] Embodiment 1
[0056] Figure 1A flowchart of a method for setting preset position parameters of a camera is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a network camera is adjusted before recording and broadcasting. The method can be executed by a preset position parameter setting device of a camera. The preset position parameter setting device of the camera can be implemented in the form of hardware and / or software. The preset position parameter setting device of the camera can be configured in a preset position parameter setting system of the camera. Figure 1 As shown, the method includes the following steps S10-S15:
[0057] S10: Setting a preset position action, receiving a first user image captured by a network camera.
[0058] The preset action may be any action performed by the user. For example, the preset action is set to a thumbs up gesture, which is held for 3 seconds.
[0059] After the AI module sets the preset position action, it receives the first user image taken by the network camera, where the direction, focal length and HDR parameters of the lens of the network camera in different areas are random.
[0060] Optionally, the AI module is a module storing a computer program based on the AI image processing method.
[0061] The network camera includes two lenses, one is a wide-angle lens and the other is a tracking lens. The wide-angle lens is used to collect panoramic images and capture human body movements in the panoramic images. The tracking lens is used to adjust the shooting angle according to the preset position parameters.
[0062] S11: Detect whether the preset position action exists in the first user image, and if so, extract image features of the first user image.
[0063] If the AI module recognizes that there is a preset position action in the first user image, it means that the preset position parameters of the network camera need to be set, and the AI module automatically extracts the image features of the first user image using a fixed method.
[0064] S12: Automatically score the first camera configuration according to the image feature to obtain a first configuration score.
[0065] The first camera configuration is the configuration of the network camera when shooting the first user image. The first camera configuration includes the distance and focal length between the network camera lens and the user. Image features are an objective quantity. The AI module automatically scores the first camera configuration according to the image features to obtain a first configuration score. Due to the use of a unified scoring standard, the first configuration score can objectively reflect the image quality of the first user image. The value range of the first configuration score is 0-1. The higher the first configuration score, the better the quality of the first user image and the better the imaging effect of the first camera configuration.
[0066] S13: If the first configuration score is less than the score threshold, an adjustment instruction is generated according to the image feature, and the adjustment instruction is sent to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera.
[0067] When the first configuration score is less than the score threshold, it indicates that the image quality of the first user image is poor, and various parameters configured by the first camera need to be adjusted. The AI module generates an adjustment instruction based on the image features, and the adjustment instruction is used to adjust various parameters of the network camera. The AI module sends the adjustment instruction to the network camera.
[0068] The score threshold ranges from 0.5 to 0.8, and optionally, the score threshold is set to 0.6.
[0069] S14: receiving a second user image captured by the network camera, and automatically scoring a second camera configuration according to the second user image to obtain a second configuration score.
[0070] After receiving the adjustment instruction, the network camera adjusts various parameters according to the adjustment instruction, such as zooming in or out the camera to adjust the distance between the camera and the user; adjusting the focal length, that is, changing the distance between the lens of the network camera and the imaging surface to increase the clarity of the image.
[0071] After adjusting various parameters, the network camera takes a photo of the user again to obtain a second user image. The network camera sends the second user image to the AI module, which receives the second user image and automatically scores the second camera configuration according to the second user image to obtain a second configuration score. The second configuration score ranges from 0 to 1, and the second configuration score can reflect the quality of the second user image and the imaging effect of the second camera configuration. The higher the second configuration score, the better the quality of the second user image and the better the imaging effect of the second camera configuration.
[0072] S15: If the second configuration score is greater than or equal to the score threshold, the adjustment amount of each parameter of the network camera is used as a preset position parameter.
[0073] As an example, the second configuration score is 0.8, the score threshold is 0.6, the second configuration score is greater than the score threshold, and the deviation distance, lens adjustment amount, and HDR parameter adjustment amount of the network camera are used as preset position parameters.
[0074] The method for setting preset parameters of a camera provided in the first embodiment of the present invention includes setting a preset action and receiving a first user image captured by a network camera. Detecting whether there is a preset action in the first user image, and if so, extracting image features of the first user image. If the user makes a preset action, it means that the preset parameters of the network camera need to be set, and the preset action exists in the first user image captured by the network camera. Automatically scoring the first camera configuration according to the image features to obtain a first configuration score. The image features can reflect the imaging effect of the network camera under the first camera configuration. If the first configuration score is less than the score threshold, it means that the imaging effect of the network camera under the first camera configuration is poor, and an adjustment instruction is generated according to the image features, and the adjustment instruction is sent to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera. The network camera shoots again, receives a second user image captured by the network camera, and automatically scores the second camera configuration according to the second user image to obtain a second configuration score. If the second configuration score is greater than or equal to the score threshold, it means that the network camera has a good imaging effect under the second camera configuration after being adjusted according to the adjustment instruction, and the adjustment amount of each parameter of the network camera is used as the preset parameter. The above method automatically scores the first camera configuration and the second camera configuration, and has a unified scoring standard. When the image feature objectively reflects the imaging effect of the first camera configuration, generating an adjustment instruction based on the image feature has the effect of objectively adjusting the first camera configuration, and the imaging effect of the network camera under the second camera configuration is better.
[0075] Embodiment 2
[0076] Figure 2 This is a flow chart of a method for setting preset position parameters of a camera provided in Embodiment 2 of the present invention. Embodiment 2 refines the steps of the method for setting preset position parameters of a camera in Embodiment 1 above. Figure 2 As shown, the method includes the following steps S20-S31:
[0077] S20: Setting a preset position action, receiving a first user image captured by a network camera.
[0078] The preset action may be any action performed by the user. For example, the preset action is set to a thumbs up gesture, which is held for 3 seconds.
[0079] After the AI module sets the preset position action, it receives the first user image taken by the network camera, where the direction, focal length and HDR parameters of the lens of the network camera in different areas are random.
[0080] Optionally, the AI module is a module storing a computer program based on the AI image processing method.
[0081] S21: Detect whether the preset position action exists in the first user image.
[0082] Optionally, the AI module uses ST-GCN (Spatial Temporal Graph Convolutional Networks) to perform action recognition on the first user image, obtain the user action, calculate the similarity between the user action and the preset action, and if the similarity is greater than the similarity threshold, the preset action exists in the first user image.
[0083] S22: If the preset position action exists in the first user image, locate the user in the first user image to obtain a user coordinate set.
[0084] If there is a preset position action in the first user image, an image clustering operation is performed on the first user image, and the image clustering method is a K-Means clustering method, a hierarchical clustering method, or a density clustering method. After clustering, each point in the first user image is classified into a user point and a background point. Each user point corresponds to a user coordinate, and all user coordinates are formed into a user coordinate set.
[0085] S23: Divide the human body area and the background area based on the user coordinate set.
[0086] The points corresponding to the user coordinates in the user coordinate set belong to the human body region, and the other points in the first user image belong to the background region. As an example, the user coordinate set includes 10,000 user points, and the human body region is divided according to the 10,000 user points. The first user image includes 30,000 points, and the other 20,000 points belong to the background points. The background region is divided according to the 20,000 background points.
[0087] S24: Detect the clarity of the human body area.
[0088] In the embodiment of the present invention, the sharpness of the human body region is used to measure the clarity of the human body region. The sharpness reflects the amount of image details and is used to evaluate the clarity of the image. The greater the sharpness, the faster the image information of the human body region changes, and the higher the image clarity. The sharpness of the human body region can be calculated using the modulation transfer function or the spatial frequency response.
[0089] S25: Detect HDR parameters of the human body area and the background area.
[0090] When high-brightness areas under strong light sources such as sunlight, lamps and reflections, as well as low-brightness areas such as shadows and backlight, exist in the image at the same time, the high-brightness areas in the image output by the camera appear white due to overexposure, and the low-brightness areas appear black due to underexposure, which seriously affects the image quality. HDR (High dynamic range) technology uses multiple images with different exposure levels and then uses software to combine the different images into one image.
[0091] The HDR parameter is used to control the process of combining different images into one image, expanding the dynamic range of the user image captured by the network camera so that the user image can show more bright and dark details.
[0092] S26: Filter out the user center coordinates from the user coordinate set.
[0093] The contour of the human body region is depicted through the user points located at the edge of the human body region, and then the geometric center point of the human body region is searched. The user coordinates corresponding to the geometric center point are the user center coordinates.
[0094] S27: Calculate the distance between the user center coordinates and the image center coordinates in the first user image to obtain a deviation distance.
[0095] As an example, the size of the first user image is 300×300, the image center coordinates are (150, 150), and the user center coordinates are (120, 130). The distance between the user center coordinates and the image center coordinates is calculated using the Euclidean distance formula, and the deviation distance is 36.
[0096] S28: Perform a weighted sum on the deviation distance, the clarity, and the HDR parameter to obtain a first configuration score.
[0097] The smaller the deviation distance, the better the imaging effect of the network camera, so the deviation distance and the first configuration score are negatively correlated, and the first weight corresponding to the deviation distance is a negative number. The higher the clarity and HDR parameters are, the better the imaging effect of the network camera, so the clarity and HDR parameters are positively correlated with the first configuration score, the second weight corresponding to the clarity is a positive number, and the third weight corresponding to the HDR parameter is a positive number.
[0098] The formula for calculating the first configuration score is as follows:
[0099] s1=w1*a1+w2*a2+w3*a3;
[0100] Among them, s1 is the first configuration score, w1 is the first weight, w2 is the second weight, w3 is the third weight, w4 is the fourth weight, a1 is the deviation distance, a2 is the clarity, and a3 is the HDR parameter.
[0101] If the first configuration score is greater than or equal to the score threshold, taking the parameters corresponding to the first camera configuration as the preset position parameters;
[0102] The image features and preset position parameters of the first user image are saved.
[0103] As an example, the score threshold is set to 0.6, the first configuration score is 0.8, and the parameters corresponding to the first camera configuration are used as preset position parameters. The image features, deviation distance, clarity, and HDR parameters of the first user image are saved.
[0104] After saving the image features and preset position parameters of the first user image, if the image features of the third user image taken by the network camera are the same as the image features of the first user image, the AI module sends the preset position parameters to the network camera, and the network camera adjusts various parameters according to the preset position parameters, thereby realizing rapid adjustment of various parameters of the network camera and improving the imaging effect of the network camera.
[0105] S29: If the first configuration score is less than the score threshold, an adjustment instruction is generated according to the image feature, and the adjustment instruction is sent to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera.
[0106] When the first configuration score is less than the score threshold, it indicates that the image quality of the first user image is poor, and various parameters configured by the first camera need to be adjusted. The AI module generates an adjustment instruction based on the image features, and the adjustment instruction is used to adjust various parameters of the network camera. The AI module sends the adjustment instruction to the network camera.
[0107] The score threshold ranges from 0.5 to 0.8, and optionally, the score threshold is set to 0.6.
[0108] Generate adjustment instructions based on image features, including:
[0109] Generate lens adjustment amount based on the clarity, the lens adjustment amount includes lens zoom-in amount, lens zoom-out amount and focal length adjustment amount;
[0110] The difference between the HDR parameter and the standard HDR parameter is used as the HDR parameter adjustment amount;
[0111] The deviation distance, the lens adjustment amount and the HDR parameter adjustment amount are combined into an adjustment instruction.
[0112] According to the clarity, the distance between the lens and the user is reduced or increased. According to the clarity, the distance between the lens and the imaging surface of the network camera is reduced or increased.
[0113] S30: receiving a second user image captured by the network camera, and automatically scoring a second camera configuration according to the second user image to obtain a second configuration score.
[0114] After receiving the adjustment instruction, the network camera adjusts various parameters according to the adjustment instruction, such as rotating the pan / tilt to adjust the shooting angle of the tracking lens; zooming in or out the camera to adjust the distance between the camera and the user; adjusting the focal length, that is, changing the distance between the lens of the network camera and the imaging surface to increase the clarity of the image; changing the HDR parameters of the human body area and the background area.
[0115] After adjusting various parameters, the network camera takes a photo of the user again to obtain a second user image. The network camera sends the second user image to the AI module, which receives the second user image and automatically scores the second camera configuration according to the second user image to obtain a second configuration score. The second configuration score ranges from 0 to 1, and the second configuration score can reflect the quality of the second user image and the imaging effect of the second camera configuration. The higher the second configuration score, the better the quality of the second user image and the better the imaging effect of the second camera configuration.
[0116] S31: If the second configuration score is greater than or equal to the score threshold, the adjustment amount of each parameter of the network camera is used as a preset position parameter.
[0117] As an example, the second configuration score is 0.8, the score threshold is 0.6, the second configuration score is greater than the score threshold, and the deviation distance, lens adjustment amount, and HDR parameter adjustment amount of the network camera are used as preset position parameters.
[0118] After step S31, the method further includes:
[0119] S32: Detect whether the automatic call preset position mode is entered, and if so, obtain the third user image captured by the network camera at the current moment;
[0120] S33: extracting the image features of the third user image, detecting whether the image features of the third user image are the same as the image features of the first user image, and if so, sending the preset position parameters to the network camera.
[0121] If the image features of the third user image are the same as the image features of the first user image, it means that the configuration of the current network camera, that is, the configuration of the third camera, is the same as the configuration of the first camera. At this time, the preset position parameters are directly sent to the network camera, and the network camera adjusts various parameters according to the preset position parameters. After the network camera adjusts various parameters, the network camera shoots under the second camera configuration, and the obtained user image quality is higher.
[0122] After step S31, the method further includes:
[0123] S32': If the manual call preset position mode is entered, the preset position option is received.
[0124] A plurality of preset buttons are set in the interactive interface of the console, some of which are configured, and others are not configured. When a preset button configured in the interactive interface is manually clicked, the AI module receives the preset option.
[0125] S33': Detect whether the preset position option is an option corresponding to the first camera configuration, and if so, send the preset position parameters to the network camera.
[0126] If the preset position option is an option corresponding to the first camera configuration, it means that the network camera is in the first camera configuration, and the preset position parameters are sent to the network camera. The network camera adjusts the first camera configuration to the second camera configuration according to the preset position parameters to improve the imaging quality.
[0127] As described above, a method for setting preset position parameters of a camera provided in the second embodiment of the present invention extracts the clarity and HDR parameters of the human body area in the first user image, performs weighted summation on the deviation distance, clarity and HDR parameters, and can evaluate the imaging effect under the first camera configuration with a unified and objective standard. The lens adjustment amount and the HDR parameter adjustment amount are then generated, and the deviation distance, the lens adjustment amount and the HDR parameter adjustment amount are combined into an adjustment instruction and sent to the network camera. The network camera adjusts the network camera from the first camera configuration to the second camera configuration according to the adjustment instruction, thereby improving the imaging quality. By setting the preset position parameters by a unified standard, the errors caused by manually setting the preset position parameters can be avoided. The scene adaptability of the above method can be enhanced by automatically calling the preset position mode or manually calling the preset position mode, and it can be applied to more scenes.
[0128] Embodiment 3
[0129] Figure 3 FIG. 1 is a schematic diagram of a device for setting preset position parameters of a camera provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0130] The first user image receiving module 100 is used to set a preset position action and receive a first user image taken by a network camera;
[0131] A first image feature extraction module 200 is used to detect whether the preset position action exists in the first user image, and if so, extract image features of the first user image;
[0132] A first scoring module 300, configured to automatically score the first camera configuration according to the image features to obtain a first configuration score;
[0133] An adjustment instruction sending module 400, for generating an adjustment instruction according to the image feature if the first configuration score is less than a score threshold, and sending the adjustment instruction to the network camera; wherein the adjustment instruction includes an adjustment amount of each parameter of the network camera;
[0134] A second scoring module 500 is used to receive a second user image captured by the network camera, and automatically score the second camera configuration according to the second user image to obtain a second configuration score;
[0135] The preset position parameter determination module 600 is configured to use the adjustment amount of each parameter of the network camera as the preset position parameter if the second configuration score is greater than or equal to the score threshold.
[0136] Optionally, the first image feature extraction module 200 includes:
[0137] A user positioning unit, used to locate the user in the first user image to obtain a user coordinate set;
[0138] A region division unit, used for dividing a human body region and a background region based on the user coordinate set;
[0139] A clarity detection unit, used to detect the clarity of the human body area;
[0140] The HDR parameter detection unit is used to detect the HDR parameters of the human body area and the background area.
[0141] Optionally, the first scoring module 300 includes:
[0142] A user center coordinate screening unit, used for screening out the user center coordinate from the user coordinate set;
[0143] a deviation distance calculation unit, used to calculate the distance between the user center coordinates and the image center coordinates in the first user image to obtain the deviation distance;
[0144] A weighted summing unit is used to perform weighted summing of the deviation distance, the clarity and the HDR parameter to obtain a first configuration score.
[0145] Optionally, the adjustment instruction sending module 400 includes:
[0146] A lens adjustment amount generating unit, configured to generate a lens adjustment amount based on the definition, wherein the lens adjustment amount includes a lens zoom-in amount, a lens zoom-out amount, and a focal length adjustment amount;
[0147] an HDR parameter adjustment amount calculation unit, configured to use a difference between the HDR parameter and a standard HDR parameter as an HDR parameter adjustment amount;
[0148] The adjustment instruction composition unit is used to combine the deviation distance, the lens adjustment amount and the HDR parameter adjustment amount into an adjustment instruction.
[0149] Optionally, the preset position parameter setting device of the camera further includes:
[0150] A third user image acquisition module, used to detect whether to enter the automatic call preset position mode, and if so, to acquire the third user image taken by the network camera at the current moment;
[0151] The first preset position parameter sending module is used to extract the image features of the third user image, detect whether the image features of the third user image are the same as the image features of the first user image, and if so, send the preset position parameters to the network camera.
[0152] Optionally, the preset position parameter setting device of the camera further includes:
[0153] A preset position option receiving module, used for receiving preset position options if entering into a manual preset position calling mode;
[0154] The second preset position parameter sending module is used to detect whether the preset position option is an option corresponding to the first camera configuration, and if so, send the preset position parameter to the network camera.
[0155] Optionally, the preset position parameter setting device of the camera further includes:
[0156] a preset position parameter setting module, configured to use the parameters corresponding to the first camera configuration as the preset position parameters if the first configuration score is greater than or equal to the score threshold;
[0157] A saving module is used to save the image features and the preset position parameters of the first user image.
[0158] The camera preset position parameter setting device provided in the third embodiment of the present invention can execute the camera preset position parameter setting method provided in the first embodiment of the present invention or the second embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0159] Embodiment 4
[0160] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0161] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0162] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0163] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a preset position parameter setting method of a camera.
[0164] In some embodiments, the preset position parameter setting method of the camera can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the preset position parameter setting method of the camera described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the preset position parameter setting method of the camera in any other appropriate manner (for example, by means of firmware).
[0165] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0166] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0167] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0168] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0169] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0170] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0171] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0172] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for setting preset position parameters of a camera, characterized in that: include: Setting a preset position action to receive a first user image captured by a network camera; detecting whether the preset position action exists in the first user image, and if so, extracting image features of the first user image; Automatically scoring the first camera configuration according to the image feature to obtain a first configuration score; If the first configuration score is less than the score threshold, an adjustment instruction is generated according to the image feature, and the adjustment instruction is sent to the network camera; wherein the adjustment instruction includes the adjustment amount of each parameter of the network camera; receiving a second user image captured by the network camera, and automatically scoring a second camera configuration according to the second user image to obtain a second configuration score; If the second configuration score is greater than or equal to the score threshold, the adjustment amount of each parameter of the network camera is used as a preset position parameter.
2. The method for setting preset position parameters of a camera according to claim 1, characterized in that: The extracting the image feature of the first user image includes: Positioning the user in the first user image to obtain a user coordinate set; Dividing a human body area and a background area based on the user coordinate set; Detecting the clarity of the human body area; HDR parameters of the human body area and the background area are detected.
3. The method for setting preset position parameters of a camera according to claim 2, characterized in that: The step of automatically scoring the first camera configuration according to the image feature to obtain a first configuration score includes: Filtering the user center coordinates from the user coordinate set; Calculating the distance between the user center coordinates and the image center coordinates in the first user image to obtain a deviation distance; A weighted sum is performed on the deviation distance, the clarity, and the HDR parameter to obtain a first configuration score.
4. The method for setting preset position parameters of a camera according to claim 3, characterized in that: The step of generating an adjustment instruction according to the image feature comprises: Generate a lens adjustment amount based on the definition, wherein the lens adjustment amount includes a lens zoom-in amount, a lens zoom-out amount, and a focal length adjustment amount; Using the difference between the HDR parameter and the standard HDR parameter as the HDR parameter adjustment amount; The deviation distance, the lens adjustment amount and the HDR parameter adjustment amount are combined into an adjustment instruction.
5. The method for setting preset position parameters of a camera according to claim 1, characterized in that: After the adjustment amount of each parameter of the network camera is used as the preset position parameter, the method further includes: Detecting whether the automatic call preset position mode is entered, and if so, obtaining the third user image captured by the network camera at the current moment; The image features of the third user image are extracted, and it is detected whether the image features of the third user image are the same as the image features of the first user image. If so, the preset position parameters are sent to the network camera.
6. The method for setting preset position parameters of a camera according to claim 5, characterized in that: After the detection of whether to enter the automatic call preset position mode, the method further includes: If you enter the manual call preset position mode, you will receive the preset position options; It is detected whether the preset position option is an option corresponding to the first camera configuration, and if so, the preset position parameters are sent to the network camera.
7. The method for setting preset position parameters of a camera according to claim 1, characterized in that: After automatically scoring the first camera configuration according to the image features to obtain the first configuration score, the method further includes: If the first configuration score is greater than or equal to the score threshold, using the parameters corresponding to the first camera configuration as the preset position parameters; The image features and the preset position parameters of the first user image are saved.
8. A device for setting preset position parameters of a camera, characterized in that: include: A first user image receiving module, used to set a preset position action and receive a first user image taken by a network camera; A first image feature extraction module, used to detect whether the preset position action exists in the first user image, and if so, extract image features of the first user image; A first scoring module, configured to automatically score the first camera configuration according to the image feature to obtain a first configuration score; an adjustment instruction sending module, configured to generate an adjustment instruction according to the image feature if the first configuration score is less than a score threshold, and send the adjustment instruction to the network camera; wherein the adjustment instruction includes an adjustment amount of each parameter of the network camera; A second scoring module is used to receive a second user image taken by the network camera, and automatically score the second camera configuration according to the second user image to obtain a second configuration score; The preset position parameter determination module is used to use the adjustment amount of each parameter of the network camera as the preset position parameter if the second configuration score is greater than or equal to the score threshold.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the preset position parameter setting method for a camera according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for setting preset position parameters of a camera according to any one of claims 1 to 7 when executed.