Image measuring apparatus and image measuring method
13 claims: 13 independent, 0 dependent
- 1An image measuring apparatus comprising an imaging portion and a calculation portion, the imaging portion (41) having pixels, each pixel being allocated with one color component four pixels constituting one set, one set being allocated with a plurality of color components express a color, and said sets being arranged in matrix, and the imaging portion being configured to image a measuring object and output four sets of image data based on said four pixels respectively;and the calculation portion (89) being adapted to calculate edge positions of the measuring object and contrast values between one side and an other side across the edge positions, and adapted to generate a position data of the measuring object based on the edge positions and the contrast values, and output the position data characterized in that the calculation portion is adapted to calculate four edge positions based on the four sets of image data, respectively, and each edge position being calculated by differentiating a color density graph of the four sets of image data, obtaining a differential graph and defining a barycenter of the differential graph as the edge position. Appareil de mesure d'image comprenant une partie imagerie et une partie calcul, la partie imagerie (41) ayant des pixels, chaque pixel se voyant attribuer une composante de couleur, quatre pixels constituant un ensemble, un ensemble se voyant attribuer une pluralité de composantes de couleur afin d'exprimer une couleur, et lesdits ensembles étant agencés en matrice, et la partie imagerie étant configurée pour imager un objet de mesure et fournir en sortie quatre ensembles de données d'image sur la base desdits quatre pixels respectivement ;et la partie calcul (89) étant adaptée pour calculer des positions de bord de l'objet de mesure et des valeurs de contraste entre un côté et un autre côté en travers des positions de bord, et adaptée pour générer une donnée de position de l'objet de mesure sur la base des positions de bord et des valeurs de contraste, et fournir en sortie la donnée de position caractérisé en ce que la partie calcul est adaptée pour calculer quatre positions de bord sur la base des quatre ensembles de données d'image, respectivement, et chaque position de bord étant calculée en différentiant un graphe de densité de couleur des quatre ensembles de données d'image, en obtenant un graphe différentiel et en définissant un barycentre du graphe différentiel comme la position de bord. Bildmessvorrichtung, die einen Bilderzeugungsabschnitt und einen Berechnungsabschnitt umfasst, wobei der Bilderzeugungsabschnitt (41) Pixel aufweist, jedem Pixel eine Farbkomponente zugeordnet ist, vier Pixel eine Gruppe bilden, einer Gruppe eine Vielzahl von Farbkomponenten zugeordnet ist, um eine Farbe auszudrücken, die Gruppen in einer Matrix angeordnet sind und der Bilderzeugungsabschnitt so konfiguriert ist, dass er ein Messobjekt abbildet und vier Gruppen von Bilddaten jeweils auf Basis der vier Pixel ausgibt;und der Berechnungsabschnitt (89) so eingerichtet ist, dass er Kantenabschnitte des Messobjektes und Kontrastwerte zwischen einer Seite und einer anderen Seite über die Kantenabschnitte berechnet, und so eingerichtet ist, dass er Positionsdaten des Messobjektes auf Basis der Kantenpositionen und der Kontrastwerte erzeugt und die Positionsdaten ausgibt, dadurch gekennzeichnet, dass der Berechnungsabschnitt so eingerichtet ist, dass er vier Kantenpositionen jeweils auf Basis der vier Gruppen von Bilddaten berechnet, jede Kantenposition berechnet wird, indem ein Farbdichtegraph der vier Gruppen von Bilddaten differenziert wird, ein Differenzialgraph ermittelt wird und ein Schwerpunkt des Differenzialgraphen als die Kantenposition definiert wird.
- 2Appareil de mesure d'image selon la revendication 1, comprenant en outre :une caméra couleur monopuce (27) comprenant la partie imagerie ;etun ordinateur personnel comprenant une partie d'interpolation de couleur adaptée pour effectuer une interpolation de couleur avec les quatre ensembles de données d'image en provenance de la partie imagerie et de la partie calcul. Bildmessvorrichtung nach Anspruch 1, die des Weiteren umfasst: eine Einzelchip-Farbkamera (27), die den Bilderzeugungsabschnitt umfasst;undeinen Personalcomputer, der einen Farbinterpolationsabschnitt umfasst, der zum Durchführen von Farbinterpolation mit den vier Gruppen von Bilddaten von dem Bilderzeugungsabschnitt und dem Berechnungsabschnitt eingerichtet ist. The image measuring apparatus according to claim 1, further comprising: a single-chip color camera (27) comprising the imaging portion ;anda personal computer comprising a color interpolation portion adapted to perform color interpolation with the four sets of image data from the imaging portion and the calculation portion.
- 3Appareil de mesure d'image selon la revendication 1, dans lequel au moins trois composantes de couleurs différentes sont attribuées aux quatre pixels. Bildmessvorrichtung nach Anspruch 1, wobei den vier Pixeln wenigstens drei verschiedene Farbkomponenten zugeordnet werden. The image measuring apparatus according to claim 1, wherein at least three different color components are allocated to the four pixels.
- 4Appareil de mesure d'image selon la revendication 1, dans lequel une composante verte G est attribuée à deux des quatre pixels, et une composante rouge R et une composante bleue B sont attribuées respectivement aux deux autres pixels. Bildmessvorrichtung nach Anspruch 1, wobei zwei der vier Pixel eine Grün-Komponente G zugeordnet wird, und den anderen zwei Pixeln jeweils eine Rot-Komponente R sowie eine Blau-Komponente B zugeordnet werden. The image measuring apparatus according to claim 1, wherein a green component G is allocated to two of the four pixels, and a red component R and a blue component B are respectively allocated to the other two pixels.
- 5Appareil de mesure d'image selon la revendication 1, dans lequel une composante jaune Y est attribuée à deux des quatre pixels, et une composante cyan C et une composante magenta M sont attribuées respectivement aux deux autres pixels. Bildmessvorrichtung nach Anspruch 1, wobei zwei der vier Pixel eine Gelb-Komponente zugeordnet wird und den anderen zwei Pixeln jeweils eine Cyan-Komponente C sowie eine Magenta-Komponente M zugeordnet werden. The image measuring apparatus according to claim 1, wherein a yellow component Y is allocated to two of the four pixels, and a cyan component C and a magenta component M are respectively allocated to the other two pixels.
- 6Appareil de mesure d'image selon la revendication 1, dans lequel une composante rouge R, une composante verte G, une composante bleue B et une composante cyan C sont attribuées respectivement aux quatre pixels. Bildmessvorrichtung nach Anspruch 1, wobei den vier Pixeln jeweils eine Rot-Komponente R, eine Grün-Komponente G, eine Blau-Komponente B und eine Cyan-Komponente C zugeordnet werden. The image measuring apparatus according to claim 1, wherein a red component R, a green component G, a blue component B and a cyan component C are respectively allocated to the four pixels.
- 7Appareil de mesure d'image selon la revendication 1, dans lequel la donnée de position de l'objet de mesure est générée en calculant une position moyenne de l'objet de mesure en pondérant les quatre positions de bord de l'objet de mesure obtenues à partir des quatre ensembles de données d'image, respectivement, avec les valeurs de contraste. Bildmessvorrichtung nach Anspruch 1, wobei die Positionsdaten des Messobjektes erzeugt werden, indem eine Mittelwertposition des Messobjektes berechnet wird, indem die aus den vier Gruppen von Bilddaten ermittelten vier Kantenpositionen des Messobjektes jeweils mit den Kontrastwerten gewichtet werden. The image measuring apparatus according to claim 1, wherein the position data of the measuring object is generated by calculating an average position of the measuring object by weighting the four edge positions of the measuring object obtained from the four sets of image data, respectively, with the contrast values.
- 8An image measuring method comprising the steps of:imaging a measuring object using an imaging portion with pixels, each pixel being allocated with one color component, four pixels constituting one set, one set being allocated with a plurality of color components to express a color, and said sets being arranged in matrix, to output four sets of image data based on said four pixels respectively,calculating edge positions of the measuring object and contrast values at one side and another side across the edge positions, andgenerating a position data of the measuring object based on the edge positions and contrast values, and outputting the position datacharacterized in thatfour edge positions are calculated on the basis of four sets of image data, respectively, and by differentiating a color density graph of the four sets of image data, obtaining a differential graph, and defining a barycenter of the differential graph as the edge position. Bildmessverfahren, das die folgenden Schritte umfasst: Abbilden eines Messobjektes unter Verwendung eines Bilderzeugungsabschnitts mit Pixeln, wobei jedem Pixel eine Farbkomponente zugeordnet wird, vier Pixel eine Gruppe bilden, einer Gruppe eine Vielzahl von Farbkomponenten zugeordnet wird, um eine Farbe auszudrücken, und die Gruppen in einer Matrix angeordnet werden, um vier Gruppen von Bilddaten jeweils auf Basis der vier Pixel auszugeben,Berechnen von Kantenpositionen des Messobjektes und Kontrastwerten an einer Seite und an einer anderen Seite über die Kantenpositionen, undErzeugen von Positionsdaten des Messobjektes auf Basis der Kantenpositionen und der Kontrastwerte und Ausgeben der Positionsdaten,dadurch gekennzeichnet, dassvier Kantenpositionen jeweils auf Basis von vier Gruppen von Bilddaten berechnet werden und durch Differenzieren eines Farbdichtegraphs der vier Gruppen von Bilddaten ein Differenzialgraph ermittelt wird und ein Schwerpunkt des Differenzialgraphs als die Kantenposition definiert wird. Procédé de mesure d'image comprenant les étapes consistant à : imager un objet de mesure en utilisant une partie imagerie avec des pixels, chaque pixel se voyant attribuer une composante de couleur, quatre pixels constituant un ensemble, un ensemble se voyant attribuer une pluralité de composantes de couleur afin d'exprimer une couleur, et lesdits ensembles étant agencés en matrice, pour fournir en sortie quatre ensembles de données d'image sur la base desdits quatre pixels respectivement,calculer des positions de bord de l'objet de mesure et des valeurs de contraste au niveau d'un côté et d'un autre côté en travers des positions de bord, etgénérer une donnée de position de l'objet de mesure sur la base des positions de bord et des valeurs de contraste, et fournir en sortie la donnée de positioncaractérisé en ce quequatre positions de bord sont calculées sur la base de quatre ensembles de données d'image, respectivement, et en différentiant un graphe de densité de couleur des quatre ensembles de données d'image, en obtenant un graphe différentiel, et en définissant un barycentre du graphe différentiel comme la position de bord.
- 9Bildmessverfahren nach Anspruch 8, wobei den vier Pixeln wenigstens drei verschiedene Farbkomponenten zugeordnet werden. Procédé de mesure d'image selon la revendication 8, dans lequel au moins trois composantes de couleurs différentes sont attribuées aux quatre pixels. The image measuring method according to claim 8, wherein at least three different colors components are allocated to the four pixels.
- 10Bildmessverfahren nach Anspruch 8, wobei zwei der vier Pixel eine Grün-Komponente G zugeordnet wird und den anderen zwei Pixeln jeweils eine Rot-Komponente R sowie eine Blau-Komponente B zugeordnet werden. Procédé de mesure d'image selon la revendication 8, dans lequel une composante verte G est attribuée à deux des quatre pixels, et une composante rouge R et une composante bleue B sont attribuées respectivement aux deux autres pixels. The image measuring method according to claim 8, wherein a green component G is allocated to two of the four pixels, and a red component R and a blue component B are respectively allocated to the other two pixels.
- 11Bildmessverfahren nach Anspruch 8, wobei zwei der vier Pixel eine Gelb-Komponente Y zugeordnet wird und den anderen zwei Pixeln jeweils eine Cyan-Komponente C sowie eine Magenta-Komponente M zugeordnet werden. Procédé de mesure d'image selon la revendication 8, dans lequel une composante jaune Y est attribuée à deux des quatre pixels, et une composante cyan C et une composante magenta M sont attribuées respectivement aux deux autres pixels. The image measuring method according to claim 8, wherein a yellow component Y is allocated to two of the four pixels, and a cyan component C and magenta component M are respectively allocated to the other two pixels.
- 12Bildmessverfahren nach Anspruch 8, wobei den vier Pixeln jeweils eine Rot-Komponente R, eine Grün-Komponente G, eine Blau-Komponente B und eine Cyan-Komponente C zugeordnet werden. Procédé de mesure d'image selon la revendication 8, dans lequel une composante rouge R, une composante verte G, une composante bleue B et une composante cyan C sont attribuées respectivement aux quatre pixels. The image measuring method according to claim 8, wherein a red component R, a green component G, a blue component B and a cyan component C are respectively allocated to the four pixels.
- 13Bildmessverfahren nach Anspruch 8, wobei die Positionsdaten des Messobjektes erzeugt werden, indem eine Mittelwertposition des Messobjektes berechnet wird, indem die aus den vier Gruppen von Bilddaten ermittelten vier Kantenpositionen des Messobjektes jeweils mit den vier Kontrastwerten gewichtet werden. Procédé de mesure d'image selon la revendication 8, dans lequel la donnée de position de l'objet de mesure est générée en calculant une position moyenne de l'objet de mesure en pondérant les quatre positions de bord de l'objet de mesure obtenues à partir des quatre ensembles de données d'image, respectivement, avec les quatre valeurs de contraste. The image measuring method according to claim 8, wherein the position data of the measuring object is generated by calculating an average position of the measuring object by weighting the four edge positions of the measuring object obtained from the four sets of image data, respectively, with the four contrast values.
Independent claims13
56 paragraphs in 4 sections, as filed
BACKGROUND OF THE INVENTION
Field of the Invention
The present invention relates to, for example, an image measuring apparatus and an image measuring method using a single-chip color camera.
Description of the Related Art
The image measuring apparatus is a precise measuring instrument which images a work, detects the edge position of the work on the image, and measures the shape and dimension and the like of the work based on the edge position. A CCD (Charge Coupled Device) color camera including the CCD as the image sensor is commonly used for imaging (see, for example, <patcit id="pcit0001" dnum="JP10145612A"><text>Japanese application patent laid-open publication No. Hei 10-145612</text></patcit> (paragraph 0057, <figref idref="f0004">FIG. 4</figref>)).
Because the CCD senses only light intensity, the CCD alone can provide only monochrome images. A color filter over each pixel of the CCD can provide color images. For example, for color expression with R (red), G (green), and B (blue), filters of these three colors are necessary.
Information (sensitivity) of all RGB colors is necessary for one pixel to provide color image. Because only one type of color filter can reside over one pixel (that is, only one color can be allocated to one pixel), one pixel can provide only one type of color information. To provide color images in such a limitation, a three-chip (i.e. three-CCD type or three-CMOS sensor type) color camera and a single-chip (i.e. one-CCD type or one CMOS-sensor type) color camera have been developed.
The three-chip color camera has three CCDs with the same resolution. An RGB spectral prism divides incoming light into R, G, and B components. An R-band CCD senses the R component, a G-band CCD the G component, and a B-band CCD the B component. The single-chip color camera has one CCD with each pixel having thereover either one of the R, G, and B color filters. A postprocess provides pseudo-colorization by calculating the information of the absent color of R, G, and B for each pixel using the color information obtained from the adjacent pixel.
At edges of the work, however, the brightness extremely differs between adjacent pixels. In the single-chip color camera which uses the color information from the adjacent pixels to express color, therefore, the abnormal color-density change at the edge may blur the edge image or may cause a zigzag pattern. An edge position detection based on such an image will increase the measurement error, prohibiting high accuracy measurements. The current image measuring apparatus thus uses the three-chip color camera which provides high-precision images.
The three-chip color camera, however, suffers from the following drawbacks. (1) The three-chip color camera is more expensive than the single-chip color camera because it needs three CCDs, which contributes to the cost of the image measuring apparatus. (2) The image measuring apparatus includes the CCD color camera in a movable unit. For higher positioning accuracy of the unit, the unit needs to be driven with as little force as possible. Because the three-chip color camera includes three CCDs, a CCD with the same light-receiving size as the CCD in the B/W (black and white) camera will increase the camera size. This, in turn, provides a larger unit which needs to be driven by more force. (3) During the assembly of the RGB spectral prism which is one of the manufacturing processes of the CCD color camera, dust can easily be trapped on the mating faces of the prism. The image measuring apparatus has a microscope optical system which uses a narrow incoming beam. If, therefore, the RGB spectral prism with the dust trapped splits the incoming light beam, the dust may be imaged together with the work. It is thus unpractical for the image measuring apparatus to use the three-chip color camera with the dust trapped on the mating faces of the prism. The three-chip color camera thus has a lower yield than the single-chip color camera, which also contributes to the cost of the image measuring apparatus.
<patcit id="pcit0002" dnum="EP0532823A"><text>EP-A-0532823</text></patcit> discloses a method and apparatus for detecting the contour and separating a given subject from an image. The apparatus includes an image measuring portion and a calculation portion for determining an edge position for each color component in an image measured.
<patcit id="pcit0003" dnum="US6229578B1"><text>US-B1-6229578</text></patcit> relates to edge detection based on noise removal algorithm. The algorithm removes noise in digital image by employing four color planes and wherein four pixels constitute a set associated with elementary colors for edge classification.
It is an object of the present invention to provide an image measuring apparatus and an image measuring method which allows high accuracy measurements using the single-chip color camera as the imaging portion.
SUMMARY OF THE INVENTION
An image measuring apparatus according to the present invention comprises: the features as set out in claim 1.
The image measuring apparatus according to the present invention calculates edge positions of the measuring object and contrast values, respectively for the four sets of image data before pseudo-colorization. This calculation is thus not affected by the abnormal color-density change due to the extreme brightness difference among the adjacent pixels. The present invention generates a position data of the measuring object based on the these edge positions and contrast values and outputs the position data of the measuring object (for example, calculates the average value of the position of the measuring object by weigthing the constant values and by outputting it as the position data of the measuring object). The present invention can thus provide high accuracy measurements using the single-chip color camera as the imaging portion.
The image measuring apparatus according to the present invention can further comprise: a single-chip color camera comprising the imaging portion; and a personal computer comprising a pseudo-colorization processing portion which processes pseudo-colorization with the four image data from the imaging portion, and the calculation portion.
The system according to an embodiment is the image measuring apparatus in which the single-chip color camera obtains the four sets of image data and outputs the data without pseudo-colorizing them therein, and in which the data are then pseudo-colorized by the personal computer. With this arrangement, the personal computer also calculates of the position data of the measuring object, so that it is possible to use an existing single-chip color camera in which the camera does not internally perform pseudo-colorization.
In the image measuring apparatus according to the present invention, different colors may be allocated to the four pixels. This can provide an image data based on four types of colors. Thus, even though an error in the measuring object position based on a one-color image data is large, an error can be smaller, because the measuring object positions based on the remaining three-color image data are also used in the average calculation.
An image measuring method according to the present invention comprises the steps as set out in claim 8.
The image measuring apparatus and image measuring method according to the present invention calculates edge positions and contrast values of the measuring object, respectively for four sets of image data based on the colors allocated to the four pixels, and generates and outputs the position data of the measuring object based on them. The present invention can thus provide an image measuring apparatus and an image measuring method which allows high accuracy measurements using the single-chip color camera as the imaging portion.
BRIEF DESCRIPTION OF THE DRAWINGS
<ul id="ul0001" list-style="none" compact="compact"><li><figref idref="f0001">FIG. 1</figref> is a perspective view of the entire configuration of the image measuring apparatus according to this embodiment.</li><li><figref idref="f0002">FIG. 2</figref> shows the optical system of the measurement device body included in the image measuring apparatus in <figref idref="f0001">FIG. 1</figref>.</li><li><figref idref="f0003">FIG. 3</figref> shows an internal structure of the three-chip color camera.</li><li><figref idref="f0004">FIG. 4</figref> shows a hardware configuration which can implement this embodiment.</li><li><figref idref="f0005">FIG. 5</figref> is a plan view of the CCDs in the single-chip color camera provided in the image measuring apparatus in <figref idref="f0001">FIG. 1</figref>.</li><li><figref idref="f0005">FIG. 6</figref> shows a memory area for storing the image data including the pseudo-colorized color information.</li><li><figref idref="f0006">FIG. 7</figref> is a function block diagram for illustrating the operation of the image measuring apparatus according to this embodiment.</li><li><figref idref="f0007">FIG. 8</figref> is a plan view of the CCDs receiving light in the single-chip color camera.</li><li><figref idref="f0007">FIG. 9</figref> shows the image data (R) obtained from the pixels under the filter R.</li><li><figref idref="f0008">FIG. 10</figref> shows the image data (G1) obtained from the pixels under the filter G1.</li><li><figref idref="f0008">FIG. 11</figref> shows the image data (G2) obtained from the pixels under the filter G2.</li><li><figref idref="f0009">FIG. 12</figref> shows the image data (B) obtained from the pixels under the filter B.</li><li><figref idref="f0009">FIG. 13</figref> shows the edge position P<sub>R</sub> detected based on the image data (R).</li><li><figref idref="f0010">FIG. 14</figref> shows the edge position P<sub>G1</sub> detected based on the image data (G1) .</li><li><figref idref="f0010">FIG. 15</figref> shows the edge position P<sub>G2</sub> detected based on the image data (G2).</li><li><figref idref="f0011">FIG. 16</figref> shows the edge position P<sub>B</sub> detected based on the image data (B).</li><li><figref idref="f0011">FIG. 17A</figref> is an image color-density graph based on the image data (G1) .</li><li><figref idref="f0011">FIG. 17B</figref> is a differential graph obtained by differentiating the color-density graph in <figref idref="f0011">FIG. 17A</figref>.</li><li><figref idref="f0012">FIG. 18</figref> shows the edge positions P<sub>R</sub>, P<sub>G1</sub>, P<sub>G2</sub>, and P<sub>B</sub> respectively based on the image data (R), (G1), (G2), and (B), and the position P obtained by averaging those four edge positions.</li><li><figref idref="f0013">FIG. 19</figref> is a function block diagram of the image measuring apparatus according to the comparative embodiment.</li><li><figref idref="f0014">FIG. 20</figref> shows the edge position Q measured by the image measuring apparatus according to the comparative embodiment.</li><li><figref idref="f0014">FIG. 21</figref> shows the actual edge position R, edge position P measured in this embodiment, and edge position Q measured in the comparative embodiment.</li></ul>
DETAILED DESCRIPTION OF THE EMBODIMENTS
<figref idref="f0001">FIG. 1</figref> shows a perspective view of the entire configuration of the image measuring apparatus 1 of a manual operation type according to this embodiment. The device 1 comprises a measurement device body 3 of a noncontact image-measurement type, a personal computer 5 which performs necessary measurement processes, an instruction input portion 7 which provides necessary measurement instructions to the measurement device body 3, and a power supply unit 9 which provides a stable power to the measurement device body 3. Note that the measurement device body 3 may contain the power supply unit 9.
The measurement device body 3 has the following configuration. The base 11 bears a stage 13 on which a work W is mounted. The stage 13 can move in X-axis direction and Y-axis direction by manual operation of an X-axis control 15, a Y-axis control 17, and a fine control 19.
The frame 21 supports a camera unit 23. A Z-axis control 25 can move the camera unit 23 in Z-axis direction along a guide rail formed on the frame 21. The camera unit 23 contains a single-chip color camera 27 which views the stage 13 from above. The camera 27 has its image head 29 exposed outside. The camera 27 images the work W mounted on the stage 13. The image head 29 has a lens around which is provided a ring-shaped oblique-illumination device 31 for emitting illumination light on the work W.
The personal computer 5 comprises a computer body 33, a keyboard 35, a mouse 37, and a CRT 39.
A description is now given of the optical system of the measurement device body 3. <figref idref="f0002">FIG. 2</figref> shows the optical system of the measurement device body 3. The single-chip color camera 27 includes as a CCD 41 as an example of an imaging portion. The single-chip color camera 27 is opposed to the stage 13. An imaging lens 43, a half mirror 45, and an objective lens 47 reside on the light axis AX of the single-chip color camera 27. The imaging lens 43 and half mirror 45 reside in the camera unit 23 in <figref idref="f0001">FIG. 1</figref>. The objective lens 47 fastens on the image head 29.
The oblique-illumination device 31 resides around the objective lens 47. The device 31 directly illuminates the stage 13. In the rear of the half mirror 45 in the camera unit 23, an incident-light illumination device 51 resides via a collimator lens 49. The device 51 illuminates the stage 13 via the half mirror 45.
By way of comparison with the single-chip color camera 27, the three-chip color camera is described below. <figref idref="f0003">FIG. 3</figref> shows the internal structure of the three-chip color camera 53. The camera 53 has three CCDs 55, and a spectral prism 57 in front of them. After passing through the imaging lens 43, the light L is splitted by the spectral prism 57 into RGB components which are received by the corresponding CCDs 55. During the assembly of the spectral prism 57 which is one of the manufacturing processes of the three-chip color camera 53, dust can easily be trapped on the mating faces 59 of the spectral prism 57.
<figref idref="f0004">FIG. 4</figref> shows a hardware configuration which can implement this embodiment. Connected to a bus 73 are CPU 61, a program memory 63, a work memory 65, a multi-value image memory 67, a display control IC 69, and an illumination control IC 71. A CRT 39 connects to the display control IC 69. The oblique-illumination device 31 and incident-light illumination device 51 connect to the illumination control IC 71.
The single-chip color camera 27 connects to the bus 73 via an interface 75. The single-chip color camera 27 takes an image data of the work W. The CPU 61 processes the image data. The multi-value image memory 67 then stores the processed data. The display control IC 69 converts the data stored in the multi-value image memory 67 into the image of the work W. The CRT 39 then displays the image of the work W. The CPU 61 measures the shape, dimension, and the like of the work W. The work memory 65 provides work areas for various processes by the CPU 61.
An X-axis encoder 77, a Y-axis encoder 79, and a Z-axis encoder 81 reside to detect the positions of the single-chip color camera 27 in the X-, Y-, Z-axis directions, respectively, relative to the stage 13. These encoders connect to the bus 73 via an interface 83. The CPU 61 thus incorporates the outputs from the encoders 77, 79, and 81. The CPU 61 calculates the current position of the work, or the like, according to the information on each axis position or the like which the CPU 61 incorporates.
The illumination control IC 71 generates an analog instruction voltage based on the instruction value generated by the CPU 61. The illumination control IC 71 then applies the instruction voltage to the oblique-illumination device 31 and incident-light illumination device 51. The input device (instruction input portion 7 and keyboard 35) connects to the bus 73 via an interface 85.
A description is now given of the CCD 41 included in the single-chip color camera 27 in <figref idref="f0002">FIG. 2</figref>. <figref idref="f0005">FIG. 5</figref> is a plan view of the CCD 41. The CCD 41 is an example of the imaging portion. The CCD 41 comprises a number of pixels (0, 0) , (1,0),..., (m,n) arranged in a matrix of m x n elements. <figref idref="f0005">FIG. 5</figref> shows a portion of the pixels. Each pixel has thereover any one of the filter R,.filters G1 and G2, and filter B.
A pixel with the filter R provides information on the R component. A pixel with the filter G1 or G2 provides information on the G component. A pixel with the filter B provides information on the B component. The number of pixels for the G component is twice the number of pixels for the R component or B component, because the human optic nerve is most sensitive to the G component.
The arrangement of the filters is described in more detail below. The CCD 41 comprises two alternating rows: one comprises alternately the pixel with the filter G1 and the pixel with the filter R, and another comprises alternately the pixel with the filter B and the pixel with the filter G2. This is the so-called Bayer arrangement. This arrangement comprises a plurality of sets S arranged in a matrix. Each set S comprises the pixel with the filter G1, the pixel with the filter R, the pixel with the filter B, and the pixel with the filter G2.
As described above, the configuration of the CCD 41 as an imaging portion can be expressed as follows: each pixel is allocated with one color; four pixels constitute one set; one set is allocated with a plurality of colors to express a color; and the sets are arranged in matrix.
Each pixel provides only one color information. The single-chip color camera performs pseudo-colorization by obtaining the absent color information of each pixel from the color information of the adjacent pixels. The adjacent pixels form an adjacent-pixel group N. The adjacent-pixel group N may be defined in different manners. This embodiment defines the group N as follows. The adjacent-pixel group NO comprises the pixels (0,0), (1,0), (0,1), and (1,1). The adjacent-pixel group N1 comprises the pixels (1,0), (2,0), (1,1), and (2,1). The adjacent-pixel group N2 comprises the pixels (0, 1), (1,1), (0,2), and (1,2). The adjacent-pixel group N3 comprises the pixels (1,1), (2,1), (1,2), and (2,2). Likewise, other adjacent-pixel groups each comprise adjacent four pixels with different filters.
The multi-value image memory 67 shown in <figref idref="f0004">FIG. 4</figref> stores the image data comprising pseudo-colorized color information. More specifically, the memory area M of the multi-value image memory 67 shown in <figref idref="f0005">FIG. 6</figref> stores the image data. The color information on the pseudo colors of the pixels shown in <figref idref="f0005">FIG. 5</figref>, for example, is calculated as follows. The color information on the pseudo color of the pixel (0, 0) is calculated from the color information of the adjacent-pixel group N0. The color information on the pseudo color of the pixel (1,0) is calculated from the color information of the adjacent-pixel group N1 . The color information on the pseudo color of the pixel (0,1) is calculated from the color information of the adjacent-pixel group N2. The color information on the pseudo color of the pixel (1,1) is calculated from the color information of the adjacent-pixel group N3. The color information on the pseudo color of each pixel (0,0), (1,0),..., (m,n) thus calculated is stored in the addresses corresponding to each pixel, as shown in <figref idref="f0005">FIG. 6</figref>.
A description is now given of how the image measuring apparatus 1 according to this embodiment obtains the position data of the measuring object, using the detection of the edges of the work W as an example. For the edge detection, the measuring object is the edge, and the position data of the measuring object is the position data of the edge. <figref idref="f0006">FIG. 7</figref> is a function block diagram of the image measuring apparatus 1 according to this embodiment for illustrating the measurement operation.
An image including a portion (shown by the dotted line) of the work W edge is projected onto the CCD 41 in the single-chip color camera 27. <figref idref="f0007">FIG. 8</figref> is a plan view of the CCD 41 in this state. <figref idref="f0007">FIG. 8</figref> corresponds to <figref idref="f0005">FIG. 5</figref>. The shaded pixels represent the dark portion, and the unshaded pixels represent the light portion. After the CCD 41 images a portion of the work W edge, the pixels under the filters R, G1, G2, and B provide the image data (R), (G1), (G2), and (B), respectively. <figref idref="f0007 f0008 f0009">FIGS. 9 to 12</figref> show these four image data. After output from the CCD 41, these four image data go to the personal computer 5 without being pseudo-colorized in the single-chip color camera 27.
An image process application of the personal computer 5 such as a frame grabber incorporates the image data (R), (G1), (G2), and (B). The application then sends the image data to a pseudo-colorization portion 87 and a calculation portion 89 in the personal computer 5. The calculation portion 89 outputs the position data. The CPU 61 and multi-value image memory 67 and the like in <figref idref="f0004">FIG. 4</figref> implement the above portion's functions.
A position/contrast-value calculation portion 91 in the calculation portion 89 calculates, for each of the image data (R), (G1), (G2), and (B), the edge position and the contrast value at one side and the other side across the edge as a boundary. <figref idref="f0009 f0010 f0011">FIGS. 13 to 16</figref> show the edge position P<sub>R</sub>, P<sub>G1</sub>, P<sub>G2</sub>, and P<sub>B</sub> detected based on the image data (R), (G1), (G2), and (B), respectively.
An example of how the edge position and contrast value are determined is described for the image data (G1) shown in <figref idref="f0010">FIG. 14</figref>. An edge-detection tool T on the image moves along the y-axis. In <figref idref="f0010">FIG. 14</figref>, the edge-detection tool T is positioned between y=6 and y=7. <figref idref="f0011">FIG. 17A</figref> shows the image color-density graph based on the image data (G1) . In <figref idref="f0011">FIG. 17A</figref>, the horizontal axis indicates the x direction of the image data. The vertical axis indicates the color density. <figref idref="f0011">FIG. 17B</figref> is a differential graph obtained by differentiating the color-density graph in <figref idref="f0011">FIG. 17A</figref>. The barycenter g of the area defined by the differential graph (which may be a graph of the squared differential value) and the x-axis shown in <figref idref="f0011">FIG. 17B</figref> is the edge position P<sub>G1</sub>. In this way, the calculation of the edge position can determine the edge position at the subpixel level. <figref idref="f0010">FIG. 14</figref> shows the edge position line obtained by joining the edge positions P<sub>G1</sub>. <figref idref="f0011">FIG. 17A</figref> also shows the contrast value W<sub>G1</sub> between one side and the other side across the edge as a boundary.
The edge position and contrast value are determined for each of the four image data, providing four sets of the edge position and contrast value. These four sets of the edge position and contrast value (R), (G1), (G2), and (B) are sent to the average calculation portion 93 in the calculation portion 89. The average calculation portion 93 calculates the average edge position P using the equations below. The average calculation portion 93 then outputs the average edge position P as the edge position data. <maths id="math0001"><math display="block"><mi mathvariant="normal">P</mi><mo>=</mo><mfenced><msub><mi mathvariant="normal">P</mi><mi mathvariant="normal">R</mi></msub><mo></mo><msub><mi mathvariant="normal">W</mi><mi mathvariant="normal">R</mi></msub><mo>+</mo><msub><mi mathvariant="normal">P</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>1</mn></mrow></msub><mo></mo><msub><mi mathvariant="normal">W</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi mathvariant="normal">P</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>2</mn></mrow></msub><mo></mo><msub><mi mathvariant="normal">W</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>2</mn></mrow></msub><mo>+</mo><msub><mi mathvariant="normal">P</mi><mi mathvariant="normal">B</mi></msub><mo></mo><msub><mi mathvariant="normal">W</mi><mi mathvariant="normal">B</mi></msub></mfenced><mo>/</mo><mfenced><msub><mi mathvariant="normal">W</mi><mi mathvariant="normal">R</mi></msub><mo>+</mo><msub><mi mathvariant="normal">W</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi mathvariant="normal">W</mi><mrow><mi mathvariant="normal">G</mi><mo></mo><mn>2</mn></mrow></msub><mo>+</mo><msub><mi mathvariant="normal">W</mi><mi mathvariant="normal">B</mi></msub></mfenced></math><img file="EP1686535B1_D0001.tif" /></maths> where, <dl id="dl0001" compact="compact"><dt>P:</dt><dd>the average edge position,</dd><dt>P<sub>R</sub>:</dt><dd>the edge position based on the image data (R),</dd><dt>P<sub>G1</sub>:</dt><dd>the edge position based on the image data (G1),</dd><dt>P<sub>G2</sub>:</dt><dd>the edge position based on the image data (G2),</dd><dt>P<sub>B</sub>:</dt><dd>the edge position based on the image data (B),</dd><dt>W<sub>R</sub>:</dt><dd>the contrast value based on the image data (R),</dd><dt>W<sub>G1</sub>:</dt><dd>the contrast value based on the image data (G1),</dd><dt>W<sub>G2</sub>:</dt><dd>the contrast value based on the image data (G2),</dd><dt>W<sub>B</sub>:</dt><dd>the contrast value based on the image data (B).</dd></dl>
<figref idref="f0012">FIG. 18</figref> shows the graph showing the edge position P, and the edge positions P<sub>R</sub>, P<sub>G1</sub>, P<sub>G2</sub>, and P<sub>B</sub> based on the image data (R), (G1), (G2), and (B), respectively. The edge position data P thus obtained provides the measurements of the shape, dimension, and the like of the work W. After receiving the image data (R), (G1), (G2), and (B), the pseudo-colorization portion 87 pseudo-colorizes the image data. The CRT 39 then displays the pseudo-colorized image data.
A description is now given of how the image measuring apparatus according to the comparative embodiment operates, and of the main effects of this embodiment in comparison with the comparative embodiment. <figref idref="f0013">FIG. 19</figref> is a function block diagram of the image measuring apparatus according to the comparative embodiment. <figref idref="f0013">FIG. 19</figref> corresponds to <figref idref="f0006">FIG. 7</figref>. The CCD 41 sends the image data (R), (G1), (G2), and (B) to the pseudo-colorization portion 87 in the personal computer 5, where the image data is pseudo-colorized.
The pseudo-colorization portion 87 sends the pseudo-colorized data to the CRT 39 for display. The pseudo-colorization portion 87 also sends the pseudo-colorized data to the gray-scale processing portion 95, where the image data is converted into the black, white, and gray data. The edge exists at the location where the image changes from light to dark (or from dark to light), that is, where the gray color exists. The position calculation portion 97 determines the location where the lightness of the gray color corresponds to a predetermined threshold value to specify the edge position Q as shown in <figref idref="f0014">FIG. 20</figref>.
<figref idref="f0014">FIG. 21</figref> shows the actual edge position R, the edge position P measured according to this embodiment, and the edge position Q measured according to the comparative embodiment. This embodiment can provide more accurate edge position than the comparative embodiment. The reason is as follows.
The comparative embodiment calculates the edge position based on the image data after pseudo-colorization, and uses that edge position as the edge position data. As described above in BACKGROUND OF THE INVENTION, the single-chip color camera expresses colors using the color information from the adjacent pixels. At the edges where the brightness extremely differs between the adjacent pixels, therefore, the abnormal color-density cause blur of the like in the edge image. The comparative embodiment uses such blurred images as a basis to calculate the edge position, providing larger measurement errors.
In contrast, this embodiment calculates the edge position and contrast value for each of the four image data before pseudo-colorization. This calculation is thus unaffected by the abnormal color-density change due to the extreme brightness difference among the adjacent pixels. This embodiment weights the four edge positions with the four contrast values based on each image data to calculate the average edge position.
The average edge position is calculated by weighting the edge positions with the contrast values for the following reason. Distinguishing between noise and the edge position based on the image data with a smaller contrast value is more difficult, while distinguishing between noise and the edge position based on the image data with a larger contrast value is less difficult. It is thus preferable to weight more heavily the edge position based on the image data with a larger contrast value to calculate the average edge position.
This embodiment then outputs the above average edge position as the edge position data, which allows the specification of the edge position at the subpixel level. As described above, this embodiment allows high accuracy measurements using the single-chip color camera 27 as the imaging portion. Particularly, a single-chip color camera with megapixels can provide an image with a higher resolution, further improving the edge detection accuracy.
According to this embodiment, the single-chip color camera 27 can provide following advantages over the three-chip color camera. (1) A lower-cost image measuring apparatus 1, (2) a smaller camera 27, which improves the positioning accuracy of the camera unit 23.
According to this embodiment, the single-chip color camera 27 obtains the four image data (R), (G1), (G2), and (B), and outputs the data without internally pseudo-colorizing them, which data are then pseudo-colorized by the personal computer 5. The personal computer 5 also calculates the edge position data. It is thus possible to use the existing single-chip color camera in which the camera 27 does not internally pseudo-colorize the image data.
Note that the color filters provided on the four pixels may be a combination of C (cyan), M (magenta), Y1 (yellow), and Y2 (yellow), or a combination of R (red), G (green), B (blue), and C (cyan). Particularly, the RGBC filters will allocate different colors to the four pixels, providing the following effect. For R, G1, G2, and B filters, the image data from the green (i.e., G1, G2) occupies 50%. A larger error in the edge position based on the green image data will thus provide a particularly larger error in the average edge position.
In contrast, the RGBC filters can provide the image data from the four colors. A large error in the edge position based on a one-color image data can still provide a small error in the average edge position because the edge positions based on the remaining three-color image data are also used in the average calculation.
Note that although this embodiment takes the edge detection as an example, the present invention applies to the pattern matching which detects positions matched to the template on the image. This is because the present invention applies to the acquisition of the pattern position data which the pattern matching needs. More specifically, the pattern positions and contrast values are calculated based on the image data (R), (G1), (G2), and (B) . The pattern positions are then weighted with the contrast values to calculate the average pattern position. The present invention can improve the measurement accuracy by taking the above average as the pattern position, rather than using the pseudo-colorized image data which may blur the pattern edge and cause a mismatching at the subpixel level.
Contents4
15 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| EP0532823A | Cites | European Patent Office (EPO) |
| EP1339238A | Cites | European Patent Office (EPO) |
| US6229578B1 | Cites | United States of America |
8 members in 5 offices
Priority claims5
| Document | Office | Kind | Date |
|---|---|---|---|
| 2005018380 | Japan | A | |
| 2005018380 | Japan | A | |
| 2005018380 | Japan | – | |
| 2005018380 | – | – | – |
| JP20050018380 | – | – | – |
Members8
| Document | Office | Kind | |
|---|---|---|---|
| EP1686535A1 | European Patent Office (EPO) | A1 | |
| JP2006208085A | Japan | A | |
| CN1818543A | China | A | |
| US2007036465A1 | United States of America | A1 | |
| EP1686535B1This record | European Patent Office (EPO) | B1 | |
| DE602006003104D1 | Germany | D1 | |
| CN100533054C | China | C | |
| US7613359B2 | United States of America | B2 |
26 legal events, as 4 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal feeWithdrawnR119 | R119 | DE | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Fee paymentPLFP | PLFP | FR | |
| Fee paymentPLFP | PLFP | FR | |
| Fee paymentPLFP | PLFP | FR | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Corresponds to:REF | REF | EP | |
| Designated contracting statesAK | AK | EP | |
| European patent grantedGrantedFG4D | FG4D | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Grant fee paidORIGINAL CODE: EPIDOSNIGR3GRAS | GRAS | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOSNIGR1GRAP | GRAP | EP | |
| Designation fees paidAKX | AKX | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Request for extension of the european patentAX | AX | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 1686535
- Publication, DOCDB
- 1686535
- Publication, EPODOC
- EP1686535
- Application
- 6001560
- Application, DOCDB
- 06001560
- Application, EPODOC
- EP20060001560
Titles3
- German
- Bildmessvorrichtung und Bildmessverfahren
- English
- Image measuring apparatus and image measuring method
- French
- Appareil et procédé de mesure d'image
Classification
- CPC, 6
- G06T7/12
- H04N23/84
- G06T2207/10056
- H04N25/136
- H04N25/134
- H04N25/76
- IPC, 3
- G06T5 00
- G06T7 00
- H04N9 04
Designated states3
- Contracting states, 3
- Germany
- France
- United Kingdom
