A method, device, and storage medium for determining an exposure parameter
By acquiring multiple images and fusing them to determine exposure parameters, the problem of poor performance of existing metering methods under different lighting conditions is solved, enabling stable shooting and high-quality image acquisition by the camera device in outdoor environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AEROSPACE CLOUD MASCH (BEIJING) TECH CO LTD
- Filing Date
- 2023-04-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing metering methods have high requirements for the light environment and cannot be used stably outdoors, resulting in poor shooting results of camera devices in different lighting environments.
By acquiring multiple images, including images taken without the fill light on, a second image is obtained by fusing them. The target exposure parameters are determined based on the grayscale values of the first and second images. The mapping information is used to characterize the correspondence between grayscale values and exposure parameters to determine the target exposure parameters.
It improves the shooting stability and measurement accuracy of the camera device under different lighting conditions, ensures image quality, and has a strong ability to adapt to different lighting environments.
Smart Images

Figure CN116506737B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing, and more particularly to a method, apparatus, device, and storage medium for determining exposure parameters. Background Technology
[0002] To ensure that the camera captures a clear image during shooting, metering is usually performed before the actual shooting. Existing metering methods generally involve first capturing an image with the camera, and then using mathematical statistical algorithms to obtain the target exposure value based on the exposure values of different areas of the image, thereby obtaining the target exposure parameters.
[0003] However, existing photometric methods have high requirements for the light environment and cannot be used stably outdoors. Summary of the Invention
[0004] This disclosure provides a method for determining exposure parameters, applied to a camera device including a fill light; the method for determining exposure parameters includes:
[0005] Acquire multiple images of a target object, wherein the multiple images are images captured by the camera device under multiple sets of preset exposure parameters, and the multiple images include a first image, which is an image captured when the fill light is not turned on;
[0006] The multiple images are fused to obtain a second image;
[0007] A first grayscale value and a second grayscale value are determined, wherein the first grayscale value is the average grayscale value of the target region of the first image, and the second grayscale value is the average grayscale value of the target region of the second image; the target region of the first image and the target region of the second image correspond to the same region of the target object.
[0008] The target exposure parameters of the camera device are determined based on the first gray value and the second gray value.
[0009] In one embodiment, determining the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value includes:
[0010] Obtain mapping information, which is used to characterize the correspondence between different first grayscale values and second grayscale values and exposure parameters;
[0011] Based on the mapping information, the target exposure parameters corresponding to the first grayscale value and the second grayscale value are determined.
[0012] In one embodiment, the mapping information includes multiple sets of mapping relationships, each set of mapping relationships including a first grayscale range, a second grayscale range, and exposure parameters corresponding to the first grayscale range and the second grayscale range; based on the mapping information, determining the target exposure parameters corresponding to the first grayscale value and the second grayscale value includes:
[0013] A target mapping relationship is determined from the multiple sets of mapping relationships; wherein the first grayscale range of the target mapping relationship contains the first grayscale value, and the second grayscale range of the target mapping relationship contains the second grayscale value;
[0014] The exposure parameters in the target mapping relationship are determined as the target exposure parameters.
[0015] In one embodiment, the first grayscale range includes a first lower grayscale limit and a first upper grayscale limit, and the second grayscale range includes a second lower grayscale limit and a second upper grayscale limit; determining the target mapping relationship from the multiple sets of mapping relationships includes:
[0016] According to the preset priority order of the multiple sets of mapping relationships, the first gray value is compared with the first gray lower limit value and the first gray upper limit value in the same set of mapping relationships, and the second gray value is compared with the second gray lower limit value and the second gray upper limit value in the same set of mapping relationships.
[0017] In response to the case where the first grayscale value is greater than or equal to the first grayscale lower limit and less than the first grayscale upper limit, and the second grayscale value is greater than or equal to the second grayscale lower limit and less than the second grayscale upper limit, the mapping relationship to which the first grayscale lower limit, the first grayscale upper limit, the second grayscale lower limit, and the second grayscale upper limit belong is determined as the target mapping relationship.
[0018] In one embodiment, determining the first grayscale value and the second grayscale value includes: determining the location information of the target region of the second image;
[0019] Based on the location information of the target region in the second image, the first grayscale value and the second grayscale value are determined.
[0020] In one embodiment, determining the location information of the target region of the second image includes: inputting the second image into a pre-trained model and outputting the location information of the target region of the second image.
[0021] In one embodiment, the target exposure parameters include at least one of exposure time, gain, gamma value, and fill light brightness.
[0022] This disclosure also provides an exposure parameter determination device, applied to a camera device, the camera device including a fill light; the exposure parameter determination device includes:
[0023] The acquisition module is used to acquire multiple images of a target object. The multiple images are images captured by the camera device under multiple sets of preset exposure parameters. Among the multiple images, there is a first image, which is an image captured when the fill light is not turned on.
[0024] A fusion module is used to fuse the multiple images to obtain a second image;
[0025] A grayscale value determination module is used to determine a first grayscale value and a second grayscale value, wherein the first grayscale value is the average grayscale value of the target area of the first image, and the second grayscale value is the average grayscale value of the target area of the second image; the target area of the first image and the target area of the second image correspond to the same area of the target object.
[0026] An exposure parameter determination module is used to determine the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value.
[0027] This disclosure also provides an electronic device, characterized in that it includes:
[0028] At least one processor;
[0029] Memory for storing the at least one processor-executable instruction;
[0030] The at least one processor is configured to execute the instructions to implement the method as described in any of the above embodiments.
[0031] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the method as described in any of the above embodiments.
[0032] The method for determining exposure parameters provided in this embodiment includes acquiring multiple images of a target object, wherein the multiple images are images captured by the camera device under multiple sets of preset exposure parameters, wherein the multiple images include a first image, which is an image captured when the fill light is not turned on; fusing the multiple images to obtain a second image; determining a first grayscale value and a second grayscale value, wherein the first grayscale value is the average grayscale value of the target area of the first image, and the second grayscale value is the average grayscale value of the target area of the second image; the target area of the first image and the target area of the second image correspond to the same area of the target object; and determining the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value. The first image was taken without the fill light on. In this case, the target area of the first image may be underexposed, properly exposed, or overexposed. That is, the first gray value can directly reflect the light intensity of the ambient light in which the target object is located. The second image is formed by fusing the above images. The second gray value can reflect the sensitivity of the target object to the fill light. Based on the first and second gray values, the target exposure parameters that meet the requirements of the ambient light and the target object can be determined. It has the advantages of high stability, accurate measurement, and strong adaptability to light environment. Attached Figure Description
[0033] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0034] Figure 1 A flowchart of a method for determining exposure parameters provided as an exemplary embodiment of this disclosure;
[0035] Figure 2 A flowchart illustrating a method for determining a first grayscale value and a second grayscale value, provided as an exemplary embodiment of this disclosure;
[0036] Figure 3 A flowchart for determining target exposure parameters corresponding to a first grayscale value and a second grayscale value based on mapping information, provided as an exemplary embodiment of this disclosure;
[0037] Figure 4 A schematic block diagram of the functional modules of an exposure parameter determination apparatus provided for an exemplary embodiment of this disclosure;
[0038] Figure 5 A schematic block diagram of an electronic device provided as an exemplary embodiment of this disclosure;
[0039] Figure 6 A block diagram of a computer system provided for an exemplary embodiment of this disclosure. Detailed Implementation
[0040] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0041] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0042] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0043] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0044] This disclosure provides a method for determining exposure parameters. This method is applied to a camera device to determine target exposure parameters before normal shooting, thereby improving image quality. In one embodiment, the camera device can be an industrial camera. Based on the captured image of a target object, the camera device can acquire the location information of the target object or a region within the target object. The target object can be, for example, a vehicle waiting to be refueled. The camera device can be, for example, a camera mounted on the head or hand of a refueling robot to acquire the location of the vehicle's refueling port. However, this method is not limited to these applications. The above-described method for determining exposure parameters can be applied to any camera device, and this disclosure does not limit its application.
[0045] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0046] Figure 1 A flowchart illustrating a method for determining exposure parameters provided as an exemplary embodiment of this disclosure, the method being applied to a camera device including a fill light; as... Figure 1 As shown, the method for determining exposure parameters includes the following steps:
[0047] S101. Acquire multiple images of the target object, wherein the multiple images are images captured by the camera device under multiple sets of preset exposure parameters, and the multiple images include a first image, which is an image captured when the fill light is not turned on.
[0048] In this step, multiple images of the target object are acquired by the camera device, and the exposure parameters corresponding to these multiple images are preset. The aforementioned camera device can be an industrial camera suitable for different scenarios, such as a camera mounted on the head or hand of a dispensing robot. In this scenario, the target object is the vehicle to be dispensed, and the camera device captures multiple images of the vehicle to be dispensed. These multiple images are captured under multiple sets of preset exposure parameters. This embodiment does not limit the specific values of the preset exposure parameters; they can be set based on the actual scenario, but it must be ensured that one image is captured without supplemental lighting, i.e., the aforementioned first image. Thus, the ambient light intensity of the target object can be determined based on the first image, such as whether the ambient light is day or night, and whether it is strong or weak light.
[0049] It should be noted that the exposure parameters in this embodiment include, but are not limited to, exposure time, exposure gain, gamma value, duration of illumination, and brightness of the fill light.
[0050] This disclosure does not limit the number of images; for example, it can be 3, 4, 5, 6, or more. In one specific embodiment, the plurality of images specifically refers to 5 images, and the preset exposure parameters of the 5 images are different. It should be noted that the different preset exposure parameters of the 5 images mean that the 5 images were taken under different exposure conditions. This difference does not necessarily mean that all the sub-parameters in the exposure parameters are different, but rather that there is at least one different sub-parameter between each pair of the 5 images. This sub-parameter could be, for example, the exposure time, the brightness of the fill light, or the exposure gain, etc. For example, the first image in these multiple images can have an exposure time of 8.5 milliseconds, with the fill light off, and its brightness can be considered 255 (the darkest). The second image can have an exposure time of 8.5 milliseconds, but with the fill light on, and its brightness is 200. The third image can have an exposure time of 16 milliseconds, with a fill light brightness of 160. The fourth image can have an exposure time of 4 milliseconds, with a fill light brightness of 120. The fifth image can have an exposure time of 8 milliseconds, with a fill light brightness of 90. It can be seen that the first and second images have the same exposure time, but different fill light brightness; that is, the first and second images have only one sub-parameter—the fill light brightness—that is, they differ in brightness. The second, third, fourth, and fifth images have different exposure times and fill light brightness in each pair.
[0051] In practical applications, it is necessary to set multiple sets of appropriate preset exposure parameters based on the lighting characteristics of the actual scene. This ensures that at any given moment in the scene, at least one image captured of any target object is within the normal exposure range. Taking a camera device used in a refueling robot as an example, when setting the preset exposure parameters, a smaller set of exposure parameters can be set. This set is suitable for environments with high brightness, such as daytime, where the color of the vehicle to be refueled is more sensitive to the supplemental lighting, such as a white vehicle. In this case, the smaller exposure parameter refers to a shorter exposure time and a lower supplemental lighting brightness. Alternatively, a larger set of exposure parameters can be set. This set is suitable for environments with low brightness, such as nighttime, where the color of the vehicle to be refueled is less sensitive to the supplemental lighting, such as a black vehicle. In this case, the larger exposure parameter refers to a longer exposure time and a higher supplemental lighting brightness.
[0052] S102, The multiple images are fused to obtain a second image.
[0053] In this step, the multiple images captured in step S101 are fused to obtain a second image. This second image has higher image quality than any of the multiple images mentioned above, which facilitates subsequent computer processing, such as target region recognition.
[0054] S103. Determine a first grayscale value and a second grayscale value, wherein the first grayscale value is the average grayscale value of the target area of the first image, and the second grayscale value is the average grayscale value of the target area of the second image; the target area of the first image and the target area of the second image correspond to the same area of the target object.
[0055] The purpose of this step is to determine the average gray value of the target area in the first image and the average gray value of the target area in the second image. The first image was taken under natural light, so the first gray value can characterize the brightness of the ambient light where the target object is located. The second image is formed by fusing multiple images, so the second gray value can characterize the sensitivity of the target object to the fill light.
[0056] This disclosure does not limit the specific method for determining the first grayscale value and the second grayscale value. Any method that can determine grayscale values can be applied to this disclosure to determine the first grayscale value and the second grayscale value. In one embodiment, such as... Figure 2 As shown, determining the first grayscale value and the second grayscale value includes the following steps:
[0057] S201. Determine the location information of the target region in the second image.
[0058] In this step, the location of the target region in the second image is first determined. Since the image quality of the second image is better than that of the images before fusion, the accuracy of determining the target region through the second image is higher.
[0059] This disclosure does not limit the specific method of determining the target region using a second image. In one example, determining the location information of the target region in the second image includes: inputting the second image into a pre-trained model, which outputs the location information of the target region in the second image. It can be seen that the input to this model is a grayscale image, and the output is the location information of the target region.
[0060] S202. Based on the location information of the target region in the second image, determine the first grayscale value and the second grayscale value.
[0061] It can be understood that the target region in the second image and the target region in the first image correspond to the same area of the target object. When the location information of the target region in the second image is known, the average gray value of the target region in the second image and the average gray value of the target region in the first image can be obtained based on this location information, i.e., the second gray value and the first gray value. Obtaining the average gray value of the target region based on its location information can be referred to existing techniques in this field, and will not be elaborated upon here.
[0062] S104. Based on the first gray value and the second gray value, determine the target exposure parameters of the camera device.
[0063] Since the first grayscale value can characterize the intensity of the ambient light surrounding the target object, and the second grayscale value can characterize the sensitivity of the target object to the fill light, exposure parameters adapted to the ambient light brightness and the target object color, i.e., target exposure parameters, can be determined based on these first and second grayscale values. These target exposure parameters may include at least one of exposure time, gain, gamma value, and fill light brightness.
[0064] This disclosure does not limit the specific method of determining the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value. In one possible implementation, determining the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value includes the following steps:
[0065] Obtain mapping information, which is used to characterize the correspondence between different first grayscale values and second grayscale values and exposure parameters; based on the mapping information, determine the target exposure parameters corresponding to the first grayscale value and the second grayscale value.
[0066] The mapping information used to characterize the correspondence between the first and second grayscale values and exposure parameters can be a mapping function or a mapping table. Both mapping functions and mapping tables can be obtained through shooting experiments in real-world scenarios, thus determining exposure parameters using this mapping information has the advantage of high accuracy. Taking a mapping table as an example, in this example, the mapping information should include multiple sets of mapping relationships located in different rows of the mapping table. Each set of mapping relationships can include a first grayscale range, a second grayscale range, and exposure parameters corresponding to the first and second grayscale ranges. That is, in this example, the first grayscale value within a certain range and the second grayscale value within a certain range are associated with a certain set of exposure parameters. In one possible implementation, based on the mapping information, the target exposure parameters corresponding to the first and second grayscale values are determined, such as... Figure 3 As shown, it includes the following steps:
[0067] S301. Determine a target mapping relationship from the multiple sets of mapping relationships; wherein the first grayscale range of the target mapping relationship contains the first grayscale value, and the second grayscale range of the target mapping relationship contains the second grayscale value.
[0068] In one possible implementation, the first grayscale range includes a first grayscale lower limit and a first grayscale upper limit, and the second grayscale range includes a second grayscale lower limit and a second grayscale upper limit. Determining a target mapping relationship from the multiple sets of mapping relationships includes: comparing the first grayscale value with the first grayscale lower limit and the first grayscale upper limit in the same set of mapping relationships according to a preset priority order of the multiple sets of mapping relationships, and comparing the second grayscale value with the second grayscale lower limit and the second grayscale upper limit in the same set of mapping relationships; in response to the case that the first grayscale value is greater than or equal to the first grayscale lower limit and less than the first grayscale upper limit, and the second grayscale value is greater than or equal to the second grayscale lower limit and less than the second grayscale upper limit, determining the mapping relationship to which the first grayscale lower limit, the first grayscale upper limit, the second grayscale lower limit, and the second grayscale upper limit belong is the target mapping relationship. In this embodiment, the first gray value and the second gray value determined in step S103 are compared with the first gray lower limit, the first gray upper limit, the second gray lower limit, and the second gray upper limit in multiple sets of mapping relationships. When the first gray value and the second gray value fall within the first gray range and the second gray range in a certain set of mapping relationships, the set of mapping relationships is determined as the target mapping relationship.
[0069] S302. Determine the exposure parameters in the target mapping relationship as the target exposure parameters.
[0070] In this step, the exposure parameters contained in the established target mapping relationship are determined as the target exposure parameters.
[0071] The method for determining exposure parameters disclosed in this embodiment involves taking a first image when the fill light is off. In this case, the target area of the first image may be underexposed, normally exposed, or overexposed. The first gray value can directly reflect the light intensity of the ambient light surrounding the target object. The second image is formed by fusing multiple images, and its image quality is better than that of the individual images before fusion. It can reflect more details about the target object. The second gray value can reflect the sensitivity of the target object to the fill light. Based on the first and second gray values, the target exposure parameters that meet the requirements of the ambient light and the target object can be determined. This method has the advantages of high stability, accurate measurement, and strong adaptability to light environments.
[0072] By dividing each function into corresponding functional modules, this disclosure provides an object pose determination device. Figure 4 A schematic block diagram of the functional modules of an exposure parameter determination apparatus provided for an exemplary embodiment of this disclosure. Figure 4 As shown, the object pose determination device 400 includes:
[0073] The acquisition module 401 is configured to acquire multiple images of a target object, wherein the multiple images are images captured by the camera device under multiple sets of preset exposure parameters, and the multiple images include a first image, which is an image captured when the fill light is not turned on;
[0074] The fusion module 402 is configured to fuse the multiple images to obtain a second image;
[0075] The grayscale value determination module 403 is configured to determine a first grayscale value and a second grayscale value, wherein the first grayscale value is the average grayscale value of the target area of the first image, and the second grayscale value is the average grayscale value of the target area of the second image; the target area of the first image and the target area of the second image correspond to the same area of the target object; the exposure parameter determination module 404 is configured to determine the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value.
[0076] In one possible implementation, the exposure parameter determination module 404 is configured to: acquire mapping information, the mapping information being used to characterize the correspondence between different first grayscale values and second grayscale values and exposure parameters; and, based on the mapping information, determine the target exposure parameters corresponding to the first grayscale value and the second grayscale value.
[0077] In one possible implementation, the mapping information includes multiple sets of mapping relationships, each set of mapping relationships including a first grayscale range, a second grayscale range, and exposure parameters corresponding to the first grayscale range and the second grayscale range; the exposure parameter determination module 404 is further configured to: determine a target mapping relationship from the multiple sets of mapping relationships; wherein the first grayscale range of the target mapping relationship contains the first grayscale value, and the second grayscale range of the target mapping relationship contains the second grayscale value; and determine the exposure parameters in the target mapping relationship as the target exposure parameters.
[0078] In one possible implementation, the first grayscale range includes a first grayscale lower limit and a first grayscale upper limit, and the second grayscale range includes a second grayscale lower limit and a second grayscale upper limit. The exposure parameter determination module 404 is further configured to: compare the first grayscale value with the first grayscale lower limit and the first grayscale upper limit in the same group of mapping relationships according to a preset priority order of the multiple groups of mapping relationships, and compare the second grayscale value with the second grayscale lower limit and the second grayscale upper limit in the same group of mapping relationships; in response to the case that the first grayscale value is greater than or equal to the first grayscale lower limit and less than the first grayscale upper limit, and the second grayscale value is greater than or equal to the second grayscale lower limit and less than the second grayscale upper limit, determine the mapping relationship to which the first grayscale lower limit, the first grayscale upper limit, the second grayscale lower limit, and the second grayscale upper limit belong as the target mapping relationship.
[0079] In one possible implementation, the grayscale value determination module 403 is further configured to: determine the location information of the target region of the second image; and determine the first grayscale value and the second grayscale value based on the location information of the target region of the second image.
[0080] In one possible implementation, the grayscale value determination module 403 is further configured to input the second image into a pre-trained model and output the location information of the target region of the second image.
[0081] In one possible implementation, the target exposure parameters include at least one of exposure time, gain, gamma value, and fill light brightness.
[0082] This disclosure also provides an electronic device, including: at least one processor; and a memory for storing the at least one processor-executable instructions; wherein the at least one processor is configured to execute the instructions to implement the method disclosed in this disclosure.
[0083] Figure 5 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this disclosure. For example... Figure 5 As shown, the electronic device 1800 includes at least one processor 1801 and a memory 1802 coupled to the processor 1801. The processor 1801 can perform the corresponding steps in the methods disclosed in the embodiments of this disclosure.
[0084] The processor 1801 described above can also be referred to as a central processing unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the method disclosed in this embodiment can be implemented by the integrated logic circuitry in the hardware of the processor 1801 or by instructions in software form. The processor 1801 can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this embodiment can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in the memory 1802, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor 1801 reads information from the memory 1802 and, in conjunction with its hardware, completes the steps of the above method.
[0085] Furthermore, various operations / processes according to this disclosure, implemented via software and / or firmware, can be transmitted from a storage medium or network to a computer system with a dedicated hardware architecture, such as... Figure 6 The computer system 1900 shown is equipped with the programs that constitute the software. When various programs are installed, the computer system is able to perform various functions, including those mentioned above. Figure 6 A block diagram of a computer system provided for an exemplary embodiment of this disclosure.
[0086] Computer System 1900 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0087] like Figure 6As shown, the computer system 1900 includes a computing unit 1901, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 1902 or a computer program loaded into a random access memory (RAM) 1903 from a storage unit 1908. The RAM 1903 may also store various programs and data required for the operation of the computer system 1900. The computing unit 1901, ROM 1902, and RAM 1903 are interconnected via a bus 1904. An input / output (I / O) interface 1905 is also connected to the bus 1904.
[0088] Multiple components in computer system 1900 are connected to I / O interface 1905, including: input unit 1906, output unit 1907, storage unit 1908, and communication unit 1909. Input unit 1906 can be any type of device capable of inputting information into computer system 1900. Input unit 1906 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 1907 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1908 may include, but is not limited to, hard disks and optical disks. Communication unit 1909 allows computer system 1900 to exchange information / data with other devices via a network such as the Internet, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0089] The computing unit 1901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1901 performs the various methods and processes described above. For example, in some embodiments, the methods disclosed in this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1908. In some embodiments, part or all of the computer program can be loaded and / or installed on the computer system 1900 via ROM 1902 and / or communication unit 1909. In some embodiments, the computing unit 1901 can be configured to perform the methods disclosed in this disclosure by any other suitable means (e.g., by means of firmware).
[0090] This disclosure also provides a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the methods disclosed in this disclosure.
[0091] The computer-readable storage medium in this disclosure can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The aforementioned computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specifically, the aforementioned computer-readable storage medium may include electrical connections based on one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0092] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0093] This disclosure also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the methods disclosed in this disclosure.
[0094] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer.
[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0096] The modules, components, or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules, components, or units do not necessarily limit the module, component, or unit itself.
[0097] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0098] The above description is merely an embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0099] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for determining exposure parameters, characterized in that, Applied to a camera device, the camera device including a fill light; the method for determining the exposure parameters includes: At least three images of a target object are acquired. These at least three images are images captured by the camera device under multiple sets of preset exposure parameters. Among these at least three images is a first image, which is an image captured when the fill light is not turned on. The preset exposure parameters when the fill light is on need to be set according to the lighting characteristics of the actual scene. A set of smaller exposure parameters and a set of larger exposure parameters can be set. Each smaller exposure parameter in the set of smaller exposure parameters is smaller than the larger exposure parameter corresponding to each smaller exposure parameter in the set of larger exposure parameters. The at least three images are fused to obtain a second image; Determine the location information of the target region in the second image; Based on the location information of the target region in the second image, a first grayscale value and a second grayscale value are determined. The first grayscale value is the average grayscale value of the target region in the first image, and the second grayscale value is the average grayscale value of the target region in the second image. The target region in the first image and the target region in the second image correspond to the same region of the target object. The target exposure parameters of the camera device are determined based on the first gray value and the second gray value.
2. The method according to claim 1, characterized in that, Determining the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value includes: Obtain mapping information, which is used to characterize the correspondence between different first grayscale values and second grayscale values and exposure parameters; Based on the mapping information, the target exposure parameters corresponding to the first grayscale value and the second grayscale value are determined.
3. The method according to claim 2, characterized in that, The mapping information includes multiple sets of mapping relationships, each set of mapping relationships including a first grayscale range, a second grayscale range, and exposure parameters corresponding to the first grayscale range and the second grayscale range; Based on the mapping information, the target exposure parameters corresponding to the first grayscale value and the second grayscale value are determined, including: A target mapping relationship is determined from the multiple sets of mapping relationships; wherein the first grayscale range of the target mapping relationship contains the first grayscale value, and the second grayscale range of the target mapping relationship contains the second grayscale value; The exposure parameters in the target mapping relationship are determined as the target exposure parameters.
4. The method according to claim 3, characterized in that, The first grayscale range includes a first grayscale lower limit and a first grayscale upper limit, and the second grayscale range includes a second grayscale lower limit and a second grayscale upper limit. Determining the target mapping relationship from the multiple sets of mapping relationships includes: According to the preset priority order of the multiple sets of mapping relationships, the first gray value is compared with the first gray lower limit value and the first gray upper limit value in the same set of mapping relationships, and the second gray value is compared with the second gray lower limit value and the second gray upper limit value in the same set of mapping relationships. In response to the case where the first grayscale value is greater than or equal to the first grayscale lower limit and less than the first grayscale upper limit, and the second grayscale value is greater than or equal to the second grayscale lower limit and less than the second grayscale upper limit, the mapping relationship to which the first grayscale lower limit, the first grayscale upper limit, the second grayscale lower limit, and the second grayscale upper limit belong is determined as the target mapping relationship.
5. The method according to claim 4, characterized in that, Determining the location information of the target region in the second image includes: inputting the second image into a pre-trained model and outputting the location information of the target region in the second image.
6. The method according to any one of claims 1 to 5, characterized in that, The target exposure parameters include at least one of the following: exposure time, gain, gamma value, and fill light brightness.
7. An exposure parameter determining device, applied to a camera device, the camera device including a fill light; characterized in that, The device for determining the exposure parameters includes: The acquisition module is used to acquire at least three images of a target object. The at least three images are images captured by the camera device under multiple sets of preset exposure parameters. Among the at least three images, there is a first image, which is an image captured when the fill light is not turned on. The preset exposure parameters when the fill light is turned on need to be set according to the lighting characteristics of the actual scene. A set of smaller exposure parameters and a set of larger exposure parameters can be set. Each smaller exposure parameter in the set of smaller exposure parameters is smaller than the larger exposure parameter corresponding to each smaller exposure parameter in the set of larger exposure parameters. A fusion module is used to fuse the at least three images to obtain a second image; A grayscale value determination module is used to determine the location information of the target region of the second image; based on the location information of the target region of the second image, a first grayscale value and a second grayscale value are determined, wherein the first grayscale value is the average grayscale value of the target region of the first image, and the second grayscale value is the average grayscale value of the target region of the second image; the target region of the first image and the target region of the second image correspond to the same region of the target object; An exposure parameter determination module is used to determine the target exposure parameters of the camera device based on the first grayscale value and the second grayscale value.
8. An electronic device, characterized in that, include: At least one processor; Memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Parameter determining method, electronic equipment and storage medium
CN107968920A
Automatic exposure method of industrial camera using CMOS detector
CN108551555A