CN111738950B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN111738950B
CN111738950B CN202010572310.6A CN202010572310A CN111738950B CN 111738950 B CN111738950 B CN 111738950B CN 202010572310 A CN202010572310 A CN 202010572310A CN 111738950 B CN111738950 B CN 111738950B
Authority
CN
China
Prior art keywords
brightness
image
pixel point
average
determining
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.)
Active
Application number
CN202010572310.6A
Other languages
Chinese (zh)
Other versions
CN111738950A (en
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010572310.6A priority Critical patent/CN111738950B/en
Publication of CN111738950A publication Critical patent/CN111738950A/en
Application granted granted Critical
Publication of CN111738950B publication Critical patent/CN111738950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/92
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides an image processing method, an image processing apparatus, an electronic device, and a computer-readable storage medium. The method comprises the following steps: determining the original brightness of each pixel point in the image; determining average brightness and maximum brightness of the image according to the original brightness of each pixel point; determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined; reconstructing the image according to the final brightness of each pixel point. The embodiment of the disclosure utilizes the brightness, average brightness and maximum brightness of the image itself when reconstructing the image, can avoid the image color distortion caused by excessive contrast enhancement, and the brightness values are different according to the difference of the image, thereby realizing self-adaption.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, and a computer readable storage medium.
Background
Film art is an important representation of human culture and a valuable wealth of human civilization. Some of the losses due to noise, compression and the like lead to the conditions of film picture blurring, dense noise points, ripple and the like, so that the film quality is poor, and the film needs to be repaired at the moment.
At present, the image is mostly repaired by a global enhancement or deep learning fitting enhancement method, and especially when a black picture with noise is encountered, the picture color distortion is easily caused by excessive enhancement of contrast of amplified noise.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The technical problem to be solved by the present disclosure is to provide an image processing method, so as to at least partially solve the technical problem in the prior art that excessive contrast enhancement occurs in noise easy to be amplified, resulting in color distortion of a picture. Further, an image processing apparatus, an image processing hardware apparatus, a computer-readable storage medium, and an image processing terminal are provided.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
an image processing method, comprising:
determining the original brightness of each pixel point in the image;
determining average brightness and maximum brightness of the image according to the original brightness of each pixel point;
determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
reconstructing the image according to the final brightness of each pixel point.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
an image processing apparatus comprising:
the original brightness determining module is used for determining the original brightness of each pixel point in the image;
the average brightness determining module is used for determining the average brightness and the maximum brightness of the image according to the original brightness of each pixel point;
the final brightness determining module is used for determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
and the image reconstruction module is used for reconstructing the image according to the final brightness of each pixel point.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
an electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
and a processor for executing the computer readable instructions such that the processor, when executing, implements the image processing method described above.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
a computer readable storage medium storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the above-described image processing method.
In order to achieve the above object, according to still another aspect of the present disclosure, there is further provided the following technical solutions:
an image processing terminal includes any one of the image processing apparatuses described above.
According to the embodiment of the disclosure, the original brightness of each pixel point in an image is determined, the average brightness and the maximum brightness of the image are determined according to the original brightness of each pixel point, the final brightness of the current pixel point is determined according to the original brightness of the current pixel point, the average brightness and the maximum brightness, and the image is reconstructed according to the final brightness of each pixel point. The embodiment utilizes the brightness, average brightness and maximum brightness of the image itself when reconstructing the image, can avoid the image color distortion caused by excessive contrast enhancement, and the brightness values are different according to the difference of the image, thereby realizing self-adaption.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow diagram of an image processing method according to one embodiment of the present disclosure;
FIG. 2 is a flow diagram of an image processing apparatus according to one embodiment of the present disclosure;
fig. 3 is a schematic structural view of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, or in parallel. Furthermore, method embodiments may include additional steps or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part 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. Related definitions of other terms will be given in the description below.
Example 1
In order to solve the technical problem that excessive contrast enhancement occurs in a plurality of easily amplified noises in the prior art, which leads to color distortion of a picture, an embodiment of the disclosure provides an image processing method. As shown in fig. 1, the image processing method mainly includes the following steps S11 to S14.
Step S11: the original brightness of each pixel in the image is determined.
The image may be a single image or a frame of image in a movie.
Specifically, the luminance component of each pixel in the image may be extracted, and the original luminance may be determined according to the luminance component of each pixel. For example, if the image is a Red Green Blue (RGB) image, the image may be converted into an HSL image or a YUV image or a LAB image by color space conversion.
If the image is converted into an HSV image, where H is a Hue (Hue) component, S is a Saturation (Saturation) component, and L is a brightness (light) component, in this embodiment, only the L component is extracted, and the original brightness of each pixel in the image is determined according to the L component.
If the image is converted into a YUV image, where Y represents brightness (luminence or Luma), i.e. a Luminance component, and U and V represent chromaticity (Chroma or Chroma), i.e. a Chrominance component, in this embodiment, only the Y component needs to be extracted, and the original brightness of each pixel point in the image is determined according to the Y component.
If the image is converted into a LAB image, where L represents luminance (luminance), i.e. the luminance component, a represents the range from magenta to green and B represents the range from yellow to blue. In this embodiment, only the L component is extracted, and the original brightness of each pixel point in the image is determined according to the L component.
Step S12: and determining the average brightness and the maximum brightness of the image according to the original brightness of each pixel point.
Specifically, the average brightness of the image may be obtained by directly averaging the original brightness of all the pixel points, or may be obtained by using the method in the first alternative embodiment described below.
Step S13: determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein the final brightness of the pixel point is determined.
Specifically, the method of the step is adopted to calculate each pixel point in the image one by one, so that the final brightness of each pixel point is obtained. The specific calculation method is referred to in the second alternative embodiment described below, and will not be described here again.
Step S14: reconstructing the image according to the final brightness of each pixel point.
The rest color components of each pixel point are kept unchanged, namely the original color values. For example, the image is an RGB image, and after the final brightness of each pixel is obtained, the image is converted into an RGB image by performing color space conversion according to the final brightness and other color components.
According to the embodiment, the original brightness of each pixel point in the image is determined, the average brightness and the maximum brightness of the image are determined according to the original brightness of each pixel point, the final brightness of the current pixel point is determined according to the original brightness of the current pixel point, the average brightness and the maximum brightness, and the image is reconstructed according to the final brightness of each pixel point. The embodiment utilizes the brightness, average brightness and maximum brightness of the image itself when reconstructing the image, can avoid the image color distortion caused by excessive contrast enhancement, and the brightness values are different according to the difference of the image, thereby realizing self-adaption.
In a first alternative embodiment, step S12 specifically includes: by the formula
Figure BDA0002549837290000071
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel point (x, y), -/->
Figure BDA0002549837290000072
For the average luminance, σ is a constant, m×n is the width and height of the image, exp () is an exponential function based on a natural constant e, and log () is a logarithmic operation.
In a second alternative embodiment, step S13 specifically includes: by the formula
Figure BDA0002549837290000073
Determining the final brightness of the current pixel point;wherein L is max And L is the final brightness, and L (a, b) is the original brightness of the current pixel point.
In a third alternative embodiment, step S12 specifically includes: and removing the caption area in the image, and determining the average brightness of the image based on the original brightness of the pixel points in the residual image area.
When the average brightness of the image is calculated, the embodiment can remove the interference of the caption area on the image content, solve the phenomenon that the brightness is suddenly changed caused by the caption difference, and further avoid the phenomenon that the contrast is excessively enhanced to cause the color distortion of the picture. The method for calculating the average brightness of the image is referred to the first alternative embodiment, and will not be described herein.
In a fourth alternative embodiment, step S12 specifically includes:
step S121: and determining the initial average brightness of the image according to the original brightness of each pixel point.
The method for calculating the initial average brightness of the image is the same as the method for calculating the average brightness of the image, and the initial average brightness of the image may be obtained by directly averaging the original brightness of all the pixel points, or the method in the first alternative embodiment described below may be used to obtain the initial average brightness of the image, which is specifically referred to the first alternative embodiment and will not be described herein.
Step S122: and if the difference value between the initial average brightness and the reference average brightness is smaller than or equal to a preset threshold value, the reference average brightness is taken as the average brightness of the image.
The reference average brightness may be set by user, and if the image is a frame of image in the movie, the reference average brightness may be the average brightness of a frame of image on the image. And the initial value of the reference average brightness is the average brightness of the first frame image in the film.
Specifically, if the difference between the initial average brightness and the reference average brightness is smaller than or equal to a preset threshold, it is indicated that the image is the same as or similar to the image of the previous frame of image, the reference average brightness may be directly used as the average brightness of the image, and if the difference between the initial average brightness and the reference average brightness is larger than the preset threshold, it is indicated that the image is different from or greatly changed from the image of the previous frame of image, the initial average brightness is used as the average brightness of the image, that is, the average brightness of the image is directly used, so that the effect that the image is stable can be still maintained when the movie image has a great amount of variation.
In a fifth alternative embodiment, the method further comprises: if the difference value between the initial average brightness and the reference average brightness is larger than the preset threshold value, the initial average brightness is adopted to update the reference average brightness, namely the initial average brightness is used as the reference average brightness; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
According to the embodiment, the average brightness of the image is adaptively updated by adaptively updating the reference average brightness, so that the problem that the color distortion of a pure-color picture with a large amount of noise on the picture is effectively prevented.
It will be appreciated by those skilled in the art that obvious modifications (e.g., overlapping of enumerated modes) or equivalent substitutions may be made on the basis of the various embodiments described above.
In the foregoing, although the steps in the embodiments of the image processing method are described in the above order, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above order, but may be performed in reverse order, parallel, cross, etc., and other steps may be further added to those skilled in the art on the basis of the above steps, and these obvious modifications or equivalent manners are also included in the protection scope of the present disclosure and are not repeated herein.
The following is an embodiment of the disclosed apparatus, which may be used to perform steps implemented by an embodiment of the disclosed method, and for convenience of explanation, only those portions relevant to the embodiment of the disclosed method are shown, and specific technical details are not disclosed, referring to the embodiment of the disclosed method.
Example two
In order to solve the technical problem that excessive contrast enhancement occurs in a plurality of easily amplified noises in the prior art, which leads to color distortion of a picture, an embodiment of the disclosure provides an image processing device. The apparatus may perform the steps of the image processing method embodiment described in the first embodiment. As shown in fig. 2, the apparatus mainly includes: an original luminance determination module 21, an average luminance determination module 22, a final luminance determination module 23, and an image reconstruction module 24; wherein, the liquid crystal display device comprises a liquid crystal display device,
the original brightness determining module 21 is configured to determine an original brightness of each pixel point in the image;
the average brightness determining module 22 is configured to determine an average brightness and a maximum brightness of the image according to the original brightness of each pixel point;
the final brightness determining module 23 is configured to determine a final brightness of the current pixel point according to an original brightness of the current pixel point, the average brightness and the maximum brightness; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
the image reconstruction module 24 is configured to reconstruct the image according to the final brightness of each pixel.
Further, the average brightness determining module 22 is specifically configured to: determining initial average brightness of the image according to the original brightness of each pixel point; and if the difference value between the initial average brightness and the reference average brightness is smaller than or equal to a preset threshold value, the reference average brightness is taken as the average brightness of the image.
Further, the image is a frame of image in a movie, and the apparatus further includes: a brightness update module 25; wherein, the liquid crystal display device comprises a liquid crystal display device,
the luminance updating module 25 is configured to update the reference average luminance with the initial average luminance if the difference between the initial average luminance and the reference average luminance is greater than the preset threshold; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
Further, the initial value of the reference average brightness is the average brightness of the first frame image in the movie.
Further, the average brightness determining module 22 is specifically configured to: and removing the caption area in the image, and determining the average brightness of the image based on the original brightness of the pixel points in the residual image area.
Further, the average brightness determining module 22 is specifically configured to: by the formula
Figure BDA0002549837290000111
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel point (x, y), -/->
Figure BDA0002549837290000112
For the average luminance, σ is a constant, m×n is the width and height of the image, exp () is an exponential function based on a natural constant e, and log () is a logarithmic operation.
Further, the final brightness determining module 23 is specifically configured to: by the formula
Figure BDA0002549837290000113
Determining the final brightness of the current pixel point; wherein L is max And L is the final brightness, and L (a, b) is the original brightness of the current pixel point.
For detailed descriptions of the working principles, the technical effects, etc. of the embodiments of the image processing apparatus, reference may be made to the related descriptions in the foregoing embodiments of the image processing method, which are not repeated herein.
Example III
Referring now to fig. 3, a schematic diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various suitable actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
In general, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 308 including, for example, magnetic tape, hard disk, etc.; and communication means 309. The communication means 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 shows an electronic device 300 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 301.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), etc., or any suitable superposition of the above.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining the original brightness of each pixel point in the image; determining average brightness and maximum brightness of the image according to the original brightness of each pixel point; determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined; reconstructing the image according to the final brightness of each pixel point.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected through the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable superposition of the above. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable overlay of the foregoing.
According to one or more embodiments of the present disclosure, there is provided an image processing method including:
determining the original brightness of each pixel point in the image;
determining average brightness and maximum brightness of the image according to the original brightness of each pixel point;
determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
reconstructing the image according to the final brightness of each pixel point.
Further, the determining the average brightness of the image according to the original brightness of each pixel point includes:
determining initial average brightness of the image according to the original brightness of each pixel point;
and if the difference value between the initial average brightness and the reference average brightness is smaller than or equal to a preset threshold value, the reference average brightness is taken as the average brightness of the image.
Further, the image is a frame of image in a movie, and the method further includes:
if the difference value between the initial average brightness and the reference average brightness is larger than the preset threshold value, updating the reference average brightness by adopting the initial average brightness; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
Further, the initial value of the reference average brightness is the average brightness of the first frame image in the movie.
Further, the determining the average brightness of the image according to the original brightness of each pixel point includes:
and removing the caption area in the image, and determining the average brightness of the image based on the original brightness of the pixel points in the residual image area.
Further, the determining the average brightness of the image according to the original brightness of each pixel point includes:
by the formula
Figure BDA0002549837290000171
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel point (x, y), -/->
Figure BDA0002549837290000172
For the average luminance, σ is a constant, m×n is the width and height of the image, exp () is an exponential function based on a natural constant e, and log () is a logarithmic operation.
Further, the determining the final brightness of the current pixel according to the original brightness, the average brightness and the maximum brightness of the current pixel includes:
by the formula
Figure BDA0002549837290000173
Determining the final brightness of the current pixel point; wherein L is max And L is the final brightness, and L (a, b) is the original brightness of the current pixel point.
According to one or more embodiments of the present disclosure, there is provided an image processing apparatus including:
the original brightness determining module is used for determining the original brightness of each pixel point in the image;
the average brightness determining module is used for determining the average brightness and the maximum brightness of the image according to the original brightness of each pixel point;
the final brightness determining module is used for determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
and the image reconstruction module is used for reconstructing the image according to the final brightness of each pixel point.
Further, the average brightness determining module is specifically configured to: determining initial average brightness of the image according to the original brightness of each pixel point; and if the difference value between the initial average brightness and the reference average brightness is smaller than or equal to a preset threshold value, the reference average brightness is taken as the average brightness of the image.
Further, the image is a frame of image in a movie, and the apparatus further includes:
the brightness updating module is used for updating the reference average brightness by adopting the initial average brightness if the difference value between the initial average brightness and the reference average brightness is larger than the preset threshold value; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
Further, the initial value of the reference average brightness is the average brightness of the first frame image in the movie.
Further, the average brightness determining module is specifically configured to: and removing the caption area in the image, and determining the average brightness of the image based on the original brightness of the pixel points in the residual image area.
Further, the average brightness determining module is specifically configured to: by the formula
Figure BDA0002549837290000181
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel point (x, y), -/->
Figure BDA0002549837290000182
For the average luminance, σ is a constant, m×n is the width and height of the image, exp () is an exponential function based on a natural constant e, and log () is a logarithmic operation.
Further, the final brightness determining module is specifically configured to: by the formula
Figure BDA0002549837290000191
Determining the final brightness of the current pixel point; wherein L is max And L is the final brightness, and L (a, b) is the original brightness of the current pixel point.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
a memory for storing non-transitory computer readable instructions; and
and a processor configured to execute the computer readable instructions, such that the processor performs the image processing method described above.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing non-transitory computer-readable instructions that, when executed by a computer, cause the computer to perform the above-described image processing method.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific arrangements of the technical features described above, but also encompasses other arrangements of the technical features described above, or their equivalents, in any manner without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcompositions.
Although the subject matter has been described in language specific to structural features or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (7)

1. An image processing method, comprising:
determining the original brightness of each pixel point in an image, wherein the image is a frame of image in a film;
determining average brightness and maximum brightness of the image according to the original brightness of each pixel point;
determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
reconstructing the image according to the final brightness of each pixel, wherein the image is an RGB image, and performing color space conversion according to the final brightness and other color components after obtaining the final brightness of each pixel, so as to convert the final brightness into an RGB image;
wherein the determining the average brightness of the image according to the original brightness of each pixel point comprises:
determining initial average brightness of the image according to the original brightness of each pixel point;
if the difference value between the initial average brightness and the reference average brightness is smaller than a preset threshold value, the reference average brightness is taken as the average brightness of the image, and the initial value of the reference average brightness is the average brightness of the first frame image in the film;
if the difference value between the initial average brightness and the reference average brightness is larger than the preset threshold value, updating the reference average brightness by adopting the initial average brightness; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
2. The method of claim 1, wherein said determining the average luminance of the image from the original luminance of each pixel comprises:
and removing the caption area in the image, and determining the average brightness of the image based on the original brightness of the pixel points in the residual image area.
3. The method of claim 1, wherein said determining the average luminance of the image from the original luminance of each pixel comprises:
by the formula
Figure FDA0004151103610000021
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel point (x, y), -/->
Figure FDA0004151103610000023
For the average luminance, σ is a constant, m×n is the width and height of the image, exp () is an exponential function based on a natural constant e, and log () is a logarithmic operation.
4. A method according to claim 3, wherein said determining the final luminance of the current pixel from the original luminance, the average luminance and the maximum luminance of the current pixel comprises:
by the formula
Figure FDA0004151103610000022
Determining the final brightness of the current pixel point; wherein L is max For the maximum brightness, L is the final brightness, L (a, b) isAnd the original brightness of the current pixel point.
5. An image processing apparatus, comprising:
the original brightness determining module is used for determining the original brightness of each pixel point in an image, wherein the image is a frame of image in a film;
the average brightness determining module is used for determining the average brightness and the maximum brightness of the image according to the original brightness of each pixel point;
the final brightness determining module is used for determining the final brightness of the current pixel point according to the original brightness, the average brightness and the maximum brightness of the current pixel point; the current pixel point is the pixel point in the image, wherein final brightness of the pixel point is determined;
the image reconstruction module is used for reconstructing the image according to the final brightness of each pixel point, wherein the image is an RGB image, and after the final brightness of each pixel point is obtained, the image is converted into an RGB image according to the final brightness and other color components;
wherein the determining the average brightness of the image according to the original brightness of each pixel point comprises:
determining initial average brightness of the image according to the original brightness of each pixel point;
if the difference value between the initial average brightness and the reference average brightness is smaller than a preset threshold value, the reference average brightness is taken as the average brightness of the image, and the initial value of the reference average brightness is the average brightness of the first frame image in the film;
a brightness updating module, configured to update the reference average brightness with the initial average brightness if the difference between the initial average brightness and the reference average brightness is greater than the preset threshold; wherein the updated reference average luminance is used to determine the average luminance of the next frame of image of the image.
6. An electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
a processor for executing the computer readable instructions such that the processor, when executed, implements the image processing method according to any of claims 1-4.
7. A computer readable storage medium storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the image processing method of any one of claims 1-4.
CN202010572310.6A 2020-06-22 2020-06-22 Image processing method and device Active CN111738950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010572310.6A CN111738950B (en) 2020-06-22 2020-06-22 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010572310.6A CN111738950B (en) 2020-06-22 2020-06-22 Image processing method and device

Publications (2)

Publication Number Publication Date
CN111738950A CN111738950A (en) 2020-10-02
CN111738950B true CN111738950B (en) 2023-06-13

Family

ID=72650256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010572310.6A Active CN111738950B (en) 2020-06-22 2020-06-22 Image processing method and device

Country Status (1)

Country Link
CN (1) CN111738950B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115908618B (en) * 2023-02-28 2023-06-02 脉冲视觉(北京)科技有限公司 Method, device, equipment and medium for generating reconstructed image based on pulse data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005175882A (en) * 2003-12-11 2005-06-30 Matsushita Electric Ind Co Ltd Apparatus and method for detecting motion vector
CN101202926A (en) * 2006-12-11 2008-06-18 三星电子株式会社 System, medium, and method with noise reducing adaptive saturation adjustment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651806A (en) * 2009-09-04 2010-02-17 青岛海信电器股份有限公司 Screen brightness adjustment method and television
FR2973630A1 (en) * 2011-03-29 2012-10-05 Metrovision Method for suppressing luminance artifacts of transmissive type LCD used for vision test in e.g. ophthalmology, involves using difference between average luminance and reference luminance to adjust backlight of LCD
CN109309826B (en) * 2017-07-27 2020-11-13 Tcl科技集团股份有限公司 Image color balancing method and device, terminal equipment and readable storage medium
CN107451979B (en) * 2017-08-08 2022-11-01 腾讯科技(深圳)有限公司 Image processing method, device and storage medium
CN108650763A (en) * 2017-12-15 2018-10-12 蔚来汽车有限公司 The luminous component brightness adjusting method and device of vehicle intelligent controller, equipment
CN110473158A (en) * 2019-08-14 2019-11-19 上海世茂物联网科技有限公司 A kind of processing method, device and the equipment of license plate image brightness
CN110599967B (en) * 2019-09-19 2021-06-08 深圳市万普拉斯科技有限公司 Image display method and device, electronic equipment and readable storage medium
CN110769210B (en) * 2019-11-07 2022-06-03 湖南国科微电子股份有限公司 Method and device for generating HDR image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005175882A (en) * 2003-12-11 2005-06-30 Matsushita Electric Ind Co Ltd Apparatus and method for detecting motion vector
CN101202926A (en) * 2006-12-11 2008-06-18 三星电子株式会社 System, medium, and method with noise reducing adaptive saturation adjustment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Recommendations for long-term luminance distribution measurements: The spatial resolution;T.W. Kruisselbrink等;Building and Environment;全文 *

Also Published As

Publication number Publication date
CN111738950A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN112419151B (en) Image degradation processing method and device, storage medium and electronic equipment
CN110971931A (en) Video watermark adding method and device, electronic equipment and storage medium
CN111260601B (en) Image fusion method and device, readable medium and electronic equipment
CN110211030B (en) Image generation method and device
CN111738951B (en) Image processing method and device
CN110070495B (en) Image processing method and device and electronic equipment
CN113962859B (en) Panorama generation method, device, equipment and medium
WO2022142876A1 (en) Image processing method and apparatus, electronic device and storage medium
CN111738950B (en) Image processing method and device
CN110070482B (en) Image processing method, apparatus and computer readable storage medium
CN113066020A (en) Image processing method and device, computer readable medium and electronic device
CN112801997B (en) Image enhancement quality evaluation method, device, electronic equipment and storage medium
CN115526796A (en) Image processing method, device, equipment and storage medium
CN112241941B (en) Method, apparatus, device and computer readable medium for acquiring image
CN111815535B (en) Image processing method, apparatus, electronic device, and computer readable medium
CN110807114B (en) Method, device, terminal and storage medium for picture display
CN112465940B (en) Image rendering method and device, electronic equipment and storage medium
CN114170341A (en) Image processing method, device, equipment and medium
CN110636331A (en) Method and apparatus for processing video
JP7364250B2 (en) Video processing device, video processing method, video processing system, and video processing program
WO2023125500A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2023036111A1 (en) Video processing method and apparatus, device and medium
CN111756954B (en) Image processing method, image processing device, electronic equipment and computer readable medium
JP2024506828A (en) Image brightness adjustment method, device, electronic equipment and medium
US20220292733A1 (en) Method and apparatus for text effect processing

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
GR01 Patent grant
GR01 Patent grant