CN116389909A - Exposure parameter adjusting method, device, terminal equipment and medium - Google Patents

Exposure parameter adjusting method, device, terminal equipment and medium Download PDF

Info

Publication number
CN116389909A
CN116389909A CN202310250456.2A CN202310250456A CN116389909A CN 116389909 A CN116389909 A CN 116389909A CN 202310250456 A CN202310250456 A CN 202310250456A CN 116389909 A CN116389909 A CN 116389909A
Authority
CN
China
Prior art keywords
target
exposure
exposure parameter
image
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310250456.2A
Other languages
Chinese (zh)
Inventor
何勇
唐合宾
曾燕辉
何乙帮
何鑫杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Castelits Intelligent Technology Co ltd
Original Assignee
Shenzhen Castelits Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Castelits Intelligent Technology Co ltd filed Critical Shenzhen Castelits Intelligent Technology Co ltd
Priority to CN202310250456.2A priority Critical patent/CN116389909A/en
Publication of CN116389909A publication Critical patent/CN116389909A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses an exposure parameter adjusting method, an exposure parameter adjusting device, terminal equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a video stream to be analyzed, and acquiring a target image of each frame in the video stream to be analyzed; when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter; and adjusting the target exposure parameter according to the adjusting direction and the adjusting step length. The invention can adjust the exposure parameters of each frame image, thereby improving the definition of the acquired image.

Description

Exposure parameter adjusting method, device, terminal equipment and medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for adjusting exposure parameters, a terminal device, and a computer readable storage medium.
Background
The automatic exposure adjustment control refers to a process of optimizing the brightness of an image by controlling the exposure amount based on subjective perception of machine vision. When the photosensitive device in the camera is exposed properly, a high quality image can be obtained for further subsequent picture processing operations.
However, in the automatic exposure mode, the rapid automatic exposure of the camera may cause uncertain exposure of the photographed picture, that is, it cannot be ensured that the images of each frame can be exposed in standard, that is, underexposure or overexposure easily occurs, and the underexposure or underexposure may seriously affect the definition of the images, which further causes that effective information cannot be extracted from the images.
Therefore, in order to ensure that the acquired picture is in the optimal exposure effect, thereby improving the definition of the image, it is necessary to automatically adjust the exposure parameters of the image.
Disclosure of Invention
The invention mainly aims to provide an exposure parameter adjusting method, an exposure parameter adjusting device, terminal equipment and a computer readable storage medium, aiming at adjusting exposure parameters of each frame of image so as to improve the definition of the acquired image.
In order to achieve the above object, the present invention provides an exposure parameter adjustment method, the method comprising the steps of:
acquiring a video stream to be analyzed, and acquiring a target image of each frame in the video stream to be analyzed;
when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter;
And adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
Optionally, after the step of acquiring the target image of each frame in the video stream to be analyzed, the method further includes:
determining other images which are adjacent to the target image in the video stream to be analyzed, and acquiring exposure difference values between the target image and the other images;
judging whether the target image is in an abnormal exposure state or not according to the exposure difference value and the exposure evaluation value of the target image;
and if the target image is in an abnormal exposure state, executing the step of determining the target exposure parameter of the target image and the adjusting direction and the adjusting step length corresponding to the target exposure parameter.
Optionally, before the step of determining the target exposure parameter of the target image and the adjustment direction and the adjustment step length corresponding to the target exposure parameter, the method further includes:
the exposure evaluation value of the target image comprises a weighted average gray value, and before the step of determining the target exposure parameter of the target image and the adjusting direction and the adjusting step length corresponding to the target exposure parameter, the method further comprises the following steps:
When the target image is in an abnormal exposure state, determining a target gray value of the target image;
the step of determining the target exposure parameter of the target image and the adjusting direction and the adjusting step length corresponding to the target exposure parameter comprises the following steps:
and comparing the weighted average gray value with the target gray value to determine a target exposure parameter of the target image and an adjusting direction and an adjusting step length of the target exposure parameter.
Optionally, the step of determining the target gray value of the target image includes:
acquiring multi-frame images in a video stream to be analyzed, and determining an overall gray value corresponding to the video stream to be analyzed according to gray levels of the multi-frame images;
and determining the target gray value of the target image according to a preset mapping relation between the overall gray value and the target gray value.
Optionally, before the step of determining the target exposure parameter of the target image and the adjustment direction and the adjustment step length corresponding to the target exposure parameter, the method further includes:
when the target image is in an abnormal exposure state, adjusting the image brightness of the target image according to the exposure degree of the target image to determine a target exposure parameter of the target image after adjusting the image brightness and an adjusting direction and an adjusting step length corresponding to the target exposure parameter, wherein the abnormal exposure state comprises: an overexposed state and an underexposed state.
Optionally, after the step of adjusting the target exposure parameter according to the adjustment direction and the adjustment step, the method further includes:
judging whether the target image after the target exposure parameters are adjusted is in a standard exposure state or not;
and if the target image after the target exposure parameters are adjusted is in the standard exposure state, storing the target image and the adjusted target exposure parameters.
Optionally, when the video stream to be analyzed includes a container video stream to be analyzed, the corresponding target image after adjusting the target exposure parameter includes a target container image, and after the step of saving the target image and the adjusted target exposure parameter, the method further includes:
and identifying the container number in the target container image of each frame so as to uniformly manage the containers.
In order to achieve the above object, the present invention also provides an exposure parameter adjusting apparatus, including:
the acquisition module is used for acquiring a preset video stream and acquiring target images of frames in the video stream;
the determining module is used for determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter when the target image is in an abnormal exposure state;
And the adjusting module is used for dynamically adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
In order to achieve the above object, the present invention also provides a terminal device including a memory, a processor, and an exposure parameter adjustment program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the exposure parameter adjustment method as described above.
In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium having stored thereon an exposure parameter adjustment program which, when executed by a processor, implements the steps of the exposure parameter adjustment method as described above.
To achieve the above object, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the exposure parameter adjustment method as described above.
The invention provides an exposure parameter adjusting method, a device, a terminal device, a computer readable storage medium and a computer program product, which are used for acquiring a video stream to be analyzed and acquiring target images of frames in the video stream to be analyzed; when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter; and adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
Compared with the mode of image acquisition by using the automatic exposure mode of the camera in the prior art, in the invention, the target image of each frame in the video stream to be analyzed is acquired, and then when the target image is an abnormal exposure image, the target exposure parameter of the target image, the corresponding adjusting direction and the adjusting step length are firstly determined, and then, the target exposure parameter is automatically adjusted according to the adjusting direction and the adjusting step length, so that the adjusted target image is a standard exposure image. Therefore, the invention can adjust each image in abnormal exposure state in a targeted way through the automatic adjustment of exposure parameters, thus realizing accurate and efficient image processing and further improving the definition of each frame image in the video stream. On the basis, the invention can further extract effective information from the adjusted clearer image to carry out corresponding operation.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a first flow chart illustrating an embodiment of an exposure parameter adjustment method according to the present invention;
FIG. 3 is a schematic diagram of a second process according to an embodiment of the exposure parameter adjustment method of the present invention;
FIG. 4 is a functional block diagram of an exposure parameter adjusting apparatus according to an embodiment of the invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic device structure of a hardware running environment according to an embodiment of the present invention.
The terminal equipment in the embodiment of the invention can be a digital camera, a smart phone, a computer, a server or other network equipment and the like, and can be used for automatically adjusting exposure parameters so as to improve the picture quality.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the apparatus structure shown in fig. 1 does not constitute a limitation of the exposure parameter adjustment apparatus, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
As shown in fig. 1, an operation, a network communication module, a user interface module, and an exposure parameter adjustment program may be included in a memory 1005 as one type of computer storage medium. Operations are programs that manage and control the hardware and software resources of the apparatus, supporting the execution of exposure parameter adjustment programs, as well as other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005 and perform the following operations:
acquiring a video stream to be analyzed, and acquiring a target image of each frame in the video stream to be analyzed;
when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter;
And adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
Further, after the step of acquiring the target image of each frame in the video stream to be analyzed, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
determining other images which are adjacent to the target image in the video stream to be analyzed, and acquiring exposure difference values between the target image and the other images;
judging whether the target image is in an abnormal exposure state or not according to the exposure difference value and the exposure evaluation value of the target image;
and if the target image is in an abnormal exposure state, executing the step of determining the target exposure parameter of the target image and the adjusting direction and the adjusting step length corresponding to the target exposure parameter.
Further, the exposure evaluation value of the target image includes a weighted average gray value, and before the step of determining the target exposure parameter of the target image and the adjustment direction and the adjustment step corresponding to the target exposure parameter, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
When the target image is in an abnormal exposure state, determining a target gray value of the target image;
the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
and comparing the weighted average gray value with the target gray value to determine a target exposure parameter of the target image and an adjusting direction and an adjusting step length of the target exposure parameter.
Further, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
acquiring multi-frame images in a video stream to be analyzed, and determining an overall gray value corresponding to the video stream to be analyzed according to gray levels of the multi-frame images;
and determining the target gray value of the target image according to a preset mapping relation between the overall gray value and the target gray value.
Further, before the step of determining the target exposure parameter of the target image and the adjustment direction and the adjustment step corresponding to the target exposure parameter, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
When the target image is in an abnormal exposure state, adjusting the image brightness of the target image according to the exposure degree of the target image to determine a target exposure parameter of the target image after adjusting the image brightness and an adjusting direction and an adjusting step length corresponding to the target exposure parameter, wherein the abnormal exposure state comprises: an overexposed state and an underexposed state.
Further, after the step of adjusting the target exposure parameter according to the adjustment direction and the adjustment step size, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
judging whether the target image after the target exposure parameters are adjusted is in a standard exposure state or not;
and if the target image after the target exposure parameters are adjusted is in the standard exposure state, storing the target image and the adjusted target exposure parameters.
Further, when the video stream to be analyzed includes a container video stream to be analyzed, the corresponding target image after adjusting the target exposure parameter includes a target container image, after the step of saving the target image and the adjusted target exposure parameter if the target image after adjusting the target exposure parameter is a standard exposure image, the processor 1001 may be configured to call an exposure parameter adjustment program stored in the memory 1005, and perform the following operations:
And identifying the container number in the target container image of each frame so as to uniformly manage the containers.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of an exposure parameter adjustment method according to the present invention.
The embodiments of the present invention provide embodiments of exposure parameter adjustment methods, it being noted that although a logic sequence is shown in the flow chart, in some cases the steps shown or described may be performed in a different order than that shown or described herein.
The three exposure elements of the digital camera include: aperture, shutter, and sensitivity, which determine the exposure of the captured image. Specifically, the exposure amount refers to the amount of light flux reaching the camera from the subject, and the amount of exposure is determined by the aperture size, shutter speed (exposure time), and gain of the camera. The aperture uses the light inlet to control the intensity of light reaching the photosensitive film when exposing, the shutter speed (exposure time) uses the length of the shutter time to control the light inlet time, the gain refers to the sensitivity of the photosensitive device (such as CCD and CMOS) in the camera, and the higher the sensitivity, the higher the brightness of the image. For a photosensitive device, its dynamic range represents the range from "darkest" to "brightest" contained in an image. The larger the dynamic range, the more rich the hierarchy can be represented. The larger the dynamic range of modern cameras and video cameras, the more abundant the dark detail and both details it can record simultaneously.
However, the light sensing capability of the light sensing device is limited and the dynamic range that can be accommodated by the photographed scene is limited, for example, only if the dynamic range spanned by the brightest to darkest portions of the scene is within the dynamic range of the light sensing element of the camera, the details of the brightest and darkest portions can be recorded simultaneously. For example, if the dynamic range of a camera is 8 stops and the exposure of the brightest and darkest portions of the scene differ by 6 stops, then all details of the scene can be recorded.
It can be seen that, due to the limited inherent light sensing capability of the camera imaging slice, the dynamic range of the photographed scene is also limited, for example, for a scene with a clear bright and dark span, it is difficult to clearly see bright and dark details simultaneously only through an image exposed by a certain frame. Therefore, some slices have the capability of acquiring two frames of images under different exposure parameters at the same time, which makes it possible to expand the dynamic range of the camera, and under certain specific scenes and specific application conditions, a slower speed automatic exposure control process is required. For example, in the process of shooting a tracking missile, rapid automatic exposure can cause uncertain shot picture exposure and further affect tracking and positioning, so that it is necessary to adaptively adjust automatic exposure parameters according to the actual shooting situation.
Based on the above-mentioned problems, in the present embodiment, an exposure parameter adjustment method for automatic exposure is provided, which is applicable to a camera (digital camera) and is aimed at automatically adjusting exposure parameters of images of frames of a captured video stream, so that an acquired image is a standard exposure frame with higher definition. The exposure parameter adjustment method in this embodiment is applied to scenes including but not limited to a dock container number identification scene, a missile tracking scene, and the like, and by the exposure parameter adjustment method in this embodiment, the definition of images of each frame acquired in an automatic exposure mode can be improved, so as to perform subsequent operations such as image processing analysis.
On the basis, the exposure parameter adjusting method of the automatic exposure in the embodiment specifically comprises the following steps:
step S10, obtaining a video stream to be analyzed, and obtaining target images of frames in the video stream to be analyzed;
after capturing a video with a camera (digital camera), the terminal device can configure the ip of the camera, and further obtain a video stream to be analyzed through rtsp (Real Time Streaming Protocol, real-time streaming protocol), and obtain images (i.e., target images) of each frame in the video stream to be analyzed.
It should be noted that, in this embodiment, the video stream to be analyzed may specifically be a video stream including container numbers, and on this basis, the terminal device will extract images of each frame in the video stream to obtain the container numbers from the images, so as to uniformly manage the containers according to the container numbers. It can be understood that, since the above-mentioned video stream is obtained by automatic exposure, the image of each frame of the video stream may have problems such as overexposure or underexposure, so in order to be able to propose a corresponding box number from the image of each frame, the exposure degree of each image needs to be automatically adjusted in advance, so as to improve the image definition.
Step S20, when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter;
in this embodiment, the abnormal exposure state includes two cases of overexposure and underexposure, and the corresponding image in the abnormal exposure state is an abnormal exposure image, which includes: an overexposed image in an overexposed state and an underexposed image in an underexposed state, both of which are possible to reduce the image sharpness, whereas the exposure condition of a standard normal image is relative to the other of the overexposed and underexposed condition, in which case the sharpness of the target image is optimal.
Therefore, when the target image is in the abnormal exposure state, in order to improve the definition of the target image, the terminal device needs to further determine the exposure parameter (i.e. the target exposure parameter) that needs to be adjusted for the target image, and further determine the adjustment direction and the adjustment step length corresponding to the target exposure parameter. Wherein adjusting the direction includes increasing the target exposure parameter or decreasing the target exposure parameter, and adjusting the step size to be a specific value of the increased or decreased target exposure parameter. The target exposure parameters include, but are not limited to, exposure time and gain, and gain refers specifically to the sensitivity of the photosensitive devices (such as CCD and CMOS) in the camera, and the higher the sensitivity, the greater the brightness of the image. In this embodiment, the exposure degree of the collected images of each frame may be adjusted, and the over-exposed or under-exposed image may be adjusted to a standard exposure image with the highest definition, so as to further improve the definition of the image, so that the adjusted clearer image may be used for the next operation.
And step S30, dynamically adjusting the target exposure parameter according to the adjustment direction and the adjustment step length.
After determining the target exposure parameter to be adjusted of the target image and the adjustment direction and the adjustment step length corresponding to the target exposure parameter, the terminal device dynamically adjusts the target parameter according to the adjustment direction (increasing or decreasing the target exposure parameter) and the adjustment step length, for example, increases or decreases the target exposure parameter according to the adjustment step length until the target image is adjusted to be the standard exposure image of standard exposure.
It can be understood that in this embodiment, since when a section of video is captured in the automatic exposure mode of the camera, the rapid automatic exposure may cause uncertainty of exposure of the captured image, that is, it cannot be guaranteed that each frame in the video stream can be exposed in a standard manner, and there may be situations such as overexposure or underexposure, the definition of the image is greatly reduced, so in this embodiment, the exposure parameters of each frame image in the video stream may be automatically adjusted, and thus the definition of the image is improved, so that effective information is extracted from the image later. In this embodiment, exposure parameter adjustment can be performed on multiple images simultaneously in a parallel processing manner, so as to improve image processing efficiency.
In this embodiment, the terminal device can configure ip of the camera, further obtain a video stream to be analyzed through rtsp (Real Time Streaming Protocol, real-time streaming protocol), and obtain a target image of each frame in the video stream to be analyzed. When the target image is an abnormal exposure image, in order to improve the definition of the target image, the terminal device needs to further determine an exposure parameter (i.e., a target exposure parameter) to be adjusted for the target image, and further determine an adjustment direction and an adjustment step length corresponding to the target exposure parameter. After determining the target exposure parameter to be adjusted of the target image and the adjustment direction and the adjustment step length corresponding to the target exposure parameter, the terminal device dynamically adjusts the target parameter according to the adjustment direction (increasing or decreasing the target exposure parameter) and the adjustment step length.
Compared with the mode of image acquisition by using the automatic exposure mode of the camera in the prior art, in the invention, the target image of each frame in the video stream to be analyzed is acquired, and then when the target image is an abnormal exposure image, the target exposure parameter of the target image, the corresponding adjusting direction and the adjusting step length are firstly determined, and then, the target exposure parameter is automatically adjusted according to the adjusting direction and the adjusting step length, so that the adjusted target image is a standard exposure image of standard exposure. Therefore, the invention can pointedly adjust each abnormal exposure image into the standard exposure image by means of automatic adjustment of exposure parameters, so as to extract effective information from the adjusted clearer images to perform corresponding operation.
Further, based on the first embodiment of the exposure parameter adjustment of the present invention, a second embodiment of the exposure parameter adjustment of the present invention is proposed.
In this embodiment, after "obtaining the target image of each frame in the video stream to be analyzed" in step S10 above, the method may further include:
Step S40, determining other images which are adjacent to the target image in the video stream to be analyzed, and acquiring exposure difference values between the target image and the other images;
step S50, judging whether the target image is in an abnormal exposure state or not according to the exposure difference value and the exposure evaluation value of the target image;
step S60, if the target image is in an abnormal exposure state, a step of determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter is executed.
After acquiring the images of each frame in the video stream to be analyzed, the terminal device needs to judge in advance whether the current target image is in an abnormal exposure state (at least comprising two conditions of overexposure and underexposure). The method for judging whether the target image is in an abnormal exposure state specifically comprises the following steps:
firstly, the exposure difference between the current target image and other frame images in the video stream to be analyzed is obtained, wherein the other frame images can be specifically images of a previous frame adjacent to the target image. Further, a difference between the exposure value of the target image and the exposure value of the image of the previous frame (i.e., exposure difference) is obtained, and the exposure value may be expressed as:
Figure BDA0004127755720000101
Where N represents an aperture and t represents an exposure time.
On the basis of the above, the terminal device compares the above exposure difference value with the exposure evaluation value of the target image to determine whether the target image is an abnormal exposure image. For example, when comparing the exposure difference value with the exposure evaluation value of the target image, if the exposure difference value is larger than the exposure evaluation value, it is determined that the current target image is over-exposed in an abnormal exposure state. For another example, if the exposure difference value is smaller than the exposure evaluation value, it is determined that the current target image is under-exposed in the abnormal exposure state. When the terminal equipment judges that the target image is in an abnormal exposure state, the target exposure parameter of the target image, and the adjusting direction and the adjusting step length corresponding to the target exposure parameter can be further determined. Therefore, in this embodiment, whether the image is an abnormal exposure image can be automatically detected quickly, so that the standard exposure image is filtered, and the subsequent image processing efficiency is improved.
Further, before "determining the target exposure parameter of the target image and the adjustment direction and the adjustment step corresponding to the target exposure parameter" in the step S20, the method may further include:
Step S70, when the target image is in an abnormal exposure state, determining a target gray value of the target image;
on this basis, the step S20 may include:
step S201, determining a target exposure parameter of the target image and an adjustment direction and an adjustment step of the target exposure parameter by comparing the weighted average gray value with the target gray value.
In one embodiment, the terminal device needs to determine an exposure evaluation value of the target image in advance, where the exposure evaluation value is a weighted average gray value.
On the basis, after the terminal equipment acquires the target image of each frame in the video stream to be analyzed and the target image is an abnormal exposure image, determining a target gray value of the target image, comparing the target gray value with the weighted average gray value, determining a target exposure parameter to be adjusted of the target image, wherein the exposure parameter can be at least one of exposure time, gain and aperture, and further determining an adjusting direction and an adjusting step length for adjusting the target exposure parameter, so that the target exposure parameter is automatically adjusted according to the adjusting direction and the adjusting step length.
Further, the step S70 may include:
step S701, acquiring multi-frame images in a video stream to be analyzed, and determining an overall gray value corresponding to the video stream to be analyzed according to the gray of the multi-frame images;
step S702, determining the target gray value of the target image according to a preset mapping relationship between the overall gray value and the target gray value.
After the terminal device obtains the video stream to be analyzed and extracts the images of each frame from the video stream to be analyzed, the terminal device also needs to determine the overall gray value corresponding to the video stream to be analyzed. The method specifically comprises the following steps: at least two frames of images can be extracted from the video stream to be analyzed, a plurality of images can be extracted for improving the image processing precision, and the overall brightness value obtained by combining the plurality of images is used as the overall gray value.
Furthermore, the terminal device can calculate the target gray value of the target image according to the preset mapping relation between the overall gray value and the target gray value. In this embodiment, the preset mapping relationship is not specifically limited, and the preset mapping relationship is predefined by the user, for example, in one embodiment, the preset mapping relationship may specifically be: the difference between the overall gray value and the target gray value is a preset gray value (the target gray value obtained according to the preset gray value enables the target image to be in a standard exposure state).
Further, before "determining the target exposure parameter of the target image and the adjustment direction and the adjustment step corresponding to the target exposure parameter" in the step S30 above, the method may further include:
step S80, when the target image is in an abnormal exposure state, adjusting the image brightness of the target image according to the exposure degree of the target image to determine a target exposure parameter of the target image after adjusting the image brightness and an adjusting direction and an adjusting step length corresponding to the target exposure parameter, wherein the abnormal exposure state comprises: an overexposed state and an underexposed state.
In order to improve the exposure parameter adjustment efficiency of the target image, when the target image is in an abnormal exposure state, the image brightness of the target image may be adjusted in advance according to the exposure degree of the target image, for example, the image brightness of the target image that is overexposed is reduced, or the image brightness of the target image that is underexposed is reduced, so that the target image after the image brightness is adjusted is subsequently subjected to the next exposure parameter adjustment. In this embodiment, the exposure degree may specifically include: overexposure and underexposure, corresponding to abnormal exposure conditions include: an overexposed state and an underexposed state.
After the brightness of the images is adjusted, some images can be adjusted from abnormal exposure to standard exposure, so that subsequent exposure parameter adjustment is not needed, and the processing efficiency of the exposure parameters is improved. In addition, for the image with brightness adjusted, the complexity of subsequent exposure parameter adjustment is greatly reduced, and the complexity of exposure parameter adjustment is simplified.
Further, in the step S30, after "dynamically adjusting the target exposure parameter according to the adjustment direction and the adjustment step size", the method may further include:
step S90, judging whether the target image after the target exposure parameters are adjusted is in a standard exposure state;
and step S100, if the target image after the target exposure parameter is adjusted is in a standard exposure state, storing the target image and the adjusted target exposure parameter.
After the terminal device dynamically adjusts the target exposure parameters according to the adjustment direction and the adjustment step length, as shown in fig. 3, it is further required to further determine whether the adjusted target image is a standard exposure image. If the image at the moment is judged to be the standard exposure image, the definition of the image at the moment is sufficiently clear, effective information can be accurately extracted from the image, and at the moment, the terminal equipment needs to save the exposure parameters of the image.
In an embodiment, in order to improve the image processing efficiency and consider that the brightness and the like of the environment where the images of the frames of the video stream to be analyzed are located, which are acquired under the same scene, are not too different, the saved exposure parameters can be applied to the images of the frames, and further, after the exposure parameters of the images are adjusted by using the saved exposure parameters, if the images are still abnormal exposure images, the exposure parameters can be further fine-tuned. By the method, the image processing efficiency is further improved on the basis of not reducing the definition of the image.
Further, when the video stream to be analyzed includes a container video stream to be analyzed, the target image after adjusting the target exposure parameter includes a target container image, and after the step S100, the method may further include:
and step A, identifying the container number in the target container image of each frame so as to uniformly manage the containers.
The exposure parameter adjusting method in this embodiment can be applied to various types of image processing scenes, for example, as shown in fig. 3, the video streams to be analyzed in different scenes are also different, if in the container management scene of a dock, in order to facilitate unified management of a large number of containers, each container has a corresponding container number on a container body, so in order to implement standard and efficient management of the containers, the digital video camera can be used to capture the video stream of the container to be analyzed, and then adjust the exposure parameters of each frame of image in the video stream of the container, after the image of each frame is adjusted to a standard exposure image and the adjusted exposure parameters are saved, at this time, the definition of the standard exposure image is very high, and the terminal device can further accurately identify the container number of the container in each standard exposure image. Therefore, in this embodiment, after the definition of the image is improved by adjusting the exposure parameter, the effective information is further identified from the standard exposure image, so that a large number of ineffective images caused by overexposure or underexposure are avoided, and the utilization rate of each frame image in the video stream is improved.
In this embodiment, after acquiring the images of each frame in the video stream to be analyzed, the terminal device needs to determine in advance whether the current target image is an abnormal exposure image, and if the exposure difference is smaller than the exposure evaluation value, it is determined that the current target image is an abnormal exposure image. The terminal equipment compares the target gray level value with the weighted average gray level value, determines a target exposure parameter to be regulated of the target image, and further determines a regulating direction and a regulating step length for regulating the target exposure parameter, wherein the terminal equipment can extract images of at least two frames from a video stream to be analyzed, and can extract a plurality of images to improve the image processing precision, and the integral brightness value synthesized by the plurality of images is used as the integral gray level value. After the terminal device dynamically adjusts the target exposure parameters according to the adjustment direction and the adjustment step length, the terminal device needs to further judge whether the adjusted target image is a standard exposure image or not. If the image at this time is judged to be the standard exposure image, the exposure parameters of the image need to be saved.
Therefore, in the invention, on one hand, the exposure parameters of each frame of image in the video stream can be automatically adjusted, thereby improving the definition of the image so as to extract effective information from the image later, and on the other hand, the information in the image can not be accurately extracted in consideration of the possibility of overexposure and underexposure in the automatic exposure mode of the camera, and the multi-frame image becomes an invalid image.
In addition, an embodiment of the present invention further provides an exposure parameter adjusting device, referring to fig. 4, where the exposure parameter adjusting device includes:
the acquisition module 10 is used for acquiring a preset video stream and acquiring target images of frames in the video stream;
a determining module 20, configured to determine a target exposure parameter of the target image and an adjustment direction and an adjustment step corresponding to the target exposure parameter when the target image is in an abnormal exposure state;
and the adjusting module 30 is used for dynamically adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
Further, the exposure parameter adjusting device further includes:
the exposure difference value acquisition module is used for determining other images which are adjacent to the target image in the video stream to be analyzed, and acquiring exposure difference values between the target image and the other images;
a first judging module, configured to judge whether the target image is in an abnormal exposure state according to the exposure difference value and the exposure evaluation value of the target image;
and the execution module is used for executing the steps of determining the target exposure parameters of the target image and the adjusting directions and the adjusting step sizes corresponding to the target exposure parameters when the target image is in the abnormal exposure state.
Further, the exposure evaluation value of the target image includes a weighted average gray value, and the exposure parameter adjusting device further includes:
the gray value determining module is used for determining a target gray value of the target image when the target image is in an abnormal exposure state;
the determining module 20 includes:
and the parameter determining unit is used for determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length of the target exposure parameter by comparing the weighted average gray value with the target gray value.
Further, the gray value determining module includes:
the first gray value acquisition unit is used for acquiring multi-frame images in the video stream to be analyzed and determining the overall gray value corresponding to the video stream to be analyzed according to the gray of the multi-frame images;
and the gray value second acquisition unit is used for determining the target gray value of the target image according to a preset mapping relation between the overall gray value and the target gray value.
Further, the exposure parameter adjusting device further includes:
the brightness adjusting module is used for adjusting the image brightness of the target image according to the exposure degree of the target image when the target image is in an abnormal exposure state so as to determine a target exposure parameter of the target image after adjusting the image brightness and an adjusting direction and an adjusting step length corresponding to the target exposure parameter, wherein the abnormal exposure state comprises: an overexposed state and an underexposed state.
Further, the exposure parameter adjusting device further includes:
the second judging module is used for judging whether the target image after the target exposure parameters are regulated is in a standard exposure state or not;
and the storage module is used for storing the target image and the adjusted target exposure parameters if the target image after the adjustment of the target exposure parameters is in the standard exposure state.
Further, when the video stream to be analyzed includes a container video stream to be analyzed, the corresponding target image after adjusting the target exposure parameter includes a target container image, and the exposure parameter adjusting device further includes:
and the container number identification module is used for identifying the container number in the target container image of each frame so as to uniformly manage the containers.
The expansion content of the specific implementation mode of the exposure parameter adjusting system is basically the same as that of each embodiment of the exposure parameter adjusting method, and is not described herein.
In addition, the embodiment of the invention also provides a computer readable storage medium, wherein the storage medium stores an exposure parameter adjusting program, and the exposure parameter adjusting program realizes the steps of an exposure parameter adjusting method as described below when being executed by a processor.
Embodiments of the exposure parameter adjustment apparatus and the computer-readable storage medium of the present invention may refer to embodiments of the exposure parameter adjustment method of the present invention, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a digital camera, a smart phone, a computer, a server or other network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. An exposure parameter adjustment method, characterized in that the exposure parameter adjustment method comprises:
acquiring a video stream to be analyzed, and acquiring a target image of each frame in the video stream to be analyzed;
when the target image is in an abnormal exposure state, determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter;
and adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
2. The exposure parameter adjustment method according to claim 1, further comprising, after the step of acquiring the target image of each frame in the video stream to be analyzed:
determining other images which are adjacent to the target image in the video stream to be analyzed, and acquiring exposure difference values between the target image and the other images;
Judging whether the target image is in an abnormal exposure state or not according to the exposure difference value and the exposure evaluation value of the target image;
and if the target image is in an abnormal exposure state, executing the step of determining the target exposure parameter of the target image and the adjusting direction and the adjusting step length corresponding to the target exposure parameter.
3. The exposure parameter adjustment method according to claim 2, further comprising, before the step of determining a target exposure parameter of the target image and an adjustment direction and an adjustment step corresponding to the target exposure parameter:
when the target image is in an abnormal exposure state, determining a target gray value of the target image;
the exposure evaluation value of the target image comprises a weighted average gray value, and the step of determining the target exposure parameter of the target image, and the adjusting direction and the adjusting step length corresponding to the target exposure parameter comprises the following steps:
and comparing the weighted average gray value with the target gray value to determine a target exposure parameter of the target image and an adjusting direction and an adjusting step length of the target exposure parameter.
4. The exposure parameter adjustment method according to claim 3, wherein the step of determining a target gradation value of the target image includes:
Acquiring multi-frame images in a video stream to be analyzed, and determining an overall gray value corresponding to the video stream to be analyzed according to gray levels of the multi-frame images;
and determining the target gray value of the target image according to a preset mapping relation between the overall gray value and the target gray value.
5. The exposure parameter adjustment method according to claim 1, further comprising, before the step of determining a target exposure parameter of the target image and an adjustment direction and an adjustment step corresponding to the target exposure parameter:
when the target image is in an abnormal exposure state, adjusting the image brightness of the target image according to the exposure degree of the target image to determine a target exposure parameter of the target image after adjusting the image brightness and an adjusting direction and an adjusting step length corresponding to the target exposure parameter, wherein the abnormal exposure state comprises: an overexposed state and an underexposed state.
6. The exposure parameter adjustment method according to claim 1, further comprising, after the step of adjusting the target exposure parameter according to the adjustment direction and the adjustment step size:
Judging whether the target image after the target exposure parameters are adjusted is in a standard exposure state or not;
and if the target image after the target exposure parameters are adjusted is in the standard exposure state, storing the target image and the adjusted target exposure parameters.
7. The exposure parameter adjustment method according to claim 6, wherein when the video stream to be analyzed includes a container video stream to be analyzed, the corresponding target image after adjustment of the target exposure parameter includes a target container image, and further comprising, after the step of saving the target image and the adjusted target exposure parameter:
and identifying the container number in the target container image of each frame so as to uniformly manage the containers.
8. An exposure parameter adjustment device, characterized in that the exposure parameter adjustment device comprises:
the acquisition module is used for acquiring a preset video stream and acquiring target images of frames in the video stream;
the determining module is used for determining a target exposure parameter of the target image and an adjusting direction and an adjusting step length corresponding to the target exposure parameter when the target image is in an abnormal exposure state;
And the adjusting module is used for dynamically adjusting the target exposure parameter according to the adjusting direction and the adjusting step length.
9. A terminal device, characterized in that it comprises a memory, a processor and an exposure parameter adjustment program stored on the memory and executable on the processor, which when executed by the processor realizes the steps of the exposure parameter adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an exposure parameter adjustment program which, when executed by a processor, implements the steps of the exposure parameter adjustment method according to any one of claims 1 to 7.
CN202310250456.2A 2023-03-08 2023-03-08 Exposure parameter adjusting method, device, terminal equipment and medium Pending CN116389909A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310250456.2A CN116389909A (en) 2023-03-08 2023-03-08 Exposure parameter adjusting method, device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310250456.2A CN116389909A (en) 2023-03-08 2023-03-08 Exposure parameter adjusting method, device, terminal equipment and medium

Publications (1)

Publication Number Publication Date
CN116389909A true CN116389909A (en) 2023-07-04

Family

ID=86974153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310250456.2A Pending CN116389909A (en) 2023-03-08 2023-03-08 Exposure parameter adjusting method, device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN116389909A (en)

Similar Documents

Publication Publication Date Title
CN110225248B (en) Image acquisition method and device, electronic equipment and computer readable storage medium
US8121404B2 (en) Exposure control apparatus and image pickup apparatus
CN108337445B (en) Photographing method, related device and computer storage medium
US7483064B2 (en) Imaging apparatus
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
CN110493539B (en) Automatic exposure processing method, processing device and electronic equipment
EP1814082A2 (en) Face importance level determining apparatus and method, and image pickup apparatus
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
KR20090020295A (en) Apparatus and method for capturing images having optimized quality under night scene conditions
US20100245622A1 (en) Image capturing apparatus and medium storing image processing program
CN110881108B (en) Image processing method and image processing apparatus
CN104052933A (en) Method for determining dynamic range mode, and image obtaining apparatus
CN110443766B (en) Image processing method and device, electronic equipment and readable storage medium
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN110809146A (en) Image contrast adjusting method and device, terminal equipment and storage medium
CN111314622A (en) Adaptive adjustment method, device and system for image brightness under various scenes
CN113163127A (en) Image processing method, image processing device, electronic equipment and storage medium
EP2763396A1 (en) Automatic exposure bracketing
JP4841582B2 (en) Image correction program and image correction apparatus
CN113298735A (en) Image processing method, image processing device, electronic equipment and storage medium
JP2009177764A (en) Imaging apparatus
US8836816B2 (en) Method of adjusting the brightness of a digital camera image
CN116389909A (en) Exposure parameter adjusting method, device, terminal equipment and medium
CN110072050B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
CN113747062B (en) HDR scene detection method and device, terminal and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination