CN107886482B - Method and device for improving Bayer image contrast - Google Patents

Method and device for improving Bayer image contrast Download PDF

Info

Publication number
CN107886482B
CN107886482B CN201711096682.0A CN201711096682A CN107886482B CN 107886482 B CN107886482 B CN 107886482B CN 201711096682 A CN201711096682 A CN 201711096682A CN 107886482 B CN107886482 B CN 107886482B
Authority
CN
China
Prior art keywords
image data
primary color
dark primary
color image
integral
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
CN201711096682.0A
Other languages
Chinese (zh)
Other versions
CN107886482A (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.)
Shenzhen China Star Optoelectronics Semiconductor Display Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics Semiconductor Display Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen China Star Optoelectronics Semiconductor Display Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Semiconductor Display Technology Co Ltd
Priority to CN201711096682.0A priority Critical patent/CN107886482B/en
Priority to PCT/CN2017/117315 priority patent/WO2019090909A1/en
Publication of CN107886482A publication Critical patent/CN107886482A/en
Application granted granted Critical
Publication of CN107886482B publication Critical patent/CN107886482B/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/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20028Bilateral filtering

Landscapes

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

Abstract

The invention provides a method and a device for improving the image contrast of Bayer images, comprising the following steps: respectively acquiring dark primary color image data of the bottom, the middle and the top of a pixel unit in current Bayer image data; managing the acquired dark primary color image data in a time-sharing manner, acquiring integral values of a left top area TL and a right top area TR through the dark primary color image data at the top, acquiring integral values of a left bottom area BL and a right bottom area BR through the dark primary color image data at the bottom, and forming an integral graph; performing bilateral filtering processing after integral values of the integral graph, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR are subjected to comprehensive processing to obtain filtered dark primary color image data; and calculating and processing the filtered dark primary color image data to obtain Bayer image data with improved contrast. By the mode, the contrast and detail information of the image are ensured, meanwhile, the intermediate processing process is simplified, and the processing delay is reduced.

Description

Method and device for improving Bayer image contrast
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for improving the image contrast of a Bayer image.
Background
In the image shooting and video acquisition process, when night vision or poor backlight is often encountered, the obtained image has low contrast and fuzzy detail information, and brings inconvenience to subsequent image analysis work. The performance of systems such as video acquisition, image recognition, dynamic recognition and the like under the low-illumination condition can be effectively improved by utilizing the image enhancement technology.
For a color image, it is necessary to collect a plurality of most basic colors, such as three colors of RGB, and the simplest method is a method using a filter, in which a red filter transmits a red wavelength, a green filter transmits a green wavelength, and a blue filter transmits a blue wavelength. If three primary colors of RGB are to be collected, three filters are needed, so that the price is high, and the manufacture is not good, because the three filters must ensure that each pixel point is aligned. This problem is well solved when using the bayer format. The bayer image is a color image set on a filter, and is found by analyzing the perception of human eyes. The Bayer pattern is a color pattern, and is widely used in CCD and CMOS cameras. In the prior art, a method for improving the contrast of Bayer image data mainly includes the following steps: firstly, carrying out interpolation processing on Bayer image data to obtain RGB image data after interpolation, and then obtaining dark primary color image data based on the RGB image data; calculating an integral diagram of the dark primary color image, and performing bilateral filtering processing on the obtained dark primary color image through the integral diagram to obtain filtered dark primary color image data; performing histogram statistics on the RGB image data and the filtered dark primary color image data to obtain an R/G/B (three component values of a pixel point R, G, B) and a dark primary color image data histogram; meanwhile, accumulating and counting the filtered dark primary color image data to obtain the sum of the dark primary color image data in the filtering window; comprehensively analyzing the sum of dark primary color image data in a filtering window aiming at the R/G/B and dark primary color image data histogram to obtain a gain value, a dark channel mean value and an atmospheric light value corresponding to the R/G/B; and calculating and processing the original Bayer image data by using the gain value obtained by updating each frame, the atmospheric light value corresponding to the R/G/B, the dark channel mean value and the filtered dark primary color image data, and finally obtaining the Bayer image data with improved contrast.
In the prior art, the Bayer image data, the bilateral pre-filtering/post-dark primary color image data and the integrogram need to be cached, so that the memory is occupied and simultaneously, the memory needs to be accessed for many times; in addition, in the original method, in addition to the need of statistics/maintenance of the R/G/B histogram, a plurality of intermediate calculation processes are also required. Therefore, in the existing method for improving the contrast of the Bayer image data, both the graphics processing and the digital signal processing can meet the real-time requirement, and even the processing delay reaches several seconds.
Therefore, there is a need for an improved Bayer image contrast scheme that improves the latency of the processing while ensuring the contrast and detail information of the image.
Disclosure of Invention
The invention solves the technical problem of providing a method and a device for improving the image contrast of a Bayer image, which can simplify the intermediate processing process and reduce the processing delay while ensuring the image contrast and detail information.
In order to solve the above technical problem, the present invention provides a method for improving the contrast of a Bayer image, comprising: the method for improving the Bayer image contrast comprises the steps of respectively acquiring dark primary color image data of the bottom, the middle and the top of a pixel unit in current Bayer image data; managing the acquired dark primary color image data in a time-sharing manner, obtaining integral values of a left top area TL and a right top area TR through the dark primary color image data at the top, obtaining integral values of a left bottom area BL and a right bottom area BR through the dark primary color image data at the bottom, and forming an integral graph; obtaining the total sum of dark primary color image data in a filter window through the integral map, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR after comprehensive processing, combining the integral values of the left top area TL and the right bottom area BR, subtracting the integral values of the right top area TR and the left bottom area BL to obtain the total sum of the dark primary color image data in the filter window, and performing bilateral filtering processing on the total sum of the dark primary color image data in the filter window to obtain the filtered dark primary color image data; calculating the filtered dark primary color image data, and performing histogram statistics according to the RGB image data and the filtered dark primary color image to obtain an R/G/B image data cumulative histogram, a dark primary color image data histogram and a dark primary color image data cumulative total value; comprehensively analyzing the cumulative histogram of the R/G/B image data, the histogram of the dark primary color image data and the cumulative total value of the dark primary color image data to obtain a gain value and an atmospheric light value corresponding to the R/G/B image data; and comprehensively calculating and processing gain values obtained by Bayer image data, atmospheric light values corresponding to R/G/B image data, the filtered dark primary color image and the Bayer image data to obtain Bayer image data with improved contrast.
The integral graph is realized in an integral line mode.
Further, the specific steps of respectively acquiring dark primary color image data of the bottom, the middle and the top of a pixel unit in the current Bayer image data include: carrying out interpolation processing on the current Bayer image data to obtain RGB image data after interpolation; and respectively acquiring dark primary color image data of the bottom, the middle and the top of the pixel unit according to the RGB image data after interpolation.
To solve the above problems, the present invention also provides an apparatus for improving the contrast of a Bayer image, comprising: the storage manager is used for realizing caching of Bayer image line data in the bilateral filtering window; the bottom operation module is used for acquiring bottom dark primary color image data of pixel units in Bayer image data and calculating an integral value of a left bottom area BL and a right bottom area BR according to the bottom dark primary color image data; the top operation module is used for acquiring top dark primary color image data of pixel units in Bayer image data and calculating an integral value of a left top area TL and a right top area TR according to the top dark primary color image data; the middle operation module is used for forming an integral diagram, obtaining dark primary color image data sum in a filter window through comprehensive processing of integral values of the integral diagram, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR, carrying out bilateral filtering processing on the dark primary color image data sum in the filter window to obtain filtered dark primary color image data, combining integral values of the left top area TL and the right bottom area BR, then subtracting the integral values of the right top area TR and the left bottom area BL to obtain the dark primary color image data sum in the filter window, and carrying out calculation processing by using the filtered dark primary color image data to obtain Bayer image data with improved contrast.
Wherein the bottom run module comprises: a line buffer management module; the Bayer image data color filtering array interpolation module is used for rearranging the interpolation data; the dark primary color calculation module is used for selecting the minimum value in the RGB image as dark primary color image data; the integral line management module is used for realizing the management of the integral lines corresponding to the top and the bottom in the filtering window; the top operation module and the bottom operation module have the same structure.
Wherein the middle operation module comprises: the line buffer management module is used for rearranging a Bayer image data color filter array interpolation module before interpolation; the color filter array interpolation module is used for carrying out interpolation calculation on Bayer image data to obtain an RGB image; the dark primary color calculation module is used for selecting the minimum value in the RGB image as dark primary color image data; the barrel shifter is used for specifying the transmission direction and displacement of Bayer image data; the bilateral filtering calculation module is used for realizing filtering and smoothing processing on dark primary color image data to obtain a filtered dark primary color image; and the calculation module is used for comprehensively analyzing and processing the dark primary color image data and the filtered dark primary color image data to obtain Bayer image data with improved contrast after calculation.
The bottom operation module, the top operation module and the middle operation module are parallel modules.
Wherein the storage manager comprises: the storage controller buffers Bayer image line data in the bilateral filtering window; and the arbitration manager is responsible for the read-write management of Bayer image line data in multiple directions.
Wherein the integration row management module adopts 2 SRAMs (static random access memories) to update and store the integration value of the analog dark primary color image row data.
The invention has the beneficial effects that: the method and the device adopt a pipeline and a data parallel processing structure, simplify the intermediate processing process, reduce the processing delay and perfect the processing process of the Bayer image while ensuring the contrast and the detail information of the image. Furthermore, the method and the device of the invention convert the integral image required by bilateral filtering into an integral line mode for management, optimize the dark image, inhibit the over-bright area and complete the improvement of the integral contrast of the image.
Drawings
FIG. 1 is a schematic flow chart diagram of one embodiment of a method of improving the contrast of a Bayer image according to the present invention;
FIG. 2 is a schematic diagram of the integration of each region of dark primary color image data according to the present invention;
FIG. 3 is a schematic diagram of dark primary image data integration lines according to the present invention;
FIG. 4 is a schematic diagram illustrating the principle of calculating the sum of dark primary color image data in the filtering window according to the present invention;
FIG. 5 is a schematic diagram of the structure of a first embodiment of the present invention for improving the contrast of Bayer images;
FIG. 6 is a schematic diagram of an apparatus for improving the contrast of a Bayer image according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of the structure of a device for improving the contrast of a Bayer image according to a third embodiment of the present invention.
Detailed Description
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for improving the contrast of a Bayer image according to the present invention, and the method for improving the contrast of a Bayer image according to the present embodiment includes the following steps:
101: dark primary color image data of the bottom, the middle, and the top of a pixel unit in the current Bayer image data are acquired, respectively.
Specifically, interpolation processing is carried out on current Bayer image data to obtain RGB image data after interpolation; and acquiring dark primary color image data of the bottom, the middle and the top of the pixel unit according to the RGB image data after interpolation.
In this embodiment, the minimum value in the RGB image is selected as the dark primary color image data, the bottom operation module obtains the bottom dark primary color image data of the pixel unit in the Bayer image data, the top operation module obtains the top dark primary color image data of the pixel unit in the Bayer image data, and the middle operation module obtains the part of the dark primary color image data in the Bayer image data.
102: the dark primary color image data are managed in a time-sharing mode, the integral values of the left top area TL and the right top area TR are obtained through the dark primary color image data on the top, the integral values of the left bottom area BL and the left bottom area BL are obtained through the dark primary color image data on the bottom, and an integral graph is formed.
Preferably, in order to perform integration synchronously, the top operating module and the bottom operating module are subjected to time-sharing management, the bottom operating module directly acquires Bayer image data, and the top operating module acquires Bayer image data in the cache device.
As shown in fig. 2, wherein the left top region TL201, the right top region TR202, the left bottom region BL203 and the left bottom region BL204 respectively represent the regions of the respective pixel units to the base point 205.
In this embodiment, the integral graph is implemented in an integral line manner. In a specific embodiment, as shown in fig. 3, an integral line is used to simulate and implement an integral graph function, and the integral values of the left top region TL301 and the right top region TR302 and the left bottom region BL303 and the right bottom region BR304 required for calculating the cumulative sum in the filter window are managed in a time-sharing manner by the top running module and the bottom running module in a line-sharing manner; each group of integration lines adopts 2 static memories to simulate the management of integration values in a time-sharing mode, wherein the static memories A and B correspond to the top integration lines; and static memories C and D correspond to the bottom integration lines; before the first line of data of the Bayer image data arrives, the data in the static memories A, B, C and D are cleared; when the first row data of the Bayer image data arrives, the static memory A takes the static memory B as a reference, and the integral values of (i-1, j-1) and (i-1, j) are simultaneously read from the static memory B; reading the value of (i, j-1) from the static memory A; after the integral value formula is calculated, updating the integral value (i, j) to the corresponding position of the static memory A; when the second row of data of the Bayer image data arrives, the integral data of the first row of data is stored in the static memory A at the moment; the static memory B takes the static memory A as a reference, calculates the integral value of the current row and updates the integral value into the static memory B; when the third line data of the image frame arrives, the static memory A, B switches again, the static memory a calculates the integrogram data of the current line by taking the static memory B as reference again, and updates the integrogram data to the static memory a; static memories C and D are managed in the same way as static memories a and B. And the like until the integral graph is obtained through calculation.
103: and performing comprehensive processing on the integral values of the integral map, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR to obtain the total dark primary color image data in the filtering window, and performing bilateral filtering processing on the total dark primary color image data in the filtering window to obtain the filtered dark primary color image data.
Preferably, the calculation principle of the sum of the dark primary color image data within the filter window is as shown in fig. 4, wherein Integral (i, j) is the Integral value of the sum of all pixels from (i, j) Pixel unit to the base point (0,0) (405 in the figure) stored in the Integral map, and Pixel (i, j) is the Pixel unit Integral value.
Pixel (0,0), the integral value of the position corresponding to the integral map is:
Integral(0,0)=Pixel(0,0)。
pixel (0,1), the integral value of the position corresponding to the integral map is:
Integral(0,1)=Pixel(0,1)+Integral(0,0)。
pixel (1,0), the integral value of the position corresponding to the integral map is:
Integral(1,0)=Pixel(1,0)+Integral(0,0)。
pixel (1,1), the integral value of the position corresponding to the integral map is:
Integral(1,1)=Integral(1,0)+Integral(0,1)-Integral(0,0)+Pixel(1,1)。
then, for Pixel (i, j), as shown in 401-404 in fig. 4, the integral value of the position corresponding to the integral map is:
Integral(i,j)=Integral(i,j-1)+Integral(i-1,j)-Integral(i-1,j-1)+Pixel(i,j)。
with the above results, the dark primary color image data total in the filter window is obtained by combining the integral values of the top left region TL and the bottom right region BR and subtracting the integral values of the top right region TR and the bottom left region BL, and the dark primary color image data total in the window is calculated as:
Sum=BR+TL-TR-BL (1)
(where Sum, Sum of dark primary color image data within a window; BR, integral value of right bottom region; TL, integral value of left top region; TR, integral value of right top region; BL, integral value of left bottom region)
In a specific embodiment, the radius of the filtering window is R, the size of the whole filtering window is (2R +1) × (2R +1), the distances between the bottom running module and the top running module in the window are different by (2R +1), the integral values of the left top region TL, the right top region TR, the left bottom region BL and the right bottom region BR are led into the formula (1), so as to obtain the total sum of dark primary color image data in the whole bilateral filter (2R +1) (2R +1) window, and the obtained total sum of dark primary color image data in the window is subjected to bilateral filtering primary color processing, so as to realize noise reduction processing on Bayer image data.
104: and calculating and processing the filtered dark primary color image data to obtain Bayer image data with improved contrast.
Specifically, histogram statistics is carried out according to RGB image data and a filtered dark primary color image to obtain an R/G/B image data cumulative histogram, a dark primary color image data histogram and a dark primary color image data cumulative total value; comprehensively analyzing the cumulative histogram of the R/G/B image data, the histogram of the dark primary color image data and the cumulative total value of the dark primary color image data to obtain a gain value and an atmospheric light value corresponding to the R/G/B image data; and finally, comprehensively calculating and processing gain values obtained by Bayer image data, atmospheric light values corresponding to R/G/B image data, the filtered dark primary color image and Bayer image data to obtain Bayer image data with improved contrast.
Different from the prior art, the dark primary color image data of the bottom, the middle and the top are respectively obtained through the bottom, the middle and the top operation modules in the embodiment, the sum of the dark primary color image data in the filtering window is obtained through the regional integration of the bottom and the top, and the Bayer image data after the contrast is improved is obtained through comprehensive calculation processing. By the mode, the contrast and the detail information of the image are ensured, meanwhile, the intermediate processing process is simplified, the processing delay is reduced, and the processing process of the Bayer image is perfected.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a device for improving the contrast of a Bayer image according to a first embodiment of the present invention, which mainly includes: memory manager 1 for realize the buffering of the Bayer image line data in the bilateral filtering window, memory manager 1 includes according to the direction of transmission in proper order: a storage controller 18, an arbitration manager 19; the bottom operation module (not shown in the figure) is used for acquiring bottom dark primary color image data of pixel units in Bayer image data and calculating an integral value of a left bottom area BL and a right bottom area BR according to the bottom dark primary color image data, and the bottom operation module sequentially comprises the following components in the transmission direction: the device comprises a line buffer management module 2, a color filter array interpolation module 3, a dark primary color calculation module 4 and an integral line management module 5; the top operation module (not marked in the figure) is used for acquiring the top dark primary color image data of the pixel unit in the Bayer image data and calculating the integral value of a left top area TL and a right top area TR according to the top dark primary color image data, the top operation module and the bottom operation module have the same structure, and the top operation module sequentially comprises the following components in the transmission direction: a line buffer management module 14, a color filter array interpolation module 15, a dark primary color calculation module 16 and an integral line management module 17; a middle operation module (not marked in the figure) for obtaining dark primary color image data corresponding to a Bayer image line corresponding to the middle part in the filtering window; simultaneously carrying out alignment processing on Bayer image lines and dark primary color image lines; the middle operation module is used for receiving the BL integral value of the left bottom area, the BR integral value of the right bottom area, the TL integral value of the left top area and the TR integral value of the right top area, integrating the BL, the BR, the TL and the TR values to obtain the total sum of dark primary color image data in a filtering window, and obtaining the filtered dark primary color image data after bilateral filtering calculation processing; the middle operation module comprises: the device comprises a line buffer management module 6, a color filter array interpolation module 7, a dark primary color calculation module 8, a barrel shifter 9, a bilateral filter calculation module 10 and a statistical analysis calculation module. The statistical analysis and calculation module comprises a statistical module 11, an analysis module 12 and a calculation module 13. The bottom operation module, the top operation module and the middle operation module are parallel modules and all adopt a pipeline structure.
In this embodiment, the line buffer management module (2, 6, 14 in the figure) is used to rearrange the Bayer image data before interpolation; the color filter array interpolation modules (3, 7 and 15 in the figure) are used for carrying out interpolation calculation on Bayer image data to obtain an RGB image; the dark primary color calculation module (4, 8 and 16 in the figure) selects the minimum value in the RGB image as dark primary color image data; the integral line management module (5, 17 in the figure) is used for realizing the management of integral lines corresponding to the top and the bottom in the filtering window, and 2 SRAMs are adopted for updating and storing integral values of analog dark primary color image line data; the barrel shifter 9 is used for specifying the transmission direction and displacement of Bayer image data; the bilateral filtering computation module 10 is used for implementing filtering and smoothing processing on dark primary color image data to obtain a filtered dark primary color image; the statistical module 11 is configured to perform histogram statistics on the filtered dark primary color image to obtain an R/G/B image data cumulative histogram, a dark primary color image data histogram, and a dark primary color image data cumulative total value; the analysis module 12 comprehensively analyzes the R/G/B image data cumulative histogram, the dark primary color image data histogram, and the dark primary color image data cumulative total value to obtain a gain value and an atmospheric light value corresponding to the R/G/B image data; the calculation module 13 comprehensively calculates and processes gain values obtained according to the Bayer image data, atmospheric light values corresponding to the R/G/B image data, the filtered dark primary color image and the Bayer image data to obtain Bayer image data with improved contrast; the memory controller 18 is used for caching Bayer image line data in the bilateral filtering window; the arbitration manager 19 is responsible for read-write management of Bayer image line data in multiple directions.
In one specific embodiment, Bayer image data is respectively input into the bottom operation module and the memory manager 1, and the image data is time-shared into the top operation module and the middle operation module through the memory controller 18 and the arbitration manager 19; dark primary color image data at the bottom, the middle and the top of a pixel unit in Bayer image data are processed by a line buffer management module (2, 6 and 14 in the figure), a color filter array interpolation module (3, 7 and 15 in the figure) and a dark primary color calculation module (4, 8 and 16 in the figure) in sequence to obtain respective dark primary color image data and RGB image data; the dark primary color image data at the top and the bottom realize the management of integral lines corresponding to the top and the bottom in a filter window through integral line management modules (5 and 17 in the figure), so as to obtain integral values of a left top area TL, a right top area TR, a left bottom area BL and a right bottom area BR and form an integral graph; obtaining the total sum of dark primary color image data in a filter window through integral calculation and comprehensive processing of integral values of an integral map, a left top area TL, a right top area TR, a left bottom area BL and a right bottom area BR, and obtaining filtered dark primary color image data after bilateral filtering processing of the total sum of the dark primary color image data in the filter window through a bilateral filtering calculation module 10; performing histogram statistics according to the RGB image data and the filtered dark primary color image by a statistical module 11 to obtain an R/G/B image data cumulative histogram, a dark primary color image data histogram and a dark primary color image data cumulative total value; comprehensively analyzing the R/G/B image data cumulative histogram, the dark primary color image data histogram and the dark primary color image data cumulative total value through an analysis module 12 to obtain a gain value and an atmospheric light value corresponding to the R/G/B image data; in the calculation module 13, the Bayer image data with improved contrast is obtained through comprehensive calculation processing by using the gain value obtained from the Bayer image data, the atmospheric light value corresponding to the R/G/B image data, the filtered dark primary color image, and the Bayer image data.
In an embodiment, please refer to fig. 6, fig. 6 is a schematic diagram of a device structure for improving the image contrast of a Bayer image according to a second embodiment of the present invention, an input image data format is an RGB image, a Color Filter Array Interpolation (CFAI) process is not required, the Color Filter Array Interpolation module in the above embodiment may be removed, and the RGB image data is directly obtained for subsequent processing, and a specific device structure is similar to the above embodiment and is not described herein.
In another specific embodiment, please refer to fig. 7, fig. 7 is a schematic structural diagram of an apparatus for improving the image contrast of Bayer image according to a third embodiment of the present invention, an input data image is a YUV image, a YUV format needs to be added to the RGB format converter 22 at the input, and a RGB format needs to be added to the YUV format converter 23 at the output.
The device for implementing Bayer image contrast enhancement can also be extended to real-time image processing with resolution such as RGB FHD (1920 × 1080) or UD (3840 × 2160), and is not limited herein.
The method and the device adopt a pipeline and a data parallel processing structure, simplify the intermediate processing process, reduce the processing delay and perfect the processing process of the Bayer image while ensuring the contrast and the detail information of the image. Furthermore, the method and the device of the invention convert the integral image required by bilateral filtering into an integral line mode for management, optimize the dark image, inhibit the over-bright area and complete the improvement of the integral contrast of the image.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method of improving the contrast of a Bayer image, comprising:
respectively acquiring dark primary color image data of the bottom, the middle and the top of a pixel unit in current Bayer image data;
managing the acquired dark primary color image data in a time-sharing manner, obtaining integral values of a left top area TL and a right top area TR through the dark primary color image data at the top, obtaining integral values of a left bottom area BL and a right bottom area BR through the dark primary color image data at the bottom, and forming an integral graph;
obtaining the total sum of dark primary color image data in a filter window through the integral map, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR after comprehensive processing, combining the integral values of the left top area TL and the right bottom area BR, subtracting the integral values of the right top area TR and the left bottom area BL to obtain the total sum of the dark primary color image data in the filter window, and performing bilateral filtering processing on the total sum of the dark primary color image data in the filter window to obtain the filtered dark primary color image data;
calculating the filtered dark primary color image data, and performing histogram statistics according to the RGB image data and the filtered dark primary color image to obtain an R/G/B image data cumulative histogram, a dark primary color image data histogram and a dark primary color image data cumulative total value;
comprehensively analyzing the cumulative histogram of the R/G/B image data, the histogram of the dark primary color image data and the cumulative total value of the dark primary color image data to obtain a gain value and an atmospheric light value corresponding to the R/G/B image data;
and comprehensively calculating and processing gain values obtained by Bayer image data, atmospheric light values corresponding to R/G/B image data, the filtered dark primary color image and the Bayer image data to obtain Bayer image data with improved contrast.
2. A method for improving the contrast of a Bayer image according to claim 1, wherein the integral map is implemented in an integral row manner.
3. The method of improving Bayer image contrast as set forth in claim 1, wherein the step of obtaining dark primary image data for the bottom, middle and top of a pixel cell in the current Bayer image data comprises:
carrying out interpolation processing on the current Bayer image data to obtain RGB image data after interpolation;
and respectively acquiring dark primary color image data of the bottom, the middle and the top of the pixel unit according to the RGB image data after interpolation.
4. An apparatus for improving the contrast of a Bayer image, comprising:
the storage manager is used for realizing caching of Bayer image line data in the bilateral filtering window;
the bottom operation module is used for acquiring bottom dark primary color image data of pixel units in Bayer image data and calculating an integral value of a left bottom area BL and a right bottom area BR according to the bottom dark primary color image data;
the top operation module is used for acquiring top dark primary color image data of pixel units in Bayer image data and calculating an integral value of a left top area TL and a right top area TR according to the top dark primary color image data;
the middle operation module is used for forming an integral diagram, obtaining dark primary color image data sum in a filter window through comprehensive processing of integral values of the integral diagram, the left top area TL, the right top area TR, the left bottom area BL and the right bottom area BR, carrying out bilateral filtering processing on the dark primary color image data sum in the filter window to obtain filtered dark primary color image data, combining integral values of the left top area TL and the right bottom area BR, then subtracting the integral values of the right top area TR and the left bottom area BL to obtain the dark primary color image data sum in the filter window, and carrying out calculation processing by using the filtered dark primary color image data to obtain Bayer image data with improved contrast.
5. An apparatus for improving the contrast of a Bayer image according to claim 4, wherein: the bottom run module comprises:
a line buffer management module; the Bayer image data color filtering array interpolation module is used for rearranging the interpolation data;
the dark primary color calculation module is used for selecting the minimum value in the RGB image as dark primary color image data;
the integral line management module is used for realizing the management of the integral lines corresponding to the top and the bottom in the filtering window;
the top operation module and the bottom operation module have the same structure.
6. An apparatus for improving the contrast of a Bayer image according to claim 4, wherein: the middle operation module includes:
the line buffer management module is used for rearranging a Bayer image data color filter array interpolation module before interpolation;
the color filter array interpolation module is used for carrying out interpolation calculation on Bayer image data to obtain an RGB image;
the dark primary color calculation module is used for selecting the minimum value in the RGB image as dark primary color image data;
the barrel shifter is used for specifying the transmission direction and displacement of Bayer image data;
the bilateral filtering calculation module is used for realizing filtering and smoothing processing on dark primary color image data to obtain a filtered dark primary color image;
and the calculation module is used for comprehensively analyzing and processing the dark primary color image data and the filtered dark primary color image data to obtain Bayer image data with improved contrast after calculation.
7. The apparatus of claim 4, wherein the bottom run module, the top run module, and the middle run module are parallel modules.
8. The apparatus for improving Bayer image contrast as set forth in claim 4, wherein the memory manager comprises:
the storage controller buffers Bayer image line data in the bilateral filtering window;
and the arbitration manager is responsible for the read-write management of Bayer image line data in multiple directions.
CN201711096682.0A 2017-11-07 2017-11-07 Method and device for improving Bayer image contrast Active CN107886482B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711096682.0A CN107886482B (en) 2017-11-07 2017-11-07 Method and device for improving Bayer image contrast
PCT/CN2017/117315 WO2019090909A1 (en) 2017-11-07 2017-12-20 Method and device for improving contrast of bayer image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711096682.0A CN107886482B (en) 2017-11-07 2017-11-07 Method and device for improving Bayer image contrast

Publications (2)

Publication Number Publication Date
CN107886482A CN107886482A (en) 2018-04-06
CN107886482B true CN107886482B (en) 2020-06-05

Family

ID=61779582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711096682.0A Active CN107886482B (en) 2017-11-07 2017-11-07 Method and device for improving Bayer image contrast

Country Status (2)

Country Link
CN (1) CN107886482B (en)
WO (1) WO2019090909A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129146A (en) * 2010-01-12 2011-07-20 株式会社尼康 Image pickup device
CN106504281A (en) * 2016-12-02 2017-03-15 中国电子科技集团公司第四十四研究所 The image quality for being applied to cmos image sensor strengthens and filtering method
CN106875358A (en) * 2017-02-09 2017-06-20 聚龙智瞳科技有限公司 Image enchancing method and image intensifier device based on Bayer format

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848343B (en) * 2009-03-24 2013-04-17 财团法人工业技术研究院 Image sensor with integral image output
US8160380B2 (en) * 2010-07-08 2012-04-17 Seiko Epson Corporation Bi-affinity filter: A bilateral type filter for color images
US20120328160A1 (en) * 2011-06-27 2012-12-27 Office of Research Cooperation Foundation of Yeungnam University Method for detecting and recognizing objects of an image using haar-like features
CN102938136A (en) * 2012-07-19 2013-02-20 中国人民解放军国防科学技术大学 Method for defogging single images based on Bayer formats rapidly
US9224362B2 (en) * 2013-03-14 2015-12-29 Microsoft Technology Licensing, Llc Monochromatic edge geometry reconstruction through achromatic guidance
CN105991937A (en) * 2015-03-04 2016-10-05 深圳市朗驰欣创科技有限公司 Virtual exposure method and device based on Bayer format image
CN106657948A (en) * 2017-01-18 2017-05-10 聚龙智瞳科技有限公司 low illumination level Bayer image enhancing method and enhancing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129146A (en) * 2010-01-12 2011-07-20 株式会社尼康 Image pickup device
CN106504281A (en) * 2016-12-02 2017-03-15 中国电子科技集团公司第四十四研究所 The image quality for being applied to cmos image sensor strengthens and filtering method
CN106875358A (en) * 2017-02-09 2017-06-20 聚龙智瞳科技有限公司 Image enchancing method and image intensifier device based on Bayer format

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"单幅Bayer格式图像的快速去雾方法";娄静涛 等;《国防科技大学学报》;20131231;第35卷(第6期);第109-115页 *

Also Published As

Publication number Publication date
WO2019090909A1 (en) 2019-05-16
CN107886482A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
CN113284054B (en) Image enhancement method and image enhancement device
CN109255758B (en) Image enhancement method based on all 1 x 1 convolution neural network
WO2021164234A1 (en) Image processing method and image processing device
CN110555808B (en) Image processing method, device, equipment and machine-readable storage medium
CN109785252B (en) Night image enhancement method based on multi-scale residual error dense network
CN104125410A (en) Panoramic video multi-lens exposure compensation method and device thereof
WO2019056549A1 (en) Image enhancement method, and image processing device
US20140375843A1 (en) Image processing apparatus, image processing method, and program
CN114730456A (en) Training method of neural network model, image processing method and device thereof
CN113379609B (en) Image processing method, storage medium and terminal equipment
US20100061650A1 (en) Method And Apparatus For Providing A Variable Filter Size For Providing Image Effects
CN113962859A (en) Panorama generation method, device, equipment and medium
CN115942128A (en) ISP system design and implementation method based on heterogeneous platform
CN114998122A (en) Low-illumination image enhancement method
US20140092116A1 (en) Wide dynamic range display
CN106558021A (en) Video enhancement method based on super-resolution technique
US7443428B2 (en) Image processing device
US20220070391A1 (en) Image sensor employing varied intra-frame analog binning
CN107886482B (en) Method and device for improving Bayer image contrast
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN116403200A (en) License plate real-time identification system based on hardware acceleration
CN113409196B (en) High-speed global chromatic aberration correction method for real-time video splicing
CN111242087B (en) Object identification method and device
CN113824894A (en) Exposure control method, device, equipment and storage medium
CN109903216B (en) System and method for realizing positioning image dot matrix extraction based on FPGA platform

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