Shading correction method and shading correction device
The shading correction method addresses overcorrection and vignetting issues by calculating correction parameters excluding areas with no incident light and filtering to prevent overcorrection, enhancing image quality and detection accuracy.
Patent Information
- Application Number
- JP2024085666
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-12-09
AI Technical Summary
Conventional shading correction methods result in overcorrection and degradation of image data when applied to imaging devices with lenses with image circles smaller than the light receiving surface, causing vignetting and unnecessary brightening of the outside of the image circle.
A shading correction method that calculates correction parameters by excluding areas with no incident light due to lens vignetting and performs shading correction based on these parameters, using a threshold value to determine the presence of light and filtering to avoid overcorrection.
The method suppresses image data degradation by preventing overcorrection and unnecessary brightening, improving the quality of the corrected image data, minimizing the impact of vignetting areas, and making it easier to detect dust or dirt on the lens.
Smart Images

Figure 2025178834000001_ABST
Abstract
Description
[Technical Field]
[0001] In particular, the present invention relates to a shading correction method and a shading correction device for correcting aberrations in captured image data. [Background technology]
[0002] 2. Description of the Related Art Conventionally, there have been imaging devices that use imaging elements such as a CCD (Charge Coupled Device) image sensor and a CMOS (Complementary Metal Oxide Semiconductor) image sensor. In addition, as an image processing method for correcting images captured by this imaging device, there is a shading correction technique that uses digital signal processing to correct brightness and color variations caused by imaging conditions such as sensitivity variations in the optical system and imaging element, and the directionality of the light source.
[0003] As a conventional shading correction method, Patent Document 1 describes a shading correction method for removing two-dimensional deviations. The technology in Patent Document 1 provides two-dimensional correction block data in the horizontal and vertical directions, smooths the two-dimensional correction block data using a two-dimensional filter, performs shading correction on the video signal using the processed signal, and stores the state of the vertical filter.
[0004] Furthermore, Patent Document 2 describes a shading correction method that prevents degradation of the screen edges due to filters. The technology in Patent Document 2 provides correction data in which dummy block data that is continuous with correction block unit data at the screen edges and that is within the blanking period of the video signal is added, and the correction data is input to a digital filter, and the video signal is shading-corrected using the output processed by the digital filter. Hereinafter, these conventional shading correction techniques will be referred to as "conventional techniques."
[0005] On the other hand, in a typical combination of an imaging device and a condenser lens, the size of the sensor adapted to the condenser lens is larger than the size of the light receiving surface of the imaging element incorporated in the imaging device. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Laid-Open No. 2007-116724 [Patent Document 2] Japanese Patent Application Laid-Open No. 2003-116052 Summary of the Invention [Problem to be solved by the invention]
[0007] However, depending on the application of the imaging device, such as when attaching special lenses for microscopes or endoscopes, or lenses with different compatible sensor sizes to the imaging device, it may be necessary to attach a lens with an image circle smaller than the light receiving surface of the imaging element. In such cases, when shading correction is performed using conventional techniques, lens vignetting causes overcorrection of the correction curve when generating correction parameters, resulting in degradation of the corrected image data, such as the vignetting of the outside of the image circle becoming unnecessarily bright.
[0008] The present invention has been made in view of the above circumstances, and has as its object to provide a shading correction method that suppresses degradation of image data and solves the above-mentioned problems. [Means for solving the problem]
[0009] The shading correction method of the present invention is a shading correction method for correcting aberrations in captured image data, wherein the image data is captured by an imaging device in which the compatible sensor size of the focusing lens is smaller than the light receiving surface of the imaging element and lens vignetting occurs, and the shading correction method calculates correction parameters for shading correction by excluding areas where there is no incident light due to lens vignetting, and performs shading correction based on the calculated correction parameters. The shading correction method of the present invention is characterized in that the presence or absence of incident light is determined based on a threshold value of the video level in the image data. The shading correction method of the present invention is characterized in that the calculated correction parameters are further filtered to generate a correction curve that is free from overcorrection, and shading correction is performed using the generated correction curve as correction based on the correction parameters. The shading correction method of the present invention is characterized in that the correction parameters in the area where lens vignetting is present are made equal to the correction parameters in the central area, so that degradation of the correction curve due to filtering processing occurs only in the area where lens vignetting is detected. The shading correction device of the present invention is a shading correction device that corrects aberrations in captured image data, wherein the image data is captured by an imaging device in which the compatible sensor size of the focusing lens is smaller than the light receiving surface of the imaging element and lens vignetting occurs, and is characterized by comprising: a parameter calculation unit that calculates correction parameters for shading correction by excluding areas where there is no incident light due to lens vignetting; and a shading correction processing unit that performs shading correction based on the correction parameters calculated by the parameter calculation unit. [Effects of the Invention]
[0010] According to the present invention, even when the image data is captured by an imaging device in which the compatible sensor size of the condenser lens is smaller than the light receiving surface of the imaging element and lens vignetting occurs, a shading correction method can be provided that can suppress degradation of image data such as overcorrection of the correction curve due to lens vignetting and unnecessarily brightening of the vignetted parts by excluding areas where there is no incident light due to lens vignetting to calculate correction parameters for shading correction and performing shading correction based on these. [Brief explanation of the drawings]
[0011] [Figure 1] 1 is a system configuration diagram showing a schematic configuration of a camera according to an embodiment of the present invention; [Figure 2] 2 is a block diagram showing a control configuration of a shading correction processing unit shown in FIG. 1. FIG. [Figure 3] 10 is a flowchart showing the flow of shading correction processing according to an embodiment of the present invention. [Figure 4] 1 is a conceptual diagram of pre-corrected image data according to an embodiment of the present invention; [Figure 5] 4 is a conceptual diagram of each signal in the shading correction processing shown in FIG. 3. [Figure 6] FIG. 4 is a conceptual diagram of image data after correction by the shading correction processing shown in FIG. [Figure 7] 10 is a flowchart showing the flow of conventional shading correction processing. [Figure 8] 8 is a conceptual diagram of each signal in the conventional shading correction process shown in FIG. 7. [Figure 9] FIG. 8 is a conceptual diagram of image data after correction by the conventional shading correction process shown in FIG. 7. DETAILED DESCRIPTION OF THE INVENTION
[0012] <Embodiment> Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a schematic configuration of an imaging device 1 according to this embodiment. The imaging device 1 is an optical camera and a device that performs digital signal processing (image processing) of a camera signal (video signal), and is an example of a shading correction device that corrects aberrations in captured image data. That is, in this embodiment, the imaging device 1 performs shading correction. The imaging device 1 includes a condenser lens 10, an imaging element 11, and a video signal processor 12 as main components related to image correction.
[0013] The condenser lens 10 is an example of an optical element (optical lens) according to this embodiment, and condenses light having shading caused by optical characteristics and the like onto the imaging element 11.
[0014] The image pickup element 11 is a CCD image sensor, a CMOS image sensor, a vacuum tube image sensor, or the like, and outputs picked-up image data as pre-correction image data to the image signal processing unit 12 in the form of an image signal. In this embodiment, the light receiving surface of the image sensor 11 is larger than the circular area of incident light collected by the collecting lens 10 (hereinafter referred to as the "image circle"). Conversely, in this embodiment, the compatible sensor size of the collecting lens 10 is smaller than the light receiving surface of the image sensor 11, resulting in a phenomenon called lens vignetting. That is, the area outside the image circle of the image sensor 11 (hereinafter referred to as the "vignetting area") does not receive the incident light from the collecting lens 10, and the video signal becomes approximately "0".
[0015] The video signal processing unit 12 is an image processing unit that processes the video signal of the image data output from the imaging element 11 and outputs the processed image data as corrected image data. The video signal processing unit 12 is configured by a control and calculation unit such as an FPGA (Field-Programmable Gate Array), a DSP (Digital Signal Processor), a GPU (Graphics Processing Unit), and an MPU (Micro Processing Unit). In the following, the present embodiment will be described as an example in which the video signal processing unit 12 is an FPGA.
[0016] In this embodiment, the video signal processing unit 12 includes a parameter calculation unit 101, a shading correction processing unit 102, and a memory unit 103 as functional blocks.
[0017] The parameter calculation unit 101 is a control and calculation unit that calculates correction parameters for shading correction. In this embodiment, the parameter calculation unit 101 calculates the correction parameters by excluding areas where no incident light occurs due to lens vignetting. The parameter calculation unit 101 may be, for example, a general-purpose control and calculation unit such as a general-purpose microcontroller configured by an IP (Intellectual Property) core within an FPGA.
[0018] The shading correction processing unit 102 is a calculation unit that performs shading correction based on the correction parameters calculated by the correction parameter calculation unit 101 . The configuration of the shading correction processing unit 102 will be described in detail later.
[0019] The memory unit 103 is a storage unit such as a ROM (Read Only Memory) for storing the program of the parameter calculation unit 101, and an SRAM (Static Random Access Memory) for storing primary data. This primary data may include image data before correction obtained by buffering the video signal received from the image sensor 11, image data after shading correction processing, and the like.
[0020] Next, the shading correction processing unit 102 will be described in detail with reference to FIG. The shading correction processing unit 102 includes a detection unit 121, a register unit 122, a correction curve generation unit 123, and a multiplication unit 124, one for each channel (ch) of R (Red), G (Green), and B (Blue) of the image data.
[0021] The detection unit 121 is a calculation unit that calculates the average value of the video level (brightness) of each detection area (FIG. 4) when calculating the correction parameters.
[0022] The register unit 122 is a register or the like that stores the average brightness value of each detection area calculated by the detection unit 121. This average value can be viewed and updated by the parameter calculation unit 101. The register unit 122 also stores correction parameters calculated by the parameter calculation unit 101 from this average brightness value.
[0023] The correction curve generation unit 123 generates a correction curve by performing filtering processing on the correction parameters calculated by the parameter calculation unit 101 and stored in the register unit 122. The generated correction curve is stored in the SRAM of the correction curve generation unit 123 or the like.
[0024] The multiplication unit 124 performs shading correction by multiplying the uncorrected image data from the image sensor 11 by a correction curve.
[0025] [Shading correction processing by imaging device 1] Next, the shading correction process using the imaging device 1 according to the embodiment of the present invention will be described in more detail with reference to FIGS. In this embodiment, correction parameters for shading correction are calculated by excluding areas where no incident light occurs due to lens vignetting, and shading correction is performed based on the calculated correction parameters. The shading correction process performed by the imaging device 1 will be described in detail below for each step using the flowchart in Fig. 3. These processes are performed by the parameter calculation unit 101 executing the code in the ROM of the memory unit 103 and by the shading correction processing unit 102 performing calculations, each using hardware resources such as an FPGA.
[0026] First, in step S100, the parameter calculation unit 101 performs a white image display process. Shading correction begins when a calibration switch on the imaging device 1 is pressed or when a command is received from a higher-level device (not shown). At this time, the parameter calculation unit 101 irradiates the optical system with white light of a predetermined luminous intensity and causes the condenser lens 10 to condense the light onto the imaging element 11. This predetermined luminous intensity may be set so that the brightness within the image circle of the imaging element 11 is approximately 50% for each of Rch, Gch, and Bch. This enables the imaging element 11 to output pre-correction image data 200 ( FIG. 4 ) of a "white chart," which is an image for shading correction.
[0027] Next, in step S101, the shading correction processing unit 102 performs a region pixel average value calculation process. Explaining this with reference to Fig. 4, for example, the detection unit 121 of the shading correction processing unit 102 measures the average brightness value of detection areas A1 to A15 divided horizontally at equal intervals. These detection areas A1 to A15 may each be areas with a number of pixels corresponding to the resolution of the image sensor 11, such as 32 x 32 pixels or 64 x 64 pixels. The detection unit 121 may calculate the average brightness value by adding up the brightness values of these pixels and dividing by a value corresponding to the number of pixels, or by performing a right bit shift, etc.
[0028] Next, in step S102, the parameter calculation unit 101 performs lens vignetting elimination processing. The parameter calculation unit 101 excludes detection areas where the average brightness value is equal to or less than the threshold value as vignetting areas from the calculation of correction parameters. That is, detection areas where the average brightness value is equal to or less than the threshold value are determined to have no incident light.
[0029] The effect of lens vignetting on shading correction will be explained using the examples of Figures 4 and 5. Figure 4 shows an example of pre-correction image data 200 of a white chart when the image circle condensed by the condenser lens 10 is smaller than the light receiving surface of the image sensor 11, causing vignetting. FIG. 5(a) shows the image level (brightness) values in the horizontal direction along the detection areas A1 to A15 in this case, and FIG. 5(b) shows some of the average brightness values of the detection areas A1 to A15.
[0030] Here, areas where light is not condensed due to lens vignetting, i.e., areas where there is no incident light, have low brightness, and the average value of the detection area of the vignetted area is approximately "0." On the other hand, areas where light is condensed are brightest at the center and become darker toward the edges, creating a shading state. For this reason, the shading correction processing unit 102 determines that a detection area where the average brightness is equal to or less than a threshold is a vignetted area, and excludes that detection area and the detection area immediately inside it from the calculation of correction parameters. This threshold may be, for example, a value approximately 5 to 15% of the maximum brightness.
[0031] In the example of FIG. 4, detection areas A1 to A3 and A13 to A15 are below the threshold. That is, due to lens vignetting, the average brightness is approximately "0." For this reason, detection areas A1 to A4 and detection areas A12 to A15, including the detection area one area inside, are excluded from the calculation of the correction parameters. Conversely, only detection areas A5 to A11 are used to calculate the correction parameters.
[0032] Next, in step S103, the parameter calculation unit 101 performs a correction parameter calculation process. The parameter calculation unit 101 calculates correction parameters for shading correction from detection areas other than the detection areas excluded in the above-described processing. At this time, the parameter calculation unit 101 may calculate the correction parameters from the center where shading occurs toward the edge of the image circle.
[0033] In the example of FIG. 4, the magnification (coefficient) of the detection area A8, which is the center of the image circle, is set to 1, and for the other detection areas A5 to A7 and A9 to A11, magnifications (coefficients) are calculated as correction parameters so that the brightness is equal to that of A8.
[0034] Next, in step S104, the parameter calculation unit 101 performs a lens vignetting inner side adjustment process. In this embodiment, since there is a possibility that the area one position inside the excluded detection area overlaps with the vignetting area, the parameter calculation unit 101 calculates the correction parameter value of the corresponding detection area by linear interpolation using the correction parameters of the detection areas two positions inside the corresponding detection area.
[0035] In the example of FIG. 4, the correction parameters are calculated for the detection area A4 by linear interpolation using the detection areas A6 and A5, and for the detection area A12 by linear interpolation using the detection areas A10 and A11.
[0036] Next, in step S105, the parameter calculation unit 101 performs an exclusion area correction value setting process. The parameter calculation unit 101 sets the detection area excluded from the calculation of the correction parameters to 1, the same as the correction parameters for the central area. In this embodiment, the processing for each detection region in steps S104 and S105 is referred to as filtering processing.
[0037] In the example of the pre-correction image data 200 of the white chart in FIG. 4, the coefficients for the detection areas A1 to A3 and the detection areas A13 to A15 are set to 1. In the example of FIG. 5(c), some examples of correction parameters calculated in this manner are shown.
[0038] Next, in step S106, the parameter calculation unit 101 performs a correction parameter writing process. The parameter calculation unit 101 writes the correction parameters calculated in the above-described process into the register unit 122. In the example of FIG. 4, the parameter calculation unit 101 writes the correction parameters corresponding to the detection areas A1 to A15 into the register unit 122.
[0039] Next, in step S107, the shading correction processing unit 102 performs a correction curve generation process. The shading correction processing unit 102 generates a correction curve using the calculated correction parameters. Specifically, the correction curve generation unit 123 of the shading correction processing unit 102 interpolates the value of each correction parameter using linear interpolation or a spline curve to generate a correction curve corresponding to each pixel. As described above, filtering is performed on the detection area where the average value affected by lens vignetting is equal to or less than the threshold value and the detection area where the correction parameters are calculated by linear interpolation. Therefore, the correction curve generation unit 123 can generate a correction curve with almost no overcorrection, although it is affected by the filtering process.
[0040] FIG. 5(d) shows an example of a correction curve generated in this way.
[0041] Next, an example of shading correction using the generated correction curve will be described. The shading correction processing unit 102 performs shading correction based on the correction parameters calculated by the correction parameter calculation unit 101. Specifically, the shading correction processing unit 102 performs shading correction using a generated correction curve as correction based on the correction parameters.
[0042] In this embodiment, when the shading correction processing unit 102 acquires new pre-correction image data while the generated correction curve is stored in the SRAM or the like of the correction curve generation unit 123, the shading correction processing unit 102 calculates the distance from the center for each pixel in the pre-correction image data and acquires the value of the correction curve corresponding to this distance. Then, the shading correction processing unit 102 performs shading correction by multiplying the video level (brightness) value of the pixel in the pre-correction image data by the value of the correction curve using the multiplication unit 124.
[0043] 5(e) shows an example of shading correction performed using the correction curve according to this embodiment. As described above, although the filtering process causes degraded areas in the correction curve, the resulting correction error is small. Furthermore, the areas where this correction error occurs become black vignetting areas, so there is no visible impact.
[0044] 6 shows an example of corrected image data 210 of a white chart after shading correction in this manner. Although the brightness around the image circle becomes slightly brighter, it can be seen that there is no degradation in the image data after correction, such as the vignetting area outside the image circle becoming unnecessarily bright, as occurs with conventional technology. This completes the shading correction process according to this embodiment.
[0045] The above configuration can provide the following effects. The optical characteristics of a typical focusing lens cause the captured image to be brighter in the center and darker towards the edges, resulting in uneven brightness and color. Conventional shading correction corrects the shading that occurs when the sensor size compatible with the focusing lens is larger than the light-receiving surface of the image sensor. For this reason, when shading correction is performed using conventional technology on image data captured by an imaging device in which the compatible sensor size of the focusing lens is smaller than the light receiving surface of the imaging element and lens vignetting occurs, the problem of image degradation occurs.
[0046] An example of shading correction using conventional techniques will be described with reference to FIGS. First, Fig. 7 shows an example of a typical process of conventional shading correction processing. In this flowchart, step S110 may be similar to step S100 in Fig. 3, step S111 may be similar to step S101, step S116 may be similar to step S106, and step S117 may be similar to step S107. That is, the detection unit 121 calculates the average brightness value, and the result is transmitted from the register unit 122 to the parameter calculation unit 101, where correction parameters are calculated, and the shading correction processing unit 102 performs shading correction processing.
[0047] FIG. 8(a) shows an example of the values of the video level (brightness) in the horizontal direction along the detection area of a white chart similar to that shown in FIG. 5(a) above. FIG. 8(b) shows an example in which the average value of brightness is calculated in the same manner as in FIG. 5(b). Figure 8(c) shows an example of correction parameters calculated using the conventional shading correction process in Figure 7. In the vignetting area where lens vignetting occurs, the brightness is almost "0," so when the correction parameters are generated, values are calculated that excessively raise the level at the edge of the image. Figure 8(d) shows an example of a correction curve calculated using such conventional correction parameters. As shown in the waveform in Figure 8(d), the correction curve of this conventional technology overcorrects the area near the image circle of the focusing lens, resulting in a waveform that lifts up the vignetting area. Figure 8(e) shows an example of shading correction processing of uncorrected image data using this conventional correction curve. It can be seen that lens vignetting causes overcorrection of the correction curve, raising the image level (brightness) of the vignetted area.
[0048] Figure 9 shows an example of corrected image data 211 of a white chart when shading correction is performed on the white chart using a correction curve of the prior art. In this corrected image data 211 of the white chart, the image becomes brighter toward the outside of the image circle, with the periphery of the image being brighter than the center. Furthermore, due to overcorrection by the correction curve, the dark areas in the vignetting areas on the outside of the image circle are unnecessarily brightened in an attempt to raise them to the same brightness as the center. In other words, degradation has occurred in the corrected image data.
[0049] In contrast to this, (1) a shading correction method according to an embodiment of the present invention is a shading correction method for correcting aberrations in captured image data, wherein the image data is captured by an imaging device 1 in which the compatible sensor size of the condenser lens 10 is smaller than the light receiving surface of the image sensor 11 and lens vignetting occurs, and the shading correction method is characterized in that correction parameters for shading correction are calculated by excluding detection areas in which there is no incident light due to lens vignetting, and shading correction is performed based on the calculated correction parameters.
[0050] By configuring in this way and obtaining the average brightness value of the detection area, and not obtaining the average brightness value of the area outside the image circle where no light enters, it is possible to generate a correction curve without being affected by vignetting areas. As a result, even when a condenser lens 10 with an adapted sensor size smaller than the light receiving surface of the image sensor 11 is used, image data degradation such as increased brightness in the vignetted areas outside the image circle due to overcorrection of the correction curve caused by lens vignetting, resulting in unnecessarily bright images, does not occur. In other words, shading correction can be performed without the vignetted areas outside the condenser lens 10 becoming unnecessarily bright. Therefore, even in an image pickup device 1 with lens vignetting, the quality of corrected image data can be improved by shading correction.
[0051] Furthermore, (2) the shading correction method according to this embodiment is further characterized in that it is the shading correction method according to (1) in which the presence or absence of incident light, i.e., whether or not there is a vignetting portion, is determined based on a threshold value of the image level (brightness) in the image data.
[0052] With this configuration, it is possible to easily determine the vignetting portion outside the image circle and to reliably exclude the detection area where no incident light is present due to lens vignetting.
[0053] Furthermore, (3) the shading correction method according to this embodiment is characterized in that it is the shading correction method according to (1) or (2), in which the calculated correction parameters are further filtered to generate a correction curve that is free from overcorrection, and shading correction is performed using the generated correction curve as correction based on the correction parameters.
[0054] By configuring in this way and performing filtering processing such as excluding the average brightness of the detection area below the threshold and the detection area one area inside from the calculation processing of the correction parameters, a correction curve that is reliably free of overcorrection can be generated, and shading correction is performed using this correction curve. This allows shading correction to be performed with correction errors nearly minimized.
[0055] Furthermore, (4) the shading correction method according to the present embodiment is characterized in that it is a shading correction method according to any one of (1) to (3), in which the correction parameters of the detection area where lens vignetting is present are made equal to the correction parameters of the central area, thereby causing deterioration of the correction curve due to the filtering process to occur only in the detection area where lens vignetting is present.
[0056] This configuration prevents the brightness of the vignetting area from increasing and also prevents the area from becoming unnaturally dark. Therefore, in the case of a microscope or the like, it becomes easier to notice dust or dirt on the condenser lens 10.
[0057] In the above embodiment, the detection area is arranged at the center of the image in the horizontal direction, but the detection area may also be arranged at the center in the vertical direction. Alternatively, the detection area may be arranged in m rows and n columns.
[0058] This configuration allows for more accurate generation of correction parameters in two dimensions, thereby improving the accuracy of shading correction. In this case, it is also possible to generate a group of two-dimensional correction curves to further improve accuracy.
[0059] In the above embodiment, an example has been described in which correction parameters for the detection areas A1 to A15 are calculated. However, as end portions, a detection area A0 may be provided outside the detection area A1 from the center, and a detection area A16 may be provided outside the detection area A15. Then, correction parameters for the detection area A0 may be calculated by linear interpolation of the detection areas A2 and A1, and correction parameters for the detection area A16 may be calculated by linear interpolation of the detection areas A14 and A15, and correction curves may be calculated.
[0060] By configuring in this way, correction errors at the edges can be further suppressed, and Mach bands and the like caused by gradation errors in dark areas in areas of lens vignetting are less likely to occur, thereby further improving the quality of the corrected image data.
[0061] In the above-described embodiment, the contrast ratio may be increased by setting the correction curve of the vignetting portion to a value such as 1x magnification or "0" magnification after generation of the correction curve of the vignetting portion.
[0062] In the above embodiment, the threshold value of the average brightness value is set to about 10%. However, the threshold value of this average brightness may be calculated dynamically. For example, a distribution diagram (histogram) of the image level (brightness) of all pixels in the white chart may be calculated, and this may be differentiated to calculate the threshold value of the image level (brightness) based on the brightness at the point where the acceleration changes suddenly.
[0063] By configuring in this way, even if the brightness of the vignetting part does not become "0" due to the influence of dark current, bias current, etc., it is possible to calculate a threshold value that can reliably distinguish the vignetting part.
[0064] In the above embodiment, the example in which lens vignetting is determined based on the average value of brightness has been described. However, it is also possible to determine the vignetting portion without using the average value. For example, the location of the vignetting portion may be specified in advance according to a model of the light condensing of the condenser lens 10, and the vignetting portion may be determined from the coordinates of each pixel. In other words, the area where lens vignetting occurs may be specified in advance from the level of incident light.
[0065] Alternatively, instead of setting an area such as 32 × 32 pixels as the detection area, the vignetting portion may be simply determined based on whether or not each pixel exceeds a threshold value, and an area where judgments exceeding the threshold value are continuous, an area where the judgment changes depending on adjacent pixels, and an area where judgments not exceeding the threshold value are continuous, and the middle of the area where the judgment changes depending on adjacent pixels may be determined to be the boundary between the vignetting portion and the rest.
[0066] This configuration makes it possible to accommodate a variety of optical lenses. Also, even if the shape of the image circle is unusual due to the influence of the aperture, etc., it is possible to reliably determine the vignetting area.
[0067] In the above-described embodiment, an example has been described in which a correction curve is generated from correction parameters to perform shading correction. However, it is also possible to use a model of the light collection of the collecting lens 10 to obtain a predetermined inner brightness, central brightness, etc. from the area where lens vignetting occurs, and generate a correction curve by weighting it by distance.
[0068] With this configuration, the processing load is reduced, and the correction curve can be generated by the shading correction processing unit 102 without using a general-purpose control and calculation unit in the FPGA. This makes it possible to reduce the circuit scale and cut costs.
[0069] In the above embodiment, an example in which shading correction is performed by an FPGA has been described. In this regard, by writing "firmware" written in a hardware description language such as VDHL or Verilog-HDL to the FPGA from a higher-level device such as a PC (Personal Computer) or dedicated device, it is possible to configure the FPGA to function as each of the above-mentioned components and perform shading correction.
[0070] Alternatively, it is also possible to configure the system so that shading correction is performed by executing a program using a general-purpose central processing unit (CPU), a micro processing unit (MPU), a GPU, or the like as hardware resources. It is also possible to configure the shading correction processing unit using an FPGA, and the correction curve generation unit using a CPU, MPU, or the like.
[0071] This configuration makes it easy to change and design the shading correction method according to various applications, and thus can accommodate a wide variety of configurations.
[0072] It goes without saying that the configurations and operations of the above-described embodiments are merely examples, and can be modified as appropriate within the scope of the present invention. [Explanation of symbols]
[0073] 1. Imaging device 10 Condenser lens 11 Image sensor 12 Video signal processing section 101 Parameter calculation unit 102 Shading correction processing unit 103 Memory section 121 Detector 122 Register section 123 Correction curve generator 124 Multiplication section 200 Uncorrected image data 210, 211 Corrected image data A1~A15 detection area
Claims
1. A shading correction method for correcting aberrations in captured image data, comprising: The image data is captured by an imaging device in which a sensor size adapted to a condenser lens is smaller than a light receiving surface of an imaging element, and lens vignetting occurs, Calculate the correction parameters for shading correction by excluding areas where there is no incident light due to lens vignetting, Shading correction is performed based on the calculated correction parameters. A shading correction method comprising:
2. The presence or absence of the incident light is determined based on a threshold value of the image level in the image data.
2. The shading correction method according to claim 1.
3. The calculated correction parameters are further filtered to generate a correction curve that is free from overcorrection; As a correction based on the correction parameters, shading correction is performed using the generated correction curve.
2. The shading correction method according to claim 1.
4. By making the correction parameters of the area where lens vignetting is present equal to the correction parameters of the central area, the deterioration of the correction curve due to filtering processing occurs only in the area where lens vignetting is detected.
4. The shading correction method according to claim 3.
5. A shading correction device that corrects aberrations in captured image data, The image data is captured by an imaging device in which a sensor size adapted to a condenser lens is smaller than a light receiving surface of an imaging element, and lens vignetting occurs, a parameter calculation unit that calculates correction parameters for shading correction by excluding an area where no incident light is present due to lens vignetting; a shading correction processing unit that performs shading correction based on the correction parameters calculated by the parameter calculation unit. A shading correction device characterized by:
Citation Information
Patent Citations
Method for correcting shading
JP2003116052A
Method for correcting shading
JP2007116724A