Light adjusting method of camera equipment, camera equipment and storage medium
By obtaining the integrated light input coefficient and light-related parameters of the camera equipment, adjusting the position of the preset components, and establishing an adjustment reference table, the problem of cumbersome light adjustment steps of the camera equipment is solved, and the accuracy and efficiency of light adjustment are improved.
Patent Information
- Application Number
- CN202411780773.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The light adjustment steps of existing camera equipment are cumbersome, resulting in low light adjustment efficiency and affecting the image imaging quality.
By obtaining the integrated light input coefficient of the imaging device, determining the light adjustment mode, obtaining light-related parameters, adjusting the position of the preset components, establishing an adjustment reference table, and improving the accuracy and efficiency of light adjustment.
Fast and accurate light adjustment is achieved, reducing the time required for light adjustment and improving the light adjustment efficiency of the camera equipment.
Smart Images

Figure CN119255112A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of camera equipment, and in particular to a light adjustment method for camera equipment, a camera equipment and a storage medium. Background Art
[0002] The camera device is used to capture images. During the process of capturing images, the imaging quality of the captured images is greatly affected by the light it captures. It is usually necessary to adjust the light to improve the quality of the captured images.
[0003] Currently, the steps for adjusting the light of a camera device are complicated and time-consuming, resulting in low efficiency of the light adjustment. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a light adjustment method for a camera device, a camera device and a storage medium, which can improve the adjustment efficiency of the light adjustment of the camera device.
[0005] In order to solve the above problems, the first aspect of the present application provides a light adjustment method for a camera device, the method comprising: obtaining a comprehensive light input coefficient of the camera device; determining a light adjustment mode of the camera device using the comprehensive light input coefficient; obtaining the current light-related parameters of the camera device; and determining the preset components that need to be adjusted in the light adjustment mode, wherein the preset components belong to the camera device, and different light adjustment modes correspond to different preset components; adjusting the current posture of the preset components using the light-related parameters to obtain light adjustment information; establishing an adjustment reference table based on the light adjustment information and the light adjustment mode, wherein the adjustment reference table is used as reference adjustment information for subsequent light adjustment of the camera device.
[0006] In order to solve the above-mentioned problem, the second aspect of the present application provides a camera device, which includes a memory and a processor coupled to each other, the memory stores program data, and the processor is used to execute the program data to implement any step of the light adjustment method of the above-mentioned camera device.
[0007] In order to solve the above-mentioned problem, the third aspect of the present application provides a computer-readable storage medium, which stores program data that can be executed by a processor, and the program data is used to implement any step of the light adjustment method of the above-mentioned camera device.
[0008] The beneficial effects of the present application are as follows: the present application obtains the comprehensive light intake coefficient of the camera device, and uses the comprehensive light intake coefficient to determine the light adjustment mode of the camera device. The current light adjustment mode can be determined according to the light of the environment, and then the current light-related parameters of the camera device are obtained, as well as the preset components that need to be adjusted in the light adjustment mode. The preset components belong to the camera device, and different light adjustment modes correspond to different preset components. The current posture of the preset components is adjusted using the light-related parameters to obtain light adjustment information. The postures of different preset components can be adjusted according to different light adjustment modes to achieve light adjustment of the camera device and improve the accuracy of light adjustment. In addition, an adjustment reference table can be established based on the light adjustment information and the light adjustment mode. The adjustment reference table can be used as reference adjustment information for subsequent light adjustment of the camera device, so that the light adjustment information corresponding to the light adjustment mode can be quickly determined in the subsequent adjustment process, and the light adjustment can be quickly performed, which can improve the adjustment efficiency of the light adjustment of the camera device as a whole.
[0009] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them: Figure 1 It is a flowchart of the first embodiment of the light adjustment method of the camera device of the present application; Figure 2 This application Figure 1 A schematic diagram of a flow chart of an embodiment of step S11; Figure 3 It is a flowchart of a second embodiment of the light adjustment method of the camera device of the present application; Figure 4 is a flowchart of a third embodiment of the light adjustment method for an imaging device of the present application; Figure 5 It is a structural schematic diagram of an embodiment of a light adjustment system of a camera device of the present application; Figure 6 It is a structural schematic diagram of an embodiment of the camera device of the present application; Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0011] 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.
[0012] The terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations 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 limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0013] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0014] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0015] The present application provides the following embodiments, and each embodiment is described in detail below.
[0016] After long-term research, the inventors of this application found that the imaging quality of the image captured by the camera equipment is greatly affected by the light it collects, and the steps for adjusting the light of the camera equipment are cumbersome, and the light needs to be adjusted to the corresponding focus through a calibration lens. The steps for light focus adjustment are relatively cumbersome. The cumbersomeness lies in the need to perform different focus adjustments according to the light in the working environment, which results in the focus adjustment taking up a lot of time, making the light adjustment inefficient.
[0017] In order to solve the above-mentioned technical problems, the present application provides a light adjustment method for a camera device, a camera device and a storage medium as follows, which can improve the adjustment efficiency of the light adjustment of the camera device.
[0018] It is understandable that a method for adjusting light of a camera device in the present application can be executed by a camera device, and the camera device can be any device with processing capability and camera function, including a hyperspectral camera, a digital camera, a SLR camera, etc., and the present application does not limit this. In some possible implementations, the method for adjusting light of the camera device can be implemented by a processor calling program data stored in a memory.
[0019] See also Figure 1 , Figure 1 This is a flow chart of the first embodiment of the light adjustment method for the camera device of the present application. The method may include the following steps: S11: Obtaining a comprehensive light-incoming coefficient of the camera device.
[0020] The comprehensive light-incoming coefficient of the camera device can be obtained during the operation of the camera device, that is, during the image acquisition process. For example, the current comprehensive light-incoming coefficient of the camera device can be obtained when the current image is acquired.
[0021] The camera equipment includes hyperspectral cameras, digital cameras, SLR cameras, etc., and this application does not limit this. The following embodiments of this application are described using hyperspectral cameras as examples. Among them, the hyperspectral camera can be used to collect hyperspectral images. The hyperspectral camera integrates the detection technology of images and spectra, and can simultaneously obtain the spatial information and spectral information of the object to be tested. It can not only intuitively reflect the appearance texture characteristics of the research object, but also indirectly reflect the internal physical structure and quality component characteristics of the object like spectral information. This technology integrates digital cameras and spectral photography, and has the characteristics of high efficiency, real-time, online and other non-destructive detection. Among them, spectral cameras are widely used in environmental monitoring such as atmosphere and water quality.
[0022] In some embodiments, see Figure 2 The step S11 of the above embodiment can be further expanded. To obtain the comprehensive light-incoming coefficient of the camera device, this embodiment may include the following steps: S111: Acquire initial light input parameters, where the initial light input parameters include light propagation path parameters, light incident angle parameters, and light interference parameters.
[0023] The initial light input parameters include light propagation path parameters, light incident angle parameters and light interference parameters. Among them, light interference parameters refer to changes in light intensity, direction or phase caused by external factors during the propagation process. These interferences can come from a variety of physical effects, such as atmospheric turbulence, light diffraction, scattering, refraction, reflection, interference, etc. In different application scenarios, the method of obtaining light interference parameters will also be different. Exemplarily, the present application can directly measure the coefficient of variation of light intensity over time and space through a spectrometer to detect whether interference occurs, and use the light interference information corresponding to the coefficient of variation of light within a preset time range as the light interference parameter.
[0024] In some embodiments, the light propagation path parameters and the light incident angle parameters can be obtained according to the starting position and contact position of the light. Specifically, the starting position and contact position of the light entering the camera device can be obtained, wherein the contact position is the coordinate position where the light contacts the lens, and the starting position represents the coordinate position of the shooting auxiliary device or the coordinate position of the target. Among them, the shooting auxiliary device can be used to assist in shooting when capturing images of the target. For example, the shooting auxiliary device may include a target background plate, which is usually arranged behind the target. During the image capture process, the target background plate can assist in controlling the light so that the image quality captured by the hyperspectral camera is better. In the process of outdoor image capture, the use of a target background plate can make the target more prominent.
[0025] The light propagation path parameters can be obtained based on the starting position and the contact position. Specifically, the difference between the coordinates of the starting position and the contact position is first obtained to obtain the light propagation path distance. The light propagation path distance can be obtained by the following formula: .
[0026] Where D represents the distance of the light propagation path, represents the coordinates of the starting position of the ray, The coordinates representing the ray's impact position.
[0027] Then, the path information between the two points can be obtained according to the starting position of the light and the contact position of the light on the lens, and the path information and the distance of the light propagation path can be associated to obtain the light propagation path parameters.
[0028] According to the starting position of the light and the contact position of the light on the lens, the connecting straight line between the two points is obtained, the angle between the lens surface and the connecting straight line is obtained, and the angle between the lens surface and the connecting straight line is used to determine the light incident angle parameter, that is, the information corresponding to the angle between the lens surface and the connecting straight line is used as the light incident angle parameter of the light.
[0029] The above method obtains the starting position of the light and the contact position of the light on the lens, then obtains the distance of the light propagation path according to the starting position and the contact position of the light, and then obtains the path information of the light in the path according to the distance of the light propagation path, wherein the path information and the light propagation path distance are associated to obtain the light propagation path parameters, that is, the light propagation path information, and then the light can be adjusted according to the light propagation path parameters. Then, the connecting straight line between the two points is obtained according to the starting position of the light and the contact position of the light on the lens. The obtained connecting straight line can truly reflect the irradiation path of the light, and the irradiation path is used as a virtual auxiliary line for measuring the refraction angle of the light. In this way, the light incident angle parameters can be obtained through the lens surface and the connecting straight line, and the light incident angle parameters can also be used to assist the lens in quickly adjusting the light gathering.
[0030] S112: extracting features of the light propagation path parameters, the light incident angle parameters and the light interference parameters respectively to obtain light propagation path features, light incident angle features and light interference features.
[0031] After obtaining the initial light input parameters, feature extraction is performed on the initial light input parameters, that is, feature extraction is performed on each light incident angle parameter, light interference parameter, and light propagation path parameter, and corresponding light propagation path features, light incident angle features, and light interference features are obtained respectively.
[0032] In some embodiments, the light incident angle feature is obtained by taking the light incident angle parameter as the current incident angle during the acquisition of the current image, obtaining the difference between the current incident angle (the angle contacting the lens) and the adjusted incident angle (the angle leaving the lens), and dividing the difference by the current incident angle to obtain a ratio, and taking the ratio as the light incident angle feature.
[0033] S113: Perform weighted processing on the light propagation path characteristics, light incident angle characteristics and light interference characteristics to obtain a comprehensive light input coefficient.
[0034] In some embodiments, the light propagation path characteristics, light incident angle characteristics, and light interference characteristics may be weighted with corresponding weights to obtain a comprehensive light-incoming coefficient.
[0035] In some embodiments, the incident angle feature and the light interference feature can be used to obtain the incident angle interference feature. Then, the light propagation path feature and the incident angle interference feature are weighted with the corresponding weights to obtain the comprehensive light-incoming coefficient.
[0036] The comprehensive light input coefficient can be obtained by the following comprehensive light input calculation formula: .
[0037] in, It represents the comprehensive light-incoming coefficient. Represents the characteristics of the light propagation path, Represents the weight corresponding to the characteristics of the light propagation path, represents the incident angle characteristics of the light, represents the weight corresponding to the light incident angle feature, and e represents the light interference feature.
[0038] Continue reading Figure 1 After the above step S11, the following steps may also be performed: S12: Determine a light adjustment mode of the camera device using the comprehensive light input coefficient.
[0039] It is determined whether the comprehensive light-incoming coefficient meets the preset light-incoming coefficient range of the corresponding mode to determine the light adjustment mode of the camera device.
[0040] The light adjustment mode includes any one of a light compensation mode, a light suppression mode, and a normal mode. The light compensation mode is used to perform light compensation in a dark light situation, the light suppression mode is used to perform light suppression in a strong light situation, and the normal mode does not require light adjustment.
[0041] In some embodiments, in response to the comprehensive light-incoming coefficient satisfying a first preset light-incoming coefficient condition, the current light adjustment mode of the camera device is determined to be a light compensation mode, wherein the first preset light-incoming coefficient condition includes that the comprehensive light-incoming coefficient is less than the first preset light-incoming coefficient.
[0042] In some embodiments, in response to the comprehensive light-incoming coefficient satisfying the second preset light-incoming coefficient condition, the current light adjustment mode of the camera device is determined to be the light suppression mode. The second preset light-incoming coefficient condition includes that the comprehensive light-incoming coefficient is greater than the second preset light-incoming coefficient. The second preset light-incoming coefficient is greater than or equal to the first preset light-incoming coefficient. Thus, when the comprehensive light-incoming coefficient belongs to the interval between the first preset light-incoming coefficient and the second preset light-incoming coefficient, it can be determined to be the normal mode.
[0043] Exemplarily, the second preset light-incoming coefficient is equal to the first preset light-incoming coefficient. For example, the preset light-incoming coefficient is 5. If the comprehensive light-incoming coefficient is equal to 5, it is determined to be in normal mode and no light adjustment is required. If the comprehensive light-incoming coefficient is less than 5, it is determined to be in light compensation mode. If the comprehensive light-incoming coefficient is greater than 5, it is determined to be in light suppression mode. For example, the light propagation path characteristic is 5, and its corresponding weight is 0.8. The light incident angle characteristic is 2, and its corresponding weight is 1.2. The light interference characteristic is 0.5. The above-mentioned comprehensive light-incoming calculation formula yields the comprehensive light-incoming coefficient j(i)=5*0.8+2*1.2*0.5=4.8. If its comprehensive light-incoming coefficient is less than 5, it is determined to be in light compensation mode.
[0044] Through the above method, the light environment of the hyperspectral camera can be quickly classified and the current light adjustment mode can be determined to determine whether light compensation or light suppression is required, so that the light adjustment of the hyperspectral camera can be segmented.
[0045] S13: Obtain current light-related parameters of the camera device.
[0046] The current light-related parameters of the camera device may refer to light-related parameters that may be acquired based on the light after the light enters the camera device.
[0047] In some embodiments, the light-related parameters include at least one of a light focusing parameter and a light attenuation parameter. The light focusing parameter may indicate the degree of light gathering, focusing, etc. The light attenuation parameter may indicate the degree of light attenuation, such as distance attenuation and / or angle attenuation. Distance attenuation refers to the speed at which light attenuates with distance, and angle attenuation refers to the attenuation of light when it deviates from the center angle. The specific implementation process of obtaining the current light-related parameters may refer to the description of the following embodiments. The present application does not limit the light-related parameters.
[0048] In some embodiments, in the light compensation mode, the corresponding light-related parameters include light focusing parameters. In the light suppression mode, the corresponding light-related parameters include light attenuation parameters.
[0049] S14: Determine the preset component that needs to be adjusted in the light adjustment mode, wherein the preset component belongs to the camera device, and different light adjustment modes correspond to different preset components.
[0050] After determining the light adjustment mode, the preset components that need to be adjusted under the light adjustment mode can be determined. The preset components are components of the camera equipment, such as lenses, etc. Different light condition modes correspond to different preset components, so that the corresponding components can be adjusted according to different light adjustment modes.
[0051] In some embodiments, when the light adjustment mode is a light compensation mode, the preset component to be adjusted in the light compensation mode includes a lens. For example, the displacement distance of the lens can be adjusted. The lens is installed inside the camera device, and the light can be adjusted by adjusting the displacement distance of the lens.
[0052] In some embodiments, when the light adjustment mode is a light suppression mode, the preset components to be adjusted in the light suppression mode include a lens. For example, the focusing distance and direction of the lens can be adjusted to achieve light adjustment.
[0053] S15: Using the light-related parameters to adjust the current posture of the preset component to obtain light adjustment information.
[0054] After determining the current light adjustment mode, the current light-related parameters of the camera device can be obtained, and then the current posture of the preset component can be adjusted using the light-related parameters to achieve light compensation or light suppression, and obtain light adjustment information. Among them, the current posture of the preset component can refer to the posture of the preset component of the camera device, such as angle or displacement or position. Different light adjustment modes can correspond to different light-related parameters, different preset components, etc. In some application scenarios, the light adjustment of this part can be multiple adjustments or one adjustment to determine the adjusted posture to achieve light compensation or light suppression, meet the conditions for light adjustment, and obtain light adjustment information.
[0055] In some implementations, in response to the light adjustment mode being the light compensation mode, the displacement distance of the lens is adjusted using the current light focusing parameters of the camera device to obtain the first light adjustment information.
[0056] In some implementations, in response to the light adjustment mode being the light suppression mode, the lens direction and / or the focusing distance of the lens may be adjusted using the current light attenuation parameters of the camera device to obtain the second light adjustment information.
[0057] S16: establishing an adjustment reference table based on the light adjustment information and the light adjustment mode, wherein the adjustment reference table is used as reference adjustment information for subsequent light adjustment of the camera device.
[0058] An adjustment reference table can be established based on the current light adjustment mode and light adjustment information, so that the adjustment reference table can be used as reference adjustment information for subsequent light adjustment of the camera device. In the subsequent light adjustment process, the recorded light adjustment information can be referred to and the light adjustment can be performed in the corresponding light adjustment mode, so as to realize adaptive adjustment of the light of the hyperspectral camera in the corresponding light adjustment mode. The above method can determine the light adjustment mode of the hyperspectral camera according to the incoming light parameters, which can be divided into a light compensation mode and a light suppression mode, and quickly and specifically classify the ambient light of the hyperspectral camera, refine the different light adjustment modes, and quickly adjust the light of the hyperspectral camera. Different focus adjustments can be made to the light compensation mode and the light suppression mode respectively. In the subsequent light adjustment process, the light adjustment information can be referred to for light adjustment to improve the light adjustment efficiency.
[0059] In some embodiments, the first light adjustment information and the second light adjustment information can be used to adaptively adjust the light of the hyperspectral camera in a subsequent light adjustment process. Specifically, the first light adjustment information and the second light adjustment information can be used as reference adjustment information, so that in the subsequent light adjustment process, the corresponding new light adjustment information can be determined according to the first light adjustment information and the second light adjustment information, and the light of the hyperspectral camera in the corresponding light adjustment mode can be adaptively adjusted.
[0060] The above scheme obtains the comprehensive light-incoming coefficient of the camera device and uses the comprehensive light-incoming coefficient to determine the light adjustment mode of the camera device. The current light adjustment mode can be determined according to the light of the environment. Then, the current light-related parameters of the camera device are obtained, and the preset components that need to be adjusted in the light adjustment mode are determined. The preset components belong to the camera device, and different light adjustment modes correspond to different preset components. The current posture of the preset components is adjusted using the light-related parameters to obtain light adjustment information. The postures of different preset components can be adjusted according to different light adjustment modes to achieve light adjustment of the camera device and improve the accuracy of light adjustment. In addition, an adjustment reference table can be established based on the light adjustment information and the light adjustment mode. The adjustment reference table can be used as reference adjustment information for subsequent light adjustment of the camera device, so that the light adjustment information corresponding to the light adjustment mode can be quickly determined in the subsequent adjustment process, and the light adjustment can be quickly performed, so that the camera device can quickly focus and adjust the light in different light adjustment modes, reducing the time required for focus adjustment and improving the adjustment efficiency of light adjustment of the camera device as a whole.
[0061] In some embodiments, in the above step S16, an adjustment reference table is established, specifically as follows: An adjustment reference table is established according to the first light adjustment information and the light compensation mode, and the second light adjustment information and the light suppression mode. The adjustment reference table records a first association mapping relationship between the light focusing parameter and the first light adjustment information in the light compensation mode, and a second association mapping relationship between the light attenuation parameter and the second light adjustment information in the light suppression mode.
[0062] Optionally, the adjustment reference table may record corresponding light adjustment modes and corresponding light adjustment information for a preset number of times or each light adjustment process.
[0063] Optionally, the adjustment reference table may record a first association mapping relationship between a plurality of light focusing parameters and corresponding first light adjustment information, so as to indicate that when the imaging device is at the recorded light focusing parameters, the corresponding lens may be adjusted according to the corresponding first light adjustment information.
[0064] Optionally, the adjustment reference table may record a second association mapping relationship between a plurality of light attenuation parameters and corresponding second light adjustment information, to indicate that when the camera device is at the recorded light attenuation parameters, the corresponding lens may be adjusted according to the corresponding first light adjustment information.
[0065] In some embodiments, in the subsequent light adjustment process, the new light-related parameters are matched with the adjustment reference table, and light-related parameters that meet the matching conditions with the new light-related parameters are searched, so that the light adjustment information corresponding to the recorded light-related parameters is determined as the new light adjustment information. The matching conditions include: the difference between the new light-related parameters and the recorded light-related parameters is less than a preset difference.
[0066] In some embodiments, in the subsequent light adjustment process, the hyperspectral camera can be adaptively adjusted in the light compensation mode and the light suppression mode according to the adjustment reference table. In response to being in the light compensation mode again, the new first light adjustment information can be determined using the new light focusing parameters of the camera device and the corresponding first associated mapping relationship in the adjustment reference table. Specifically, in the process of determining the corresponding new first light adjustment information, the new light focusing parameters can be matched with the adjustment reference table, and the light focusing parameters that meet the matching conditions with the new light focusing parameters can be searched according to the first associated mapping relationship, so that the first light adjustment information corresponding to the recorded light focusing parameters is determined as the new first light adjustment information for adjusting the displacement distance of the lens. Wherein, the matching condition includes: the difference between the new light focusing parameters and the recorded light focusing parameters is less than the first preset difference.
[0067] In some embodiments, in response to being in the light suppression mode again, new second light adjustment information is determined using the new light attenuation parameter of the camera device and the corresponding second association mapping relationship in the adjustment reference table. Specifically, the new light attenuation parameter can be matched with the adjustment reference table, and the light attenuation parameter that meets the matching condition with the new light attenuation parameter can be searched according to the second association mapping relationship, so that the second light adjustment information corresponding to the recorded light attenuation parameter is determined as the new second light adjustment information for adjusting the focusing distance and / or lens direction of the lens. The matching condition includes: the difference between the new light attenuation parameter and the recorded light attenuation parameter is less than the second preset difference.
[0068] In some embodiments, in the subsequent light adjustment process, if there is no matching first light adjustment information or second light adjustment information in the adjustment reference table in the corresponding light adjustment mode, that is, in response to the fact that the adjustment reference table does not have light-related parameters that meet the matching conditions with the new light-related parameters, the new light adjustment information can be determined according to the above steps S11 to S16, and the new light adjustment information can continue to be added to the adjustment reference table, so that the adjustment reference table can be continuously updated, the efficiency and accuracy of light adjustment can be improved, and light adjustment can be performed adaptively.
[0069] In the above scheme, since the hyperspectral camera needs to specifically distinguish the light adjustment mode (such as light suppression mode, light compensation mode) each time before adjusting the light, wherein the posture of the preset component adjustment (such as the displacement distance of the lens) needs to be recalculated each time. Based on this, the present application establishes an adjustment reference table according to the first light adjustment information and the second light adjustment information, wherein the establishment of the adjustment reference table is to associate and map the light adjustment information and light-related parameters of the preset component for multiple adjustments, so that after distinguishing the light suppression mode and the light compensation mode, the current light-related parameters can be obtained, and the current light-related parameters can be compared with the adjustment reference table to obtain the posture of the adjustment closest to the preset component, so that the posture that needs to be adjusted can be quickly determined, and the lens, lens and other components of the hyperspectral camera can be quickly adjusted. Similarly, the light can be adaptively adjusted in the light suppression mode and the light compensation mode with reference to the adjustment reference table.
[0070] In some embodiments, for the above steps S13 to S16, light adjustment may be performed respectively in the light compensation mode and the light suppression mode, and the details may refer to the following embodiments.
[0071] See also Figure 3 , Figure 3 The present invention is a flowchart of a second embodiment of a method for adjusting light for a camera device. When adjusting light in a light compensation mode, the method may include the following steps: S21: Acquire dark light parameters of the shooting environment, and extract light source quality parameters according to the dark light parameters of the shooting environment, wherein the light source quality parameters include the brightness of the light source and the number of light sources.
[0072] When the light of the hyperspectral camera is in the light compensation mode, the dark light parameters of the shooting environment are first obtained, wherein the dark light parameters of the shooting environment can be obtained based on the spectral sensor in the hyperspectral camera. The dark light parameters of the shooting environment mainly include light intensity, which refers to the total amount of light falling on the surface of the target object, usually measured in lux. Low light intensity means that the ambient light is relatively dark. Then, the light source quality parameters are extracted according to the dark light parameters of the shooting environment, wherein the light source quality parameters include the brightness of the light source and the number of light sources.
[0073] S22: Determine the comprehensive brightness by integrating the brightness of the light source and the number of light sources.
[0074] The brightness of the light source and the number of light sources are combined, for example, the brightness of the light source and the number of light sources are summed to obtain the comprehensive brightness. The comprehensive brightness can be used to quickly obtain the light quality of the current environment. The comprehensive brightness of the incoming light can be calculated according to the brightness of the light source and the number of light sources using the following comprehensive brightness calculation formula, where the calculation formula is: .
[0075] in, Indicates the overall brightness and darkness. Represents the brightness of the light source, and n represents the number of light sources.
[0076] Through the above method, the comprehensive brightness of the incoming light can be calculated according to the brightness of the light source and the number of light sources. The comprehensive brightness can be used to determine the intensity of the light in the environment where the current hyperspectral camera is located, and then the light of the hyperspectral camera in the current light environment can be adjusted in a targeted manner.
[0077] S23: Analyze and process the comprehensive brightness to obtain light focusing parameters.
[0078] The comprehensive brightness is analyzed and processed to obtain the divergence frequency of the light, wherein the divergence frequency of the light refers to the distribution characteristics of the light source in space, that is, the intensity distribution of the light source at different wavelengths. The intensity of the light can be judged by the divergence frequency of the light. Then, the light focusing parameters can be obtained according to the divergence frequency of the light. Among them, the light focusing parameters can be defined as the degree to which the light changes from a divergent state to a concentrated state, which is usually related to the focal length, shape and material of the lens. For example, in the present application, when the lens adopts standard parts (such as lenses with preset standard shapes and materials), other shapes and materials can be referred to as light interference information.
[0079] S24: adjusting the displacement distance of the lens using the light focusing parameter to obtain first light adjustment information.
[0080] The displacement distance of the lens can be obtained according to the light focusing parameter, and the light is adjusted according to the displacement distance of the lens to obtain first light adjustment information, wherein the lens is used to adjust the light of the hyperspectral camera, and the lens is installed in the hyperspectral camera.
[0081] In some implementations, the displacement distance of the lens can be obtained based on the distance from the image to the lens and the light focusing parameters. Specifically, the distance formula of the lens is: , where f is the focal length of the lens, u is the distance from the target to the lens, and v is the distance from the image to the lens. In the process of adjusting the displacement distance of the lens using the light focusing parameters, first, the relevant information of the initial position of the lens is recorded, such as recording the distance X from the initial position of the lens to the image sensor, or recording the distance Y from the initial position of the lens to the light source, etc. The following is explained by taking the distance X from the initial position of the lens to the image sensor as an example. By adjusting the position of the lens multiple times, the light focusing parameters corresponding to each position are obtained respectively. After obtaining the light focusing parameters, the gathering of different gradient lights in a weak light environment can be determined specifically. For example, the gathering situation includes whether the light focusing parameters meet the light adjustment conditions, or whether the image quality meets the imaging adjustment conditions, or whether the adjusted light meets the preset light conditions, etc. In this way, the target position of the lens can be determined. For example, the target position can be the optimal position. By adjusting the position of the lens and observing the change in image quality, when the lens is located at a certain specific position, the image quality will reach the best, and this position is determined as the target position. The displacement distance of the lens can be obtained according to the light focusing parameters, and then the displacement distance of the lens can be adjusted according to the focusing conditions. Thus, the light of the hyperspectral camera can be adjusted in a dark light environment through the displacement distance of the lens, and the first light adjustment information can be obtained.
[0082] For example, a hyperspectral camera is used to collect images of a target object 3m away from the hyperspectral camera in a dark environment. 3m is 3000mm. If the camera is adjusted to the target position, the focal length of the lens (i.e., the light focusing parameter) is 50mm. The distance formula of the lens is: , we can get the distance from the image to the lens v=50.02mm. At this time, when adjusting the displacement distance of the lens, for example, if the initial position of the lens is X from the image sensor, the lens needs to be adjusted to move to the position of X+50.02 or 50.02−X, so that it moves to the target position and realizes light adjustment in the light compensation mode. The above values are only used for illustration, and this application does not limit the specific values.
[0083] In the above solution, when in the light compensation mode, the displacement distance of the lens can be quickly adjusted according to the light focusing parameter to obtain the first light adjustment information.
[0084] See also Figure 4 , Figure 4 The third embodiment of the light adjustment method of the camera device of the present application is a flow chart. When the light adjustment is performed in the light suppression mode, the method may include the following steps: S31: Obtain light characteristic parameters; wherein the light characteristic parameters include light focusing propagation distance and light refraction angle.
[0085] Optionally, characteristic parameters of light related to a shooting auxiliary device or a target object may be obtained, wherein the shooting auxiliary device may be used to assist shooting. The present application is described by taking the shooting auxiliary device including a target object background plate as an example.
[0086] During the image acquisition process of the hyperspectral camera, for example, when the target object is imaged, when light is irradiated onto the target object, the object will absorb, reflect or transmit part of the spectrum, and the hyperspectral camera can collect these reflected or transmitted light. When the ambient light is in the light suppression mode, the light characteristic parameters of the target background plate can be obtained first, wherein the light characteristic parameters include the light refraction angle and the light focusing propagation distance. Then, the light attenuation parameters can be obtained according to the light refraction angle and the light focusing propagation distance, so that the direction / focusing distance of the camera lens can be adjusted by the light attenuation parameters, so that the distance between the camera device and the target background plate can be controlled and adjusted.
[0087] S32: Determine the resolution and focusing accuracy values using the light focusing propagation distance.
[0088] Since the imaging quality of a hyperspectral camera is essentially related to light, this application obtains imaging information of the corresponding distance based on the focused propagation distance of the light, and extracts the resolution of the pixel based on the imaging information. The resolution obtained in this way can more realistically determine whether the light is adjusted normally. Then, multiple focal positions on the corresponding path are obtained based on the focused propagation distance of the light, and the difference between the multiple focal positions and the preset focal position is calculated to obtain multiple deviation distances, and the focusing accuracy value is obtained based on the multiple deviation distances. Among them, the focusing accuracy value is defined as the resolution divided by the absolute value of the deviation distance.
[0089] In some embodiments, test points may be set at preset intervals according to the distance between the target object and the camera device, and the preset focus position of the camera device may be determined according to each test point. Thus, the difference between multiple focus positions and the preset focus position may be calculated to obtain multiple deviation distances, and the resolution may be obtained by measuring at the preset focus position. Then, the resolution is calculated and divided by the absolute value of the deviation distance to obtain the focus accuracy value.
[0090] Exemplarily, the focal length of the lens is 50mm, and the target is 1000mm away from the camera. A test point can be set every 50mm between the distance between the target and the camera of 900mm and 1100mm, for a total of 5 test points. By adjusting the lens, it is found that the image at 1000mm is the clearest, which is used as the preset focus position, that is, the ideal focus position. The images at other positions are blurrier than the ideal focus position. Thus, the deviation distances can be obtained as ±50mm, ±100mm, and ±150mm, respectively. At the preset focus position, the measured pixel resolution is 10lp / mm, while at the position of ±150mm, the resolution drops to 5lp / mm, where the focus accuracy value is defined as the resolution divided by the absolute value of the deviation distance. Therefore, the focus accuracy value at the position of ±150mm is 5lp / mm divided by 150mm=0.0333lp / mm². In some application scenarios, if the preset focus accuracy threshold is 0.05lp / mm², it means that the light adjustment at the position of ±150mm is still acceptable, but the lens position needs to be further optimized to 1000mm to improve the overall imaging quality. In this way, after obtaining multiple deviation distances, the focus accuracy value can be obtained according to the multiple deviation distances, and the optimal focus accuracy value can be determined. Then, the light control and adjustment of the hyperspectral camera can be analyzed through the focus accuracy value, so that the focus distance from the hyperspectral camera to the target object background plate can be more accurately controlled through the light attenuation parameters, so that the hyperspectral camera can work more efficiently. The above-mentioned values are only used for illustration, and this application does not limit the specific values.
[0091] S33: performing weighted processing on the light refraction angle, resolution and focusing accuracy values and corresponding weights respectively to obtain light attenuation parameters.
[0092] The light refraction angle, resolution and focusing accuracy values are weighted with their corresponding weights to obtain the light attenuation parameter. The light refraction angle, resolution and focusing accuracy values correspond to a weight respectively. This application does not limit the weights.
[0093] In some embodiments, the light refraction angle, resolution, and focusing accuracy values may be input into a light energy extraction model for processing, such as weighted processing or training processing, to obtain a light attenuation value, wherein the function formula of the light energy extraction model is: .
[0094] in, Represents the light attenuation parameter, represents the angle of refraction of light, Indicates the weight corresponding to the refraction angle of light; Indicates resolution, Indicates the weight corresponding to the resolution; represents the focusing accuracy value, and c represents the weight corresponding to the focusing accuracy value.
[0095] S34: adjusting the focus distance and / or the direction of the lens by using the light attenuation parameter to obtain second light adjustment information.
[0096] The lens direction and focusing distance of the hyperspectral camera can be changed to avoid the target background plate with strong light. The hyperspectral camera after avoidance can reduce the influence of strong light and obtain the second light adjustment information.
[0097] In some implementations, the lens direction and focus distance can be adjusted multiple times to avoid the target background with strong light. If the light meets the preset light conditions after adjustment, the adjusted lens direction and focus distance are recorded to obtain the second light adjustment information.
[0098] In the above solution, when in the light suppression mode, the focus distance and / or lens direction of the lens can be quickly adjusted according to the light attenuation parameter to obtain the second light adjustment information.
[0099] It is understandable that in the above method of the specific implementation mode, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0100] For the above-mentioned embodiments, the present application also provides a light adjustment system for an imaging device, which is used to implement the above-mentioned light adjustment method for the imaging device.
[0101] See also Figure 5 , Figure 5 1 is a schematic diagram of a light adjustment system of a camera device of the present application. The light adjustment system 40 of the camera device includes: a light acquisition module 41, a mode determination module 42, a parameter acquisition module 43, a preset component module 44, a light adjustment module 45 and a reference table module 46. The modules can be connected to each other.
[0102] The light acquisition module 41 is used to acquire the comprehensive light input coefficient of the camera device.
[0103] The mode determination module 42 is used to determine the light adjustment mode of the camera device by using the comprehensive light input coefficient.
[0104] The parameter acquisition module 43 is used to acquire the current light-related parameters of the camera device.
[0105] The preset component module 44 is used to determine the preset components that need to be adjusted in the light adjustment mode, wherein the preset components belong to the camera device, and different light adjustment modes correspond to different preset components.
[0106] The light adjustment module 45 is used to adjust the current position and posture of the preset component using light-related parameters to obtain light adjustment information.
[0107] The reference table module 46 is used to establish an adjustment reference table based on the light adjustment information and the light adjustment mode, wherein the adjustment reference table is used as reference adjustment information for subsequent light adjustment of the camera device.
[0108] In some embodiments, the light adjustment mode includes any one of a light compensation mode and a light suppression mode. The corresponding preset component to be adjusted in the light compensation mode includes a lens, and the corresponding preset component to be adjusted in the light suppression mode includes a lens; the light-related parameters include at least one of a light focusing parameter and a light attenuation parameter.
[0109] In some embodiments, the light acquisition module 41 is also used to obtain initial light input parameters, which include light propagation path parameters, light incident angle parameters, and light interference parameters; feature extraction is performed on the light propagation path parameters, light incident angle parameters, and light interference parameters, respectively, to obtain light propagation path features, light incident angle features, and light interference features; and weighted processing is performed on the light propagation path features, light incident angle features, and light interference features to obtain a comprehensive light input coefficient.
[0110] In some embodiments, the light acquisition module 41 is also used to obtain the starting position and contact position of the light entering the camera device, wherein the contact position is the coordinate position where the light contacts the lens; based on the starting position and the contact position, the light propagation path parameters are obtained; the connecting straight line between the starting position and the contact position is obtained, and the light incident angle parameters are determined using the angle between the lens surface and the connecting straight line.
[0111] In some embodiments, the mode determination module 42 is also used to determine that the current light adjustment mode of the camera device is a light compensation mode in response to the comprehensive light intake coefficient satisfying a first preset light intake coefficient condition; or, in response to the comprehensive light intake coefficient satisfying a second preset light intake coefficient condition, determine that the current light adjustment mode of the camera device is a light suppression mode.
[0112] In some embodiments, the light-related parameters include light focusing parameters. The parameter acquisition module 43 is also used to acquire the dark light parameters of the shooting environment, and extract the light source quality parameters according to the dark light parameters of the shooting environment, wherein the light source quality parameters include the brightness of the light source and the number of light sources; the brightness of the light source and the number of light sources are integrated to determine the comprehensive brightness; the comprehensive brightness is analyzed to obtain the light focusing parameters.
[0113] In some embodiments, the light-related parameters include at least one of the light attenuation parameters. The parameter acquisition module 43 is also used to acquire light characteristic parameters; wherein the light characteristic parameters include the light focusing propagation distance and the light refraction angle; the resolution and focusing accuracy values are determined by using the light focusing propagation distance; the light refraction angle, resolution and focusing accuracy values are weighted with the corresponding weights to obtain the light attenuation parameters.
[0114] In some embodiments, the light adjustment module 45 is also used to, in response to the light adjustment mode being a light compensation mode, adjust the displacement distance of the lens using the current light focusing parameters of the camera device to obtain first light adjustment information; or, in response to the light adjustment mode being a light suppression mode, adjust the focusing distance and / or lens direction of the lens using the current light attenuation parameters of the camera device to obtain second light adjustment information.
[0115] In some embodiments, the reference table module 46 is also used to establish an adjustment reference table based on the first light adjustment information and the light compensation mode, and the second light adjustment information and the light suppression mode; wherein the adjustment reference table records a first associated mapping relationship between the light focusing parameters and the first light adjustment information in the light compensation mode; and a second associated mapping relationship between the light attenuation parameters and the second light adjustment information in the light suppression mode.
[0116] In some embodiments, the light adjustment module 45 is further configured to determine corresponding new light adjustment information in a subsequent light adjustment process. In response to being in the light compensation mode again, the new first light adjustment information is determined using the new light focusing parameters of the camera device and the corresponding first association mapping relationship in the adjustment reference table; or, in response to being in the light suppression mode again, the new second light adjustment information is determined using the new light attenuation parameters of the camera device and the corresponding second association mapping relationship in the adjustment reference table.
[0117] It should be noted that the light adjustment system of the camera device provided in the above embodiment and the light adjustment method of the camera device provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In practical applications, the light adjustment system of the camera device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this application is not limited to this.
[0118] For the above embodiment, the present application provides a camera device, see Figure 6 , Figure 6 1 is a schematic diagram of the structure of an embodiment of the camera device of the present application. The camera device 50 includes a memory 51 and a processor 52, wherein the memory 51 and the processor 52 are coupled to each other, the memory 51 stores program data, and the processor 52 is used to execute the program data to implement the steps of any embodiment of the light adjustment method of the camera device described above.
[0119] In this embodiment, the processor 52 may also be referred to as a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip having the ability to process signals. The processor 52 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, or discrete hardware components. A general-purpose processor may be a microprocessor or the processor 52 may also be any conventional processor, etc.
[0120] The method of the above embodiment can be implemented in the form of a computer program, so the present application proposes a computer readable storage medium, see Figure 7 , Figure 7 The computer-readable storage medium 60 stores program data 61 that can be run by a processor, and the program data 61 can be executed by the processor to implement the steps of any embodiment of the light adjustment method of the above-mentioned camera device.
[0121] The computer-readable storage medium 60 of this embodiment may be a medium that can store the program data 61, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server storing the program data 61. The server may send the stored program data 61 to other devices for execution, or may execute the stored program data 61 by itself.
[0122] In some embodiments, the functions or modules included in the device provided in the above embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, the present application will not go into details here.
[0123] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other. For the sake of brevity, this application will not go into details here.
[0124] The above descriptions 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 light adjustment method for a camera device, characterized in that: include: Obtain the comprehensive light-incoming coefficient of the camera device; Determining a light adjustment mode of the camera device using the comprehensive light-incoming coefficient; Obtaining current light-related parameters of the camera device; as well as Determining a preset component that needs to be adjusted in the light adjustment mode, wherein the preset component belongs to the camera device, and different light adjustment modes correspond to different preset components; Adjusting the current posture of the preset component using the light-related parameters to obtain light adjustment information; An adjustment reference table is established based on the light adjustment information and the light adjustment mode, wherein the adjustment reference table is used as reference adjustment information for subsequent light adjustment of the imaging device.
2. The method according to claim 1, characterized in that The light adjustment mode includes any one of a light compensation mode and a light suppression mode. In the light compensation mode, the corresponding preset component to be adjusted includes a lens. In the light suppression mode, the corresponding preset component to be adjusted includes a lens. The light-related parameter includes at least one of a light focusing parameter and a light attenuation parameter. The step of adjusting the current posture of the preset component by using the light-related parameters to obtain light adjustment information includes: In response to the light adjustment mode being the light compensation mode, adjusting the displacement distance of the lens using the current light focusing parameters of the camera device to obtain first light adjustment information; or In response to the light adjustment mode being the light suppression mode, the focus distance and / or lens direction of the lens are adjusted using the current light attenuation parameter of the camera device to obtain second light adjustment information.
3. The method according to claim 2, characterized in that The light-related parameters include: light focusing parameters; and obtaining the current light-related parameters of the camera device includes: Acquiring a dark light parameter of a shooting environment, and extracting a light source quality parameter according to the dark light parameter of the shooting environment, wherein the light source quality parameter includes the brightness and the number of light sources; Determine the comprehensive brightness by combining the brightness of the light source and the number of the light sources; The comprehensive brightness is analyzed to obtain the light focusing parameters.
4. The method according to claim 2, characterized in that The light-related parameters include: light attenuation parameters; the obtaining of the current light-related parameters of the camera device includes: Obtaining light characteristic parameters; wherein the light characteristic parameters include light focusing propagation distance and light refraction angle; Determine the resolution and focusing accuracy values using the focused propagation distance of the light; The light refraction angle, the resolution, the focus accuracy value and the corresponding weights are weighted to obtain the light attenuation parameter.
5. The method according to claim 2, characterized in that The establishing of an adjustment reference table based on the light adjustment information and the light adjustment mode includes: establishing the adjustment reference table according to the first light adjustment information and the light compensation mode, and the second light adjustment information and the light suppression mode; The adjustment reference table records a first associated mapping relationship between the light focusing parameter and the first light adjustment information in the light compensation mode; and a second associated mapping relationship between the light attenuation parameter and the second light adjustment information in the light suppression mode. And / or, the adjustment reference table is used as reference adjustment information for subsequent light adjustment of the camera device, including: In response to being in the light compensation mode again subsequently, determining new first light adjustment information using the new light focusing parameters of the camera device and the corresponding first association mapping relationship in the adjustment reference table; or In response to being in the light suppression mode again subsequently, new second light adjustment information is determined using the new light attenuation parameter of the camera device and the corresponding second association mapping relationship in the adjustment reference table.
6. The method according to claim 1, wherein The light adjustment mode includes any one of a light compensation mode and a light suppression mode; The determining of the light adjustment mode of the camera device by using the comprehensive light-incoming coefficient includes: In response to the comprehensive light-incoming coefficient satisfying a first preset light-incoming coefficient condition, determining that the current light adjustment mode of the camera device is the light compensation mode; or, In response to the comprehensive light-incoming coefficient satisfying a second preset light-incoming coefficient condition, it is determined that the current light adjustment mode of the camera device is the light suppression mode.
7. The method according to claim 1, characterized in that The obtaining of the comprehensive light-incoming coefficient of the camera device includes: Acquiring initial light input parameters, wherein the initial light input parameters include light propagation path parameters, light incident angle parameters, and light interference parameters; Extracting features of the light propagation path parameter, the light incident angle parameter, and the light interference parameter to obtain light propagation path features, light incident angle features, and light interference features; The light propagation path characteristics, light incident angle characteristics and light interference characteristics are weighted to obtain the comprehensive light input coefficient.
8. The method according to claim 7, characterized in that The obtaining of the initial light input parameters includes: Obtaining a starting position and a contact position of a light ray entering the imaging device, wherein the contact position is a coordinate position where the light ray contacts a lens; Based on the starting position and the contact position, obtaining the light propagation path parameters; A straight line connecting the starting position and the contact position is obtained, and the light incident angle parameter is determined using the angle between the lens surface and the straight line.
9. A camera device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program data, and the processor is configured to execute the program data to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that Program data capable of being executed by a processor is stored, and the program data is used to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Electronic camera
CN101656831A
Image pickup apparatus and method of controlling the same
CN102629984A
Method and device for strong light inhibition on basis of non-wide-dynamic function
CN103780845A
Flash lamp adjustment method and mobile terminal
CN107770455A
Image acquisition equipment, equipment control method and device and storage medium
CN110557571A
