Image measuring machine and program

JP2025032936APending Publication Date: 2025-03-12MITUTOYO CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023138469
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-03-12

Smart Images

  • Figure 2025032936000001_ABST
    Figure 2025032936000001_ABST
Patent Text Reader

Abstract

To provide an image measuring machine capable of capturing an image including a prescribed encoded blur, irrespective of the moving speed of a stage.SOLUTION: The image measuring machine comprises: a stage on which a measurement object is placed; an imaging unit for capturing an image of the measurement object placed on the stage and capable of capturing the image of the measurement object while the stage is moving in a prescribed direction relatively to the imaging unit; a code information generation unit for outputting an exposure control signal encoded in accordance with a position in the prescribed direction of the stage; a light source for irradiating the measurement object with light; an exposure control unit for blinking the light source corresponding to the position in the prescribed direction of the stage in accordance with the exposure control signal; and a correction unit for removing a blur from the image and restoring an all-in-focus image on the basis of a blur spread function that represents an encoded blur occurring in the image captured by the imaging unit due to exposure control by the exposure control signal.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image measuring instrument and a program for measuring the shape of a measurement object in a non-contact manner based on an image obtained by capturing an image of the measurement object. [Background technology]

[0002] An image measuring instrument is a device that takes an image of the object to be measured (hereafter referred to as the "workpiece"), analyzes the image, extracts shapes such as lines, circles, polygons, etc., and obtains measurement results such as distance, inclination, diameter, width, etc. of the extracted shapes.

[0003] When capturing images of a workpiece with an image measuring machine, in order to prevent blurring of the images, the stage is generally moved so that each measurement point is within the field of view of the image, and then the image is captured after the stage is stopped.As the number of measurement points increases, the measurement time becomes enormous as movement and stopping are repeated accordingly.

[0004] To solve this problem, image measuring instruments have been developed that use pulse exposure and are less likely to blur images even when capturing images while moving the stage. Although image measuring instruments that use pulse exposure can significantly reduce measurement time, there is a limit to how much accuracy can be improved due to the reduced contrast of the image, as the exposure time is too short with pulse exposure.

[0005] On the other hand, coded exposure technology is known as a technique for suppressing such image blurring (see, for example, Non-Patent Document 1). In this technique, the exposure of the light source used for imaging is coded in time while the stage is moving, thereby adding "coded blurring" to the image. Then, in post-processing, the "coded blurring" is removed by correction. In this technique, the integration time of exposure is longer than in pulse exposure, so it is expected that not only can the measurement time be reduced, but also a reduction in image contrast degradation can be suppressed. [Prior art documents] [Non-patent literature]

[0006] [Non-Patent Document 1] Hajime Nagahara, "Coded Imaging", IPSJ Technical Report, Vol. 2010-CVIM-171, No. 14 (2010) Summary of the Invention [Problem to be solved by the invention]

[0007] However, when the conventional coded exposure technology that codes the exposure of the light source over time is applied to an image measuring instrument, image blur cannot be sufficiently corrected when the stage speed fluctuates, and precise stage control is required to ensure accuracy. Also, different stage movement speeds cause different image blurs. For this reason, it is necessary to either suppress blur only at a predetermined known stage movement speed, or to sequentially generate "coded blur" according to the stage movement speed.

[0008] An object of the present invention is to provide an image measuring instrument that can capture an image containing a predetermined encoded blur regardless of the moving speed of the stage. [Means for solving the problem]

[0009] An image measuring instrument according to an embodiment of the present invention comprises a stage on which a measurement object is placed, an imaging unit that captures an image of the measurement object placed on the stage, where the imaging unit captures an image of the measurement object while the stage is moving in a predetermined direction relative to the imaging unit, a code information generating unit that outputs an exposure control signal encoded according to the position of the stage in the predetermined direction, a light source that irradiates light onto the measurement object, an exposure control unit that blinks the light source according to the position of the stage in the predetermined direction in accordance with the exposure control signal, and a correction unit that removes blur from the image and restores an all-focus image based on a blur spread function that represents the encoded blur that occurs in the image captured by the imaging unit due to exposure control by the exposure control signal.

[0010] In the present invention, the image measuring machine may further include a code scale provided on the stage along a predetermined direction and having a code pattern formed according to a position in the predetermined direction, and a code track reader that reads the code scale according to the position of the stage in the predetermined direction. The code information generator may output an exposure control signal that is coded according to the position of the stage in the predetermined direction based on the code of the code scale read by the code track reader.

[0011] Alternatively, the image measuring device may further include an encoder that outputs information indicating a reference position in a predetermined direction of the stage and a signal indicating a relative displacement amount in the predetermined direction. The code information generating unit may output an exposure control signal that is coded according to the position of the stage in the predetermined direction, based on the information indicating the reference position and the signal indicating the relative displacement amount in the predetermined direction.

[0012] Alternatively, the image measuring device may further include an encoder that outputs a signal indicating a relative displacement amount of the stage in the predetermined direction. The code information generating unit may be configured to receive a trigger signal, and may output an exposure control signal that is coded according to the position of the stage in the predetermined direction based on the signal indicating the relative displacement amount in the predetermined direction, with the position of the stage in the predetermined direction at the time the trigger signal is input as a reference.

[0013] In the present invention, the Fourier transform of the image captured by the imaging unit is J, the Fourier transform of the omnifocus image is I, and the Fourier transform of the PSF kernel, which is a matrix representing the encoded blur that occurs in the image captured by the imaging unit, is K. The correction unit calculates I using I=J / K and restores the omnifocus image by performing an inverse Fourier transform on I.

[0014] A program according to an embodiment of the present invention may cause a computer to function as a correction unit in any one of the above-described image measuring devices. [Brief description of the drawings]

[0015] [Figure 1]1 is a functional block diagram showing the configuration of an image measuring instrument 1 in a first embodiment. [Diagram 2] FIG. 2 illustrates an example of a code track. [Diagram 3] FIG. 2 is a block diagram showing the configuration of a computer main unit 160. [Figure 4] FIG. 11 is a functional block diagram showing the configuration of an image measuring instrument 1 in a second embodiment. [Diagram 5] FIG. 11 is a functional block diagram showing the configuration of an image measuring instrument 1 in a third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] [First embodiment] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In the following description, the same members are designated by the same reference numerals, and the description of members that have already been described will be omitted as appropriate.

[0017] [Configuration of the image measuring device] 1 is a functional block diagram showing the configuration of an image measuring instrument 1 in the first embodiment. The image measuring instrument 1 includes an imaging unit 10, a stage 11, an encoder 12, a light source 13, a control unit 14, and a computer system 16.

[0018] Stage 11 is disposed so that its upper surface (mounting surface) is a horizontal plane. A workpiece W, which is an object to be measured, is mounted on the upper surface. Stage 11 has driving means in the X-axis direction and the Y-axis direction, such as a motor and an actuator, and is movable in the X-axis direction and the Y-axis direction under the control of a movement control unit 141 provided in the control unit 14.

[0019] Encoder 12 acquires the position of stage 11. Encoder 12 includes an X encoder 121 that reads the position in the X-axis direction and a Y encoder 122 that reads the position in the Y-axis direction. X encoder 121 and Y encoder 122 each include a scale with graduations and a read head that reads the graduations. The scale is attached to the moving part (i.e., stage 11), and the read head is disposed in a non-moving part of image measuring device 1 at a position where the scale can be read. The read head reads the scale using any method, such as a photoelectric method or an electromagnetic induction method. The position information read by X encoder 121 and Y encoder 122 is fed back to movement control unit 141.

[0020] The encoder 12 further includes a code track 124. In this embodiment, the code track 124 is provided in parallel with the X-encoder 121 as shown in FIG. 2. The code track 124 includes a code scale 124a provided on the stage 11 along the X-axis direction in parallel with the scale 121a of the X-encoder 121, and a code track reader 124b that is provided in parallel with the read head 121b of the X-encoder 121 in a non-movable part of the image measuring device 1 and reads the code scale 124a. The code scale 124a has a code pattern formed according to the position in the X-axis direction in two states (for example, reflection and non-reflection on the scale of a reflective photoelectric encoder). The code track reader 124b reads the code of the opposing code scale 124a in accordance with the position in the X-axis direction, and outputs the code information as an exposure control signal. In this embodiment, the code track 124 corresponds to the code information generator of the present invention. This exposure control signal specifies whether or not to irradiate light from the light source 13 in accordance with the position of the stage 11.

[0021] The imaging unit 10 is provided facing the upper surface of the stage 11, and captures an image of the workpiece W placed on the stage 11. The image of the workpiece W is captured while the stage 11 moves relatively in a predetermined direction (e.g., the X-axis direction or the Y-axis direction) with respect to the imaging unit 10. The imaging unit 10 has an imaging element 101 and an optical system 102. The imaging unit 10 also has a driving means such as a motor or an actuator, and may be movable in the Z-axis direction under the control of a movement control unit 141 provided in the control unit 14.

[0022] The imaging element 101 is a two-dimensional image sensor such as a CCD or CMOS. The optical system 102 forms an image of the workpiece W on the light receiving surface of the imaging element 101. The optical system 102 is, for example, a combination of multiple lenses and apertures to form a telecentric optical system. In a telecentric optical system, the principal ray can be regarded as parallel light, so the dimensions in the captured image do not depend on the position in the Z-axis direction (height direction). For this reason, it is suitable for measuring a workpiece W that has undulations (for example, steps, holes, etc.). The image of the workpiece W is converted into an image (image data) by the imaging element 101 and input to the computer system 16.

[0023] The light source 13 irradiates light onto the workpiece W when capturing an image of the workpiece W. The light source 13 irradiates light onto at least a portion of the workpiece W to be captured under the control of the exposure control unit 143 when capturing an image of the workpiece W.

[0024] The control unit 14 cooperates with a computer system 16 as necessary to control each part of the image measuring instrument 1. The control unit 14 in this embodiment includes a movement control unit 141 and an exposure control unit 143.

[0025] The movement control unit 141 controls the movement of the stage 11. The movement path (direction and distance) and movement speed are based on commands from the computer system 16.

[0026] The exposure control unit 143 controls the imaging unit 10 and the light source 13 based on the exposure control signal output by the code track 124 and a command related to the light amount from the CPU 164 to capture an image of the workpiece W, and blinks the illumination light from the light source 13 according to the exposure control signal during the imaging period. With this configuration, the exposure control signal does not depend on the moving speed or moving direction of the stage 11, but changes according to the code of the code scale 124a read by the code track reading unit 124b. Therefore, the image measuring machine 1 is controlled as to whether or not to expose depending on the position of the stage 11.

[0027] The computer system 16 includes a computer main unit 160, a keyboard 161, a mouse 162, and a display 163. Fig. 3 is a block diagram showing the configuration of the computer main unit 160. The computer main unit 160 includes a CPU (Central Processing Unit) 164 which serves as the center of control, a storage unit 165, a work memory 166, interfaces (indicated as "IF" in Fig. 3) 167 and 168, and a display control unit 169 which controls the display on the display 163.

[0028] Operator instruction information input from the keyboard 161 or mouse 162 is input to the CPU 164 via the interface 167. The interface 168 is connected to the control unit 14, and outputs commands to the control unit for controlling the imaging unit 10, light source 13, stage 11, etc. The interface 168 also receives various types of status information and measurement results from the imaging unit 10, light source 13, stage 11, etc. via the control unit 14, and inputs them to the CPU 164.

[0029] The display control unit 169 displays the image captured by the imaging unit 10 on the display 163. Furthermore, the display control unit 169 displays on the display 163, in addition to the image captured by the imaging unit 10, a user interface for inputting control instructions to the image measuring instrument 1, a user interface of a tool for analyzing the captured image, and the like.

[0030] The work memory 166 provides a working area for various processes of the CPU 164. The storage unit 165 is configured with, for example, a hard disk drive, a RAM, etc., and stores programs executed by the CPU 164, image data captured by the imaging unit 10, etc. The storage unit 165 also stores a correction program for executing a correction process described below, and a PSF kernel used in the correction process. This PSF kernel is a matrix that represents the coded blur that occurs in an image due to exposure corresponding to the code pattern of the code track 124.

[0031] The CPU 164 controls each part of the image measuring machine 1 via the control unit 14 based on various input information via each interface, instructions from an operator, a measurement definition program (part program) stored in the memory unit 165, and the like. The CPU 164 gives instructions to the control unit 14 regarding, for example, setting the movement path of the stage 11, adjusting the movement speed and exposure time, adjusting the light amount of the light source 13, timing of imaging by the imaging unit 10, and the like. The CPU 164 also executes various processes such as a correction process for removing blurring of the image of the workpiece W captured by the imaging unit 10. That is, the CPU 164 realizes the function of the image blur correction unit in the present invention.

[0032] In the following, the capturing of an image using the above-mentioned image measuring device 1 and the correction process for the image of the workpiece W obtained by this capturing will be described.

[0033] [Image capture] Prior to imaging, the workpiece W is placed on the stage 11. At this time, the workpiece W is placed at a position on the stage 11 in the X-axis direction where the code scale 124a is read by the code track reading unit 124b when the imaging unit 10 places the workpiece W in the imaging field of view. In accordance with a measurement program executed by the computer system 16, under the control of the control unit 14, the imaging unit 10 captures an image of the workpiece W while the stage 11 is moving in the X-axis direction. At that time, the light source 13 irradiates the illumination light while blinking according to an exposure control signal that varies according to the position of the stage 11 in the X-axis direction. As a result, the imaging unit 10 captures an image of the workpiece W by exposure coded according to the position of the stage 11 in the X-axis direction, but the obtained image contains coded blurring due to the movement of the stage 11 during imaging. The image of the workpiece W captured in this manner is taken into the computer system 16, and a correction process is performed to remove the coded blurring.

[0034] [Correction Processing] In the correction process of the present invention, the computer system 16 executes a correction program to correct the image of the workpiece containing the encoded blur and remove the blur from the measured workpiece image. That is, the computer system 16 functions as a correction unit of the present invention.

[0035] Generally, if an ideal scene image without blur (all-in-focus image) is i, an image containing blur is j, and the blur spread function (PSF) corresponding to the blur is k, then if noise other than blur is ignored, j can be expressed as the convolution of i, as shown in Equation (1). j = k * i … (1)

[0036] The Fourier transform of equation (1) gives equation (2). In equation (2), the Fourier transform of all-in-focus image i is I, the Fourier transform of image j containing blur is J, the Fourier transform of the blur spread function is K, and the Fourier transform of noise is N. J = K I … (2)

[0037] Solving equation (2) for I gives equation (3). I = J / K … (3)

[0038] From this equation (3), the K of the PSF (or its inverse function K -1 ), it is possible to obtain the Fourier transform I of the all-focus image i from the blurred image j, and further to restore the all-focus image i by performing the inverse Fourier transform on I. Note that there is a second term associated with noise in equation (3). If K contains zero or a small absolute value, the calculation result diverges or the effect of noise that was ignored at the stage of equation (1) appears significantly in the calculation result, making it impossible to stably obtain the all-focus image i. To prevent this, by using a code scale 124a having a code pattern that results in a PSF that does not contain zero or a small absolute value in K, it becomes possible to stably obtain the all-focus image i, and to restore the all-focus image i with high accuracy.

[0039] In this way, if the PSF is known, it is possible to restore an all-in-focus image, and correction processing is performed based on the image of the workpiece W captured by the exposure encoded as described above and the PSF kernel previously stored in the storage unit 165. That is, in equation (3), the PSF kernel corresponds to the encoded blur caused by the encoded exposure during imaging, but since the exposure is encoded according to the position of the stage 11 in the X direction as described above, the same PSF kernel can be used regardless of the moving speed and moving direction of the stage 11 in the X axis direction.

[0040] The CPU 164 performs a calculation in which the Fourier transform of the image of the workpiece W captured by the imaging unit 10 is taken as J in equation (3) and the PSF kernel is taken as K in equation (3), thereby removing the encoded blur contained in the image of the workpiece W captured by the imaging unit 10 and outputting the corrected image.

[0041] The computer system 16 displays the corrected image of the workpiece on the display 163. Then, a measurement tool for analyzing the image displayed on the display 163 is applied to the image by a user operation or automatic processing by a program, and desired locations are measured.

[0042] According to the image measuring instrument 1 of the present embodiment described above, an image containing a predetermined encoded blur can be captured regardless of the moving speed of the stage. Then, the encoded blur contained in the image can be removed by a correction process to obtain an image that can be measured with high accuracy.

[0043] Second Embodiment In the above-described first embodiment, the code information generating unit 142 generated an exposure control signal encoded according to a position based on a code corresponding to a position read by the code track 124. In contrast, the image measuring instrument 1 according to the second embodiment is characterized in that it does not include the code track 124, and the code information generating unit 142 generates an exposure control signal encoded according to a position based on position information read by the encoder. Note that, apart from the changes associated with this configuration, the image measuring instrument 1 is the same as the image measuring instrument 1 of the first embodiment, and therefore a description thereof will be omitted here.

[0044] 4 is a functional block diagram showing the configuration of the image measuring instrument 1 in the second embodiment. The image measuring instrument 1 includes an imaging unit 10, a stage 11, an encoder 12, a light source 13, a control unit 14, and a computer system 16.

[0045] Unlike the first embodiment, the encoder 12 of this embodiment does not include the code track 124, but includes an X encoder 121 and a Y encoder 122. In this embodiment, the X encoder 121 includes at least an incremental linear encoder, and outputs a two-phase square wave signal according to the relative displacement amount in the X-axis direction. In addition, the X encoder 121 outputs information indicating the reference position of encoding in the X-axis direction. The information indicating the reference position of encoding in the X-axis direction may be, for example, origin information indicating the origin in the X-axis direction (for example, an origin pulse generated when the read head of the X encoder 121 is located at the origin in the X-axis direction), or absolute position information output by an absolute encoder attached to the incremental encoder. The two-phase square wave signal output by the X encoder 121 and the information indicating the reference position of encoding are input to the code information generating unit 142.

[0046] The control unit 14 includes a movement control unit 141 and an exposure control unit 143, similar to the first embodiment. In addition to these, the control unit 14 includes a code information generating unit 142. The code information generating unit 142 generates and outputs an exposure control signal coded according to a position, based on the two-phase square wave signal output by the X encoder 121 and information indicating a reference position for coding. In order to generate such an exposure control signal, the code information generating unit 142 holds a code pattern that specifies the value of the exposure control signal relative to the amount of displacement from the reference position (i.e., a logical value indicating exposure / non-exposure). A PSF kernel corresponding to this code pattern is stored in the storage unit 165 for use in the correction process.

[0047] When the stage 11 reaches the reference position, the code information generating unit 142 starts generating an exposure control signal. Specifically, the code information generating unit 142 generates and outputs an exposure control signal, the output value of which changes in response to the amount of displacement from the reference position specified by a two-phase square wave, based on a predetermined code pattern. With this configuration, the exposure control signal does not depend on the moving speed or moving direction of the stage 11, but changes in response to the position in the X-axis direction read by the X-encoder 121.

[0048] As in the first embodiment, the exposure control unit 143 controls the imaging unit 10 and the light source 13 based on the exposure control signal and a command related to the light amount from the CPU 164 to capture an image of the workpiece W, and blinks the illumination light from the light source 13 according to the exposure control signal during the imaging period. Therefore, in the image measuring machine 1 of this embodiment as well, whether or not to expose is controlled according to the position of the stage 11.

[0049] Using the image measuring machine 1 of the second embodiment configured as described above, the workpiece W is placed near the reference position in the X-axis direction on the stage 11 and an image containing encoded blur is obtained by imaging. Then, by performing a correction process on the obtained image in the same manner as in the first embodiment, the encoded blur contained in the image can be removed, and an image that can be measured with high accuracy can be obtained.

[0050] The image measuring device 1 of the second embodiment described above can remove blurring in the same manner as the first embodiment, but unlike the first embodiment, it does not require the provision of a code track 124, thereby reducing costs. Third Embodiment The second embodiment described above is characterized in that the code information generating unit 142 generates an exposure control signal encoded according to a position based on the position information read by the X-encoder 121, with reference to information indicating a reference position (e.g., origin information) output by the X-encoder 121. In contrast, the image measuring instrument 1 in the third embodiment is common to the second embodiment in that the code information generating unit 142 generates an exposure control signal encoded according to a position based on the position information read by the X-encoder 121, but differs from the second embodiment in that the exposure control signal is generated based on an external trigger signal (pulse signal) rather than on information indicating a reference position output by the X-encoder 121. Other than the changes associated with this configuration, the image measuring instrument 1 in the third embodiment is similar to the image measuring instrument 1 in the second embodiment, and therefore a description thereof will be omitted here.

[0051] 5 is a functional block diagram showing the configuration of an image measuring instrument 1 in the third embodiment. The image measuring instrument 1 includes an imaging unit 10, a stage 11, an encoder 12, a light source 13, a control unit 14, and a computer system 16.

[0052] The code information generating unit 142 in the control unit 14 of this embodiment is different from that of the second embodiment in that it has an input for receiving a trigger signal from the outside. The code information generating unit 142 generates an exposure control signal coded according to the position based on the two-phase square wave signal output by the X-encoder 121 and the trigger signal. In order to generate such an exposure control signal, the code information generating unit 142 holds a code pattern that specifies the value of the exposure control signal relative to the amount of displacement from the reference position (i.e., a logical value indicating exposure / non-exposure). A PSF kernel corresponding to this code pattern is stored in the storage unit 165 for use in the correction process.

[0053] The code information generating unit 142 starts generating the exposure control signal at the timing when the trigger signal is input. The trigger signal may be input at the timing when the workpiece W enters the imaging field of the imaging unit 10. Unlike the second embodiment in which the generation of the exposure control signal is started when the stage is positioned at a predetermined reference position, in this embodiment, the generation of the exposure signal can be started at any stage position. The code information generating unit 142 generates and outputs an exposure control signal whose output value changes in response to the amount of displacement from the position where the pulse of the trigger signal specified by the two-phase square wave output by the X-encoder 121 is input, based on a predetermined code pattern. With this configuration, the exposure control signal does not depend on the moving speed or moving direction of the stage 11, but changes according to the position in the X-axis direction read by the X-encoder 121.

[0054] As in the first and second embodiments, the exposure control unit 143 controls the imaging unit 10 and the light source 13 based on the exposure control signal and a command related to the light amount from the CPU 164 to capture an image of the workpiece W, and blinks the illumination light from the light source 13 according to the exposure control signal during the imaging period. Therefore, also in the image measuring machine 1 of this embodiment, whether or not to expose is controlled according to the position of the stage 11.

[0055] When capturing an image of the workpiece W and performing measurement using the image measuring machine 1 of the third embodiment configured as described above, the workpiece W may be placed at any position on the stage 11. Then, while moving the stage 11, a trigger signal pulse is input at the timing when the workpiece W enters the imaging field of the imaging unit 10 to capture an image including encoded blur, thereby obtaining an image. Then, by performing a correction process on the obtained image in the same manner as in the first embodiment, the encoded blur contained in the image can be removed, and an image that can be measured with high accuracy can be obtained.

[0056] The image measuring machine 1 of the third embodiment described above can remove blur like the first and second embodiments, but unlike the first embodiment, it is not necessary to provide the code track 124, which can reduce costs. Also, since an exposure control signal can be generated with an arbitrary position as a starting point, unlike the first and second embodiments, it is possible to place the workpiece W at an arbitrary position on the stage and capture an image including encoded blur.

[0057] [Modifications of the embodiment] The present invention is not limited to the above-described embodiment, and the present invention includes modifications and improvements within the scope of the present invention that can achieve the object of the present invention.

[0058] For example, in each of the above embodiments, the exposure control unit 143 controls the light source 13 in accordance with the exposure control signal, but instead of the light source 13, it may control the shutter of the image sensor 101 of the imaging unit 10 to perform intermittent exposure in accordance with the exposure control signal.

[0059] In addition, in each of the above embodiments, the case where exposure is coded according to the position in the X-axis direction has been described as an example, but it may also be configured to code exposure according to the position in the Y-axis direction instead of / in addition to the X-axis direction.

[0060] Those embodiments or specific examples of the above-described embodiments or specific examples in which a person skilled in the art appropriately adds or deletes components or modifies the design are also included within the scope of the present invention as long as they include the gist of the present invention. [Explanation of symbols]

[0061] 1. Image measuring device 10. Imaging unit 11 Stage 12 Encoders 13 Light source 14 Control section 141 Movement control section 142 Code information generation unit 143 Exposure control section 16 Computer Systems Double work

Claims

1. a stage on which an object to be measured is placed; an imaging unit that captures an image of the measurement object placed on the stage, the imaging unit capturing an image of the measurement object while the stage is moving relatively in a predetermined direction with respect to the imaging unit; a code information generating unit that outputs an exposure control signal that is coded according to the position of the stage in the predetermined direction; A light source that irradiates the object to be measured with light; an exposure control unit that blinks the light source according to the position of the stage in the predetermined direction in accordance with the exposure control signal; a correction unit that removes blur from the image based on a blur spread function that represents an encoded blur that occurs in the image captured by the imaging unit due to exposure control by the exposure control signal, and restores an all-in-focus image; An image measuring machine comprising:

2. a code scale provided on the stage along the predetermined direction, the code scale having a code pattern formed thereon according to a position in the predetermined direction; a code track reading unit that reads the code scale in accordance with a position of the stage in the predetermined direction; Further equipped with 2. The image measuring machine according to claim 1, wherein the code information generating unit outputs the exposure control signal that is encoded according to the position of the stage in the predetermined direction, based on the code of the code scale read by the code track reading unit.

3. an encoder that outputs information indicating a reference position of the stage in the predetermined direction and a signal indicating a relative displacement amount in the predetermined direction; 2. The image measuring instrument according to claim 1, wherein the code information generation unit outputs the exposure control signal that is coded according to a position of the stage in the predetermined direction, based on information indicating the reference position and a signal indicating a relative displacement amount in the predetermined direction.

4. an encoder that outputs a signal indicating a relative displacement amount of the stage in the predetermined direction; 2. The image measuring instrument according to claim 1, wherein the code information generation unit is configured to be able to receive a trigger signal, and outputs the exposure control signal that is coded in accordance with the position of the stage in the predetermined direction, based on a signal that indicates a relative displacement amount in the predetermined direction, with the position of the stage in the predetermined direction at the time the trigger signal is input as a reference.

5. 5. The image measuring device according to claim 1, wherein the Fourier transform of the image captured by the imaging unit is J, the Fourier transform of the omnifocus image is I, and the Fourier transform of a PSF kernel, which is a matrix representing encoded blur that occurs in the image captured by the imaging unit, is K. The correction unit calculates I by I = J / K and restores the omnifocus image by performing an inverse Fourier transform on I.

6. 2. A program for causing a computer to function as the correction unit in the image measuring instrument according to claim 1.