1. Field of the Invention
The present invention relates to an imaging apparatus and an imaging method.
2. Description of the Related Art
An imaging apparatus includes an imaging device that has a plurality of two-dimensionally arrayed pixels and outputs image data of each pixel. In such an imaging apparatus, one of the plurality of pixels in the imaging device may be a defect pixel that outputs abnormal image data. JP2007-124056A describes execution of processing in which information for specifying a defect pixel is stored in a memory of an imaging apparatus, and in a step when the imaging apparatus is used, image data of a good pixel adjacent to the defect pixel stored in the memory is interpolated, and the interpolated image data is used as image data for the defect pixel. The defect pixel is found by inspecting the imaging device in a step when the imaging apparatus is shipped from a factory. Since such processing is executed, deterioration in image quality caused by the defect pixel is reduced.
An object of the present invention is to provide an imaging apparatus and an imaging method that can further reliably correct a value of image data of a defect pixel in an imaging device.
An imaging apparatus according to an aspect of the present invention includes (1) an imaging device that has a plurality of two-dimensionally arrayed pixels and outputs image data of each pixel; (2) a memory that stores information for specifying a pixel among the arrayed pixels as a defect pixel, the pixel outputting image data having a variation equal to or larger than a predetermined value in a first period while light with a constant first light-quantity level is incident on each pixel of the imaging device; and (3) a correction unit that obtains data for the defect pixel based on image data of a good pixel that is adjacent to the defect pixel. The “variation in image data in a specified period” represents a “difference between a maximum value and a minimum value of image data in a specified period,” or a “standard deviation of image data in a specified period.”
According to another aspect of the present invention, there is provided a method of imaging an object with an imaging apparatus including an imaging device that has a plurality of two-dimensionally arrayed pixels and outputs image data of each pixel. The method includes (1) specifying a pixel among the arrayed pixels as a defect pixel, the pixel outputting image data having a variation equal to or larger than a predetermined value in a first period while light with a constant first light-quantity level is incident on each pixel of the imaging device; (2) imaging the object with the imaging device; and (3) obtaining data for the defect pixel based on image data of a good pixel that is adjacent to the defect pixel.
With the aspects of the present invention, the value of the image data of the defect pixel in the imaging device can be further reliably corrected.
Embodiments of the present invention are described below with reference to the figures. The figures are provided for description, and do not intend to limit the scope of the invention. In the figures, the identical reference signs indicate the same parts to avoid redundant description. The ratios of dimensions illustrated in the figures may not be correct.
There has been a defect pixel outputting a value of time-varying image data even under the same exposure condition. The inventor has found that such a defect pixel might be missed by a conventional method of specifying a defect pixel. The present invention is made to address the concern.
In the inspection step S1, the control unit 11 of the imaging apparatus 10 receives image data of each pixel output from the imaging device 12 having a plurality of two-dimensionally arrayed pixels, and outputs the image data of each pixel to the image interface 15. The image interface 15 outputs the image data of each pixel received from the control unit 11 to the identification unit 21 of the inspection apparatus 20.
The identification unit 21 identifies whether or not the imaging device 12 is normal or defective based on the image data of each pixel received from the image interface 15, and outputs defect pixel information for identifying a defect pixel to the control signal interface 16. The control signal interface 16 gives the control unit 11 the defect pixel information received from the identification unit 21. The control unit 11 stores the defect pixel information in the memory 13.
The correction unit 14 receives the image data of each pixel output from the imaging device 12, from the control unit 11, and also receives information for specifying a defect pixel of the imaging device 12 from the memory 13. The correction unit 14 obtains data for the defect pixel based on the image data of a good pixel adjacent to the defect pixel, among image data of each pixel output from the imaging device 12. Then the correction unit 14 outputs the obtained data for the defect pixel and the image data of the good pixel to an external device through the image interface 15.
Next, the method for identifying a defect pixel by the identification unit 21 for defect pixel of the inspection apparatus 20 is described, and also the defect pixel information stored in the memory 13 of the imaging apparatus 10 is described.
In step S10, an exposure time of the imaging device 12 is set to a predetermined time (for example, 1 to 9 ms). In step S11, light with a first light-quantity level is incident on each pixel of the imaging device 12 a plurality of times (for example, 100 times) for the exposure time set within a predetermined time (for example, 60 seconds). At this time, the control unit 11 acquires image data of each pixel output from the imaging device 12, and gives the identification unit 21 the acquired image data. The first light-quantity level at this time may be a completely light shielding level. In step S12, the identification unit 21 calculates the difference between a maximum value and a minimum value (a variation) of the image data of each pixel. If the variation is a predetermined value (for example, 200 counts) or larger, it is identified that the pixel (x, y) is a defect pixel and hence the defect pixel (x, y) is specified in step S21.
In step S13, the identification unit 21 obtains an average value (AVEtotal) of image data of all pixels and an average value (AVE (x, y)) of image data of each pixel (x, y). In step S14, the identification unit 21 identifies that the pixel (x, y) is a defect pixel if the average value (AVE (x, y)) of a certain pixel (x, y) is different from the average value (AVEtotal) of all pixels by a predetermined value (for example, 4σ counts) or larger. Thus, the defect pixel (x, y) is specified in step S21.
In step S15, light with a second light-quantity level is incident on each pixel of the imaging device 12 a plurality of times (for example, 100 times) for the set exposure time. At this time, the control unit 11 acquires image data of each pixel output from the imaging device 12, and gives the identification unit 21 the acquired image data. The second light-quantity level at this time is different from the first light-quantity level. In step S16, the identification unit 21 obtains an average value (AVEtotal) of image data of all pixels acquired in step S15, and an average value (AVE (x, y)) of image data of each pixel (x, y). In step S17, the identification unit 21 identifies that the pixel (x, y) is a defect pixel if the average value (AVE (x, y)) of a certain pixel (x, y) is different from the average value (AVEtotal) of all pixels by a predetermined value (for example, 4σ counts) or larger. Thus, the defect pixel (x, y) is specified in step S21.
In step S18, it is determined whether or not the processing in steps S15 to S17 is repeated a predetermined number of times. If the number of times the processing is repeated does not reach the predetermined number of times, the light-quantity level is set to another level, and the processing in steps S15 to S17 is further performed. If the number of times the processing is repeated reaches the predetermined number of times, the processing goes to step S22. In step S22, other pixels that are not identified as defect pixels in step S21 are designated as normal pixels. The memory 13 of the imaging apparatus 10 stores information of the defect pixel specified in step S21. In this embodiment, the defect pixel is specified and the defect pixel information is stored in the memory 13 in this way. Accordingly, the value of the image data of the defect pixel of the imaging device 12 can be further reliably corrected.
Next, a method of correcting data of a defect pixel by the correction unit 14 of the inspection apparatus 20 is described.
In a first correction method by the correction unit 14, data D2,2 for the defect pixel P2,2 is obtained, as an average value of data of all good pixels that are adjacent to the defect pixel P2,2 in up-down, left-right, or oblique direction. In particular, in the first correction method, the data D2,2 for the defect pixel P2,2 is obtained by Eq. 1 as follows:
D
2,2=(D1,1+D1,3+D2,1+D2,3+D3,2+D3,3)/6 (1)
In a second correction method by the correction unit 14, data D2,2 for the defect pixel P2,2 is obtained, as an average value of data of good pixels that are adjacent to the defect pixel P2,2 in the up-down, left-right, or oblique direction and that sandwich the defect pixel P2,2. In particular, in the second correction method, the data D2,2 for the defect pixel P2,2 is obtained by Eq. 2 as follows:
D
2,2=(D1,1+D2,1+D2,3+D3,3)/4 (2)
In a third correction method by the correction unit 14, data D2,2 for the defect pixel P2,2 is obtained, as an average value of data of each good pixels that are adjacent to the defect pixel P2,2 in the left-right direction. In particular, in the third correction method, the data D2,2 for the defect pixel P2,2 is obtained by Eq. 3 as follows:
D
2,2=(D2,1+D2,3)/2 (3)
In a fourth correction method by the correction unit 14, data D2,2 for the defect pixel P2,2 is obtained, as an average value of data of each good pixels that are adjacent to the defect pixel P2,2 in the up-down direction. In particular, in the fourth correction method, the data D2,2 for the defect pixel P2,2 is obtained by Eq. 4 as follows:
D
2,2
=D
3,2 (4)
The third and fourth correction methods are preferable if the imaging apparatus 10 is a line-sensor hyperspectral imaging apparatus.
The spectroscope 17 receives light emitted from a region 3 in the field in view, which has a stripe shape and is provided at a certain position in the y direction and extends in the x direction on the surface of a measurement object 2. The spectroscope 17 disperses the light, and causes the dispersed light to be incident on an imaging surface of the imaging device 12. The imaging device 12 has, for example, 320 pixels in the x direction and 237 pixels in the y direction. A position in the x direction on the imaging surface of the imaging device 12 corresponds to a position in the x direction in the region 3 in the field of view. A position in the y direction on the imaging surface of the imaging device 12 corresponds to a wavelength. When the measurement object 2 moves in the y direction, the line-sensor hyperspectral imaging apparatus 10A can measure the spectrum on light emitted from each position of the surface of the measurement object 2.
In such a line-sensor hyperspectral imaging apparatus 10A, if the third correction method of obtaining the data for the defect pixel as the average value of the data of the good pixels that are adjacent to the defect pixel in the x direction is employed, reduction in wavelength resolution can be restricted. Also, if the fourth correction method of obtaining the data for the defect image as the average value of the data of the good pixels that are adjacent to the defect pixel in the y direction is employed, reduction in positional resolution can be restricted.
Number | Date | Country | Kind |
---|---|---|---|
2011-233630 | Oct 2011 | JP | national |