CN111738950A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN111738950A
CN111738950A CN202010572310.6A CN202010572310A CN111738950A CN 111738950 A CN111738950 A CN 111738950A CN 202010572310 A CN202010572310 A CN 202010572310A CN 111738950 A CN111738950 A CN 111738950A
Authority
CN
China
Prior art keywords
brightness
image
pixel point
determining
average
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.)
Granted
Application number
CN202010572310.6A
Other languages
Chinese (zh)
Other versions
CN111738950B (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

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present disclosure provides an image processing method, an 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 the average brightness and the 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 a pixel point which is subjected to final brightness determination in the image; and reconstructing the image according to the final brightness of each pixel point. The embodiment of the disclosure utilizes the brightness, the average brightness and the maximum brightness of the image when reconstructing the image, thereby avoiding the color distortion of the image caused by the contrast over-enhancement, and the brightness values are different according to the difference of the image, thereby realizing the self-adaptation.

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 and apparatus, and a computer-readable storage medium.
Background
Film art is an important embodiment of human culture and a valuable wealth of human civilization. Some of the loss of noise and compression causes the blur of the film picture, dense noise points, and moire, which results in poor film quality, and the film needs to be repaired.
At present, images are mostly repaired by a global enhancement or deep learning fitting enhancement method, and especially when a black picture with noise exists, the noise is easily amplified, and the contrast is excessively enhanced, so that the picture color distortion is caused.
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 solved by the present disclosure is to provide an image processing method to at least partially solve the technical problem of picture color distortion caused by contrast over-enhancement due to easy amplification of noise in the prior art. In addition, an image processing apparatus, an image processing hardware apparatus, a computer-readable storage medium, and an image processing terminal are also provided.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
an image processing method comprising:
determining the original brightness of each pixel point in the image;
determining the average brightness and the 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 a pixel point which is subjected to final brightness determination in the image;
and 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, the following technical solutions are provided:
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 a pixel point which is subjected to final brightness determination in the image;
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, the following technical solutions are provided:
an electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
and the processor is used for executing the computer readable instructions, so that the processor realizes the image processing method when executing.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a computer-readable storage medium for 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, the following technical solutions are also provided:
an image processing terminal comprises any one of the image processing devices.
The method and the device for reconstructing the image comprise the steps of determining the original brightness of each pixel point in the image, determining the average brightness and the 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, and reconstructing the image according to the final brightness of each pixel point. In the embodiment, the brightness, the average brightness and the maximum brightness of the image are used when the image is reconstructed, so that the image color distortion caused by the contrast over-enhancement can be avoided, and the brightness values are different according to the difference of the image, so as to realize the self-adaptation.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic flow diagram of an image processing method according to one embodiment of the present disclosure;
FIG. 2 is a schematic flow diagram of an image processing apparatus according to one embodiment of the present disclosure;
fig. 3 is a schematic structural diagram 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 are shown in the 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 rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the 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 "include" and variations thereof as used herein are 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". Relevant definitions for other terms will be given in the following description.
Example one
In order to solve the technical problem that contrast is excessively enhanced due to a plurality of easily amplified noises, which causes color distortion of a picture in the prior art, the embodiment of the disclosure provides an image processing method. As shown in fig. 1, the image processing method mainly includes steps S11 to S14 as follows.
Step S11: and determining the original brightness of each pixel point in the image.
The image may be a single image or a frame of image in a movie.
Specifically, the luminance component of each pixel point in the image can be extracted, and the original luminance is determined according to the luminance component of each pixel point. 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 an 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 luminance (brightness) component, in this embodiment, only the L component needs to be extracted, and the original luminance 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 (Luma or Luma), i.e., a Luminance component, and U and V represent Chrominance (Chroma or Chroma), i.e., a Chrominance component, in this embodiment, only the Y component needs to be extracted, and the original Luminance of each pixel point in the image is determined according to the Y component.
If the image is converted to an LAB image, where L denotes luminance (luminance), i.e. a luminance component, a denotes the range from magenta to green, and B denotes the range from yellow to blue. In this embodiment, only the L component needs to be 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 following first optional embodiment.
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; and the current pixel point is the pixel point which is subjected to final brightness determination in the image.
Specifically, the method of the step is adopted to calculate each pixel point in the image one by one, and the final brightness of each pixel point is obtained. For a specific calculation method, refer to the following second alternative embodiment, which is not described herein again.
Step S14: and reconstructing the image according to the final brightness of each pixel point.
And the other color components of each pixel point are kept unchanged, namely the original color value is obtained. For example, if the image is an RGB image, after the final brightness of each pixel is obtained, color space conversion is performed according to the final brightness and other color components, and the RGB image is converted.
In this embodiment, 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, the average brightness and the maximum brightness of the current pixel point, and the image is reconstructed according to the final brightness of each pixel point. In the embodiment, the brightness, the average brightness and the maximum brightness of the image are used when the image is reconstructed, so that the image color distortion caused by the contrast over-enhancement can be avoided, and the brightness values are different according to the difference of the image, so as to realize the self-adaptation.
In a first optional 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 (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 optional embodiment, step S13 specifically includes: by the formula
Figure BDA0002549837290000073
Determining the final brightness of the current pixel point; wherein L ismaxAnd taking the maximum brightness, taking L as the final brightness, and taking L (a, b) as the original brightness of the current pixel point.
In a third optional embodiment, step S12 specifically includes: and removing the subtitle area in the image, and determining the average brightness of the image on the basis of the original brightness of pixel points in the residual image area.
In the embodiment, when the average brightness of the image is calculated, the interference of the subtitle area to the image content can be removed, the phenomenon of brightness flickering caused by subtitle difference is solved, and the image color distortion caused by contrast over-enhancement can be further avoided. For a specific method for calculating the average brightness of the image, reference is made to the first optional embodiment, and details are not repeated here.
In a fourth optional 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 pixels, or by using the method in the following first optional embodiment, which is specifically referred to the first optional embodiment and is not described herein again.
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, taking the reference average brightness as the average brightness of the image.
The reference average brightness can be set by a user in a self-defined way, and if the image is an image of one frame in a movie, the reference average brightness can be the average brightness of the image of the last frame in the image. And the initial value of the reference average brightness is the average brightness of the first frame image in the movie.
Specifically, if the difference between the initial average brightness and the reference average brightness is less than or equal to a preset threshold, it indicates that the image is the same as or similar to the picture 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 greater than the preset threshold, it indicates that the image is different from or has a large change in the picture 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 of picture stabilization can be maintained when there is a large amount of change in the movie picture.
In a fifth optional 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, updating the reference average brightness by adopting the initial average brightness, namely taking the initial average brightness as the reference average brightness; wherein the updated reference average luminance is used to determine an average luminance of an image of a next frame of the image.
According to the embodiment, the reference average brightness is updated in a self-adaptive manner, so that the average brightness of the image is updated in a self-adaptive manner, and the problem of color distortion of a pure color picture with a large amount of noise in the picture can be effectively solved.
It will be appreciated by those skilled in the art that obvious modifications (for example, a superposition of the modes listed) or equivalent substitutions may be made on the basis of the various embodiments described above.
In the above, although the steps in the embodiment of the image processing method are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiment of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, those skilled in the art may also add other steps, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
For convenience of description, only the relevant parts of the embodiments of the present disclosure are shown, and details of the specific techniques are not disclosed, please refer to the embodiments of the method of the present disclosure.
Example two
In order to solve the technical problem that contrast is excessively enhanced to cause picture color distortion due to a plurality of easily amplified noises in the prior art, the embodiment of the present disclosure provides an image processing apparatus. The apparatus may perform the steps in the image processing method embodiment described in the first embodiment. As shown in fig. 2, the apparatus mainly includes: an original brightness determination module 21, an average brightness determination module 22, a final brightness determination module 23, and an image reconstruction module 24; wherein the content of the first and second substances,
the original brightness determining module 21 is configured to determine an original brightness of each pixel 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;
the final brightness determining module 23 is configured to determine a final brightness of the current pixel according to the original brightness, the average brightness, and the maximum brightness of the current pixel; the current pixel point is a pixel point which is subjected to final brightness determination in the image;
the image reconstructing module 24 is configured to reconstruct the image according to the final brightness of each pixel point.
Further, the average brightness determining module 22 is specifically configured to: determining the 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, taking the reference average brightness 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 content of the first and second substances,
the brightness updating module 25 is configured to update the reference average brightness with the initial average brightness if a 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 an average luminance of an image of a next frame 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 subtitle area in the image, and determining the average brightness of the image on the basis of the original brightness of 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 (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 ismaxAnd taking the maximum brightness, taking L as the final brightness, and taking L (a, b) as the original brightness of the current pixel point.
For detailed descriptions of the working principle, the technical effect of the implementation, and the like of the embodiment of the image processing apparatus, reference may be made to the description of the embodiment of the image processing method, and further description is omitted here.
EXAMPLE III
Referring now to FIG. 3, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
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 appropriate 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 necessary 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.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, 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 devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any superposition of the two. A computer readable storage medium may 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 superposition of the foregoing. In the present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable superposition of the foregoing. 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, optical cables, RF (radio frequency), etc., or any suitable superposition of the above.
In some embodiments, 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 communications 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 network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled 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 the average brightness and the 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 a pixel point which is subjected to final brightness determination in the image; and reconstructing the image according to the final brightness of each pixel point.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above 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: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), 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. A 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 combination of the foregoing. 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 superposition 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 the average brightness and the 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 a pixel point which is subjected to final brightness determination in the image;
and 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 the 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, taking the reference average brightness 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 an average luminance of an image of a next frame 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 subtitle area in the image, and determining the average brightness of the image on the basis of the original brightness of 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 (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 point according to the original brightness, the average brightness and the maximum brightness of the current pixel point includes:
by the formula
Figure BDA0002549837290000173
Determining the final brightness of the current pixel point; wherein L ismaxAnd taking the maximum brightness, taking L as the final brightness, and taking L (a, b) as 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 a pixel point which is subjected to final brightness determination in the image;
and the image reconstruction module is used for reconstructing the image according to the final brightness of each pixel point.
Further, the average brightness determination module is specifically configured to: determining the 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, taking the reference average brightness 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 an average luminance of an image of a next frame 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 determination module is specifically configured to: and removing the subtitle area in the image, and determining the average brightness of the image on the basis of the original brightness of pixel points in the residual image area.
Further, the average brightness determination 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 (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 determination module is specifically configured to: by the formula
Figure BDA0002549837290000191
Determining the final brightness of the current pixel point; wherein L ismaxAnd taking the maximum brightness, taking L as the final brightness, and taking L (a, b) as 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
a processor for executing the computer readable instructions, so that the processor realizes the image processing method when executing.
According to one or more embodiments of the present disclosure, there is provided 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.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular arrangement of features above described which are stacked together, and that other arrangements in which features of the above described type or their equivalents are stacked together as desired without departing from the spirit of the disclosure are also encompassed. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while 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. Under 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 limitations on the scope of the 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 subcombination.
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 disclosed as example forms of implementing the claims.

Claims (10)

1. An image processing method, comprising:
determining the original brightness of each pixel point in the image;
determining the average brightness and the 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 a pixel point which is subjected to final brightness determination in the image;
and reconstructing the image according to the final brightness of each pixel point.
2. The method of claim 1, wherein said determining an average luminance of said image based on an original luminance of said each pixel point comprises:
determining the 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, taking the reference average brightness as the average brightness of the image.
3. The method of claim 2, wherein the image is a frame of an image in a movie, the method further comprising:
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 an average luminance of an image of a next frame of the image.
4. The method according to claim 3, wherein the initial value of the reference average luminance is an average luminance of a first frame image in the movie.
5. The method of claim 1, wherein said determining an average luminance of said image based on an original luminance of said each pixel point comprises:
and removing the subtitle area in the image, and determining the average brightness of the image on the basis of the original brightness of pixel points in the residual image area.
6. The method of claim 1, wherein said determining an average luminance of said image based on an original luminance of said each pixel point comprises:
by the formula
Figure FDA0002549837280000021
Determining an average brightness of the image; wherein L (x, y) is the original brightness of the pixel (x, y),
Figure FDA0002549837280000022
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.
7. The method of claim 6, wherein 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 comprises:
by the formula
Figure FDA0002549837280000023
Determining the final brightness of the current pixel point; wherein L ismaxAnd taking the maximum brightness, taking L as the final brightness, and taking L (a, b) as the original brightness of the current pixel point.
8. An image processing apparatus characterized by 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 a pixel point which is subjected to final brightness determination in the image;
and the image reconstruction module is used for reconstructing the image according to the final brightness of each pixel point.
9. 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 executing implements the image processing method according to any of claims 1-7.
10. 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-7.
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 true CN111738950A (en) 2020-10-02
CN111738950B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114820404A (en) * 2021-01-29 2022-07-29 北京字节跳动网络技术有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN115908618A (en) * 2023-02-28 2023-04-04 脉冲视觉(北京)科技有限公司 Reconstructed image generation method, device, equipment and medium based on pulse data

Citations (10)

* 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
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
CN107451979A (en) * 2017-08-08 2017-12-08 腾讯科技(深圳)有限公司 A kind of 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
CN109309826A (en) * 2017-07-27 2019-02-05 Tcl集团股份有限公司 A kind of image color equalization methods and terminal
CN110473158A (en) * 2019-08-14 2019-11-19 上海世茂物联网科技有限公司 A kind of processing method, device and the equipment of license plate image brightness
CN110599967A (en) * 2019-09-19 2019-12-20 深圳市万普拉斯科技有限公司 Image display method and device, electronic equipment and readable storage medium
CN110769210A (en) * 2019-11-07 2020-02-07 湖南国科微电子股份有限公司 Method and device for generating HDR image

Patent Citations (10)

* 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
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
CN109309826A (en) * 2017-07-27 2019-02-05 Tcl集团股份有限公司 A kind of image color equalization methods and terminal
CN107451979A (en) * 2017-08-08 2017-12-08 腾讯科技(深圳)有限公司 A kind of 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
CN110599967A (en) * 2019-09-19 2019-12-20 深圳市万普拉斯科技有限公司 Image display method and device, electronic equipment and readable storage medium
CN110769210A (en) * 2019-11-07 2020-02-07 湖南国科微电子股份有限公司 Method and device for generating HDR image

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
T.W. KRUISSELBRINK等: "Recommendations for long-term luminance distribution measurements: The spatial resolution", BUILDING AND ENVIRONMENT *
王仕女: "全局与局部融合的图像增强算法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
王仕女: "全局与局部融合的图像增强算法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 01, 15 January 2020 (2020-01-15) *
陈迎春: "基于色调映射的快速低照度图像增强", 《计算机工程与应用》 *
陈迎春: "基于色调映射的快速低照度图像增强", 《计算机工程与应用》, 28 June 2019 (2019-06-28), pages 235 - 236 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114820404A (en) * 2021-01-29 2022-07-29 北京字节跳动网络技术有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN115908618A (en) * 2023-02-28 2023-04-04 脉冲视觉(北京)科技有限公司 Reconstructed image generation method, device, equipment and medium based on pulse data

Also Published As

Publication number Publication date
CN111738950B (en) 2023-06-13

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
JP6328275B2 (en) Image type identification method, apparatus, program, and recording medium
CN111260601B (en) Image fusion method and device, readable medium and electronic equipment
WO2023010749A1 (en) Hdr video conversion method and apparatus, and device and computer storage medium
CN111738951B (en) Image processing method and device
CN110070495B (en) Image processing method and device and electronic equipment
CN111738950B (en) Image processing method and device
US20060114479A1 (en) Accelerated image enhancement
CN113962859A (en) Panorama generation method, device, equipment and medium
WO2022166907A1 (en) Image processing method and apparatus, and device and readable storage medium
WO2022142876A1 (en) Image processing method and apparatus, electronic device and storage medium
CN110097520B (en) Image processing method and device
CN112465940B (en) Image rendering method and device, electronic equipment and storage medium
CN113038176A (en) Video frame extraction method and device and electronic equipment
CN110636331B (en) Method and apparatus for processing video
CN114170341A (en) Image processing method, device, equipment and medium
CN115526796A (en) Image processing method, device, equipment and storage medium
CN112241941B (en) Method, apparatus, device and computer readable medium for acquiring image
CN114972021A (en) Image processing method and device, electronic equipment and storage medium
CN111815535B (en) Image processing method, apparatus, electronic device, and computer readable medium
CN112312200A (en) Video cover generation method and device and electronic equipment
CN111756954B (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN117692679B (en) Quality enhancement video transmission method, device, electronic equipment and readable medium
JP2019165434A (en) Method and apparatus for generating hdr image with reduced clipped area

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