Distance measurement method
The method enhances distance measurement accuracy in image reading devices by using a gray-and-white patterned chart to correct for manufacturing and thermal variations, addressing inaccuracies from defects and dirt, and ensuring precise pixel counting.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- MITSUBISHI ELECTRIC CORP
- Filing Date
- 2024-04-11
- Publication Date
- 2026-07-03
Smart Images

Figure 0007884679000001 
Figure 0007884679000002 
Figure 0007884679000003
Abstract
Description
Technical Field
[0003] ,
[0001] The present disclosure relates to a distance measurement method.
Background Art
[0002] In recent years, image reading devices whose applicable uses have been expanding are used in some scenes for measuring the distance between arbitrary positions in the main scanning direction of a document because they form a frontally upright and same-sized image. However, due to factors such as manufacturing variations in the image reading device, manufacturing variations in the rod lens array, and thermal expansion of the substrate on which the light receiving elements are fixed, there is a limit to the measurement accuracy if the distance is calculated only from the reading waveform, that is, the number of elements (pixel count) of the light receiving elements related to waveform reading.
[0003] Therefore, corrections for improving the accuracy of distance measurement are being made (for example, Patent Documents 1 and 2). Patent Document 1 describes a method of preparing a calibration chart with black lines arranged at known intervals, reading the chart with an image sensor, and performing corrections.
[0004] Patent Document 2 describes a method of correcting the influence of thermal expansion.
Prior Art Documents
Patent Documents
[0005]
Patent Document 1
Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0006] In the technique described in Patent Document 1, there is a problem that calibration errors occur due to incorrect detection of the calibration chart caused by scratches, defects, and dirt on the calibration chart.
[0007] The technology described in Patent Document 2 does not include any description of correction that takes into account the expansion and contraction due to thermal expansion of the image reading device itself.
[0008] This disclosure aims to solve the aforementioned problems and to provide a distance measurement method that can improve the accuracy of distance measurement. [Means for solving the problem]
[0009] The distance measurement method according to this disclosure is a distance measurement method in which an image reading device having pixels, which are light-receiving elements, arranged in the main scanning direction reads a distance correction chart in which a gray-and-white pattern is formed at regular intervals in the main scanning direction as waveform data of the gray-and-white pattern with the light-receiving elements arranged in the main scanning direction, and measures the distance between multiple points in the main scanning direction based on the read waveform data, and comprises: a first step of converting the waveform data into a binarized waveform by binarizing it with a predetermined threshold; a second step of comparing the binarized waveform with the gray-and-white pattern formed on the distance correction chart and converting it into edge information, which is the falling edge and rising edge, from the binarized waveform with noise removed; and a third step of comparing the edge information with the physical length of the gray-and-white pattern on the distance correction chart and deriving the number of pixels, which are light-receiving elements, corresponding to the physical interval between adjacent black patterns in the main scanning direction. [Effects of the Invention]
[0010] According to this disclosure, by reading a distance correction chart with an image reading device, the waveform data obtained is converted into a binarized waveform, and correction is performed based on the comparison result between the edge information of the binarized waveform and the physical length of the black and white pattern of the distance correction chart, thereby improving the accuracy of distance measurement. [Brief explanation of the drawing]
[0011] [Figure 1] Perspective view of the image reading device according to Embodiment 1 [Figure 2] This figure shows the state of reading a document using the image reading device according to Embodiment 1. [Figure 3]Diagram showing the output waveform when a black-and-white chart is read by the image reading device according to Embodiment 1 [Figure 4] Expanded view of the output waveform when a black-and-white chart is read by the image reading device according to Embodiment 1 [Figure 5] Side view when the side plate of the image reading device according to Embodiment 1 is removed [Figure 6] Top view seen from the reading surface of the image reading device according to Embodiment 1 [Figure 7] Diagram showing the rod lens array according to Embodiment 1 [Figure 8] Diagram showing the projection of an image on the rod lens array according to Embodiment 1 [Figure 9] Diagram showing the light receiving elements arranged on the substrate support plate according to Embodiment 1 [Figure 10] Perspective view showing the state where the image reading device according to Embodiment 1 is fixed to a fixing jig [Figure 11A] Diagram showing the state where a distance correction chart is placed at the position on the 1st pixel side according to Embodiment 1 [Figure 11B] Diagram showing the state where a distance correction chart is placed at the position on the END pixel side according to Embodiment 1 [Figure 12] Top view of the distance correction chart according to Embodiment 1 [Figure 13] Block diagram showing the configuration of the distance measurement system according to Embodiment 1 [Figure 14] Flowchart of data processing of the distance correction chart waveform according to Embodiment 1 [Figure 15A] Flowchart of noise removal processing by pattern matching according to Embodiment 1 [Figure 15B] Partial flowchart of noise removal processing [Figure 16] Diagram showing an example of waveform processing of noise removal processing [Figure 17] Diagram showing an example of a damaged distance correction chart according to Embodiment 1 [Figure 18] Flowchart of the process for physical length confirmation and line interval confirmation according to Embodiment 1 [Figure 19]Figure showing a waveform processing example of the process for physical length confirmation and line interval confirmation [Figure 20A] Flowchart of the process for chart position validity confirmation according to Embodiment 1 [Figure 20B] Partial flowchart of the process for chart position validity confirmation [Figure 21] Figure showing the relationship between the first measurement range and the length measurement correction range according to Embodiment 1 [Figure 22] Figure showing a waveform processing example of the process for chart position validity confirmation (first measurement, 1st side) [Figure 23] Figure showing a waveform processing example of the process for chart position validity confirmation (first measurement, END side) [Figure 24] Flowchart of the combination process of the first measurement and the second measurement according to Embodiment 1 [Figure 25] Figure explaining the combination process of the first measurement and the second measurement [Figure 26] Figure showing the change in the body temperature of the image reading device according to Embodiment 1 [Figure 27] Flowchart of the data processing for determining the temperature correction coefficient according to Embodiment 1 [Figure 28] Figure showing the amount of positional deviation in pixel units according to Embodiment 1 [Figure 29] Figure showing a measurement example of the change in the amount of positional deviation over elapsed time according to Embodiment 1 [Figure 30] Figure showing a measurement example of the change in the amount of positional deviation with respect to elapsed time according to Embodiment 1 [Figure 31] Figure showing the change in the amount of positional deviation with respect to temperature [Figure 32] Figure showing the change in the slope of the amount of positional deviation with respect to temperature depending on pixel position [Figure 33] Flowchart of the temperature correction procedure using the temperature correction coefficient [Figure 34] Flowchart of the data processing for the distance correction chart waveform according to Embodiments 2 and 3 [Figure 35] Figure showing the joint part of the rod lens array according to Embodiment 3 [Figure 36]A diagram showing the mounting portion of the rod lens array according to Embodiment 3. [Figure 37] This figure shows the image formed through the joint of the rod lens 16 according to Embodiment 3. [Figure 38] This figure shows the temperature correction value at the joint of the rod lens 16 according to Embodiment 3. [Modes for carrying out the invention]
[0012] Embodiments of the present disclosure will be described below with reference to the drawings. In the following drawings, the same or corresponding parts are denoted by the same reference numerals, and their descriptions will not be repeated.
[0013] Embodiment 1. Figure 1 is a perspective view of an image reading device 100 according to Embodiment 1. The image reading device 100 according to this disclosure is a contact image sensor (CIS). As shown in Figure 1, the x-direction is the main scanning direction, the y-direction is the sub-scanning direction, and the z-direction is the reading depth direction. The side plate 2 is a sealing member for ensuring dust protection inside the image reading device 100. It is generally made of a metal or resin plate. The first transparent body 3 can be made of, for example, resin or glass, and extends in the x-direction.
[0014] Figure 2 is a schematic diagram showing the state in which the image reading device 100 according to Embodiment 1 is capturing an image of a document M. For example, the document M is a medium to be read (irradiated object) that has image information of banknotes, securities, or other general documents. Since the image reading device 100 has a row of light-receiving elements 15 in the main scanning direction, capturing an image of the document requires either transporting the document in the sub-scanning direction or moving the image reading device 100 in the sub-scanning direction.
[0015] Figure 3 shows the output waveform 5 of the image reading device 100 when the original document M has the pattern shown in Chart 4. The output becomes higher in the white areas of Chart 4 and lower in the black areas.
[0016] Figure 4 shows a magnified view of the output waveform 5 of the image reading device 100. The output waveforms of two samples from the image reading device 100 are shown as solid and dotted lines. Compared to the difference in the waveforms at edge 1 in the upper left of Figure 4, the difference in the waveforms at edge 12 in the lower right of Figure 4 is larger. In other words, even though the same chart 4 was imaged, the position where the edge is observed may differ depending on the image reading device 100. For example, if you want to measure the distance between two points using the image reading device 100, you can calculate it by multiplying the number of pixels between the points by the size of one pixel (42.33 μm in the case of 600 dpi), but the number of pixels between the points varies from one image reading device 100 to another, which becomes a measurement error.
[0017] Patent Document 1 describes a solution to a similar problem in two-dimensional image sensors. Patent Document 1 proposes a method of preparing a calibration chart with black lines arranged at known intervals, reading the chart with an image sensor, and performing correction. However, it does not describe a way to avoid calibration errors that may occur due to false detections caused by scratches, defects, or dirt on the calibration chart.
[0018] Figure 5 is a side view of the image reading device 100 with the side plate 2 removed. The first transparent body 3 and the light source 8 are fixed by the second frame 7. Inside the second frame 7 is the first frame 9. The second transparent body 10, the rod lens array 11, the light-receiving element 15, etc. are attached to the first frame 9. The light-receiving element 15 is fixed to the substrate 13 with adhesive. A substrate 14 is fixed together with the substrate 13 to the substrate support plate 12, aligned with the sub-scanning direction of the substrate 13.
[0019] Figure 6 is a top view of the image reading device 100 as seen from the reading surface. The rod lens array 11 is arranged in the main scanning direction. Figure 7 is a schematic diagram of the rod lens array 11. Multiple rod lenses 16 are sandwiched between fixed side plates 17 and fixed in the main scanning direction with adhesive. Figure 8 shows a schematic diagram illustrating the projection of the image when a document is read by the rod lens array 11.
[0020] Assume that a document 18 of length L is placed at a distance lo from the rod lens array 11. The rod lens array 11 forms an erect, 1:1 image 19 at a distance li. When the object distance lo and the image plane distance li are equal, and they are separated by a conjugate length Tc, the position of the photodetector 15 becomes the focal point, and theoretically, the rod lens array 11 forms an image at 1:1 magnification on the photodetector side. That is, when lo=li, the relationship between the document size and the image size is L=L'. However, due to variations in the manufacturing process of the rod lenses 11 or the image reading device 100, even if the relationship lo=li is satisfied, L=L' may not be strictly satisfied. In short, the image may be enlarged or reduced relative to the document.
[0021] Figure 9 is a top view of a structure in which the light-receiving elements 15, substrates 13 and 14 are fixed to the substrate support plate 12, after being removed from the first frame 9. The light-receiving elements 15 (pixels) are arranged continuously in the main scanning direction for the effective reading length. On the other hand, the image reading device 100 generates heat over time after power-on and begins to expand due to thermal stress. Since the substrate 13 is constructed as a single, undivided unit in the main scanning direction, thermal expansion occurs. Because the light-receiving elements 15 are fixed to the substrate 13 via adhesive, the position of the light-receiving elements 15 also changes in accordance with the thermal expansion of the substrate 13. The material commonly used for the substrate 13 is glass-reinforced epoxy resin, such as FR-4. Glass-reinforced epoxy resin expands as the temperature rises. Therefore, when the image reading device 100 generates heat, even when reading a document of the same size, the number of pixels decreases, and the image appears smaller.
[0022] The problem of variations in the number of pixels between points due to manufacturing variations in the image reading device 100 or the rod lens array 11 can be solved by creating correction data and applying it to the measurement results. Therefore, the method for creating the correction data will be described below.
[0023] First, the image reading device 100 needs to be fixed in a suitable environment. Figure 10 shows the fixing jig used when acquiring distance correction data. The image reading device 100 is fixed to the table 20, which has a flat surface, by fixing devices 21 and 22 via a rail 24 that is movable in the main scanning direction. However, the fixing device 21 on the 1st side fixes the image reading device 100 with, for example, a screw. This fixes the image reading device 100 on the 1st side during measurement. When acquiring distance correction data, the distance correction chart 25 is placed on the table 20.
[0024] If the effective reading length of the image reading device 100 is long, the length of the distance correction chart 25 may be shorter than the effective reading length due to chart manufacturing considerations. In that case, correction data can be acquired by dividing the image reading device 100 into the 1st pixel side and the END pixel side. 11A Place the distance correction chart 25 at the position on the 1st pixel side as shown in Figure 1, and acquire the waveform data. 11B A distance correction chart 25 is placed at the END pixel position shown, and waveform data is acquired. The distance correction chart 25 must be placed on the table 20 parallel to the image reading device 100, and rotation in the θ direction must be suppressed as much as possible. (A structure to suppress rotation in the θ direction may be provided on the table 20.)
[0025] Figure 12 is a top view of the distance correction chart 25. The distance correction chart 25 has black lines 26 drawn at regular intervals. While the line thickness and spacing of the black lines 26 on the chart are arbitrary, a thickness of approximately 200 μm and a spacing of approximately 1 mm are preferred. Furthermore, to minimize the effects of thermal expansion due to changes in the measurement environment (room temperature), stainless steel or glass is preferred as the base material for the distance correction chart 25.
[0026] Figure 13 is a block diagram showing the configuration of the distance measurement system 1000 according to this embodiment. The distance measurement system 1000 reads a distance correction chart, in which a grayscale pattern is formed at regular intervals in the main scanning direction, as waveform data of the grayscale pattern using light-receiving elements arranged in the main scanning direction of the image reading device 100, and processes the data to generate distance correction data. Furthermore, the distance measurement system 1000 measures the distance between multiple points in the main scanning direction using the distance correction data, based on the waveform data obtained by reading the image of the object to be measured by the image reading device 100. The distance measurement system 1000 comprises an image reading device 100 and a data processing device 200 that measures distance based on image data read by the image reading device 100.
[0027] The data processing device 200 comprises a processor 210 and a storage unit 220. The processor 210, for example, includes a CPU (Central Processing Unit) and functions as a correction data generation unit 211 and a distance measurement unit 212 by executing a program stored in the storage unit 220.
[0028] The storage unit 220 includes RAM (Random Access Memory), EEPROM (Electrically Erasable and Programmable Read Only Memory), and non-volatile memory such as flash memory. The storage unit 220 stores distance correction data 221 used for distance measurement, and various programs executed by the processor 210.
[0029] The correction data generation unit 211 of the processor 210 acquires waveform data obtained when the image reading device 100 reads the distance correction chart 25, processes the data, and generates distance correction data 221. The correction data 221 is the data used when measuring distance.
[0030] Figure 14 is a flowchart of the data processing performed by the correction data generation unit 211 of the processor 210 on the waveform data of the distance correction chart 25. This will be explained in detail below.
[0031] First, the correction data generation unit 211 of the processor 210 performs a binarization process on the acquired waveform data (Step 1, first step). The waveform is represented as 0 or 1, with an arbitrary threshold as the boundary. In Figure 16, the threshold is set to 128, and the acquired waveform data (solid line) is converted into a binarized waveform (dotted line). More specifically, the position where the distance correction chart changes from a white pattern to a black pattern is defined as the falling edge position where the value of the binarized waveform changes from 1 to 0, and the position where the distance correction chart changes from a black pattern to a white pattern is defined as the rising edge position where the value of the binarized waveform changes from 0 to 1.
[0032] Next, the correction data generation unit 211 performs noise reduction by pattern matching (Step 2). Specifically, the correction data generation unit 211 compares the binarized waveform with the black and white pattern formed on the distance correction chart and converts it into edge information including falling and rising edges from the binarized waveform with noise removed. The flowchart of the noise reduction process is shown in Figures 15A and 15B. Since the pattern width of the black and white pattern on the distance correction chart 25 to be read is predetermined, the arrival positions of the rising edge (binarized waveform 0→1) and falling edge (binarized waveform 1→0) can be predicted. The purpose of this process is to improve the reliability of the distance correction data 221 by removing signals that deviate significantly from the predicted arrival positions. Examples of events that impair the reliability of the distance correction data 221 include the events described in the possible failure modes in Figure 17, which may occur on the distance correction chart 25. To avoid these issues, it is effective to (i) set upper and lower limits on the width of the black line 26, and (ii) limit the lower limit on the width of the white blank area 27.
[0033] First, the image reading device 100 scans in the main scanning direction, and the correction data generation unit 211 reads out the waveform (step S101). When the number of pixels exceeds a predetermined measurement start pixel (step S102: Yes), detection of the falling edge, which is the starting point of the black pattern of the black line 26 in the main scanning direction, is enabled (step S103, 21st step). If a falling edge is detected in the area above the measurement start pixel (Figure 16, area A) (step S104: Yes), the received light data from the pixel where the falling edge was detected onward is invalidated, and the falling edge detection is disabled (step S105, 22nd step). The correction data generation unit 211 stores the edge position and the fact that it is a falling edge in the storage unit 220 (step S106). After that, rising edge detection is not performed until the lower limit of the width of the black line 26 is reached. This is to prevent false detection in the case of white scratches or defects in the black line 26 (Figure 16, area B). If no falling edge is detected (step S104: No), the waveform reading is repeated (step S102).
[0034] After detecting a falling edge, when the pixel width exceeds the width that prohibits detection of rising edges (lower limit of black line width) (step S108: Yes), the black pattern enters the range where it is predicted to reach its end (Figure 16, region C). Therefore, the correction data generation unit 211 enables the received data, enables rising edge detection, and starts monitoring the width of the black line (step S109, 23rd step). In other words, when the black pattern reaches the endpoint prediction pixel in the main scanning direction, rising edge detection is enabled. By enabling rising edge detection at the endpoint prediction pixel, it is possible to prevent false detection of black foreign objects adjacent to the black line and to detect edge drooping.
[0035] Furthermore, the correction data generation unit 211 reads the waveform (step S110), and if a rising edge arrives as expected in the region below the upper limit of the black line width (step S111: Yes) (step S112: Yes), the received light data from the pixel where the rising edge was detected (Figure 16, region D) is invalidated (step 24). In other words, the detection of the rising edge is invalidated, and the monitoring of the black line width is reset (step S114). Here, even if a rising edge does not arrive as expected, if the scanning exceeds the upper limit of the black line width (step S111: No) and goes beyond the range of the predicted endpoint pixels in the main scanning direction of the black pattern, the process is forcibly moved to step S114 (step 24). This is to prevent false detection in the event that black dirt or scratches are attached to the white blank area 27 (Figure 16, region D). Until a rising edge arrives (step S112: No), if the value of the binarized waveform is "0" (step S115: No), return to step S110; if the value of the binarized waveform is "1" (step S115: Yes), proceed to step S114.
[0036] Furthermore, the correction data generation unit 211 reads the waveform data (step S116). If it is not the last pixel to be measured (step S117: No), or if it is below the lower limit of the white background width (step S118: Yes), it returns to step S116. If it exceeds the lower limit of the white background width (step S118: No), enters the range where the falling edge of the black line 26 is expected to arrive, and reaches the measurement start pixel for the next black pattern located in the main scanning direction, it returns to step S101 and enables falling edge detection again (Figure 16, area A'). If the waveform readout reaches the last pixel to be measured (step S117: Yes), in the case of the first measurement (step S119: Yes), it proceeds to the second waveform acquisition and binarization process (step S120). In the case of the second measurement (step S119: No), it terminates the process, writes the detected edge information, and moves to the next step.
[0037] In the case of a distance correction chart with a black line width of 211.5 μm and a center-to-center distance of 1 mm, the width of the black line 26 is approximately 5 pixels, and the white area 27 is approximately 18.5 pixels. If the lower limit of the black line 26 width is 3.5 pixels and the upper limit is 6.5 pixels, and the lower limit of the white area 27 is 15.5 pixels, then the black line 26 width will not be valid for ±1.5 pixels and the white area 27 for -3 pixels, which may result in errors in distance correction. This range can be changed arbitrarily, but reducing the range may increase the number of undetected edges. To compensate for this disadvantage, further data processing is performed in the physical length confirmation and line spacing confirmation process described later.
[0038] Next, the physical length and line spacing verification process is described (Step 3 in Figure 14, the third step). In this process, the edge information is compared with the physical pattern of the black and white pattern of the distance correction chart to derive the number of pixels (number of photodetectors) corresponding to the physical spacing between adjacent black patterns in the main scanning direction. The processing flowchart for this process is shown in Figure 18. The waveform data at this time is converted into edge information by noise reduction through pattern matching. The correction data generation unit 211 of the processor 210 reads the edge information (Step S201) and performs various processes.
[0039] First, information on falling edges that are not adjacent to rising edges is deleted (step S202, step 31). That is, if no adjacent rising edge corresponding to a falling edge is detected, that falling edge is deleted. This is because, due to the pattern matching process, if no rising edges are detected, the information on those rising edges is lost, so this process leaves only the black lines 26 that were successfully detected.
[0040] Next, the average pixel position of adjacent rising and falling edges is calculated and recorded as the position of the black line 26 (black pattern) (step S203, step 32). More specifically, a pixel that detects a falling edge is designated as a falling edge detection pixel, a pixel that detects an adjacent rising edge corresponding to the falling edge is designated as a rising edge detection pixel, and the pixel position of the black line 26 is the average value of the positions of the falling edge detection pixels and the rising edge detection pixels.
[0041] Step 2 in Figure 14 (flowchart in Figure 15A) repeatedly detects multiple falling edges and rising edges, and by performing the processing in step S203, the pixel positions of multiple black lines 26 are derived (step 33). Then, based on the pixel positions of the black lines 26 calculated in step S203, the number of pixels corresponding to the distance between adjacent black lines 26 is calculated (step S204).
[0042] Next, the spacing between the pixel positions of the multiple black lines 26 is compared with the physical spacing of the black lines 26 in the distance correction chart 25. If the comparison shows that the spacing between the pixel positions of the multiple black lines 26 is equal to the physical spacing of the black lines 26 in the distance correction chart 25, the number of pixels between adjacent black line 26 pixel positions is set to the number of pixels corresponding to the physical spacing of the black lines 26 in the distance correction chart 25. If the spacing between the pixel positions of the multiple black lines 26 is an integer multiple of 2 or more of the physical spacing of the black lines 26 in the distance correction chart, the number of pixels between the pixel position obtained by interpolating the black line 26 and the adjacent black line 26 pixel position is set to the number of pixels corresponding to the physical spacing of the black lines 26 in the distance correction chart 25 (step 34). In other words, the adjacent distance condition is that the spacing between the pixel positions of the multiple black lines 26 is an integer multiple of 1 or more of the physical spacing of the black lines 26 in the distance correction chart 25, and the number of detail pixels corresponding to the adjacent black line spacing is determined based on whether or not this condition is met (step S205).
[0043] Let's explain in detail using the example of black line position 26 shown in Figure 19. For positions (circle 1), (circle 2), and (circle 3), the interval is 23.5 pixels, and if the interval of black line 26 was 1 mm, it can be seen that there were no gaps in the black line 26 in between. On the other hand, there is a gap of 47 pixels between position (circle 3) and position (circle 5), which corresponds to an interval of 2 mm, and it can be inferred that one black line 26 in that space was missing due to some abnormality. In Figure 19, position (circle 1) refers to "circled 1" in the figure. Similarly, position (circle 2) refers to "circled 2" in the figure. The same applies to positions (circle 3) and beyond. In this specification and in the figures, "circled numbers" are expressed in the same way.
[0044] Since the spacing of the black lines 26 is known, if the spacing is 1 mm, there should be a black line 26 approximately every 23.5 pixels, and the line spacing is determined based on this. For example, after position (circle 3) in Figure 19, it is expected that a black line 26 will exist at position (circle 4). If a black line 26 exists within a range of 23.5 ± 1 pixels from position (circle 3), it will be recognized that a black line 26 existed with a spacing of 1 mm. However, in the case of Figure 19, there is no position information for a black line 26 at position (circle 4), so it is ignored.
[0045] Next, it is expected that black line 26 exists at position (circle 5). If a black line exists within a range of 47±1 pixels from position (circle 3), it will be recognized that black line 26 existed with a spacing of 2 mm. In the case of Figure 19, since black line 26 exists at position (circle 5), the line spacing between position (circle 3) and position (circle 5) is recognized as 2 mm. Similarly, if a black line exists within a range of 70.5±1 pixels from position (circle 3), it will be recognized that black line 26 existed with a spacing of 3 mm.
[0046] Thus, even if the position of the black line 26 is not detected in the previous step, noise reduction by pattern matching (step 2 in Figure 14), data processing will continue if the next black line 26 is recognized in the correct position. This means that even if strict conditions are set during noise reduction by pattern matching to prevent false detections due to missing or damaged black lines 26 or scratches or dirt on the white areas 27, and black lines 26 are excessively ignored, the generation of correction data can continue with the remaining correctly detected black lines 26. Of course, the expected range of appearance of the black line 26 can be set arbitrarily (set to ±1 pixel in Figure 19).
[0047] Furthermore, by performing this process, if, for example, a black scratch 28 on the white blank area 27 shown in Figure 17 (an enlarged view of the enlarged portion of Figure 13) is mistakenly detected as a black line 26, the next black line 26 will not fall within the defined range (23.5±1 pixels, 47±1 pixels, 70.5±1 pixels) and will be ignored. Therefore, this process also plays a role in removing any noise that could not be completely removed by pattern matching.
[0048] The flowchart shown in Figure 18 illustrates, as an example, the case where two consecutive black lines 26 are missing (corresponding to an expected black line 26 position range of 70.5 ± 1 pixels and a black line 26 spacing of 3 mm). If three or more consecutive black lines 26 are missing, the adjacent distance condition is not met (step S205: No), an error message is displayed (step S207), and the process is forcibly terminated, prompting a remeasurement.
[0049] The number of consecutive missing readings required to prompt a remeasurement can be arbitrarily set. For example, if a maximum measurement error of 0.5 mm is expected for a reading length of 900 mm, the expected measurement error at 3 mm is 1.7 μm. This is sufficiently small, considering that the size of one pixel of the 600 dpi photodetector 15 is 42.3 μm. (Measurement errors smaller than the size of one pixel cannot be detected). Furthermore, it is sufficiently small compared to the expected maximum measurement error.
[0050] In this way, taking into account the expected maximum length measurement error or the size of the photodetector 15, it is possible to determine the maximum number of black line 26 defects to be allowed. If it is determined that the adjacent distance condition, including the number of black line 26 defects to be allowed, is met (step S205: Yes), the data is recorded in the form of pixel position - adjacent black line spacing (physical length) (step S206). The starting point (0 mm) position is the position where the first black line 26 is detected in each measurement.
[0051] Next, to ensure the effective range of the length correction, a chart position validation process is performed (Step 4 in Figure 14). The processing flowchart is shown in Figures 20A and 20B. Figure 21 shows the effective range of document reading and the effective range of the length correction value of the image reading device 100.
[0052] The effective range for document reading refers to the range determined by the position of the first pixel to the last pixel of the light-receiving element 15. On the other hand, the effective range for length correction values is narrower than the effective range for document reading because correction data is generated based on the waveform data of the distance correction chart 25 captured by the image reading device 100. However, when used for distance measurement in the customer's process, it is necessary to clarify the effective range for length correction values. Length correction values can only be generated within the range where the black line 26 of the distance correction chart 25 exists. Therefore, in order to clarify the effective range for length correction values, it is necessary to define the expected location of the black line 26 on the 1st pixel side and the expected location of the black line 26 on the END side, and to confirm whether the black line 26 actually exists within that range. In addition, it is necessary to confirm that the black line 26 is not a false detection line due to dirt, scratches, etc. on the white background, and that the distance correction chart 25 is in the desired position in order to perform the merging process of the first and second data described later.
[0053] Specifically, the correction data generation unit 211 of the processor 210 determines that a black pattern of the distance correction chart 25 is detected within a predetermined range of expected locations for the black pattern on the first pixel side and the black pattern on the last pixel side, within the range from the first pixel position to the final pixel position located in the main scanning direction.
[0054] As an example, we will explain using the first measurement (1st side measurement). Figure 22 shows an example of the detection status of the black line 26 up to the 188th pixel on the 1st side during the first measurement. The position of the black line 26 on the 1st side (circle 1 in Figure 22) is the 16th pixel. The area enclosed by the black dotted line is the expected location range on the 1st side (0 to 23.5 pixels). We determine whether the first observed line is within the expected location range (step S301). In the example shown in Figure 22, the black line 26 is actually present within the expected location range. Note that if the expected location range is set to within 23.5 pixels from the 1st pixel / END pixel, the guaranteed effective range of the length correction value will be 1 mm inside the effective range of document reading. (It will be about 2 mm shorter than the effective range of document reading).
[0055] Next, to confirm that the black line 26 (circle 1) in Figure 22 is not a falsely detected line, and that data has been acquired correctly up to the range expected in advance for data connection processing with the second measurement data, we check whether the distance measurement chart 25 was placed in the correct position at the time of imaging.
[0056] Figure 22 shows an example of the detection status of the black line 26 up to the 188th pixel on the 1st side during the first measurement. After confirming that the position of the first black line 26 (the first observed line) is within the expected position range (step S301: Yes), it is then checked whether the second (circle 2 in Figure 22) and third (circle 3 in Figure 22) are continuous within a range of 23.5 ± 1 pixels (corresponding to 1 mm) (steps S302, S303). This is because if three black lines 26 are detected consecutively, it can be confirmed that the distance correction chart 25 is applied to at least the 1st side. The number of consecutive lines required to determine that the chart is in the correct position can be set arbitrarily.
[0057] Similarly, on the END side, it is confirmed that the black line 26 on the END side (the final observation line, (circle 1) in Figure 23) is located within the expected location range (in the case of Figure 23, the range within 23.5 pixels from the first final measurement position of 12000 pixels, the area enclosed by the black dotted line frame) (step S304).
[0058] Next, check whether the previous observation line (circle 2 in Figure 23) and the observation line two steps prior (circle 3 in Figure 23) are continuous within a range of 23.5 ± 1 pixels (corresponding to 1 mm) (steps S305, S306). In the example in Figure 23, all conditions are met, and the position on the END side is also fine.
[0059] Since it was confirmed that the distance correction chart 25 was applied to both the 1st side and the END side, and that the position of the first black line 26 on the 1st side and the position of the final black line 26 on the END side were within the expected position range, the image reading device 100 determined that the position of the distance correction chart 25 during the first measurement was acceptable (Steps S301-S306: Yes).
[0060] On the other hand, if the position of the first black line 26 on the 1st side and the position of the last black line 26 on the END side are not within the expected range of existence (steps S301, S304: No), an error message is displayed (step S307) and the process is terminated. Also, if the intervals between the first and second observation lines, the second and third observation lines, the last observation line and the previous observation line, and the previous observation line and the observation line two steps prior are not within the range of 23.5 ± 1 pixels (equivalent to 1 mm) (steps S302, S303, S305, S306: No), an error message is displayed (step S307) and the process is terminated.
[0061] If the processing in steps S301 to S306 is being performed on the first data set (step S308: No), the process returns to step S301, and the processing in steps S301 to S306 is performed on the second data set to determine if the position of the distance correction chart 25 is correct. If the processing in steps S301 to S306 is being performed on the second data set (step S308: Yes), the process is terminated.
[0062] Upon completion of this process, it is confirmed that the effective range of the measurement correction value is determined (guaranteed) and that there will be no problems in the merging process of the first and second measurement data described later.
[0063] Next, when multiple distance correction charts 25 are arranged in the main scanning direction, the data corresponding to the number of pixels between the black patterns of each distance correction chart 25 is combined. For example, the data from the first measurement and the data from the second measurement are combined (step 5 in Figure 14). Figure 24 shows the processing flowchart. Note that this process can be skipped if the reading length of the image reading device 100 is short and the distance correction chart 25 is sufficiently longer than the reading length, as it is unnecessary to measure in sections.
[0064] The data processing example shown in Figure 25 will be used for explanation. First, the results of the first measurement are read (step S401). In the example in Figure 25, the end position of the acquisition of the first measurement data is set to the 12,000th pixel. Next, the pixel position of the final black line 30 of the first measurement is identified (step S402), and then the results of the first measurement are copied to the final result file (step S403).
[0065] Next, the cumulative physical length is calculated from the adjacent black line spacing, which is calculated and recorded in the physical length confirmation and line spacing confirmation process (step 3 in Figure 14). Then, the cumulative physical length is recorded along with the pixel position of the final black line 30 of the first measurement result copied to the final result file (step S404). The cumulative physical length is calculated by adding the adjacent black line spacing values up to the pixel position for which the calculation is to be performed.
[0066] Next, the second measurement data is read (step S405), and it is determined whether the black line of the second measurement data exceeds the pixel position of the final black line of the first measurement (step S406). If there is an initial effective starting black line 29 that exceeds the pixel position of the final black line 30 of the first measurement (step S406: Yes), the offset value is calculated (step S407). Note that in step S406, if the final black line 30 of the first measurement and the black line of the second measurement coincide, the process may proceed to step S407. As long as the black line of the second measurement data does not exceed the pixel position of the final black line 30 of the first measurement (step S406: No), the reading of the second measurement data continues (step S405).
[0067] The offset value calculated in step S407 is the value obtained by subtracting the pixel position of the first final black line 30 from the pixel position of the effective starting black line 29 that first exceeded the first final black line 30 in the second measurement data. If the offset value exceeds a preset value (step S408: Yes), an error message and a prompt to remeasure are displayed (step S409) and the process is terminated. This is because there is no distance correction data between the first final black line 30 and the pixel position of the effective starting black line 29 that exceeded the first final black line 30 in the second measurement data, and considering the accuracy of distance correction, it is desirable to set an upper limit for this offset value.
[0068] The offset tolerance can be set arbitrarily. Similar to the approach to setting tolerances in the physical length and line spacing verification processes, one can consider how to set the offset tolerance. If the offset value falls within the pre-set tolerance (Step S408: No), the process moves to the actual measurement data merging operation. The second measurement data is recorded as an addendum to the first measurement data, as described later.
[0069] If the offset value is 0 (the final black line 30 of the first measurement and the effective starting black line 29 of the second measurement are exactly the same) (Step S410: Yes), the final black line 30 of the first measurement and the effective starting black line 29 of the second measurement overlap, and the second measurement data is recorded sequentially from the black line following the overlapping effective starting black line 29, recording the pixel position and cumulative physical length data (Step S412). If the offset value is not 0 (Step S410: No), the distance A is calculated by multiplying the offset value from the pixel position of the first effective starting black line 29 of the second measurement by the pixel size of 1, and this distance A is added to the cumulative physical length of the final black line 30 of the first measurement and recorded as the cumulative physical length of the effective starting black line 29 of the second measurement (Step S411). Subsequently, the interval between adjacent black lines is added from the second and subsequent effective black lines of the second measurement to the final black line, and this is recorded as the cumulative physical length for the image reading device 100, along with the black line pixel position (Step S412). Through the above process, when multiple distance correction charts are arranged in the main scanning direction, it is possible to combine data with a number of pixels corresponding to the cumulative physical length, which is the physical interval between the black patterns of each distance correction chart.
[0070] Up to this point, we have described a data processing method for creating distance correction data 221 by capturing a distance correction chart 25 with the image reading device 100, in order to address the problem of variations in the number of pixels between points due to manufacturing variations in the image reading device 100 or the rod lens array 11. These processes must be performed individually for each image reading device 100 from which distance correction data 221 is to be created.
[0071] Next, we will describe a method for correcting the problem that occurs when power is turned on to the image reading device 100, causing the position of the light-receiving element 15 to change due to thermal expansion, which results in measurement errors during length measurement.
[0072] Patent Document 2 describes a method for compensating for the effects of thermal expansion, although the form of the correction chart is different. However, this concerns the compensation for thermal expansion of the calibration plate itself and does not take into account the expansion and contraction due to thermal expansion of the image reading device itself.
[0073] Figure 26 is a graph showing the relationship between time and temperature from the power-on of the image reading device 100 (contact image sensor, CIS). When the power is turned on, the temperature of the image reading device 100 begins to rise, and after 120 minutes from power-on, it reaches thermal equilibrium, and the temperature change becomes small. Since the image reading device 100 is incorporated into a device that inspects scratches, chips, etc. on objects, it will be in continuous operation for long periods of time. Therefore, it is useful to understand the effect of thermal expansion approximately 120 minutes after power-on, when it reaches thermal equilibrium.
[0074] However, if it is necessary to wait 120 minutes to acquire distance correction data, a delay occurs in the assembly process of the image reading device 100 during the process of acquiring distance correction data, which leads to a problem of increased manufacturing costs for the image reading device 100.
[0075] Therefore, during the assembly process of the image reading device 100, distance correction data at a certain temperature is acquired, and distance correction data at temperatures that could not be measured during the assembly process can be estimated using parameters that were experimentally determined in advance. This makes it possible to correct the temperature dependence of the distance correction data without impairing the productivity of the image reading device 100.
[0076] Therefore, this section will explain a method for experimentally extracting the temperature dependence of distance-corrected data. First, we will describe the measurement environment necessary for experimentally extracting the temperature dependence of distance-corrected data. The measurement environment used will be the one shown in Figure 10.
[0077] The image reading device 100 is fixed to a table 20 with a flat surface using fixtures 21 and 22 via a rail 24 that is movable in the main scanning direction. However, the fixture 21 on the 1st side fixes the image reading device 100 with screws, for example. This fixes the image reading device 100 on the 1st side during measurement. The fixture 22 on the END side is configured to allow the image reading device 100 to move only in the main scanning direction. When acquiring distance correction data, a distance correction chart 25 is placed on the table 20. If the effective reading length of the image reading device 100 is long, the length of the distance correction chart 25 may be shorter than the effective reading length due to chart manufacturing constraints. In that case, correction data can be acquired by dividing the image reading device 100 into the 1st pixel side and the END pixel side.
[0078] On table 20, an infrared sensor 23 is positioned to monitor the temperature of the image reading device 100. While measuring the temperature characteristics of distance-corrected data using the distance correction chart 25, the infrared sensor 23 measures the time-temperature relationship since power-on for the image reading device 100. In Figure 10, three infrared sensors 23 are installed, but the number of installations can be changed as needed.
[0079] The temperature correction process will be explained using Figure 27. Figure 27 is a flowchart of the data processing for determining the temperature correction coefficient. First, an image reading device 100 for acquiring temperature characteristics is placed on table 20, and the data processing device 200 acquires the CIS temperature / distance correction chart waveform using the distance correction chart 25 (step 11).
[0080] Next, the correction data generation unit 211 of the processor 210 performs the same processing as in steps 1 to 5 of Figure 14 on the distance correction chart acquired in step 11, converting the waveform data of the distance correction chart 25 into a pixel position-cumulative physical length relationship (step S12). In other words, the processing in steps 13 to 18 of Figure 27 corresponds to the temperature correction processing in step 6, which is performed after steps 1 to 5 of Figure 14.
[0081] Here, the image acquisition and conversion to the pixel position-cumulative physical length relationship in steps 1 to 5 of Figure 14 must be performed at several points immediately after power-on, when the image reader 100 reaches thermal equilibrium, and in between. In Figure 29, described later, acquisitions are made at 0 minutes (immediately after power-on), 5 minutes, 10 minutes, 30 minutes, and 120 minutes (thermal equilibrium), but all points except 0 minutes (immediately after power-on) and thermal equilibrium can be set arbitrarily. However, shortening the time interval is advantageous when calculating the temperature correction coefficient in steps 16, 17, and 18, because it allows for an increase in data points when converting to time-position shift data in step 14 described later.
[0082] The correction data generation unit 211 records the pixel position-cumulative physical length relationship obtained in step S12, along with the elapsed time since power-on. If the correction data acquisition is divided into two or more steps, the data is combined at this stage (step 5 in Figure 14).
[0083] Next, the correction data generation unit 211 approximates the amount of displacement for each pixel from the discrete (1 mm interval) waveform data at each elapsed time to generate continuous waveform data (step 13). A more detailed explanation of the process follows. First, the amount of positional displacement at the pixel position is calculated using the calculation method shown in equation (1) below. Positional displacement = Cumulative physical length at the pixel position - Pixel size of one pixel × (Pixel position - 26 pixels of the first black line) (1)
[0084] If the displacement amount is positive, the image result is smaller than the original. If the displacement amount is negative, the image result is larger than the original. The calculation result is data in the form of pixel position - displacement amount at the pixel position. The pixel position here is the position of the black line 26 on the distance correction chart 25, and the data is every 23.5 pixels (every 1 mm).
[0085] In step 13, when considering the correction for temperature effects, it becomes difficult to obtain the same amount of positional displacement at each temperature when performing step 14 in Figure 27, which will be described later, using only the positional information of the black line 26. Therefore, the correction data generation unit 211 calculates the amount of positional displacement for pixel positions other than the pixel positions where the black line 26 is recorded, and continuously records the amount of positional displacement for all pixels of the image reading device 100. An example of the calculation result of the amount of positional displacement on a pixel-by-pixel basis is shown in Figure 28. There is data for the black line 26 at the 11013.5th pixel and the 11037.5th pixel. There is no data for the black line 26 at the pixel positions in between. For the pixel positions in between, the processor 210 approximates the amount of positional displacement using linear approximation from the amount of positional displacement at the recorded black line 26 positions. Then, data of the approximate amount of positional displacement for each pixel is recorded. In this way, the relationship between pixel position and amount of positional displacement at each elapsed time of the image reading device 100 is recorded. Figure 29 shows an example of measuring the change in positional displacement over time.
[0086] Next, the correction data generation unit 211 extracts the amount of positional displacement at each pixel position for each elapsed time at a certain interval (for example, every 1000 pixels) from the pixel position-positional displacement relationship obtained in step 13, and generates data on the elapsed time-positional displacement relationship (step 14). That is, the pixel position-positional displacement data is converted into data on the amount of positional displacement with respect to elapsed time at the same pixel position. Figure 30 shows an example of measuring the change in positional displacement with respect to elapsed time.
[0087] In the example in Figure 30, the positional displacement amounts at 100 pixels, 1000 pixels, 2000 pixels, 10000 pixels, 20000 pixels, 21000 pixels, and 21500 pixels are extracted from the data in Figure 29. The more pixel positions extracted, the higher the accuracy of the approximation process described later, so it is desirable to extract data at as many pixel positions as possible, but the extraction frequency can be set arbitrarily. Since the horizontal axis has been converted to time, the correction data generation unit 211 converts the data obtained in step 14 into a relationship between the body temperature of the image reading device 100 and the positional displacement amount by using the elapsed time-temperature relationship of the image reading device 100 acquired simultaneously by the infrared sensor 23 (step 15). That is, the correction data generation unit 211 determines the change in positional displacement amount with respect to temperature shown in Figure 31, based on the elapsed time-temperature relationship shown in Figure 26 and the elapsed time-positional displacement amount relationship shown in Figure 30.
[0088] Once the relationship shown in Figure 31 has been calculated, the correction data generation unit 211 then performs a linear approximation calculation using the least squares method for each pixel position (step 16). The amount of linear expansion is defined by the following equation (2). The amount of linear expansion (change in positional displacement) ΔL = α × L × ΔT (2) Here, α is the coefficient of linear expansion. L: Pixel position from the 1st pixel, ΔT: Temperature difference
[0089] The coefficient of linear expansion α is a value determined by the material. However, since the image reading device 100 is a combination of various components, estimation is not easy. The relationship between temperature and positional displacement can be approximated linearly from the equation of linear expansion, assuming L is a constant. For example, if a linear approximation is taken using the least squares method for the graph in Figure 31, the positional displacement is expressed by the following equation (3). In equation (3), b is a term that is not dependent on temperature, i.e., it can be ignored when determining the change in positional displacement. (Amount of displacement) = a × (temperature) + b (3)
[0090] Figure 31 shows a graph created for each pixel position L, which corresponds to the distance from the starting point (pixel position) of the distance correction data. Therefore, by focusing on each line representing the amount of displacement at each pixel position L, the pixel position L can be considered a constant. Each line for each pixel position L in Figure 31 shows that the amount of positional displacement changes when the temperature changes. The slope a when linearly approximating the temperature range shown in the graph of Figure 31 increases as the distance from the starting point (pixel position) of the distance correction data increases. This means that if the temperature T is the same, the amount of positional displacement increases as the pixel position L increases. The coefficient of linear expansion α is generally temperature-dependent, but the ΔT of the image reading device 100 is at most about 20°C as shown in Figure 26, and the operating environment is at room temperature (about 24°C), so the coefficient of linear expansion α can be considered constant. Therefore, the slope a of equation (3) when linearly approximating the change in the amount of positional displacement with respect to temperature change corresponds to α × L in equation (2) for linear expansion ΔL, but only the pixel position L can be treated as a variable. The correction data generation unit 211 extracts the slope a (a1, a2, a3...a7) of the linear approximation result at each pixel position L, thereby creating a pixel position-slope a relationship as shown in Figure 32 (step S17). Figure 32 shows the change in the slope a of the positional displacement amount with respect to temperature, depending on the pixel position.
[0091] Since the slope a responds linearly to the pixel position L, the correction data generation unit 211 performs linear approximation again on the graph using the least squares method (step S18). After performing linear approximation, the following equation (4) is derived. (Slope) a = c × (Pixel position from the 1st pixel) + d (4)
[0092] Therefore, the displacement is expressed by the following equation (5). In equation (5), b is a term that is not dependent on temperature, i.e., it can be ignored when calculating the change in displacement. (Positional displacement) = (c × (Pixel position from the 1st pixel) + d) × (Temperature) + b (5)
[0093] Furthermore, the necessary information is the change in positional displacement ΔL when the body temperature of the image reader 100 becomes Tcis, which is calculated based on the positional displacement L' measured when the body temperature of the image reader 100 is at a certain temperature T', as measured on the mass production line. ΔL is calculated using the following equation (6). Positional displacement change ΔL = (c × (pixel position from the 1st pixel) + d) × (Tcis - T') (6)
[0094] In equation (6) above, c and d are items related to the coefficient of linear expansion, which should be determined in advance by experimentation from the graph shown in Figure 32, and are temperature correction coefficients. Since they remain constant unless the material or combination of parts changes, the values can be experimentally determined in advance for each model.
[0095] Furthermore, by monitoring Tcis and determining the pixel position for which the positional displacement amount is to be calculated, the change in positional displacement amount can be calculated using equation (6). Regarding Tcis, if the image reading device 100 is warmed up during startup and used in a thermal equilibrium state, there is no need to monitor it (however, it is necessary to know the temperature at which thermal equilibrium is reached). Also, since T' is the main body temperature of the image reading device 100 when measured on the mass production line, it can be recorded in the storage unit 220 inside the image reading device 100.
[0096] Furthermore, when P' is the cumulative physical length at a certain pixel position, the cumulative physical length Ptemp at that pixel position, considering the temperature dependence when the main body temperature of the image reading device 100 is Tcis, is expressed by the following equation (7). Ptemp = P' + ΔL (7)
[0097] In equation (7), P' and ΔL depend on the pixel position from the 1st pixel, so they can be calculated using the pixel position for which the positional displacement amount is to be determined. Here, since ΔL also depends on Tcis, ΔL is calculated by substituting the pixel position and Tcis into equation (6). In this way, the effect of temperature can be corrected using the temperature correction coefficient shown in equation (6) without having to measure the temperature dependence of the positional displacement amount for each of the 100 image reading devices.
[0098] Figure 33 is a flowchart of the temperature correction process using a temperature correction coefficient (step 6 in Figure 14). More specifically, Figure 33 shows the processing method for applying the correction of the positional displacement due to linear expansion to the pixel position-cumulative physical length relationship derived in steps 1 to 5 of Figure 14, based on the data of the change in positional displacement with respect to temperature derived by the process shown in the flowchart of Figure 27.
[0099] As mentioned above, the change in positional displacement depends on the pixel position. In the temperature correction process shown in Figure 33, first, the temperature of the image reading device 100 at the time of distance correction data measurement, the temperature to be corrected, and the temperature of the image reading device 100 (CIS) itself at the time of distance correction data measurement are required. The temperature at the time of distance correction data measurement is recorded in advance in the storage unit 220 of the data processing device 200. Then, the correction data generation unit 211 of the processor 210 adds or subtracts the change in positional displacement ΔL calculated using the above equation (6) to the cumulative physical length (step S501), and terminates the process. Through this process, the number of pixels corresponding to the cumulative physical length, which is the physical interval between black patterns in the distance correction chart, can be temperature corrected. Note that if this temperature correction process is not required, step 6 in Figure 14 can be skipped.
[0100] In the flowchart of Figure 14, the correction data generation unit 211 of the processor 210 processes the output data last (step 7 in Figure 14). Since steps 1 to 6 processed the data in the pixel position-cumulative physical length format, skipping step 7 would result in the format output after processing in step 6 becoming the distance correction data 221. However, since the pixel positions recorded in the distance correction data 221 are values for each interval of the black lines 26 of the distance correction chart 25, the cumulative physical length is not recorded for all pixel positions, which may make it inconvenient to use. In that case, it is possible to convert it into continuous data by performing the conversion to the positional displacement amount of the cumulative physical length and approximation calculations for pixels between adjacent lines, as performed in step 13 of Figure 27. In this way, the correction data generation unit 211 of the data processing device 200 converts the data into a data format convenient for the end user of the image reading device 100 and outputs the data (step 7 in Figure 14).
[0101] The distance measurement unit 212 of the data processing device 200 uses the distance correction data 221 generated by the processing of the flowchart in Figure 14 to measure the distance between multiple points in the main scanning direction based on waveform data obtained by reading the image of the object to be measured with the image reading device 100.
[0102] Embodiment 2. Embodiment 2 of this disclosure will be described with reference to the figures.
[0103] Figure 34 is a processing flowchart of the distance correction chart waveform according to Embodiment 2. The processing flowchart in Figure 34 includes a white output confirmation step (Step 101), a step to check for output degradation due to foreign matter such as dust (Step 102), and a dust removal step (Step 103) before the waveform acquisition and binarization process (Step 1) in the flowchart of Figure 14.
[0104] In Embodiment 1, the data processing device 200 generates distance correction data 221 that corrects the physical length of the image reading device 100 in the main scanning direction based on the output data of the image reading device 100, which reads a black and white pattern formed at equal intervals in the main scanning direction on the distance correction chart 25. However, when the distance correction chart 25 is read while the surface of the first transparent body 3 is dirty or has foreign matter attached to it, the dirt or foreign matter on the surface of the first transparent body 3 is mistakenly recognized as the black lines 26 on the distance correction chart 25.
[0105] Therefore, in Embodiment 2, a white output confirmation step (step 101) is provided before the waveform acquisition and binarization process (step 1), and a white chart for white brightness correction (for correcting the amount of light received by the light receiving element 15) is read in advance by the image reading device 100 to confirm the white output (white correction process).
[0106] If the surface of the first transparent body 3 is dirty or has foreign matter attached to it, the amount of light received by the corresponding photodetector 15 will decrease. Therefore, in the step to check for output reduction due to dust or other foreign matter (step 102), the condition of the surface of the first transparent body 3 is determined. If there is data from the photodetector 15 indicating a decrease in the amount of light received (light received data indicating a decrease in white output) (step 102: Yes), it is determined that the surface of the first transparent body 3 is dirty or has foreign matter attached to it, and the process proceeds to the dust removal step of the image reading device 100 (step 103). In step 103, the first transparent body 3 is cleaned, and the process returns to the white output confirmation step (step 101). If there is no light received data from the photodetector 15 indicating a decrease in the amount of light received (step 102: No), it is determined that the surface of the first transparent body 3 is clean and free of dirt or foreign matter, and the process proceeds to waveform acquisition ~ binarization (step 1).
[0107] By performing the above steps (steps 101 to 103), reading errors in the distance correction chart 25 can be prevented.
[0108] The above describes a flow in which, if it is determined that the surface of the first transparent body 3 is dirty or has foreign matter attached, the process proceeds to the dust removal step (step 103) of the image reading device 100 to clean the first transparent body 3. However, in the output reduction confirmation step (step 102), the data of the photodetector 15 whose light reception amount has decreased may be set as invalid data, and the process proceeds to waveform acquisition ~ binarization processing (step 1). In this case, the data of the photodetector 15 will be treated as invalid data in the subsequent steps.
[0109] Embodiment 3. Embodiment 3 of this disclosure will be described with reference to the figures.
[0110] Figure 34 is a processing flowchart of the distance correction chart waveform according to Embodiment 3. The processing flowchart in Figure 34 includes a lens joint presence / absence determination process (step 301) and a process to invalidate the temperature correction value near the lens joint (step 302) between the temperature correction process (step 6) and the output data processing (step 7) in the flowchart of Figure 14.
[0111] In the case of an image reading device 100 with a long main scanning direction, a single rod lens array 11 cannot cover the image reading range. Therefore, as shown in Figure 35, several rod lens arrays 11 may be joined together in the main scanning direction. Figure 35 shows a case where rod lens array 11A and rod lens array 11B are joined together in the main scanning direction.
[0112] When multiple rod lens arrays 11 (11A, 11B) are joined in the main scanning direction, rod lens 11A and rod lens 11B are joined by a sealing material 111. Joining errors may occur between the two rod lens arrays 11 (11A, 11B) being joined, including the sealing material 111. In the image reading device 100, as shown in Figure 36, the rod lens arrays 11 (11A, 11B) are pressed against the plate 31 in the sub-scanning direction by the lens plate 112 and adjustment screws 113, so no misalignment occurs in the sub-scanning direction (Y direction) at the joint. Also, for the same reason, no misalignment occurs in the main scanning direction (X direction).
[0113] However, in directions perpendicular to the main scanning direction and the sub-scanning direction, joining errors may occur in the rod lens array 11 (11A, 11B) at the joining point. Specifically, as shown in Figure 37, in adjacent rod lenses 16 separated by the joining point, the distance between the optical axes may differ between one end (e.g., the light incident end) and the other end (e.g., the light exit end).
[0114] In the rod lens 16 at the joint, if the distance between the optical axes is the same at one end (e.g., the light incident end) and the other end (e.g., the light exit end) (Figure 37(a)), the length measurement correction of the image reading device 100 can be performed in steps 1 to 6 of Figure 34, similar to Embodiment 1.
[0115] However, if the distance between the optical axes differs between one end (e.g., the light incident end) and the other end (e.g., the light exit end) of the rod lens 16 at the joint (Figure 37(b)), the temperature correction value at the joint may show a singularity (discontinuity point) as shown in Figure 38.
[0116] Therefore, data near the junction of the rod lens array 11 (11A, 11B), where the temperature correction value may show an anomaly, is invalidated (for example, by forcibly inputting FAULT-DATA), and the process moves to output data processing (step 7).
[0117] Since the positions of the junctions between the rod lens arrays 11 (11A, 11B) are known in advance, the received light data from a predetermined number of photodetectors 15, including the junctions, is invalidated. For example, the received light data from 50 photodetectors 15 in the front and rear directions (i.e., 100 photodetectors in total) is invalidated (for example, FAULT-DATA is forcibly input), and the process moves to output data processing (step 7).
[0118] In other words, if the image reading device 100 is configured in advance with multiple rod lens arrays 11 connected in the main scanning direction, the lens joint presence / absence determination process determines that there is a "presence" (step 301: Yes), and the data processing device 200 performs a process to invalidate the temperature correction value near the lens joint (step S302). Specifically, the data from a predetermined number of light-receiving elements 15, including the joints of the rod lens arrays 11, is invalidated, and the process moves to output data processing (step 7), where the measurement results of the distance between multiple points in the main scanning direction are output.
[0119] If the image reading device 100 is composed of a single rod lens array 11, the data processing device 200 determines that there is "no" lens junction (step 301: No), and proceeds to output data processing (step 7). Using the result obtained in step 6, the measurement result of the distance between multiple points in the main scanning direction is output.
[0120] By performing the above processing, even when the image reading device 100 is configured with multiple rod lens arrays 11 connected in the main scanning direction, it is possible to correct the measurement of the image reading device 100.
[0121] [Note 1] In a distance measurement method, an image reading device in which pixels, which are light-receiving elements, are arranged in the main scanning direction reads a distance correction chart in which a gray-and-white pattern is formed at regular intervals in the main scanning direction as waveform data of the gray-and-white pattern using the light-receiving elements arranged in the main scanning direction, and measures the distance between multiple points in the main scanning direction based on the read waveform data, The first step is to convert the aforementioned waveform data into a binarized waveform based on a defined threshold, A second step involves comparing the binarized waveform with the grayscale pattern formed on the distance correction chart, and converting the binarized waveform into edge information consisting of falling and rising edges from which noise has been removed. A third step involves comparing the edge information with the physical length of the black and white pattern of the distance correction chart to derive the number of pixels, which are the light-receiving elements, that correspond to the physical distance between adjacent black patterns in the main scanning direction. A distance measurement method equipped with [a specific feature]. [Note 2] The distance measurement method described in Appendix 1, wherein the first step is defined as the falling edge position where the value of the binarized waveform changes from 1 to 0 at the point where the distance correction chart changes from a white pattern to a black pattern, and the rising edge position where the value of the binarized waveform changes from 0 to 1 at the point where the distance correction chart changes from a black pattern to a white pattern. [Note 3] The second step described above is: Step 21 involves scanning the image reading device in the main scanning direction, and when it reaches a predetermined measurement start pixel, enabling detection of the falling edge which is the starting point of the black pattern in the main scanning direction. Step 22: When the falling edge is detected, the received light data from the pixel onward where the falling edge was detected is invalidated. A 23rd step in which, after detecting the falling edge, when the black pattern reaches the endpoint prediction pixel in the main scanning direction, the received data is enabled and the detection of the rising edge is enabled, The process includes a 24th step in which, upon detecting the rising edge, the received light data from the pixel onward where the rising edge was detected is invalidated, or, even without detecting the rising edge, the received light data is invalidated when the scan exceeds the range of the endpoint prediction pixels in the main scanning direction of the black pattern. The distance measurement method according to Appendix 1 or Appendix 2, wherein when the measurement start pixel for the next black pattern located in the scanning direction is reached, the 21st, 22nd, 23rd, and 24th steps are repeated. [Note 4] The third step described above is: A 31st step of deleting the falling edge for which an adjacent rising edge corresponding to the falling edge has not been detected, Step 32: The pixel that detected the falling edge is designated as a falling edge detection pixel, and the pixel that detected the rising edge adjacent to the falling edge is designated as a rising edge detection pixel, and the position of the black pattern pixel is set to the average value of the position of the falling edge detection pixel and the position of the rising edge detection pixel. A third step involves deriving the pixel positions of multiple black patterns by performing the processing of the third step on multiple falling edges and rising edges repeatedly detected in the second step, A distance measurement method according to any one of Appendix 1 to 3, comprising: a 34th step of comparing the interval between the pixel positions of the plurality of black patterns with the physical interval of the black patterns on the distance correction chart; if the interval between the pixel positions of the plurality of black patterns is equal to the physical interval of the black patterns on the distance correction chart, the number of pixels between adjacent pixel positions of the black patterns is set to the number of pixels corresponding to the physical interval of the black patterns on the distance correction chart; and if the interval between the pixel positions of the plurality of black patterns is an integer multiple of 2 or more of the physical interval of the black patterns on the distance correction chart, the number of pixels between the pixel position obtained by interpolating the black pattern and the adjacent pixel position of the black pattern is set to the number of pixels corresponding to the physical interval of the black patterns on the distance correction chart. [Note 5] A distance measurement method according to any one of Appendix 1 to Appendix 4, further comprising a fourth step of determining whether a black pattern of the distance correction chart is detected within a predetermined range of expected locations of the black pattern on the first pixel side and the expected locations of the black pattern on the last pixel side, in the range from a first pixel position located in the main scanning direction to the final pixel position. [Note 6] The distance measurement method according to any one of Appendix 1 to 5, further comprising a fifth step of arranging a plurality of distance correction charts in the main scanning direction and combining data for a number of pixels corresponding to the interval between black patterns of each distance correction chart. [Note 7] The distance measurement method according to any one of Appendix 1 to 5, further comprising a fifth step of arranging a plurality of distance correction charts in the main scanning direction and combining data for a number of pixels corresponding to the physical interval between black patterns of each distance correction chart. [Note 8] A distance measurement method according to any one of Appendix 1 to Appendix 7, further comprising a sixth step of correcting the number of pixels corresponding to the interval between black patterns in the distance correction chart based on temperature-dependent data of the positional displacement of pixels in the main scanning direction of the image reading device acquired in advance. [Note 9] Prior to the first step, a white output confirmation step is performed in which the image reading device reads the white chart and the white output of the image reading device is confirmed. The distance measurement method described in any one of Appendix 1 to Appendix 8, further comprising: if there is light-receiving data in which the white output output by the light-receiving element decreases, it is determined that there is dirt or foreign matter attached to the first transparent body of the image reading device, and the method branches to a dust removal step in which the white output confirmation step is performed again after cleaning the first transparent body; and if there is no decrease in the white output output by the light-receiving element, it is determined that the first transparent body is normal, and the method proceeds to the first step. [Note 10] After the sixth step, the image reading device further includes a lens bonding portion presence / absence determination step in which it determines whether or not there is a lens bonding portion in which a plurality of rod lens arrays are joined in the main scanning direction. If a lens joint is found to be present in the lens joint presence determination step, the received light data from a predetermined number of light-receiving elements including the lens joint is invalidated, and the measurement result of the distance between multiple points in the main scanning direction is output. The distance measurement method described in Appendix 8, wherein if there is no lens joint in the lens joint presence determination step, the result of the processing in step 6 is used to output the measurement result of the distance between multiple points in the main scanning direction. [Note 11] The presence or absence of the aforementioned lens coupling portion is pre-entered in the distance measurement method described in Appendix 10.
[0122] This disclosure allows for various embodiments and modifications without departing from the broad spirit and scope of this disclosure. Furthermore, the embodiments described above are for illustrative purposes only and do not limit the scope of this disclosure. In other words, the scope of this disclosure is indicated by the claims, not by the embodiments. Various modifications made within the scope of the claims and the equivalent significance of the disclosure are considered to be within the scope of this disclosure.
[0123] This application is based on Japanese Patent Application No. 2023-064812, filed on 12 April 2023, and Japanese Patent Application No. 2024-009960, filed on 26 January 2024. The entire specifications, claims, and drawings of Japanese Patent Application No. 2023-064812 and Japanese Patent Application No. 2024-009960 are incorporated herein by reference. [Explanation of Symbols]
[0124] 100 Image reading device, 2 Side plate, 3 First transparent body, 4 Chart, 5 Output waveform of Chart 4, 7 Second frame, 8 Light source, 9 First frame, 10 Second transparent body, 11, 11A, 11B Rod lens array, 12 Substrate support plate, 13 Substrate, 14 Substrate, 15 Photodetector, 16 Rod lens, 17 Fixed side plate, 18 Original, 19 Erect 1:1 image of Original 18, 20 Table with ensured flatness, 21 Fixing device, 22 Fixing device, 23 Infrared sensor, 24 Rail, 25 Distance correction chart, 26 Black line, 27 White blank area, 28 Black scratch, 29 Second effective start black line, 30 First final black line, 31 Plate, 111 Sealing material, 112 Lens plate, 113 Adjustment screw, 200 Data processing device, 210 Processor, 211 Correction data generation unit, 212 distance measurement unit, 220 storage unit, 221 distance correction data, 1000 distance measurement system.
Claims
1. In a distance measurement method, an image reading device in which pixels, which are light-receiving elements, are arranged in the main scanning direction reads a distance correction chart in which a gray-and-white pattern is formed at regular intervals in the main scanning direction as waveform data of the gray-and-white pattern using the light-receiving elements arranged in the main scanning direction, and measures the distance between multiple points in the main scanning direction based on the read waveform data, The first step is to convert the waveform data into a binarized waveform based on a predetermined threshold, A second step involves comparing the binarized waveform with the grayscale pattern formed on the distance correction chart, and converting the binarized waveform into edge information consisting of falling and rising edges from which noise has been removed. A third step involves comparing the edge information with the physical length of the black and white pattern of the distance correction chart to derive the number of pixels, which are the light-receiving elements, that correspond to the physical interval between adjacent black patterns in the main scanning direction. A distance measurement method equipped with [a specific feature].
2. The distance measurement method according to claim 1, wherein the first step is defined as the falling edge position where the value of the binarized waveform changes from 1 to 0 at the point where the distance correction chart changes from a white pattern to a black pattern, and the rising edge position where the value of the binarized waveform changes from 0 to 1 at the point where the distance correction chart changes from a black pattern to a white pattern.
3. The second step described above is: The 21st step involves scanning the image reading device in the main scanning direction, and when it reaches a predetermined measurement start pixel, enabling detection of the falling edge which is the starting point of the black pattern in the main scanning direction. Step 22: When the falling edge is detected, the received light data from the pixel onward where the falling edge was detected is invalidated. A 23rd step in which, after detecting the falling edge, when the black pattern reaches the endpoint prediction pixel in the main scanning direction, the received data is made valid and the detection of the rising edge is enabled, The process includes a 24th step in which, upon detecting the rising edge, the received light data from the pixel onward where the rising edge was detected is invalidated, or, even without detecting the rising edge, the received light data is invalidated when the scan exceeds the range of the endpoint prediction pixel in the main scanning direction of the black pattern. The distance measurement method according to claim 1, wherein when the measurement start pixel for the next black pattern located in the scanning direction is reached, the 21st, 22nd, 23rd, and 24th steps are repeated.
4. The previous third step is, A 31st step of deleting the falling edge for which the adjacent rising edge corresponding to the falling edge is not detected, Step 32: The pixel that detects the falling edge is designated as a falling edge detection pixel, and the pixel that detects the rising edge adjacent to the falling edge is designated as a rising edge detection pixel, and the position of the black pattern pixel is set to the average value of the position of the falling edge detection pixel and the position of the rising edge detection pixel. A third step involves deriving the pixel positions of multiple black patterns by performing the processing of the third step on the multiple falling edges and rising edges repeatedly detected in the second step, A distance measurement method according to claim 1, comprising a 34th step of comparing the interval between the pixel positions of the plurality of black patterns with the physical interval of the black patterns on the distance correction chart, and if the interval between the pixel positions of the plurality of black patterns is equal to the physical interval of the black patterns on the distance correction chart, the number of pixels between adjacent pixel positions of the black patterns is set to the number of pixels corresponding to the physical interval of the black patterns on the distance correction chart, and if the interval between the pixel positions of the plurality of black patterns is an integer multiple of 2 or more of the physical interval of the black patterns on the distance correction chart, the number of pixels between the pixel position obtained by interpolating the black pattern and the adjacent pixel position of the black pattern is set to the number of pixels corresponding to the physical interval of the black patterns on the distance correction chart.
5. The distance measurement method according to claim 1, further comprising a fourth step of determining whether a black pattern of the distance correction chart is detected within a predetermined range of expected locations of the black pattern on the first pixel side and expected locations of the black pattern on the last pixel side, in the range from a first pixel position located in the main scanning direction to the final pixel position.
6. The distance measurement method according to claim 1, further comprising a fifth step of arranging a plurality of distance correction charts in the main scanning direction and combining data of a number of pixels corresponding to the interval between black patterns of each of the distance correction charts.
7. The distance measurement method according to claim 1, further comprising a fifth step of arranging a plurality of distance correction charts in the main scanning direction and combining data of a number of pixels corresponding to the physical interval between black patterns of each distance correction chart.
8. A distance measurement method according to any one of claims 1 to 7, further comprising a sixth step of correcting the number of pixels corresponding to the physical interval between black patterns in the distance correction chart based on temperature-dependent data of the positional displacement of pixels in the main scanning direction of the image reading device acquired in advance.
9. Prior to the first step, a white output confirmation step is performed in which the image reading device reads the white chart and the white output of the image reading device is confirmed. The distance measurement method according to any one of claims 1 to 7, further comprising: if there is received data indicating a decrease in the white output output by the light-receiving element, it is determined that there is dirt or foreign matter attached to the first transparent body of the image reading device, and the method branches to a dust removal step in which the white output confirmation step is performed again after cleaning the first transparent body; and if there is no decrease in the white output output by the light-receiving element, it is determined that the first transparent body is normal, and the method proceeds to the first step.
10. After the sixth step, the image reading device further includes a lens joint presence / absence determination step in which it determines whether or not there is a lens joint where a plurality of rod lens arrays are joined in the main scanning direction. If a lens joint is found to be present in the lens joint presence determination step, the light data received from a predetermined number of light-receiving elements including the lens joint is invalidated, and the distance measurement result between multiple points in the main scanning direction is output. The distance measurement method according to claim 8, wherein if there is no lens joint in the lens joint presence determination step, the result of the processing in step 6 is used to output the distance measurement result between multiple points in the main scanning direction.
11. The distance measurement method according to claim 10, wherein the presence or absence of the lens joint is pre-entered.
12. In a distance measurement method in which a distance correction chart having a black and white pattern formed at regular intervals in the x-direction, which is the measurement direction, is read as waveform data of the black and white pattern by light-receiving elements arranged in the x-direction, and the distance between multiple points in the x-direction is measured based on the read waveform data, The first step is to convert the waveform data into a binarized waveform based on a predetermined threshold, A second step involves comparing the binarized waveform with the grayscale pattern formed on the distance correction chart, and converting the binarized waveform into edge information consisting of falling and rising edges from which noise has been removed. A third step involves comparing the edge information with the physical length of the black and white pattern of the distance correction chart to derive the number of light-receiving elements corresponding to the physical distance between adjacent black patterns in the x direction. A distance measurement method equipped with [a specific feature].