Camera image processing method and camera

JP7646619B2Active Publication Date: 2025-03-17BLACKMAGIC DESIGN PTY LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
JP2022186120
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2017-06-15
Filing Date
2022-11-22
Publication Date
2025-03-17
Estimated Expiration
2038-06-13

Smart Images

  • Figure 0007646619000015
    Figure 0007646619000015
  • Figure 0007646619000016
    Figure 0007646619000016
  • Figure 0007646619000017
    Figure 0007646619000017
Patent Text Reader

Abstract

A method and camera for processing RAW image data from a digital color camera are provided. A method for processing RAW image data from a camera includes calculating 108 a luminance image 110 from the RAW image data 102 and calculating 112 at least one chrominance image 114B, 114R from the RAW image data corresponding to at least one of the sensor image colors. The luminance image and the chrominance image can represent the same color range that can be represented in the RAW image data. The chrominance image has a lower resolution than the luminance image.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing method for a camera. The filter array is used to filter out the captured image, i.e. white pixels. Different image capture devices with color filter arrays (CFAs) containing unprocessed pixels Other embodiments may also be implemented using the same configuration. [Background technology]

[0002] Digital color cameras usually use charge-coupled devices (CCDs) or complementary metal-oxide semiconductor ( It uses an image sensor, typically a CMOS (Complementary Metal Oxide Semiconductor) sensor, to electronically capture a color image of a real scene. Because image sensors are monochromatic, digital camera manufacturers use Various solutions are implemented. These solutions use one sensor per color channel. The use of three sensor devices, a vertical color-sensing photosite, or most commonly This involves the use of a single sensor device with a color filter array. One of the most cost-effective methods used for sensing is the use of a single sensor device. It is widely used in digital cameras.

[0003] In a single sensor camera, the color filter is essentially a spatial array of color filters. A color filter array (CFA) is placed in front of a single image sensor to filter out different spectra. The filters in the CFA are the same size as the photosite of a single image sensor. The photosites are spatially correlated with each other, and each photosite has a corresponding spectrally selective filter. RAW images captured by GuruSensor cameras typically have only one color per photosite. The RAW image is then converted into a series of grayscale mosaics. An image processing step is performed to generate an image that realistically depicts the captured real-world scene.

[0004] The most commonly used CFA is a vector filter with alternating red, green, and blue colors, as shown in Figure 2. Ear CFA. Since only one color type is captured at each photosite, Each captured RAW image is a "mosaic" of red, green and blue values ​​from different photosites. do.

[0005] A process known as "demosaicing" extracts the full color information of each photosite. In this process, the missing color information of the photosite is interpolated. The Bayer CFA sensor produces a three-color image. When acquiring a RAW image, the amount of raw image data increases threefold through this demosaicing process. In addition, white balance, color conversion, noise reduction, tone mapping, etc. Such a process is carried out as follows: (1) The image processing steps are performed before the camera stores the image, and the user can view the stored image. Images and videos captured can be viewed immediately on the display. Most consumer camera applications are based on R The AW image data is processed before it is stored. (2) Some of the above image processing steps can be left to post-processing. This approach is not suitable for professional use. It is more common in camera applications. Both options have their merits. And there are disadvantages.

[0006] As mentioned above, the first option is to demosaice the image. Various image processing algorithms, such as compressing image data, are used to convert the raw image from the image sensor. The major drawback of this option is that it not only results in inefficient compression, but also limits post-processing. The limitation of this post-processing is that certain color processes are already involved in the demosaicing process. applied to compressed data, certain image information may be lost in the compression process. The inefficiency of compression is due to the fact that the demosaicing algorithm This is because the amount of data required for the image to be stored is three times larger than that required for the image to be stored. This added data must be compressed more heavily to achieve smaller sizes and bit rates. It will be necessary to do so.

[0007] The second option is to encode and compress the raw image data from the image sensor, then compress it. The compressed mosaic RAW image data can be demosaiced, white-balanced, etc. This option involves storing all of the visual information captured by the image sensor. This option allows greater freedom in post-processing as the demo is reserved. Since there is no additional image data added by demosaicing, the image is This requires less compression than encoding the image. Not only image processing but also extensive processing such as full demosaicing is required at the decoding stage. become. Summary of the Invention [Problem to be solved by the invention]

[0008] The present invention aims to address at least some of the above-mentioned problems. To provide a method and / or system for processing AW image data, or at least a useful alternative. Provide steps.

[0009] A reference to prior art in a specification does not require a court to determine that the prior art is part of the common knowledge. No admission or suggestion is made that such prior art would be deemed to be prior art by those of ordinary skill in the art. It may be considered to be related to and / or combined with another part of the art. No acknowledgement or suggestion is made that any of the foregoing is reasonably foreseeable. [Means for solving the problem]

[0010] The present invention broadly provides a method for processing raw image data from a camera. Calculates the brightness image from the AW image data; calculates the image color of the sensor from the RAW image data. At least one chrominance image corresponding to at least one of the luminance and chrominance images is calculated. The luminance image can represent the same range of colors that can be represented in the RAW image data. In the specification, image or image data refers to raw image data output from an image sensor. When described as an image or image data, the image or image data is This means that the range of representable color values ​​has not been narrowed by the That is, the data range of the image or image data should be determined by the image sensor. It is not limited or cut off compared to what could have been output. Of course. What image type (luminance image, chrominance image, color planes, etc.) The entire color range that can be included in RAW image data, even if it is just image data, is included. It should be understood that it cannot be expressed by itself.

[0011] An embodiment of the present invention demosaices the sensor raw image data to obtain the Generate demosaiced images for each image, and and calculating a luminance image from the luminance image corresponding to at least one of the image colors of the sensor. The present invention further provides a method that broadly includes calculating a chrominance image having a lower resolution than the original chrominance image. The advantage is that demosaicing can be performed in a way that is optimized for the camera's image sensor. That is the thing.

[0012] In the following description, the term "color filter array" refers to a normal color filter array as well as and a filter array having a filter array arrangement comprising: Should: For example, no color filtering (no filter at all), neutral density filter, transparent of light-transmitting filter elements; Filtering with a passband unrelated to a given color (e.g. a high-pass filter, low pass filters, wide band pass filters, etc.).

[0013] Hence the concept of "color" in a color filter array or image color. refers to the filter elements of a color filter array (including related uses of the word color). It serves as an identifier of the passband that corresponds to the

[0014] In a first aspect, the present invention provides a method for processing image data of a camera, the camera comprising: an image sensor having a filter array, the image sensor including an array of photosites; Each photosite receives light of one of a number of colors in the color filter array and outputs a corresponding The method is configured to output pixel values ​​indicative of the intensity of light captured by the photosite. generating a luminance image having a first resolution representative of raw image data output from the image sensor; a second resolution lower than the first resolution representing raw image data output from the image sensor; The method may include generating at least one chrominance image having a desired image resolution.

[0015] In another aspect, the present invention provides a method for processing image data of a camera, the camera being a color configured to capture RAW image data using an image sensor having a filter array; The image sensor includes an array of photosites, each photosite being a duplicate of a color filter array. A pixel represents the intensity of light received by each of several colors and captured by the corresponding photosite. and configured to output the cell value; the method comprising: Demosaicing the captured raw image data to multiple colors on a color filter array generating a corresponding plurality of color images; Generate a luminance image having a first resolution; For each of the colors of the color filter array having a second resolution lower than the first resolution. generating at least one corresponding chrominance image.

[0016] Demosaicing is the process of generating a color image that corresponds to each color in a color filter array. Preferably, the color image for each color is at a first resolution.

[0017] Implementations of the above aspects of the invention may include various optical features.

[0018] Preferably, two or more chrominance images are generated.

[0019] In any of the above embodiments, the generation of a color image (of a predetermined color) is performed by: For a pixel, edge and line detection is performed based on a number of pixels surrounding the pixel. and determining pixel values ​​based on the edge or line detection. It may include.

[0020] Determining a pixel value involves determining the neighborhood of another pixel from which to determine the pixel value. Pixel values ​​may be determined by selecting a subset of the pixels of the image. Alternatively or additionally, weighting the pixels in the subset in which the The weighting of the pixels in the subset may be Based on the noise level applied to either the cell or a subset of pixels is also good.

[0021] Preferably, the demosaicing process compensates for missing color information based on surrounding pixel values. The information is estimated for each photosite or pixel for which it is lacking. The way the data is captured is as detailed and linear as what is captured by each color type pixel. The goal is to preserve image details that can be distinguished from random noise. At the same time, the random noise level is reduced in each image plane.

[0022] Preferably, the captured RAW image data has a resolution of NxM pixels. The image may also have a resolution of NxM pixels.

[0023] The luminance image corresponds to the same pixel location in multiple demosaiced color images. The pixel values ​​may be combined to generate a pixel value. The step of weighting includes weighting the pixel values ​​for each pixel location. In form, it is a conventional color filter with the same ratio of red, blue, and green pixels as a regular Bayer RGB CFA. When a Bayer RGB color filter array is employed, the luminance at position (i, j) is The degree value Y is calculated as follows:

[0024]

number

[0025] Here, Y(i,j) represents the luminance value at a given pixel position (i,j), and R, G, and B represent the corresponding represents the pixel values ​​of the red, green, and blue color image at the pixel location of The first resolution is the full resolution of NxM pixels.

[0026] The step of generating a chrominance image comprises calculating pixel values ​​of the raw image and pixels in the luminance image. and calculating a difference value between the luminance image values ​​of the subset of cells. The luminance image is calculated for pixels that correspond to pixels of a given color in the CFA. For example, for a camera with a single sensor and a standard RGB Bayer filter CFA: Then, blue and red chrominance images are generated. The blue chrominance image is generated by subtracting the blue pixel from the CFA. contains only pixel values ​​corresponding to the red chrominance image, and similarly for the red chrominance image. Therefore, the chrominance image is obviously lower resolution than the luminance image. RGB Bayer In the example filter, the chrominance image has 1 / 4 the number of pixels in the luminance image. , the step of calculating the difference value for each pixel (at location i,j) of the chrominance image is The following formula can be used:

[0027]

number

[0028] where kB and kR are magnifications; CB(i,j) and CR(i,j) are the blue and red difference values ​​at a given pixel location (i,j). represents the difference value of; R(i,j), B(i,j) are the red, green, and blue pixel values ​​of the pixel location (i,j) in the image. represents; Y(i,j) represents the luminance value at pixel location (i,j).

[0029] Preferably, kB and kR are set to maximize the accuracy of the data range of CB(i,j) and CR(i,j). The values ​​are chosen so as to maximize the color space while maintaining the full range of color response without constraining it. In one example where kR=kB=2, the method further comprises encoding the calculated luminance and difference values. This may include decoding and / or compressing the data.

[0030] The luminance and chrominance images may be compressed as separate images or as related images. They may be compressed together as a group. Preferably, the compression uses transform coding, e.g. For example, wavelet transform, discrete cosine transform, etc. are used.

[0031] More preferably, the compression is performed using JPEG or JPEG 2000 compression. The compression algorithm uses the calculated luminance and chrominance images directly in the compression process. It's convenient because you can use it again.

[0032] In one example, the method includes: encoding luminance values ​​and difference values ​​into a YCbCr 420 format. The method may include generating image data compatible with the printer.

[0033] In a further aspect, the present invention provides a method for processing image data of a camera, the camera comprising: an image sensor having a color filter array, the image sensor including an array of photosites; each photosite receiving light at each of a plurality of colors of a color filter array and corresponding The optical fiber 10 is configured to output a pixel value indicative of the intensity of light captured at the corresponding photosite. The method includes demosaicing captured raw image data output from an image sensor. A plurality of color filters representing the raw image data and corresponding to the plurality of colors of the color filter array. generating an image, the demosaicing process comprising: A color image corresponding to each color of the color filter array is generated, and each pixel of the color image is The surroundings of said pixel of the captured raw image data are mosaiced to a cell. performing at least one of edge and line detection based on the plurality of pixels of the Selecting a subset of pixels around a given pixel based on edge or line detection determining pixel values ​​by calculating a pixel value for the subset of pixels; Calculate the weighted average of pixels in the same pixel as the pixel.

[0034] The weighting of the pixels of the subset is determined by the weighting of the pixels in the subset. Preferably, the noise level is determined based on a noise level that may be applied to any of the subsets of cells. I wish.

[0035] Preferably, each color image represents raw image data output from an image sensor. The method further comprises generating a luminance image representative of the raw image data output from the image sensor; Generate at least one chrominance image representative of the raw image data output from the sensor. Preferably, at least two chrominance images are generated. In an aspect, the present invention is configured to carry out an embodiment according to any of the above methods. A camera comprising: an image capture system configured to convert the received light into raw image data; An image processing system configured to process RAW image data according to the method described above. include.

[0036] As used herein, the term "comprises" and its variant form "comprises" include "sing," "comprises," "comprised," etc. are words that are required by the context. Exclude further additives, components, integers or steps if not required is not intended.

[0037] Further aspects of the disclosure and further embodiments of the aspects described in the preceding paragraphs include This becomes apparent from the following description, given by way of example only and with reference to the accompanying drawings, in which: [Brief description of the drawings]

[0038] [Figure 1] FIG. 1 is a schematic block diagram of a camera capable of implementing the methods described herein. [Diagram 2] A typical CFA arrangement and corresponding image are shown, which are applied to a sensor with a resolution of NxM pixels. [Diagram 3] 1 is a flow chart outlining an exemplary method. [Figure 4] 3 depicts a series of fully demosaiced image planes corresponding to images captured by the sensor arrangement of FIG. 2. [Diagram 5]Represents a set of first order central differences used for edge detection in the pixel value determination process. [Figure 6] represents a set of second order central differences used in thin line detection when performing pixel interpolation. [Figure 7] 3 illustrates a series of pixel pairs that can be used for pixel averaging when demosaicing an image captured by the sensor arrangement of FIG. 2. [Figure 8] 3 illustrates a further series of pixel pairs that can be used for pixel averaging when demosaicing an image captured by the sensor arrangement of FIG. 2. [Figure 9] 4 is a flow chart outlining an alternative method to that of FIG. 3. [Figure 10] The embodiment of FIG. 9 illustrates the use of a 3x3 filter kernel to derive a luminance image and a 5x5 filter kernel to calculate a chrominance image. [Figure 11] The embodiment of FIG. 9 illustrates alternative filter kernels that can be used to derive the full resolution luminance image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0039] Although the embodiments of the present invention will be described with reference to specific examples, the scope of the invention is not limited to such examples. For example, a typical RGB Bayer color filter array may be used as an embodiment. However, in this invention, a single sensor is used for the camera. The disclosed embodiment includes "white", neutral density, or unfiltered pixels in the array. The present invention also applies to the use of other color filter arrays, including color filter arrays including

[0040] FIG 1 is a schematic diagram of a camera 10 capable of implementing the method according to the present disclosure. The image capture system 12 converts the captured light into raw image data. The capture system 12 is associated with an image sensor 12A (e.g., a CCD or CMOS image sensor chip, etc.). The associated optical filter 12B (e.g. an IR cutoff filter or optical low An optical system 14, e.g. a lens, is also provided above the image sensor. The image sensor is provided in the form of a spatial array of color filters, A color filter array is placed in front of the image sensor chip to enable color image capture. The filter in the CFA is a single image sensor photo site and a spatial Each photosite has a corresponding spectrally selective filter. Thus, the CFA used in this embodiment has red, green, and blue arranged alternately as shown in FIG. The Bayer CFA is a type of color filter that uses a single color filter. Since each photosite captures only one color type, The RAW image captured is a "mosaic" of the red, green and blue values ​​of each different photosite. It is.

[0041] Figure 2 shows the filter element arrangement and the resulting RAW image frame output by the sensor. The raw image data is stored in an NxM array of photosites on the image sensor. Each photosite has a resolution of NxM pixels corresponding to a corresponding filter element. The CFA has a filter that receives light at each of the multiple colors and converts the captured light into a The output is a pixel value that represents the intensity of the light captured at each photosite. In Figure 2, the R, G, and B are the same. Usually, "R" stands for red pixel and "G" stands for green pixel. The "B" represents a blue pixel.

[0042] The sensor raw video data generated by the image capture system 12 is fed to an image processing subsystem The image processing subsystem 18 may be implemented using an ASIC, FPGA, or related software. A processor that includes one or more processors, such as a microprocessor with embedded software, and performs a series of image processing tasks. The image processor 16 may perform tasks including, but not limited to, the following: Correction of unwanted optical effects such as pincushion distortion, demosaicing of Bayer mosaic images , noise reduction, e.g. pixelization of captured video data by dead pixel removal, Correction of cell-to-cell variations, correction of conversion efficiency variations. The working memory 20 is used for image processing and / or image Provided for temporary storage of data and software while performing image compression and other tasks. can be.

[0043] The image processing subsystem 18 further includes a video encoding system 22. The video encoding system 22 may include a processor that implements one or more video codecs. The system is implemented by providing software configured to enable a video Used to encode and selectively compress data into a desired format. For example, The video encoding system 22 encodes the video data in any known video data format. It can be set to encode the signal into a matte.

[0044] The image processing subsystem 18 further processes the video output data and transmits it to the video transmission system 2. 6. In addition, the video transmission system 26 is compatible with one or possibly several video transmission protocols. The format conversion system 2 is set to transmit only video data that matches the 4 converts the video data into the video transmission format before being sent to the video transmission system 26. This allows the transmission of video data in one of its original formats. The video transmission system 26 transmits the data to a suitable video transmission format (one of the formats). This includes decoding.

[0045] The video transmission system includes a video interface having at least a video output port. The video output data is operable to be transmitted (and selectively received) via the video The video interface can operate bidirectionally and therefore also includes a video input port. The video interface can be an SDI interface or other similar interface. It may also be a chair.

[0046] The camera further includes a data storage system in the form of a memory control subsystem 28. The memory control subsystem stores the video data ( and any other data). Memory 30 uses removable memory such as memory cards and removable hard disks. However, typically the memory control subsystem 28 is a local memory 3 0 and arranged to transmit and / or receive bidirectional control signals to Controls the storage and retrieval of 30 video data, and also encodes the data for storage. The memory 30 supports the Serial ATA protocol. Therefore, it may be a solid state drive that operates, and the memory control subsystem The system controls the operation of the Serial ATA drive and reads data from and to the memory 30. Manage your logins and writes.

[0047] FIG. 3 shows a schematic method for processing RAW video data according to an embodiment.

[0048] The method 100 includes the steps of: We start with the sensor image data 102. In the preferred embodiment, the raw sensor data is mostly These are unprocessed sensor data. RAW data is the data captured by the sensor. The color range is maintained without any restrictions or cuts. White and color balance are not processed. It is applied after decoding the processed data, for example in post-production. The raw sensor image data 102 is demosaiced (104) to produce Generate sized images 106R, 106G, and 106B (color planes) Each image 106R, 106G, 106B corresponds to one of the CFA colors. Then, the luminance Image 110 is calculated from demosaiced images 106R, 106G, and 106B. Then, one or more chrominances corresponding to at least one of the sensor image colors are detected (108). The demosaicing 104 generates the first resolution demosaicing images 114B and 114R (112). Typically this is done using the full set of captured image data (NxM pixels). The luminance image 110 is also the normal demosaicing images 106R, 106G, and 106B. whereas the chrominance images 114B, 114R are usually of lower resolution. Then an encoding step 116 is performed in which the luminance and chrominance images are, for example, compressed or encoded. is formatted and encoded for further use (e.g., storage, transmission, display, etc.). The output data of the encoding step can be handled and processed by known tools. It is advantageous for these steps to be conformable to a common standard format so that An example implementation of each of these steps is provided below. In the preferred embodiment, this process is Through this, image data is captured without limitations or color variations that exceed the color range captured by the sensor. It is preferable to save the data without being copied. This makes it possible to save the data as if it were a RAW image. Like image data, it can be effectively handled in downstream processing.

[0049] (Demosizing 104) Demosaicing is done by converting a single, multi-color, mosaic-like raw image data102 into It is understood that the CFA generates respective images 106R, 106G, and 106B for each color. Thus, each final color image 106R, 106G, 106B is a representation of the first captured contains more pixels for each color than the original, and therefore less defects in each color image. Interpolation is then required to estimate the pixel values ​​that are being used. The formats of the single color images 106R, 106G, and 106B are shown. has a resolution of NxM pixels.

[0050] In the embodiment, the demosaicing process selected is To preserve detail and reduce noise that may be captured by the image sensor It is optimized to

[0051] The demosaicing process is based on weighted interpolation. However, it is not enough to simply Rather than calculating the "missing" pixel values, preferably the same pixel value determination process is executed at every photosite (i,j) to generate three color images 106R, 106G, and 106B. Thus, even if color values ​​captured at a particular photosite are available, Pixel value calculations are valid for all colors (of the CFA) and at all positions. This allows the noise distribution to be balanced across all photosites. This allows the two green frames of the 2x2 Bayer macropixel to be used in a three-color Bayer CFA. This allows compensation for deviations between photosites.

[0052] A brief overview of the pixel calculations used in demosaicing is: (a) detecting edges and / or thin lines based on the pixels surrounding a pixel value to be determined; and / or (b) Using edge / thin line information to select or weight the contributions from surrounding pixels for the interpolation Perform the search.

[0053] This process preserves edges and shapes in the intermediate (demosaic) image data. Step (a) is edge-sensitive at various angles so that the different color filters This is done by calculating the gradient (first order difference) at different angles in the data pattern. The primary center of the blue photosite (Fig. 5(a)) or the blue photosite (Fig. 5(b)) at position (i,j) In both cases, the central differences are mutually opposite to each other for the (i,j) position. The difference between two photosites of the same type is calculated in four directions. is calculated as follows:

[0054]

number

[0055] These are the absolute values ​​of the central differences in the horizontal, vertical, and diagonal directions. Regardless of the color type of the origin, the position of any photosite is determined based on the photosite P(i,j) at the origin. It is calculated at position (i,j).

[0056] These gradients are calculated in a 3x3 window to determine the edge direction at any position (i,j). while second-order differences are calculated in a 5x5 window as a means of detecting lines in different directions. Figure 6(a) and (b) show the second-order differentials in the four directions for the green and blue photosites, respectively. These differences are calculated as absolute differences:

[0057]

number

[0058] First order central differences are calculated at four different angles for any central pixel location, i.e., color type. The second order central difference is used to detect edges. The same four different angles are used to detect thin lines. The alignment provides information about both edge and fine line image details at four different angles. The combination of both detector types adds two absolute differences for different angles as follows: This can be achieved by calculating:

[0059]

number

[0060] This is the first set of angle detectors for horizontal, vertical, up-down and diagonal directions. The set gives another set of four angles: the vertical (or horizontal) direction and the surrounding diagonal directions. The angle detector determines the angle direction with the smallest difference. It provides information and is used to determine the direction of averaging.

[0061] In step (b), these sets of angle detectors are used to calculate each color value 106R,10 Determine how to combine the surrounding pixel values ​​to calculate 6G and 106B. The pixel average values ​​are either selected or weighted. Each pair has the following characteristics: The pixels are equidistant from the central pixel; The pixel is diametrically opposed from the central pixel; The pixels are at different angles around a central pixel within a 5x5 window; A pixel has a corresponding edge / line detector or has two edge / line detectors. It is determined by the combination.

[0062] In FIG. 7(a), the blue color value needs to be determined based on the green photosites. Three different pixel averages are calculated for pixels in a 5x5 window centered on a green photosite. These three averages are calculated as follows:

[0063]

number

[0064] Another example in Figure 7(b) is used to calculate a red color value based on blue photosites. Two different photosite averages are involved in this case and calculated as follows:

[0065]

number

[0066] The corresponding angle edge detector determines the weighting for each of the averages to estimate each color value. Used to set the color and preserve any edges or thin lines. The weighting coefficient w() for each direction of the pixel average value is derived from the first and second differences in a specific direction. In general, a higher weight is assigned to a direction that has a lower difference in that particular direction. The weighting factor ranges from 0 to 1 depending on the absolute difference. The weighting function is such that, at a particular response level of a photosite, if the difference is below the noise threshold, The maximum weight is assigned to the difference. Once the difference exceeds the noise threshold, the weight is gradually decreased. Large differences in a particular direction result in zero. The weight function can be used, but the method is not limited to a specific function. A suitable weighting function that can be used in the embodiment is As shown in the formula:

[0067]

number

[0068] where D is the weighted difference value and σ is the sensor noise at the pixel signal level. Represents the standard deviation of the distribution.

[0069] Figure 7(b) shows how to calculate the red color value at the blue photosite. The photosites are located diagonally opposite each other from the center. In this case, the 5x5 window The pixel values ​​in the pixel area are determined by the following formula:

[0070]

number

[0071] This example uses only the first-order gradient edge detector. The weight function w() is also the absolute value of the first and second-order differences. is added to the sum of w( ) is always greater than 0 to avoid division by 0. The scheme for determining the blue pixel value is similar, but with red photosites dominating. The position is shifted as shown.

[0072] Figure 7(a) shows three different directions for calculating the blue color value at the green photosite. However, two of them do not exactly match the four directions of the first and second order differences. The corresponding edge and line detector D12h is used, while the pixel average values ​​M2a, M2b are used. No, it's not.

[0073] For FIG. 7(b), the function of pixel value determination follows the same principles as above.

[0074] Figure 7(c) shows the red light from green photosites in a 5x5 pixel region surrounding the central photosite. This shows which pixel pairs can be averaged to calculate the pixel value. ) and rotated 90 degrees from Fig. 7(a). Fig. 7(d) shows the central photodetector. The green pixel value is calculated by averaging the blue photosites in a 5x5 pixel area surrounding the This shows pixel pairs that can be equalized, determining the green pixel value for a red photosite. The scheme for calculating the luminance is similar, except that the red photosite is repositioned to be in the center. do.

[0075] The pixel value determination process, which averages a number of pixels, helps reduce random noise in the image. The absolute difference in each direction is useful to estimate the expected difference caused by random noise. Image sensors are well known for certain camera designs and can be compared for any particular Characterize a mode or configuration for its noise performance over a range of output signals This allows the standard deviation of random noise to be constant at any signal response level. The function to convert the output signal of the image sensor can be determined. This allows the The algorithm performs perfectly at any pixel position with any signal level (digital value) of the cell. A fixed weighting function can be used for the pairwise differences. This weighting function reduces the random noise component gives a smooth cutoff for the maximum expected deviation from At any angle that shows an absolute difference lower than the noise level, The direction also allows using the average of two pixels in that direction. The noise is reduced by including more pixels in the applied low-pass filter. The same principle applies to color type pixels captured at a given location. Noise is weighted by increasing the number of noise detectors along with the pixels being averaged. Increasing the window size of the low-pass filter reduces noise in this approach. You will also find that it increases your ability to reduce noise.

[0076] Figure 8(a) shows the green photosite at the origin using a 5x5 pixel region surrounding the green photosite at the origin. represents the possible pixel pairs that can be averaged to calculate the green pixel value at a site. Figures 8(b) and 8(c) show pairs for blue and red photosites, respectively. In the case of Figure 8(c), the pixel values ​​are calculated appropriately as follows:

[0077]

number

[0078] In this case, the difference is large in all directions, or the difference is small in the direction below the noise level. If the pixel value at the origin is averaged with the surrounding pixels, then the value of the pixel at the origin characterizes the weighted sum. A similar calculation of pixel value is done for the blue pixel value when P(i,j) is the blue photosite. The value for the green photosite is calculated as follows:

[0079]

number

[0080] The method used in the preferred embodiment captures pixels of each color type. The goal is to preserve image detail that is as fine as the original and distinguishable from random noise. It is preferable to maintain edge detail and random noise levels for each image processor. It is reduced in the lane.

[0081] (Calculation of brightness image 110) The luminance image is a representation of the same pixel position of each of the multiple demosaiced color images. The pixel values ​​are generated by combining multiple pixel values ​​corresponding to the pixel positions. The step of combining pixel values ​​includes weighting the pixel values ​​for each pixel location. If a conventional Bayer RGB color filter array is used, then the positions (i,j ) is calculated as follows:

[0082]

number

[0083] Here, Y(i,j) represents the luminance value at a given pixel position (i,j), and R, G, and B represent the corresponding The red, green, and blue color image pixel values ​​at the pixel location are displayed. The luminance image is used for demosaicing. The weighting chosen is to simplify and efficiently compute the Note that the representation approximates a luminance representation that can be encoded efficiently. However, Coefficients can also be used.

[0084] In the preferred embodiment, the encoded data is directly converted into a realistic color image. It seeks to represent the RAW image sensor data rather than a color-modified representation that is color-coded. The luminance image allows the full range of captured colors to be preserved for post-processing. The coefficients are selected.

[0085] (Calculation of Chrominance Images 112) The step of generating a chrominance image 112 is performed by dividing the pixels of one color plane and the This includes calculating the difference between corresponding luminance values ​​of the pixels. The color pixel value and the luminance image value at the pixel corresponding to the pixel of a given color in the CFA. In this case, the blue pixels are captured relative to the pixels being captured. chrominance image pixels are generated to produce a chrominance image for the blue channel. Therefore, the blue chrominance image contains only pixel values ​​that correspond to the blue pixels of the CFA. is also true for the red chrominance image. Therefore, the chrominance image is In the RGB Bayer filter example, the chrominance image is In this example, if the CFA is of color type X=3, , a chrominance image of X-1 is generated. Generally, this is sufficient. The protocol allows for additional or more accurate representation of the spectral content of the captured light. In such a case, the system stores the chrominance image of X-1 and Maintains a large amount of available color information. Includes 3 color filters plus a white / transparent filter If included in the CFA, this leads to X=4, meaning that one color in the scene is primarily responsible for luminance information. If the chrominance image of X-2 is generated, then the chrominance image of X-2 can be generated. For example, this is R, This can be achieved by weighting the G and B components to generate a first luminance image Y, which is white / transparent. This is comparable to the second luminance image Y2 captured directly by the filter. The images are then combined into a single luminance image for encoding.

[0086] In a preferred embodiment, the color difference value for each pixel (location i,j) in the chrominance image is calculated. The step of extracting the value uses the following formula:

[0087]

number

[0088] where kB, kR are magnifications; CB(i,j) and CR(i,j) are the blue and red difference values ​​at a given pixel position (i,j). represents; R(i,j), B(i,j) are the red, green, and blue color image pixels at pixel location (i,j). Represents the cell value; Y(i,j) represents the luminance value at pixel location (i,j).

[0089] Preferably, the data range of CB(i,j) and CR(i,j) should be set to maximize accuracy. Specifically, kR and kB are selected to keep CB(i,j) and CR(i,j) within the range. In one example, kR = kB = 2.

[0090] (Encoded 116) After generating the luminance image 110 and the chrominance images 114R and 114B, these images are The image is transmitted and stored. This involves compression, formatting, and other aspects of use and storage. For example, the resulting luminance image 11 may include data encoding for The luminance and chrominance images 114R, 114B can be compressed. Techniques (e.g. discrete cosine transform (e.g. JPEG) and wavelet transform (e.g. JPE The compression method selected may be implemented using techniques based on the luminance image. Image 100 and chrominance images 114R, 114B can be processed completely separately. However, they should be handled in a general way. In particular, they should not be compressed using JPEG, Compression is performed using well-known techniques including color space conversion such as EG2000 as part of the It is effective to

[0091] Advantageously, the relative resolution of the luminance image 110 and the chrominance images 114R, 114B The spatial alignment of the images and their pixels in this embodiment is then used for subsequent processing. This means that the image data can be processed as YCbCr420 image data in It uses well-known built-in compression and transmission protocols without modification. Cut.

[0092] This method uses different image formats for further image processing of YCbCr420 images. This may include decoding the YCbCr420 image data and converting it to and converting it back to an RGB image format. The RGB value for is produced by the following calculation:

[0093]

number

[0094] where (i,j) is the pixel location. This process Perform a restore.

[0095] The method further includes displaying the decoded video data and demosaicing the color image. This may include image reconstruction.

[0096] However, as we have seen from the above, the chrominance image is There are too few pixels to do this at 100 degrees. So if you need full resolution data requires generating additional pixel values ​​for the chrominance image by interpolation. Since chrominance components generally do not have high spatial frequencies, this is a simple bilinear It can be an interpolation.

[0097] This embodiment has several advantages over camera-based data processing. The first of these is The advantage is that the raw image data is converted to a value that substantially maintains the data range of the sensor raw data. Encode and give you full freedom to apply color transformations and tone mapping in post-processing and relatively good (compared to the demosaiced raw data) Furthermore, the final data can be compressed to the existing RAW file format. It fits the flow while reducing the level of processing required at the RAW decode stage, thereby The goal is to speed up workflow and improve handling of large amounts of image data.

[0098] It is desirable to use a compression codec and a 3D image sensor to perform the majority of the demosaicing in the camera. Not only for the desired compression ratio, but also for the camera's specific image capture sensor and its noise characteristics. This also makes it easier to adapt the demosaicing algorithm.

[0099] FIG. 9 illustrates an alternative method to that of FIG. 3 for processing RAW video data. 0 is a mosaic processed multi-color image format with a resolution of NxM pixels. It starts with AW sensor image data 102. In the preferred embodiment, most of the RAW sensor data is Most of the raw data is unprocessed sensor data. The captured color range is maintained without any limitations or cuts. In the process of Figure 9 The raw sensor image data 102 is demosaiced before the luminance and chrominance images are calculated. Instead, in step 108, a suitable filter kernel 900 is used Then, the luminance image is calculated directly from the mosaic processed image. In the filter, one or more of the chrominance images 114B, 114R are filtered using a suitable filter kernel 902. It is generated using

[0100] Fig. 10 shows a mosaic image captured by an image sensor equipped with a conventional Bayer CFA. From image 1000, a luminance image 1004 and two chrominance images 1008.B, 1008 The process of generating .R is shown below. The values ​​of the luminance image Y are the same as those in Figure 3. The ratios shown below are In the ratios, "AND" represents a combination of R, G, B values: Y=(R+2G+B) / 4 In the example of Figure 3, CB(i,j) and CR(i,j) are (BY) / kB and (RY ) / kR, but in this example, the chrominance images Cb and Cr are calculated as (BG ) / kB, (RG) / kR. That is, the chrominance image has no difference with the luminance image. However, there is a difference for the green value.

[0101] In this example, each pixel value of the luminance image 1004 is filtered using the 3x3 filter card shown in FIG. The filter kernel 1002 is used to generate the filter covered by the filter. The weighting factor applied to the weighted sum of pixel values ​​centered around the photosite that produces the pixel value The sum is divided by 16 to bring the value back into range. The filter uses simplified coefficients to approximate a two-dimensional Gaussian filter of a certain width. The method can also be implemented with more complex filters to improve the frequency response towards the goal. An example is shown in Figure 11.

[0102] To calculate the Cb and Cr values ​​1008B and 1008R, use a 5x5 filter kernel. To calculate the Cb value, the filter kernel 1006 is applied to each blue photosize The weighted sum is applied to the filter to calculate the pixel value. The division is performed to put each pixel value into a range to obtain the final pixel value.

[0103] Image 1000 mosaiced by filter kernel 1006 to obtain the Cr value. is applied to each red photosite to obtain the pixel value corresponding to the Cr pixel value at that location as described above. Each weighted sum is divided by 32 (the filter weighted sum) to calculate each pixel value. The pixel values ​​are then input into a range to obtain the final pixel values.

[0104] As in the previous example, the resolution of Cb and Cr is one-fourth of the resolution of the luminance image.

[0105] As can be seen, the filter width from the edge of the mosaic processed frame 1000 It is necessary to calculate pixel values ​​for photosites that are closer than half.

[0106] Figure 11 shows an alternative 2D Gaussian kernel that can be used to replace kernel 1002 in Figure 10. 11 shows an unfilter kernel 1102. As will be appreciated, such a filter kernel The pixel value calculated using is divided by 512 (the sum of the filter coefficients). As can be seen, the alternative filter kernel 1102 covers a 9x9 region. Therefore, this filter achieves greater noise reduction than the 3x3 pixel kernel 1002. In some embodiments, one or more characteristics of the image frame being processed (e.g., frame Based on the noise level of a given region (filter kernel 1002, 1102, etc.), It may be possible to select a preferred filter kernel (from the kernels above).

[0107] Returning to FIG. 9, an encoding step 116 is performed to encode the luminance and chrominance images. For further use (storage, transmission, display, etc.), As noted above, in a preferred embodiment, the implementations described herein The frame resolution ratio of the Y, Cr, and Cb frames in this example is YCbCr 4:2:0 format. The encoded image data is suitable for encoding as a matrix. It is most desirable to maintain the color range captured by the scanner, and the color range is not limited or cut. This ensures that the data is effectively processed downstream just as if it were RAW image data, without being Make it possible.

[0108] The invention disclosed and illustrated in this specification is not limited to the invention described or illustrated in the text or drawings. It will be understood that the present invention covers all possible combinations of two or more of the individual features apparent from the claims. All of these different combinations constitute various alternative aspects of the present invention.

Claims

1. 1. A method of image processing for a camera, the camera comprising an image capture system configured to convert received light into raw image data in the form of a mosaicked plurality of color images, the image capture system including an image sensor with a color filter array, the image sensor including an array of photosites spatially correlated with filters of the color filter array, each photosite having a corresponding spectrally selective filter and configured to receive light at each of a plurality of colors in the color filter array and output pixel values ​​indicative of an intensity of captured light, the method comprising: sending the raw image data to an image processing subsystem configured to perform a range of image processing tasks including encoding the raw image data into a desired video data format; Prior to the encoding, the image processing subsystem: generating a luminance image from the raw image data by calculating a luminance value for each photosite by applying a first filter kernel to central pixel values ​​of the photosites, the first filter kernel representing a weighting applied to a weighted sum of pixel values ​​covered by the first filter kernel, the luminance image having a first resolution; generating a first chrominance image from the raw image data by applying a second filter kernel to a central pixel value of each photosite having a pixel value of a first color in the color filter array, the pixel values ​​in the first chrominance image comprising a difference between a pixel value of the first color in the color filter array and a pixel value of a second color in the color filter array; generating a second chrominance image from the raw image data by applying the second filter kernel to a central pixel value of each photosite having a pixel value of a third color in the color filter array, generating a second chrominance image, the pixel values ​​in the second chrominance image comprising a difference between a pixel value of the third color in the color filter array and a pixel value of the second color in the color filter array; the first color is red (R), the second color is green (G), and the third color is blue (B); The second filter kernel is (R−G) / kR generating pixel values ​​in the first chrominance image comprising a weighted sum of pixel values ​​representing The second filter kernel is (B-G) / kB generating pixel values ​​in the second chrominance image comprising a weighted sum of pixel values ​​representing A method wherein kR and kB are constants selected such that the color range of the raw image data is maintained in the luminance image, the first chrominance image, and the second chrominance image.

2. The method of claim 1 , wherein the luminance image represents a combination of the first, second and third colors in a 1:2:1 ratio.

3. The method of claim 1 or 2, wherein the first filter kernel approximates a Gaussian filter.

4. 4. The method of claim 1, wherein the first filter kernel has a first size and the second filter kernel has a second size different from the first size and larger than the first size.

5. the first and second chrominance images having a second resolution lower than the first resolution, and optionally the raw image data has the first resolution; and / or A method according to any one of claims 1 to 4, wherein the first and second chrominance images have a second resolution which is a quarter of the first resolution.

6. applying the first filter kernel to pixel values ​​of centers of the photosites includes processing image frames of the raw image data; The method of any one of claims 1 to 5, further comprising selecting the first filter kernel from a plurality of filter kernels based on one or more characteristics of the image frame being processed.

7. 7. The method of claim 1, further comprising: bringing the luminance image, the first and second chrominance images into range by dividing them by a sum of their respective filter coefficients, by the image processing subsystem.

8. 8. The method of claim 1, further comprising: generating encoded image data by encoding, by the image processing subsystem, the luminance image, the first and second chrominance images.

9. The method of claim 8 , wherein the encoding comprises compressing at least one of the luminance image and one or more of the first or second chrominance images.

10. 9. The method of claim 8, wherein said encoding comprises formatting said luminance image and said first and second chrominance images into a YCbCr420 format.

11. A method according to any one of claims 8 to 10, wherein the encoded image data preserves the range of colours captured by the image sensor.

12. A camera including an image capture system and an image processing subsystem configured to carry out the method of any one of claims 1 to 11.

Citation Information

Patent Citations

  • Device and method for interpolating pixel

    JP1998164602A

  • Method, apparatus, and program for information processing , and storage medium for storing program

    JP2004289450A

  • Image processor

    JP2005006061A

  • Color separation processing circuit, color separation processing method, program, and digital camera

    JP2005072786A

  • Device, method, and program for judging image condition

    JP2006135523A