CN115018736A - Image brightness uniformity processing method and processing terminal - Google Patents

Image brightness uniformity processing method and processing terminal Download PDF

Info

Publication number
CN115018736A
CN115018736A CN202210860639.1A CN202210860639A CN115018736A CN 115018736 A CN115018736 A CN 115018736A CN 202210860639 A CN202210860639 A CN 202210860639A CN 115018736 A CN115018736 A CN 115018736A
Authority
CN
China
Prior art keywords
data
storage area
pixel point
subsection
row
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210860639.1A
Other languages
Chinese (zh)
Inventor
张春裕
杨光阳
卢李炎
蔡文生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Baolun Electronics Co Ltd
Original Assignee
Guangzhou Baolun Electronics 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 Guangzhou Baolun Electronics Co Ltd filed Critical Guangzhou Baolun Electronics Co Ltd
Priority to CN202210860639.1A priority Critical patent/CN115018736A/en
Publication of CN115018736A publication Critical patent/CN115018736A/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

The invention discloses a method for uniformly processing image brightness, which comprises the following steps: step 1: receiving a source image and converting the source image into a YUV format; step 2: sequentially storing the Y subsection data and the UV subsection data into corresponding storage regions and positions in the storage regions according to the position sequence of the pixel point data in a first-in-second-in-sequence manner; and step 3: reading Y subsection data in the first storage area according to the pixel position sequence, calculating new Y subsection data according to a corresponding formula, and storing the new Y subsection data into a fourth storage area according to the pixel position sequence; and 4, step 4: and synthesizing the new Y subsection data in the fourth storage area and the UV subsection data in the second storage area into a pixel point according to the pixel point position, thereby obtaining all pixel point data and obtaining a processed image. The brightness change of each pixel point of the obtained image is smoother, the brightness of the whole image is more uniform, and the phenomenon that part of the image is slightly bright or dark can not occur.

Description

Image brightness uniformity processing method and processing terminal
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a terminal for uniformly processing image brightness.
Background
The brightness of images (including adaptation) is an important link of image processing, and with the popularization of photographing devices (including mobile phones, digital cameras, video cameras and the like), the photographing function is more and more emphasized by users, wherein the brightness of images can directly influence the impression of users. Although there are some algorithms and methods capable of automatically adjusting the brightness of an image at present, if the algorithms need to be used, the algorithms are often expensive and are difficult to use by common, especially small and medium-sized manufacturers. Meanwhile, the algorithm is complex in calculation, processing in the aspect of image brightness uniformity is not ideal, and the difference exists between the algorithm and the expectation of consumers, so that a processing method capable of improving the image brightness uniformity effect is expected, automatic processing can be achieved, and a complex image brightness processing algorithm does not need to be configured additionally.
Disclosure of Invention
In view of the deficiencies of the prior art, it is an object of the present invention to provide a method for processing image brightness uniformity, which can solve the problem of uneven image brightness;
it is another object of the present invention to provide a processing terminal capable of solving the problem of uneven brightness of an image.
The technical scheme for realizing one purpose of the invention is as follows: a method for uniformly processing image brightness comprises the following steps:
step 1: receiving a source image, and converting the source image into a YUV format if the source image is in a non-YUV format;
step 2: sequentially storing Y subsection data of YUV format source images according to the position sequence of pixel point data in a first row and a second row, sequentially storing UV subsection data according to the position sequence of pixel point data in a first row and a second row, and keeping the number of rows and columns of a YV subsection data storage area consistent with the number of rows and columns of Y subsection data; the Y subsection data can be stored in a first storage area, the UV subsection data is stored in a second storage area, and the first storage area and the second storage area are two independent storage areas;
and step 3: reading Y subsection data in the first storage area according to the pixel position sequence, calculating new Y subsection data according to the following formula, and storing the new Y subsection data into a fourth storage area according to the pixel position sequence:
Figure BDA0003760950740000021
in the formula, A i,j Indicating new Y subsection data in ith row and jth column in fourth storage area, S i,j Y partial data, S, representing ith row and jth column in first storage area i,j+1 Y partial data, S, representing ith row, jth +1 column in first storage area i+1,j Y subsection data which represents the ith +1 th row and the jth column in the first storage area;
and 4, step 4: and synthesizing the new Y subsection data in the fourth storage area and the UV subsection data in the second storage area into a pixel point according to the pixel point position, thereby obtaining all pixel point data and obtaining a processed image.
Furthermore, an FPGA is adopted to receive a source image, and a first storage area, a second storage area and a fourth storage area are arranged in the FPGA.
The second technical scheme for realizing the aim of the invention is as follows: a processing terminal comprising, a memory for storing program instructions;
and the processor is used for executing the program instructions to execute the steps in the image brightness uniformity processing method.
The beneficial effects of the invention are as follows: the invention extracts Y subsection data of pixel points, the part of data represents the brightness of the image, and in step 3, the Y subsection data of the current pixel point is replaced by sequentially extracting two pixel point data of the current line and two pixel point data of the next line for averaging, because the difference value of the pixel values of the three pixel points or two adjacent pixel points of the same line (the last line) or two adjacent pixel points of the last column is extremely small, wherein the pixel point data of the front line and the back line have a certain distance on the position of the pixel point, when the brightness of the current pixel point is processed, the brightness of the adjacent pixel points is considered, the brightness of the pixel points with a certain distance is also considered and fed, so that the brightness of the current pixel point and the brightness of the surrounding pixel points change more smoothly, the brightness of the whole image is more uniform finally, and the phenomenon that part of the image is brighter or darker can not occur, therefore, after each pixel point is processed in such a way, the brightness of the whole image is greatly and uniformly processed, the brightness of image display is more uniform, and the sawtooth phenomenon is better improved to a certain extent.
Drawings
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a schematic diagram of pixel point data (Y subsection data) of a source image;
FIG. 3 is a schematic diagram of the new pixel data processed properly in accordance with the present invention as compared to FIG. 2;
fig. 4 is a schematic structural diagram of a processing terminal according to the present invention.
Detailed Description
The invention is further described with reference to the accompanying drawings and the specific embodiments.
As shown in fig. 1-3, a method for processing image brightness uniformity includes the following steps:
step 1: receiving a source image, and converting the source image into a YUV format if the source image is in a non-YUV format. For example, most images will be in RGB format, and therefore, conversion from RGB format to YUV format is required.
The present implementation may use the FPGA to receive the source image, and of course, may also use other hardware devices to receive the source image. An external signal source transmits a source image to the FPGA, and the source image is usually transmitted by adopting a vesa time sequence, so VS, HS, DE and DATA signals are generated, the FPGA can calculate information such as the resolution ratio of the source image according to the vesa time sequence, and a complete RGB format source image is obtained.
Step 2: and sequentially storing Y subsection data of YUV format source images according to the position sequence of pixel point data in a first row and a second row, sequentially storing UV subsection data according to the position sequence of pixel point data in a first row and a second row, and keeping the row and column number of a YV subsection data storage area consistent with the row and column data number of the Y subsection data. The Y subsection data can be stored in a first storage area, the UV subsection data can be stored in a second storage area, and the first storage area and the second storage area are two independent storage areas.
Referring to fig. 2, a schematic diagram of pixel point data of a source image stored in a first storage area is shown. And taking the top left corner as a starting point, taking the data in the first row and the first column as a first pixel point, taking the data in the first row and the second column as a second pixel point, and so on, and sequentially storing the pixel points according to the sequence of the first row and the second column.
In actual use, the first storage area may adopt a single storage hardware device (e.g., RAM), and the second storage area may adopt another single storage hardware device. Of course, the memory addresses of one memory hardware device may be divided, and a part of the divided memory addresses belong to the Y-division data-specific memory area, and another part of the divided addresses belong to the UV-division data-specific memory area.
When the FPGA is adopted to receive a source image, after the FPGA is powered on, an internal memory (such as a RAM, a ROM, a DDR and the like) in the FPGA can be initialized along with the power-on, and after the initialization, a DE pull-up signal is received (namely the DE signal is changed from a low level to a high level), the image data is represented as valid data. And (3) buffering the Y subsection data and the UV subsection data of the received YUV format source image by using different RAMs, namely, one RAM buffers the Y subsection data, and the other RAM buffers the UV subsection data.
And step 3: reading the first two pixel point data of the first line in the first storage area according to the line sequence, respectively recording the data as S1 and S2, reading the first pixel point data of the second line in the first storage area as S3, taking the average value of the three pixel points as a pixel point A, and storing the pixel point A in the first position of the fourth storage area, namely using the pixel point A as the first pixel point of the fourth storage area.
Reading a second pixel point and a third pixel point of a first line in the first storage region, reading a second pixel point of a second line in the first storage region, taking the mean value of the three pixel points as a new pixel point A, and storing the pixel point A in a second position of a fourth storage region, namely taking the pixel point A as a second pixel point. And analogizing in sequence, respectively reading the last two pixel points in the first storage region after the last reading of the current row, reading the next pixel point in the first storage region after the last reading of the current row, taking the average value of the three pixel points as a new pixel point A, and taking the pixel point AAnd A is stored in the corresponding position in the fourth storage area until the penultimate pixel point of each line in the first storage area is read. Reading the ith row and jth column of pixel points in the first storage region and marking as S i,j I is more than or equal to 1 and less than or equal to m-1, j is more than or equal to 1 and less than or equal to n-1, m is the total row number of the first storage area, m is more than or equal to 2, n is the total column number of the first storage area, n is more than or equal to 2, S i,j And S i+1,j Respectively representing the ith pixel point and the (i + 1) th pixel point of the jth line in the first storage region, S i,j+1 Indicating the ith pixel point of the j +1 th line. And calculating to obtain the pixel point A according to the following formula i,j And combine the pixel point A i,j The pixel point of the ith row and the jth column as the fourth storage area:
Figure BDA0003760950740000061
and if the data of the last column is read, taking the average value of the last pixel point of the current row and the last pixel point of the next row as a pixel point A, and storing the pixel point A in the corresponding position of the fourth storage area. And if the data of the last line is read, taking the average value of two pixel points corresponding to the current line according to the reading sequence as a pixel point A, and storing the pixel point A in the corresponding position of the fourth storage area. And if the data of the last row and the last column are read, taking the pixel point as a pixel point A and storing the pixel point A in the corresponding position of the fourth storage area.
That is, if j is equal to n and i is not equal to m, the pixel point a is calculated according to the formula (ii):
Figure BDA0003760950740000062
if i is equal to m and j is not equal to n, calculating according to a formula III to obtain a pixel point A:
Figure BDA0003760950740000063
if i is m and j is n, then a i,j =S i,j . That is, the last pixel is taken as the pixel a, and the pixel a is also the last pixel of the fourth storage area.
Therefore, the formula (i) - (c) can be constructed as follows:
Figure BDA0003760950740000071
in the above formula, if the value obtained by averaging includes decimal points, only the integer part is removed, for example, the average value of the pixel point a is 76.3, and the final pixel point a is 76.
Referring to fig. 2, for example, the 2 nd reading of the first row of pixels in the first storage region is performed by the 2 nd pixel and the 3 rd pixel, and the 2 nd pixel in the second row in the first storage region is performed by the 2 nd reading. And 3 rd time reading the first row of pixel points in the first storage region as a 3 rd pixel point and a 4 th pixel point, and reading the second row of pixel points in the first storage region as a 3 rd pixel point and a 4 th pixel point. And when the reading is carried out for the fourth time, all the pixel points in the first row are completely read, and the previously read pixel point data is obtained by calculation according to a formula (i). After the fifth reading, two pixel points cannot be read in the first row, and therefore, reading the data in the last row requires calculating a new pixel point a in another manner.
According to the formula, the pixel points obtained by calculating the pixel points in fig. 2 are shown in fig. 3, wherein the decimal part is discarded.
And 4, step 4: and taking the pixel point data in the fourth storage area as new Y subsection data, and combining the new Y subsection data with the UV subsection data in the second storage area according to the pixel point position to obtain all the pixel point data and obtain a processed image, wherein the brightness of the image is uniform, and the brightness of the later image is uniformly processed.
The invention extracts Y subsection data of pixel points, the part of data represents the brightness of the image, and in step 3, the Y subsection data of the current pixel point is replaced by sequentially extracting two pixel point data of the current line and two pixel point data of the next line for averaging, because the difference value of the pixel values of the three pixel points or two adjacent pixel points of the same line (the last line) or two adjacent pixel points of the last column is extremely small, wherein the pixel point data of the front line and the back line have a certain distance on the position of the pixel point, when the brightness of the current pixel point is processed, the brightness of the adjacent pixel points is considered, the brightness of the pixel points with a certain distance is also considered and fed, so that the brightness of the current pixel point and the brightness of the surrounding pixel points change more smoothly, the brightness of the whole image is more uniform finally, and the phenomenon that part of the image is brighter or darker can not occur, therefore, after each pixel point is processed in this way, the brightness of the whole image is greatly and uniformly processed, the brightness of image display is more uniform, and the sawtooth phenomenon is better improved to a certain extent.
The invention can be well integrated on the basic software of image processing or cloud computing software, and can realize automatic brightness uniform processing of images, thereby being well applied to emerging software and services, better serving consumers and improving user experience.
As shown in fig. 4, the present invention also relates to an entity implementing processing terminal 100 implementing a front-end and back-end character distinct encryption method, which includes,
a memory 101 for storing program instructions;
and the processor 102 is used for executing the program instructions to execute the steps in the image brightness uniformity processing method.
The embodiments disclosed in this description are only an exemplification of the single-sided characteristics of the invention, and the scope of protection of the invention is not limited to these embodiments, and any other functionally equivalent embodiments fall within the scope of protection of the invention. Various other changes and modifications to the above-described embodiments and concepts will become apparent to those skilled in the art from the above description, and all such changes and modifications are intended to be included within the scope of the present invention as defined in the appended claims.

Claims (3)

1. The image brightness uniformity processing method is characterized by comprising the following steps of:
step 1: receiving a source image, and converting the source image into a YUV format if the source image is in a non-YUV format;
and 2, step: sequentially storing Y subsection data of YUV format source images according to pixel point data position sequence in a first row and a second row, sequentially storing UV subsection data according to pixel point data position sequence in a first row and a second row, and keeping the row and column number of a YV subsection data storage area consistent with the row and column data number of the Y subsection data; the Y subsection data can be stored in a first storage area, the UV subsection data is stored in a second storage area, and the first storage area and the second storage area are two independent storage areas;
and step 3: reading Y subsection data in the first storage area according to the pixel position sequence, calculating new Y subsection data according to the following formula, and storing the new Y subsection data into a fourth storage area according to the pixel position sequence:
Figure FDA0003760950730000011
in the formula, A i,j Indicating the new Y subsection data of ith row and jth column in the fourth storage area, S i,j Y partial data representing ith row and jth column in first storage region, S i,j+1 Y partial data, S, representing ith row, jth +1 column in first storage area i+1,j Y subsection data which represents the ith +1 th row and the jth column in the first storage area;
and 4, step 4: and combining the new Y subsection data in the fourth storage area with the UV subsection data in the second storage area into a pixel point according to the pixel point position, thereby obtaining all pixel point data and obtaining a processed image.
2. The method for uniformly processing the brightness of the image according to claim 1, wherein an FPGA is adopted to receive the source image, and a first storage area, a second storage area and a fourth storage area are arranged in the FPGA.
3. A processing terminal, characterized in that it comprises,
a memory for storing program instructions;
a processor for executing the program instructions to perform the steps of the image brightness uniformity processing method according to claim 1 or 2.
CN202210860639.1A 2022-07-22 2022-07-22 Image brightness uniformity processing method and processing terminal Pending CN115018736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210860639.1A CN115018736A (en) 2022-07-22 2022-07-22 Image brightness uniformity processing method and processing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210860639.1A CN115018736A (en) 2022-07-22 2022-07-22 Image brightness uniformity processing method and processing terminal

Publications (1)

Publication Number Publication Date
CN115018736A true CN115018736A (en) 2022-09-06

Family

ID=83082511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210860639.1A Pending CN115018736A (en) 2022-07-22 2022-07-22 Image brightness uniformity processing method and processing terminal

Country Status (1)

Country Link
CN (1) CN115018736A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677408A (en) * 2008-09-19 2010-03-24 索尼株式会社 Image processing apparatus, image processing method, and program
CN109191394A (en) * 2018-08-17 2019-01-11 京东方科技集团股份有限公司 A kind of method, apparatus of image enhancement, readable storage medium storing program for executing and computer equipment
CN110910333A (en) * 2019-12-12 2020-03-24 腾讯科技(深圳)有限公司 Image processing method and image processing apparatus
CN112788251A (en) * 2019-11-07 2021-05-11 中兴通讯股份有限公司 Image brightness processing method and device, and image processing method and device
CN113256534A (en) * 2021-06-16 2021-08-13 湖南兴芯微电子科技有限公司 Image enhancement method, device and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677408A (en) * 2008-09-19 2010-03-24 索尼株式会社 Image processing apparatus, image processing method, and program
US20100074521A1 (en) * 2008-09-19 2010-03-25 Shinichiro Gomi Image Processing Apparatus, Image Processing Method, and Program
CN109191394A (en) * 2018-08-17 2019-01-11 京东方科技集团股份有限公司 A kind of method, apparatus of image enhancement, readable storage medium storing program for executing and computer equipment
CN112788251A (en) * 2019-11-07 2021-05-11 中兴通讯股份有限公司 Image brightness processing method and device, and image processing method and device
CN110910333A (en) * 2019-12-12 2020-03-24 腾讯科技(深圳)有限公司 Image processing method and image processing apparatus
CN113256534A (en) * 2021-06-16 2021-08-13 湖南兴芯微电子科技有限公司 Image enhancement method, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
严学高: "《全国中医药行业高等教育"十三五"规划教材 医学图形图像处理 新世纪第3版》", 北京:中国中医药出版社, pages: 135 - 136 *

Similar Documents

Publication Publication Date Title
JP3046079B2 (en) A histogram equalizer for improving the contrast of moving images
US10728473B2 (en) Imaging control method, imaging device, and computer-readable storage medium
US8452094B2 (en) Real-time image generator
CN113508416B (en) Image fusion processing module
CN112202986B (en) Image processing method, image processing apparatus, readable medium and electronic device thereof
WO2021083059A1 (en) Image super-resolution reconstruction method, image super-resolution reconstruction apparatus, and electronic device
WO2021148057A1 (en) Method and apparatus for generating low bit width hdr image, storage medium, and terminal
US20200314289A1 (en) High dynamic range color conversion using selective interpolation
EP3940633A1 (en) Image alignment method and apparatus, electronic device, and storage medium
CN102223480A (en) Image processing device and image processing method
CN111429371B (en) Image processing method and device and terminal equipment
US9832395B2 (en) Information processing method applied to an electronic device and electronic device having at least two image capturing units that have the same image capturing direction
US8542919B2 (en) Method and system for correcting lens shading
CN101115144B (en) Image processing apparatus and image processing method
CN103685854A (en) Image processing apparatus, image processing method, and program
CN111861965B (en) Image backlight detection method, image backlight detection device and terminal equipment
CN111539975A (en) Method, device and equipment for detecting moving target and storage medium
CN115018736A (en) Image brightness uniformity processing method and processing terminal
KR20120060278A (en) Method and apparatus for automatic brightness adjustment of image signal processor
CN111970451B (en) Image processing method, image processing device and terminal equipment
CN111866476A (en) Image shooting method and device and electronic equipment
CN111901539B (en) Image acquisition method, image acquisition device and terminal equipment
CN113301222B (en) Imaging correction method and device and intelligent terminal
CN113194267B (en) Image processing method and device and photographing method and device
CN109151299B (en) Focusing method and device

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
CB02 Change of applicant information

Address after: No. 56 Nanli East Road, Shiqi Town, Panyu District, Guangzhou City, Guangdong Province, 510000

Applicant after: Guangdong Baolun Electronics Co.,Ltd.

Address before: No.19 Chuangyuan Road, Zhongcun street, Panyu District, Guangzhou, Guangdong 510000

Applicant before: GUANGZHOU ITC ELECTRONIC TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20220906

RJ01 Rejection of invention patent application after publication