Image transfer system and image transfer method
By selectively transferring only necessary image data, the system addresses the data transfer bottleneck, ensuring high-speed imaging and efficient measurement processes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2026-03-31
AI Technical Summary
The existing image transfer systems face bottlenecks in data transfer speed due to the inability of interfaces to keep up with increased imaging speeds, limiting the performance of image sensors and hindering high-speed measurement processes.
An image transfer system and method that distinguishes between necessary and unnecessary areas in image data, transferring only the required data to an image processing device, thereby optimizing data size and maintaining high-speed imaging capabilities.
This approach allows for high-speed image data transfer by reducing the size of image data to match the transfer speed of the interface, effectively utilizing the imaging sensor's capabilities and enhancing measurement efficiency.
Smart Images

Figure 0007838130000001 
Figure 0007838130000002 
Figure 0007838130000003
Abstract
Description
Technical Field
[0001] The present invention relates to an image transfer system and method for transferring image data from an imaging device that acquires an image in which a work is irradiated with line light to an image processing device.
Background Art
[0002] For various optical measurement purposes, a work may be irradiated with line light and its image may be captured. For example, in the optical cutting method for optically measuring the height of a work, the work is irradiated with line light and scanned while being relatively moved with respect to the measurement optical system, and the height of the work is obtained from the captured image based on the principle of triangulation.
[0003] In the optical cutting method, multiple imaging operations are required for one work. Therefore, in order to speed up the measurement, it is essential to increase the imaging speed of the scan camera and to transfer the image data acquired by imaging to an image processing device that performs image processing for height measurement calculation at high speed. The increase in the imaging speed can be achieved by improving the performance of the image sensor mounted on the camera. However, the image data transfer speed of the interface connecting the imaging device and the image processing device may not be able to keep up with the increased imaging speed. In this case, the interface becomes a bottleneck and the performance of the image sensor cannot be utilized, resulting in a problem that the measurement cannot be accelerated.
[0004] If there is a limit to increasing the transfer speed of the interface, a measure to reduce the amount of image data to be transferred may be taken. Patent Document 1 discloses a device that suppresses the size of the transferred image data by appropriately setting a ROI (Region Of Interest) that determines the readout range of the pixels of the imaging sensor so as not to capture an image of an area unnecessary for measurement. However, the smaller the ROI area, the smaller the measurement range of the height measurement. In order to expand the measurement range, the ROI area has to be enlarged, and ultimately, the size of the image data cannot be significantly suppressed.
Prior Art Documents
[0005] [Patent Document 1] Japanese Patent Publication No. 2000-275024 [Overview of the project] [Problems that the invention aims to solve]
[0006] The object of the present invention is to provide an image transfer system and method that can reduce the size of image data as much as possible when transferring image data from an imaging device that acquires an image of a workpiece illuminated with line light to an image processing device.
[0007] An image transfer system according to one aspect of the present invention comprises a light source that irradiates line light onto a workpiece that is moving relative to it in a predetermined feeding direction; an imaging device that acquires an image of the workpiece and its surroundings irradiated with the line light; an image processing device that performs necessary image processing on the image data acquired by the imaging device; and a transfer device that transfers the image data to the image processing device through an interface. The transfer device performs the following processes in the image data: detecting an irradiated area where reflected light of the line light is observed; distinguishing an area of a predetermined width including the irradiated area as a required area and an area other than the required area as an unnecessary area; and then transfers the image data of the required area to the image processing device.
[0008] Another aspect of the present invention relates to an image transfer method which involves irradiating a workpiece with line light while relatively moving the workpiece in a predetermined feeding direction, capturing an image of the workpiece and its surroundings irradiated with line light, and transferring the resulting image data to an external device through an interface. The method further involves detecting an irradiated area in the image data where reflected light from the line light is observed, designating a predetermined width of area including the irradiated area as a required area, and clearly distinguishing the area outside the required area as an unnecessary area, and transferring the image data of the required area to the external device. [Brief explanation of the drawing]
[0009] [Figure 1] Figure 1 is a schematic diagram that simply shows the hardware configuration of an image transfer system according to an embodiment of the present invention. [Figure 2] Figures 2(A) to 2(C) are schematic diagrams illustrating the method of measuring the height of a part (workpiece) using the light section method. [Figure 3] Figure 3 is a flowchart showing an image transfer method related to a comparative example. [Figure 4] Figure 4 is a schematic diagram illustrating the problems with the image transfer method in the comparative example. [Figure 5] Figure 5 is a schematic diagram illustrating the image transfer method of the present invention. [Figure 6] Figure 6(A) shows an example of an image obtained by the light section method, and Figure 6(B) is a diagram illustrating the unwanted region of the image. [Figure 7] Figure 7 is a flowchart showing an image transfer method according to an embodiment of the present invention. [Figure 8] Figures 8(A) to 8(C) show examples of reductions in the amount of image data transmitted. [Figure 9] Figure 9 is a block diagram showing the functional configuration of the image transfer system. [Figure 10] Figure 10 is a schematic diagram showing a first embodiment of the process of distinguishing between necessary and unnecessary regions in a pixel line. [Figure 11] Figure 11 is a schematic diagram showing a second embodiment of the process for distinguishing between necessary and unnecessary regions in a pixel line. [Figure 12] Figure 12 is a schematic diagram showing a third embodiment of the process for distinguishing between necessary and unnecessary regions in a pixel line. [Figure 13] Figure 13 shows an example of processing when multiple candidate line beams are detected. [Figure 14] Figures 14(A) and (B) show other processing examples when multiple candidate line beams are detected. [Figure 15] Figure 15 shows another example of processing when multiple candidate line beams are detected. [Figure 16]Figure 16 shows an example of processing when the line light does not fit within the number of pixels in the extraction area. [Modes for carrying out the invention]
[0010] Embodiments of the present invention will be described in detail below with reference to the drawings. The image transfer system and image transfer method according to the present invention can be applied to various devices that irradiate various workpieces such as various industrial products, semi-finished products, machine parts, electronic components, food products, and agricultural products with line light for the purpose of measurement, capture images, and perform necessary image processing on the acquired images. For example, one preferred application of the present invention is to measure the height of a component mounted on a substrate using the light section method. In the following embodiments, a measuring device that measures the height of a component using the light section method will be described. The measuring device is, for example, incorporated into a printed circuit board production line that mounts electronic components on printed circuit boards, and is an appearance inspection machine that checks whether the electronic components are mounted on the printed circuit board in the correct position without defects.
[0011] [Device configuration] Figure 1 is a schematic diagram illustrating the hardware configuration of the image transfer system 1 according to this embodiment. The image transfer system 1 includes a camera unit 2, an image processing device 3, and a transmission cable 4 (interface). The camera unit 2 captures an image of a component C as a workpiece and transfers the acquired image data to the image processing device 3. The image processing device 3 performs the necessary image processing on the transferred image data. The transmission cable 4 connects the camera unit 2 and the image processing device 3 in an electrically communicative manner. As the transmission cable 4, for example, a CameraLink cable that realizes image data transfer in accordance with the CameraLink standard (Note: CameraLink is a registered trademark of AIA) can be used.
[0012] The camera unit 2 includes a line light source 21 (light source), a camera 22 (imaging device), and a transfer device 23. The line light source 21 irradiates the component C with line light SL. The line light SL is light that extends linearly in one direction. As the line light source 21, a light source device including a laser light source and an optical component that converts the laser light emitted by the laser light source into slit light that spreads in a fan shape can be applied. The component C is relatively moved in a predetermined scan direction F (predetermined feed direction) by a moving mechanism (not shown). Therefore, the line light source 21 irradiates the component C moving in the scan direction F with the line light SL.
[0013] The camera 22 acquires an image of the component C irradiated with the line light SL and its surroundings. That is, the camera 22 images a partial image of the component C including the reflected light RL of the line light SL. The imaging optical axis of the camera 22 is in the vertical direction, whereas the projection axis of the line light SL emitted from the line light source 21 is set in an oblique direction. These axis arrangements are for measuring the three-dimensional shape of the component C by the optical cutting method. The camera 22 includes an imaging lens 24 and an imaging sensor 25. The imaging lens 24 forms an optical image including the reflected light RL on the light receiving surface of the imaging sensor 25. The imaging sensor 25 is a solid-state imaging device such as a CMOS sensor or a CCD sensor, and photoelectrically converts the optical image into image data.
[0014] The transfer device 23 transfers the image data acquired by the camera 22 to the image processing device 3 through the transmission cable 4. When the transfer device 23 performs image transfer in accordance with the Camera Link standard, an image signal including a synchronization signal and image data is transferred using a binary signal of a fixed amount (for example, 28 bits) synchronized with a reference clock. As will be described in detail later, when transferring the image data, the transfer device 23 does not transfer all of the image data acquired by the camera 22, but deletes unnecessary areas of the image data and then transfers it.
[0015] The image processing device 3 executes image processing for obtaining the height data of the component C by the optical cutting method based on the image data of the component C acquired by the camera unit 2. In FIG. 1, an example in which two camera units 2 are connected to the image processing device 3 is shown. The number of camera units 2 may be one or three or more. The transmission cable 4 connecting the camera unit 2 and the image processing device 3 transmits an image signal by, for example, the LVDS (Low Voltage Differential Signaling) transmission method.
[0016] [Height measurement by optical cutting method] Referring to FIGS. 2(A) to (C), an explanation will be added about the height measurement of the component C by the optical cutting method. Here, the measurement target is, as shown in FIG. 2(A), the component C (work) in a state of being mounted on the surface PS of the substrate P. As described above, the camera 22 of the camera unit 2 has an imaging optical axis AX extending in the vertical direction with respect to the surface PS and images the image of the component C. The line light source 21 has a projection optical axis having a predetermined crossing angle θ with respect to the imaging optical axis AX and emits line light SL along the projection optical axis. The line light SL is irradiated onto the component C as the measurement target.
[0017] FIG. 2(B) shows an image IM acquired by the camera 22 at a certain scan position SC1 where the component C is irradiated with the line light SL. When the line light SL from the line light source 21 is irradiated onto the area including the component C, the reflected light RL1 from the surface PS of the substrate P around the component C and the reflected light RL2 from the upper surface of the component C are imaged by the camera 22. Since the line light SL is oblique light and the component C has a height, on the image IM, the reflected lights RL1 and RL2 are observed at positions with different X coordinates. Specifically, the reflected light RL1 appears at the coordinate x11, and the reflected light RL2 appears at the coordinate x12 on the downstream side in the scan direction from the coordinate x11.
[0018] In Figure 2(A), point P0 is treated as a point with a calculated height of 0 when illuminated by the line light SL. Then, as shown in Figure 2(C), using the principle of triangulation with the intersection angle θ, height data can be obtained such that the height of coordinate x11 is h1 and the height of coordinate x12 is h2. Subsequently, the line light source 21 and camera 22 are moved downstream in the scanning direction from scan position SC1, and the camera 22 takes images sequentially at scan positions SC2 and SC3. As a result, height data for coordinates x21 and x22 is obtained at scan position SC2, and height data for coordinates x31 and x32 is obtained at scan position SC3. Needless to say, the actual scan pitch is much narrower than in the example shown.
[0019] By integrating multiple height data acquired through scanning, the three-dimensional shape data of part C can be obtained. Note that the height data acquired at a single scan position SC1, SC2, and SC3 is based on the results of reflected light RL1 and RL2 being irradiated at different X coordinate positions. Therefore, when integrating the data, a height table is created that matches, for example, the height data of coordinate x12 obtained in the area of part C at scan position SC1 with the height data of coordinate x12 obtained in the area of surface PS at subsequent scan positions.
[0020] [Explanation of the comparative example] Figure 3 is a flowchart showing the image transfer process by the image transfer system 1 according to a comparative example. First, the camera 22 of the camera unit 2 performs an operation to image the component C as the object to be imaged (step S1). This imaging operation includes the irradiation of line light SL from the line light source 21 onto the component C and the imaging sensor 25 capturing an optical image including reflected light RL from the surface PS of the substrate P surrounding the component C. The image data (luminance data) converted photoelectrically by the imaging sensor 25 is swept to the transfer device 23 at a predetermined frame rate (fps: Frames Per Second) (step S2). The frame rate is an indicator that determines the imaging speed of the camera 22.
[0021] Next, image data is output from the transfer device 23 to the image processing device 3 (step S3). In data transfer in accordance with the Camera Link standard, the transfer device 23 generates transmission data for an image signal that includes a synchronization signal and image data, and the image signal is transmitted via the transmission cable 4 using the LVDS transmission method.
[0022] The aforementioned image signal is received by the image input circuit of the image processing device 3 (step S4). The image processing device 3 uses the principle described earlier in Figures 2(B) and (C) to perform the necessary image processing on the transmitted image signal to obtain the height data of component C (step S5). For example, the image processing device 3 identifies the reflected light RL1 and RL2 of line light SL1 and SL2 as illustrated in Figure 2(B) on the image data, and derives the height data of component C by referring to the coordinate values of the reflected light RL1 and RL2.
[0023] In the light section method described above, only height data based on one line of light SL can be obtained in a single image. To acquire high-resolution height data of component C, it is necessary to perform multiple images while moving component C relative to the imaging optical system at small increments. Due to the demand for high line speeds, it is desirable to minimize the time spent on board inspection, etc., so naturally, high-speed measurement of component C's height is also required. High-speed height measurement can be achieved by increasing the imaging speed of the camera 22, that is, by increasing the frame rate of the imaging sensor 25.
[0024] However, the transfer speed of the transmission cable 4, which is the interface between the camera unit 2 and the image processing device 3, may not be able to keep up with the increased frame rate of the imaging sensor 25. In other words, the transfer speed of the transmission cable 4 becomes a bottleneck, preventing the imaging sensor 25 from performing to its full potential, and as a result, it may not be possible to speed up height measurement.
[0025] Figure 4 is a schematic diagram illustrating the problems with the image transfer method of the comparative example. In Figure 4, the first camera unit 2A and the second camera unit 2B are connected to the image processing device 3 by a transmission cable 4 with a transfer speed of 1.0 GB / sec. The imaging sensor 25 of the first camera unit 2A has the capability to scan 1 MB size frame images at 1000 fps per second. That is, the first camera unit 2A can output 1.0 GB / sec of image data. On the other hand, the imaging sensor 25 of the second camera unit 2B has the capability to scan 1 MB size frame images at 2000 fps per second, and can output 2.0 GB / sec of image data.
[0026] The transmission cable 4 can keep up with the output rate from the first camera unit 2A (1.0 GB / sec), but it cannot keep up with the output rate of the second camera unit 2B (2.0 GB / sec). As a result, although the second camera unit 2B has an imaging speed of 1 MB / 2000 fps, it is limited to transferring only 1 MB / 1000 fps due to the transfer speed limitation of the transmission cable 4.
[0027] [Image transfer method of this embodiment] In this embodiment, in order to resolve the above-mentioned problems and speed up the height measurement of component C, the transfer device 23 distinguishes between the necessary area required for measurement and the unnecessary area that is not substantially used for each image data acquired by the camera 22. Then, only the image data of the necessary area is transferred from the transfer device 23 to an external device such as the image processing device 3. By performing such selective transfer, the size of the image data to be transferred can be suppressed to the minimum necessary, and even if the image data transfer speed of the interface cannot be increased, high-speed transfer of the required image data can be achieved.
[0028] Figure 5 is a schematic diagram illustrating the image transfer method of this embodiment. Here, the second camera unit 2B, image processing device 3, and transmission cable 4 shown in Figure 4 are displayed. As described above, the second camera unit 2B has an imaging speed of 1 MB / 2000 fps. In this embodiment, the image data size is reduced in the transfer device 23 to match the transfer speed of the transmission cable 4 while maintaining the imaging speed of the second camera unit 2B.
[0029] For example, before transferring the image data, the transfer device 23 performs a process to reduce the data size of the frame image obtained in a single image capture by the second camera unit 2B from 1MB to 0.5MB. The image data to be reduced is the image data of the unnecessary area mentioned above. In other words, the second camera unit 2B is used as an imaging device that sweeps out 0.5MB frame images at 2000fps per second. As a result, the output rate of the second camera unit 2B becomes 1.0GB / sec, which can be matched to the transfer speed of the transmission cable 4. Therefore, the capability of the second camera unit 2B to capture at "2000fps" can be effectively utilized, contributing to faster processing.
[0030] Regarding the unnecessary regions of image data, we will explain using an example of an image acquired by imaging based on the light section method. Figure 6(A) shows a single frame image 5 acquired during height measurement using the light section method. This image 5 corresponds to the image IM exemplified earlier in Figure 2(B). Image 5 consists of an illuminated region 51 where the reflected light RL of the line light SL is observed, and a dark region 52 where the reflected light RL is not observed. The illuminated region 51 is a rectangular region that is long in the X direction, which is the extension direction of the line light SL. As explained based on Figure 2(B), the illuminated region 51 is observed at positions corresponding to the reflected light RL1 from around the component C and the reflected light RL2 from the top surface of component C.
[0031] Figure 6(B) is a diagram illustrating the unnecessary region 53 in Image 5. In Image 5, the area necessary for height measurement using the light section method is the irradiation area 51 of the line light SL and its adjacent area; the remaining area is not used for height measurement. In other words, the necessary region used for height measurement is the minimum Y-direction width of Image 5 in which one end and the other end (upper and lower end in Figure 6) of the Y-direction width of the irradiation area 51 can be determined. The area of Image 5 other than the necessary region becomes the unnecessary region 53. That is, if the positional information (coordinate values) of the irradiation area 51 or the necessary region in Image 5 is specified, the area of Image 5 other than the necessary region can be treated as the unnecessary region 53 that is not used.
[0032] Since the image data corresponding to the unnecessary area 53 will not be used in practice even if it is transferred to the image processing device 3, the transfer itself can be omitted. Therefore, by having the transfer device 23 transfer only the image data of the necessary area to the image processing device 3 and discarding the image data of the unnecessary area 53, it is possible to reduce the size of the image data to be transferred to the absolute minimum.
[0033] Figure 7 is a flowchart showing an example of the image transfer method of this embodiment. The processes in steps S1, S2, S3, S4, and S5 are the same as steps S1 to S5 of the comparative example described earlier based on the flowchart in Figure 3. The difference from the comparative example is that between step S2, in which image data is swept from the imaging sensor 25, and step S3, in which the transfer device 23 outputs an image signal, the transfer device 23 performs a process to reduce the image data to be transferred (step S10).
[0034] As an image data reduction process, the transfer device 23 performs the following steps: step S11, which involves detecting the illumination region 51 in the image data output from the imaging sensor 25 in step S2, where the reflected light RL of the line light SL is observed; and step S12, which involves separating the region with a predetermined width including the illumination region 51 into the required region and the region outside the required region into the unnecessary region 53. In the subsequent step S3, the transfer device 23 transfers only the image data of the required region to the image processing device 3.
[0035] Figures 8(A) to 8(C) show an example of the image data reduction process for transmission. Image 5 shown in Figure 8(A) is the same image 5 illustrated earlier in Figure 6(B). In step S11, the positional information of the illumination area 51 on image 5, i.e., the coordinate value, is obtained by evaluating the brightness value of each pixel for each pixel line in the Y direction perpendicular to the extension direction of the illumination area 51 of the line light SL in image 5. Several specific examples of how this brightness value is evaluated will be given later.
[0036] In step S12, as shown in Figure 8(A), a region of a predetermined width in the Y direction of image 5, including the irradiated area 51 detected in step S11, is identified as the required area A1. The required area A1 is typically set to include the irradiated area 51 and adjacent regions of a predetermined width in the Y direction that sandwich the irradiated area 51. In other words, the image of the required area A1 is an image in which the irradiated area 51 is sandwiched between a pair of adjacent regions in the Y direction. Having such an image of the required area A1 has the advantage of making it easier to accurately determine the positional information of the irradiated area 51 based on the brightness contrast between the irradiated area 51, which is a bright area, and the adjacent regions, which are dark areas.
[0037] Once the required area A1 is identified, the remaining portion of image 5 becomes the unnecessary area 53. If the Y direction is treated as the up and down direction in image 5, then the unnecessary area 53 will be set above and below the required area A1. The XY width of the unnecessary area 53 depends on the XY position of the irradiated area 51. For example, in the part of the irradiated area 51 observed in the center of the Y direction in image 5, the upper unnecessary area 53 will be narrow in the Y direction, and the lower unnecessary area 53 will be relatively wide in the Y direction. If the part C to be measured has a dome-shaped three-dimensional shape in the X direction, then the irradiated area 51 in the center of the Y direction will be observed as an arc shape in image 5. In this case, the upper and lower unnecessary areas 53 will not be rectangular as in Figure 8(A), but the upper unnecessary area 53 will have an arc-shaped depression, and the lower unnecessary area 53 will have an arc-shaped bulge.
[0038] Figure 8(B) schematically shows the image transferred from the transfer device 23 to the image processing device 3. The transferred image is only the image corresponding to the required region A1 from the entire image 5. For example, if the total image width A2 in the Y direction of image 5 consists of 100 pixels, and the required region A1 in the Y direction consists of 10 pixels, the size of the image data to be transferred can be reduced to approximately 1 / 10. The required region A1 is accompanied by data indicating the position of the required region A1, specifically the coordinate values of the irradiation area 51 of the line light SL or the required region A1. These coordinate values are used by the image processing device 3 to indicate the position from which the required region A1 was extracted in the Y direction of image 5.
[0039] Figure 8(C) schematically shows the image signal D transferred from the transfer device 23 to the image processing device 3 after processing in steps S11 and S12. The image signal D includes luminance data d1 to d5 of pixels constituting the image of the required region A1 as image data da, and coordinate data D1 indicating the coordinate values of the illuminated region 51 or the required region A1. The coordinate data D1 is data obtained by replacing the coordinate values with luminance data selected from 0 to 255. For example, bits for 1 to 4 pixels are allocated for the transfer of the coordinate data D1.
[0040] By including coordinate data D1, information is transferred indicating which coordinate region on image 5 detected the line light SL. This allows for immediate determination of the position of the illuminated area 51 on the image, enabling rapid height measurement processing in the image processing device 3. Furthermore, since the position information of the illuminated area 51 or the required area A1 can be transferred using the bits of the channel that transfers the image data da, it is unnecessary to secure a separate channel or interface for transferring this position information.
[0041] One existing method for reducing the size of image data to be transmitted is to set a smaller ROI (Region of Interest), which defines the readout range of the image sensor pixels. The smaller the ROI, the more the image data size of a single frame image can be suppressed. However, the smaller the ROI, the smaller the measurement range for height measurement becomes. Taking image 5 in Figure 8(A) as an example, if the ROI is set to read out only the area near the center in the Y direction, the illuminated area 51 located in the center in the X direction cannot be detected. In order to avoid reducing the measurement range, the ROI must be set larger, and ultimately the image data size cannot be significantly reduced. In contrast, according to the embodiment described above, after detecting the illuminated area 51 of the line light in image 5, the necessary area A1 including the illuminated area 51 and the other unnecessary areas 53 are clearly distinguished. Therefore, the image data size can be suppressed without reducing the measurement range.
[0042] [Image Transfer System Configuration] Figure 9 is a block diagram showing the configuration of the image transfer system 1 applied to the height measurement of component C. The image transfer system 1 includes a camera unit 2, which includes a line light source 21, a camera 22, and a transfer device 23, as previously described, and an image processing device 3. The transfer device 23 and the image processing device 3 are connected electrically via a transmission cable 4. As previously described, when performing data transfer based on the Camera Link standard, a Camera Link cable is used as the transmission cable 4, and the two are connected in a way that enables LVDS communication. Note that an interface based on a data transfer standard other than the Camera Link standard, such as CoaXPress or USB 3.0, may also be adopted. Here, an example is shown in which the transfer device 23 performs data transfer using the Camera Link standard.
[0043] Camera 22 captures an image of component C moving relative to the scanning direction F under illumination by line light SL emitted from line light source 21. Transfer device 23 has the function of outputting an image signal that includes a synchronization signal and image data acquired by camera 22, using a fixed amount of binary signal synchronized with a reference clock. Transfer device 23 transfers the image signal to image processing device 3 via transmission cable 4.
[0044] The transfer device 23 functionally includes an image input circuit 26, an illumination area identification unit 27, a required area setting unit 28, and an image output circuit 29. The image input circuit 26 receives image data output from the camera 22's imaging sensor 25 (Figure 1) at a predetermined frame rate. The image input circuit 26 also generates a synchronization signal based on the Camera Link standard and places luminance data as image data into a predetermined number of tater bits in units of the reference clock period.
[0045] The irradiation area identification unit 27 performs predetermined processing on the image data of image 5 illustrated in Figure 8(A) to detect the irradiation area 51 shown in step S11 of Figure 7. As illustrated in Figure 8(C), the coordinate values of the detected irradiation area 51 are converted into brightness data and incorporated into the empty bits of the data bits where the image data is placed. The required area setting unit 28 performs the sorting process shown in step S12. The required area setting unit 28 sorts the area with a predetermined width including the irradiation area 51 as the required area A1 and the area other than the required area A1 as the unnecessary area 53, and processes the image data of the unnecessary area 53 to be discarded. The image output circuit 29 converts the synchronization signal and the image signal including the image data and coordinate value data corresponding to the required area A1 into a signal that can be used for LVDS communication and outputs it.
[0046] The image processing device 3 comprises an image input circuit 31, an image memory 32, an image processing unit 33, and a height calculation unit 34. The image input circuit 31 is an LVDS communication deserializer circuit that receives synchronization signals and image signals transferred from the transfer device 23. The image memory 32 temporarily stores the transferred image signals. The image processing unit 33 accesses the image memory 32 as needed and performs processing to identify the position of the illumination area 51 corresponding to the line light SL. The height calculation unit 34 performs processing to determine the height data of component C by the light section method based on the positional relationship of the multiple illumination areas 51 identified on the image 5.
[0047] [Specific examples of processing to distinguish between necessary and unnecessary areas] <First Example> Figure 10 is a schematic diagram showing the first embodiment of the process for distinguishing between the required area A1 and the unnecessary area 53 in a single pixel line GL. This distinguishing process also detects the illumination area 51 of the line light SL included in the image 5, which is mostly occupied by dark areas 52. The process of detecting the illumination area 51, performed by the illumination area identification unit 27, is carried out sequentially for each pixel line GL in the Y direction. The pixel line GL is a pixel line in a direction perpendicular to the extension direction (X direction) of the line light SL. This point is the same in the second and third embodiments described later.
[0048] In the XY pixel matrix that constitutes image 5, we focus on one pixel line GL in the Y direction. The pixel line GL includes an illuminated area 51 consisting of a dark area 52 with a relatively small luminance value and a bright area with a clearly larger luminance value than the dark area 52. Since the line light SL is an elongated light extending in the X direction, it usually appears as a narrow line at one location on a single pixel line GL. In the differentiation process of the first embodiment, an extraction area SA is set, consisting of N pixels with a constant extraction width narrower than the Y-direction width of the pixel line GL. In the first embodiment, this extraction area SA defines the required area A1. The illumination area identification unit 27 shifts the extraction area SA along the pixel line GL and performs a calculation to find the sum of the luminance data of the pixel group present within the extraction area SA.
[0049] The range over which the extraction area SA is shifted is from the start to the end of the pixel line GL. In the example in Figure 10, the extraction area SA is shifted one pixel at a time from the top to the bottom of the pixel line GL, and the sum of the brightness data of the pixel groups within the extraction area SA is calculated. Then, the position of the illumination area 51 is detected based on the position on the pixel line GL of the extraction area SA that has the maximum sum.
[0050] As shown in the example in Figure 10, at position (a), the extracted area SA does not include the illuminated area 51 and only covers the dark area 52, so the total value of the luminance data is small. At position (b), where the extracted area SA has shifted further downward, the extracted area SA now extends into part of the illuminated area 51. For this reason, the total value at position (b) is larger than at position (a). At position (c), where the shift has progressed further, the extracted area SA includes the entire illuminated area 51. Naturally, the total value of the luminance data at position (c) is larger than at positions (a) and (b), and represents the maximum value. From this result, it can be detected that the illuminated area 51 exists within the extracted area SA at position (c).
[0051] Once it is determined that position (c) is the position where the sum of the luminance data is maximum, the illumination area identification unit 27 treats the coordinates of the upper edge of the extracted area SA as position information indicating the upper edge of the required area A1. For example, if the upper edge of the required area A1 is the pixel position of the 10th row in image 5, the coordinate value = 10 is used as the coordinate data for the required area A1. Alternatively, the pixel position of the lower edge of the required area A1 may be used as the coordinate data.
[0052] In the first embodiment, an extraction area SA corresponding to the Y-direction width of the required area A1 is set to detect the illumination area 51. Therefore, once the detection of the illumination area 51 is complete, the required area A1 is automatically identified. Accordingly, the required area setting unit 28 extracts the extraction area SA at position (c) as the required area A1, and treats the area other than this required area A1 as the unnecessary area 53. The image data output from the image output circuit 29 consists of luminance data of the illumination area 51 and dark area 52 included in the extraction area SA at position (c), and position data obtained by converting coordinate data of coordinate value = 10, shown as an example, into luminance data.
[0053] <Second Example> Figure 11 is a schematic diagram showing a second embodiment of the differentiation process. In the second embodiment, the position of the illumination area 51 is determined by detecting the position where the brightness is maximum for each pixel line GL. That is, the illumination area identification unit 27 checks the brightness value of the pixels constituting one pixel line GL and detects the position of the maximum pixel where the brightness value is maximum.
[0054] The line light SL does not have a uniform light intensity within its width in the Y direction, but rather has a Gaussian distribution of light intensity. Therefore, the center of the illumination area 51 in the Y direction is generally the brightest. Consequently, by detecting the position of the largest pixel, the center position in the Y direction of the illumination area 51 can be determined, and as a result, the illumination area 51 can be detected. If multiple largest pixels are detected consecutively in the Y direction, the center of those pixel sequences in the Y direction can be treated as the center coordinate value of the illumination area 51.
[0055] The required area setting unit 28 identifies a predetermined width centered on the position of the largest pixel as the required area A1. For example, N pixels corresponding to the Y-direction width of the required area A1 are predetermined, and the area of N pixels centered on the position of the largest pixel is identified as the required area A1. Naturally, the width of N pixels is narrower than the Y-direction width of the pixel line GL. The number of N pixels may be the same as the number of N pixels that define the extraction area SA in the first embodiment. Detailed examples of setting the number of N pixels will be explained later.
[0056] The required area setting unit 28 extracts the required area A1 identified above as the data area to be transferred, and treats the area other than this required area A1 as the unnecessary area 53. The upper or lower end of the identified required area A1 is used as the coordinate data for that required area A1. The image data output from the image output circuit 29 consists of luminance data for the illuminated area 51 and dark area 52 within the required area A1, and position data obtained by converting the coordinate data to luminance data. The coordinate data may be placed at either the start end (upper side in the figure) or the end end (lower side) of the image data of the required area A1. In addition, other data, such as error data, data indicating some position information, or operation flag data, may be placed in the data bits allocated for the placement of the coordinate data. According to the second embodiment, the position coordinates of the illuminated area 51 are identified simply by detecting the maximum value of the luminance data for each pixel line GL, thus simplifying the detection process of the illuminated area 51.
[0057] <Third Example> Figure 12 is a schematic diagram showing a third embodiment of the differentiation process. In the third embodiment, each pixel line GL is divided into a high-brightness area and a low-brightness area, and the position of the illumination area 51 is determined based on the position of the maximum high-brightness area, which has the largest width along the pixel line GL among the observed high-brightness areas.
[0058] Specifically, the illumination area identification unit 27 checks the brightness value of each pixel constituting the pixel line GL and binarizes it into high-brightness areas 51A, 51B and low-brightness areas 52A using a predetermined threshold. Depending on the setting of the threshold and if light from other light sources enters, multiple high-brightness areas 51A, 51B may be detected, as illustrated in Figure 12. Anticipating such cases, the illumination area identification unit 27 refers to the binarized area. The illumination area identification unit 27 identifies the area of the maximum high-brightness area 51A, which has the largest Y-direction width along the pixel line GL, as the illumination area 51. Furthermore, the required area setting unit 28 identifies the width of N pixels centered on the Y-direction center of the maximum high-brightness area 51A as the required area A1.
[0059] The required area setting unit 28 extracts the required area A1 identified above as the data area to be transferred, and performs a process to distinguish areas other than this required area A1 from the unnecessary area 53. The upper or lower end of the identified required area A1 is used as the coordinate data of the required area A1, as in the first and second embodiments. The image data output from the image output circuit 29 consists of luminance data of the illuminated area 51 and dark area 52 within the required area A1, and position data obtained by converting the coordinate data into luminance data. Of course, the luminance data to be transferred is the data before binarization processing. According to the third embodiment, the illuminated area 51 can be accurately identified through the process of binarization of high-luminance and low-luminance areas, evaluation of the Y-direction width of the high-luminance area, and identification of the position of the maximum high-luminance area.
[0060] [Processing when multiple candidate line lights are detected] Since the line light SL is a single straight line of light, only one illumination area 51 should be observed in a single pixel line GL. However, in actual measurements, as illustrated in the third embodiment, for some reason, multiple areas that meet the requirements of an illumination area 51, i.e., multiple candidates for illumination area 51, may be detected in a single pixel line GL. In this case, height measurement cannot be performed unless one illumination area 51 is selected from the multiple candidates. When multiple candidates for illumination area 51 are detected, one of the following subsequent processes can be selected and executed. Process A) Select one of the irradiation areas 51 using a predetermined selection process. Process B) The process of detecting the irradiation area 51 is executed again. • Process C) Transfer the image data in which multiple irradiation areas 51 have been detected as is.
[0061] Process A described above can be exemplified by manual selection settings and automatic selection settings using a predetermined algorithm. Figure 13 shows an example of manual selection settings when multiple candidates for the illumination area 51 of the line light SL are detected. As shown in Figure 13(A), for example, when performing the luminance value-based differentiation process of the first to third embodiments described above, it is assumed that three line light candidates 51a, 51b, and 51c are detected in one pixel line GL, and the result is obtained that the remainder is a dark area 52.
[0062] Assuming the starting point of the pixel line GL is the top edge of the figure, the brightness values of the pixels are checked from the top edge to the bottom edge. In this case, the three line light candidates 51a, 51b, and 51c will be detected in the order 51a → 51b → 51c. In manual selection settings, as shown in Figure 13(B), the first detected line light candidate 51a is pre-set to be selected as the illumination area 51. Alternatively, as shown in Figure 13(C), the last detected line light candidate 51c is pre-set to be selected as the illumination area 51. Such manual settings simplify the selection process when multiple candidates for the illumination area 51 are detected.
[0063] In the differentiation process of the first to third embodiments described above, it is also possible to intentionally set the system to make it easier to detect multiple candidate illumination areas 51. In the first embodiment, assuming that a position on the pixel line GL where the sum of the brightness data of the extracted area SA equals the maximum value M1 is detected, other positions in the extracted area SA where the sum of the brightness data falls within the range of (maximum value M1 - coefficient R) are also included as candidates for illumination areas 51. The coefficient R is a value arbitrarily set by the user based on experience, etc., or a value set as a predetermined ratio to the maximum value M1.
[0064] Then, from these multiple candidates, one illumination area 51 is identified by applying the manual selection setting method described above or the automatic selection setting method described below. Using such means makes it possible to improve the accuracy of identifying the illumination area 51. Similarly, in the second embodiment, assuming that the position of the highest pixel where the brightness value is the maximum value M2 is detected, the positions of other pixels where the brightness value falls within the range of (maximum value M2 - coefficient R) are also included as candidates for the illumination area 51. In the third embodiment, assuming that the position of a high-brightness area where the binarization area is the maximum value M3 is detected, the positions of other high-brightness areas where the binarization area falls within the range of (maximum value M3 - coefficient R) are also included as candidates for the illumination area 51.
[0065] Figures 14(A) and (B) show examples of automatic selection settings when multiple candidates for the illumination area 51 of the line light SL are detected. Figure 14(A) shows an example where the results of the pixel line adjacent to the detection target of the illumination area 51 are referenced. In Figure 14(A), an example is given where two line light candidates 51a and 51b are detected in the target pixel line GL. In this case, the identification result of the illumination area 51 in the pixel line GLa adjacent to the pixel line GL in the same image is referenced. Then, of the two line light candidates 51a and 51b, the one that is closer to the illumination area 51 of the adjacent pixel line GLa is automatically selected. This selection process is based on the fact that the position of the illumination area 51 does not usually change significantly between adjacent pixel lines GL and GLa. In the example of Figure 14(A), the line light candidate 51b that is closer to the illumination area 51 of the adjacent pixel line GLa is selected as the illumination area 51.
[0066] Figure 14(B) shows an example where the results of the previous image acquisition, which is sequentially acquired using the light section method, are referenced. In Figure 14(B), an example is given where two line light candidates 51a and 51b are detected in the target pixel line GL. In this case, the result of identifying the illumination area 51 in the same pixel line GLb as the target pixel line GL in the image acquired in the previous acquisition is referenced. Then, of the two line light candidates 51a and 51b, the one that is closer to the illumination area 51 of the adjacent pixel line GLb is automatically selected. This selection process is based on the fact that, in images before and after the light section method, which is performed with a narrow pitch, the position of the illumination area 51 does not usually change significantly between the same pixel lines GL and GLb. In the example in Figure 14(B), line light candidate 51a, which is closer to the illumination area 51 of the adjacent pixel line GLb, is selected as the illumination area 51.
[0067] Process B described above is a method for detecting the illumination area 51 of a single pixel line GL using another discrimination process when multiple candidate illumination areas 51 are detected for a single pixel line GL in one discrimination process. Specifically, when multiple candidates are detected in any one of the algorithms of the first to third embodiments of the discrimination process for the required area A1 in a single pixel line GL, as illustrated in Figures 10 to 12, the process of detecting the illumination area 51 is executed again using the algorithm of the other embodiment.
[0068] For example, if the differentiation process using the first embodiment in Figure 10 detects multiple candidate illumination areas 51 for a single pixel line GL, the process of detecting illumination areas 51 for that pixel line GL is executed again using the differentiation process using the second embodiment in Figure 11 or the third embodiment in Figure 12. If multiple candidate illumination areas 51 are still detected after the second differentiation process, one illumination area 51 is identified by applying the manual selection setting or automatic selection setting method described above.
[0069] The above-described process C is a method that transfers the image data in which multiple illumination regions 51 have been detected as is to the image processing device 3 and entrusts the processing to the image processing device 3. As shown in Figures (A) and (B) of Figure 15, suppose that two line light candidates 51a and 51b are detected in one pixel line GL. In this case, the illumination region 51 and the required region A1 for the pixel line GL are not identified, that is, no data reduction processing is performed, and the image data of pixels with the entire image width A2 is transferred as is.
[0070] However, in order for the image processing device 3 to identify that a pixel line GL has not undergone data reduction processing, unique luminance data X, which is distinguishable from the coordinate data of a pixel line that has undergone data reduction, is attached as coordinate data 54. Figure 15(A) shows an example in which the coordinate data 54 is placed at the beginning of the image data with a total image width A2. On the other hand, Figure 15(B) shows an example in which the coordinate data 54 is placed at the end of the image data with a total image width A2. In this case, due to the requirement of consistency with the pixel line that has undergone data reduction, the coordinate data 54 is placed after the N pixels of image data from the top of the pixel line GL.
[0071] [How to set the N pixels to determine the width of the required area] In the differentiation process of the first to third embodiments described above, the number of pixels of the N pixels (see Figures 10 to 12) that determine the Y-direction width of the required region A1 in the pixel line GL may be set arbitrarily by the user, or it may be set automatically based on predetermined setting criteria.
[0072] One example of an automatic setting configuration is to have the transfer device 23 refer to the maximum frame rate of the image sensor 25 equipped with the camera 22 and the maximum transfer speed of the transmission cable 4 (interface). Then, it determines the number of pixels such that the data size to be transferred is less than or equal to the transfer size determined by the maximum transfer speed, and sets this number of pixels as N pixels that define the width of the required area A1. By adopting such an automatic setting, it is possible to set the required area A1 with a number of pixels within a range that enables high-speed transfer of image data, taking into account the maximum frame rate of the image sensor 25 and the maximum transfer speed of the interface.
[0073] Next, a specific example of the automatic setting described above will be shown. The transfer device 23 automatically measures the difference between the maximum frame rate of the image sensor 25 and the maximum transfer speed of the transmission cable 4, and performs a process to determine the optimal value of N. This process can be performed in the following steps 1 to 4. <Procedure 1> Set the exposure time and ROI of the camera 22's image sensor 25 to conditions suitable for imaging component C using the light section method. Let W be the width of the image determined by the ROI setting, and H be the height of the image. Note that H corresponds to the width in the Y direction of the pixel line GL. <Step 2> Calculate the maximum frame rate (FPS) of the imaging sensor 25 when the camera 22 takes an image under the conditions of Step 1 above. <Step 3> Determine the coefficient AN such that the data size per second when imaging is performed at the FPS determined in Step 2 is smaller than the transfer size Cs determined by the maximum transfer speed of the transmission cable 4. In this case, the number of data bits Da used to place the coordinate data of the required area A1 is also taken into consideration. The coefficient AN is calculated using the following formula. H×W×FPS×AN=Cs-Da×W×FPS AN=(Cs-Da×W×FPS) / (H×W×FPS) <Step 4> As shown in the following equation, multiply the coefficient AN by the height H of the ROI, and round down the decimal part to obtain the value which is the number of pixels = N that determines the width of the required region A1 in the Y direction. N = floor(H × AN)
[0074] [Handling cases where the line of light does not fit within N pixels] During imaging of component C, there may be cases where the illumination area 51 of the line light SL does not fit within the range of N pixels (see Figures 10 to 12). For example, this can occur if ambient illumination light is reflected or if some kind of flash occurs. Alternatively, it is possible that the user has set the wrong number of N pixels. In view of this, it is desirable to have the transfer device 23 perform a process to determine whether or not the illumination area 51 fits within the predetermined required area A1 of N pixels.
[0075] In the case of the first embodiment of the differentiation process (Figure 10), the determination process can be performed by detecting the length of the shift position where the total brightness data value of the extracted area SA becomes V% of the maximum value of the total brightness data value detected in the pixel line GL. The value of V is a threshold set by the user as appropriate. If shift positions of the extracted area SA where the total brightness data value is V% or greater are observed for N pixels or more consecutively, it is determined that the illumination area 51 does not fit within the required area A1. In the case of the second embodiment (Figure 11), if pixels with a brightness value of V% of the maximum brightness value are observed for N pixels or more consecutively, it is determined that the illumination area 51 does not fit within the required area A1. In the case of the third embodiment (Figure 12), if the Y-direction width of the maximum high-brightness portion 51A exceeds N pixels, it is determined that the illumination area 51 does not fit within the required area A1.
[0076] If the illuminated area 51 does not fit within the required area A1 with a width of N pixels, the transfer device 23 attaches an error code to the image data and transfers it to the image processing device 3, as shown in Figure 16. Figure 16 shows an example in which a line light candidate 51n with a width greater than N pixels is detected in a single pixel line GL. In this case, arbitrary luminance data is placed in the data bit A1n for image data in the transferred data. For example, luminance data with a luminance value of 0 or random luminance data is placed in data bit A1n. Then, unique data obtained by converting the error code into luminance data is placed as coordinate data 54. By attaching an error code to the image data during transfer in this way, it becomes possible to perform appropriate post-processing on the image processing device 3 side.
[0077] If the transfer device 23 determines that the irradiation area 51 is not within the required area A1, it is desirable to have the transfer device 23 perform appropriate corrective processing. For example, the transfer device 23 may be instructed to automatically expand the number of pixels = N that defines the required area A1 from the next imaging. Alternatively, the number of pixels in the area with a value of V% or greater detected in the above determination process may be set as the new N value. By performing such corrective processing, the relationship between the irradiation area 51 and the required area A1 can be optimized, and the position of the irradiation area 51 can be accurately identified.
[0078] [Inventions included in the above embodiments] The embodiments described above include the invention having the following configuration.
[0079] An image transfer system according to one aspect of the present invention comprises a light source that irradiates line light onto a workpiece that is moving relative to it in a predetermined feeding direction; an imaging device that acquires an image of the workpiece and its surroundings irradiated with the line light; an image processing device that performs necessary image processing on the image data acquired by the imaging device; and a transfer device that transfers the image data to the image processing device through an interface. The transfer device performs the following processes in the image data: detecting an irradiated area where reflected light of the line light is observed; distinguishing an area of a predetermined width including the irradiated area as a required area and an area other than the required area as an unnecessary area; and then transfers the image data of the required area to the image processing device.
[0080] Another aspect of the present invention relates to an image transfer method which involves irradiating a workpiece with line light while relatively moving the workpiece in a predetermined feeding direction, capturing an image of the workpiece and its surroundings irradiated with line light, and transferring the resulting image data to an external device through an interface. The method further involves detecting an irradiated area in the image data where reflected light from the line light is observed, designating a predetermined width of area including the irradiated area as a required area, and clearly distinguishing the area outside the required area as an unnecessary area, and transferring the image data of the required area to the external device.
[0081] According to the image transfer system or method described above, the irradiation area of the line light is detected in the acquired image data, and the necessary area including the irradiation area is clearly separated from the other unnecessary areas. Then, only the image data of the necessary area is transferred to the image processing device or external device. In other words, instead of limiting the imaging range from the beginning as in ROI, the necessary area is identified and transferred for each acquired image data. As a result, image data essential for image processing such as measurement is transferred to the image processing device, while image data of the unnecessary area is not transferred and is effectively discarded. Therefore, the image data size can be kept to the minimum necessary, and even if the image data transfer speed of the interface cannot be increased, high-speed transfer of the required image data can be achieved.
[0082] In the image transfer system described above, it is desirable that the image processing device performs image processing to determine the height data of the workpiece using the light section method.
[0083] In this configuration, for each image data acquired by the imaging device, only the image data necessary for calculating height data using the light section method is transferred to the image processing device. This enables the transfer of image data in line with the increased imaging speed, contributing to faster height data measurement.
[0084] In the image transfer system described above, it is desirable that the required area be set to include the irradiation area and an adjacent area of a predetermined width that sandwiches the irradiation area.
[0085] According to this embodiment, the image of the required region is obtained when the irradiated region is sandwiched between adjacent regions. In other words, it becomes easier to accurately determine the positional information of the irradiated region based on the brightness contrast between the irradiated region and the adjacent regions. Therefore, the accuracy of measurements and other operations can be improved.
[0086] In the image transfer system described above, it is desirable that the transfer device transfers the brightness data of pixels constituting the image of the required region as image data, and also transfers the positional information of the illuminated region or the required region by replacing it with brightness data.
[0087] According to this embodiment, since the positional information of the irradiated area or required area, that is, information on which coordinate area on the image detected the line light, is transmitted, the position of the line light on the image can be immediately determined, and processing such as measurement can be performed quickly. Furthermore, since the positional information of the irradiated area or required area can be transmitted using the bits of the channel that transmits the brightness data as image data, it is not necessary to secure a separate channel or interface for transmitting said positional information.
[0088] In the image transfer system described above, the process of detecting the illumination area performed by the transfer device may include setting a constant extraction width that is narrower than the width of the pixel line in a direction perpendicular to the extension direction of the line light of the image data, performing a calculation to find the sum of the brightness data of the pixel group located within the extraction width while shifting the extraction width from the start to the end of the pixel line, and determining the position coordinates of the illumination area based on the position on the pixel line of the extraction width that maximizes the sum.
[0089] According to this embodiment, the sum of the luminance data of the pixel group present within the extraction width is obtained by shifting the extraction width, so the position of the illuminated area can be reliably detected from the image data.
[0090] In the image transfer system described above, the transfer device may, as a process for detecting the illumination area, detect the brightness data of the pixels constituting the pixel lines in the image data in a direction perpendicular to the extension direction of the line light, and perform a process to identify the position coordinates of the illumination area based on the position of the largest pixel where the value of the brightness data is maximum. As a process for distinguishing, it may also perform a process to identify a predetermined width centered on the largest pixel as the required area.
[0091] According to this embodiment, the position coordinates of the illuminated area are determined simply by detecting the maximum value of the brightness data for each pixel line, thus simplifying the process of identifying the illuminated area.
[0092] In the image transfer system described above, the transfer device may, as a process for detecting the irradiation area, binarize the brightness data of pixels constituting the pixel lines in the image data in a direction perpendicular to the extension direction of the line light using a predetermined threshold to divide them into high-brightness and low-brightness portions, identify the position coordinates of the irradiation area based on the position of the maximum high-brightness portion that has the largest width along the pixel line among the high-brightness portions, and as a process for distinguishing, identify a predetermined width centered on the central position of the maximum high-brightness portion as the required area.
[0093] According to this embodiment, the irradiation area can be accurately identified through a process of binarization of high-luminance and low-luminance areas, evaluation of the width of the high-luminance area, and identification of the position of the area with the highest luminance.
[0094] In the image transfer system described above, if multiple candidate illumination areas are detected in a single pixel line, it is desirable that the transfer device execute one of the following processes: select one illumination area using a predetermined selection process; repeat the process of detecting the illumination areas; or transfer the image data in which multiple illumination areas have been detected as is.
[0095] Normally, line light is a single linear beam of light, but in actual processing, multiple areas that meet the requirements of an irradiation area may be detected. According to the above embodiment, when multiple irradiation areas are detected, appropriate next-stage processing can be performed.
[0096] In the image transfer system described above, the transfer device may perform a process to determine whether the irradiation area is contained within a predetermined required area in the image data, and if the irradiation area is not contained within the required area, it may attach an error code to the image data and transfer it to the image processing device.
[0097] If the irradiation area does not fall within the required area, the edges of the irradiation area become unclear, making it difficult to accurately determine the position of the irradiation area. According to the above embodiment, in such cases, an error code is attached when transferring the image data, allowing the image processing device to perform appropriate processing.
[0098] In the image transfer system described above, it is desirable that the transfer device executes a process to expand the required area if it determines that the irradiation area does not fit within the required area. This optimizes the relationship between the irradiation area and the required area, and allows for accurate identification of the position of the irradiation area.
[0099] In the image transfer system described above, the transfer device may set the width of the required area by referring to the maximum frame rate of the imaging sensor provided by the imaging device and the maximum transfer speed of the interface, and determining the number of pixels such that the data size to be transferred is less than or equal to the transfer size determined by the maximum transfer speed.
[0100] According to this embodiment, considering the maximum frame rate of the imaging sensor and the maximum transfer speed of the interface, it is possible to set a required area having a number of pixels that enables high-speed transfer of image data.
Claims
1. A light source that illuminates a workpiece moving relative to it in a predetermined feed direction with line light, An imaging device that acquires an image of the workpiece and its surroundings that are irradiated with the aforementioned line light, An image processing device that performs necessary image processing on image data acquired by the aforementioned imaging device, The system includes a transfer device that transfers the aforementioned image data to the image processing device through an interface, The transfer device, The image data includes a process for detecting the irradiation region in which the reflected light of the line is observed, A process is performed to distinguish between a region of a predetermined width, including the irradiation area and along a direction perpendicular to the extension direction of the line light, as a required region, and the region outside the required region as an unnecessary region. The maximum frame rate of the imaging sensor provided by the imaging device and the maximum transfer speed of the interface are referenced to determine the number of pixels such that the data size to be transferred is less than or equal to the transfer size determined by the maximum transfer speed, and this number of pixels is set as the required pixels that define the predetermined width of the required area. An image transfer system that transfers image data of the required region having a predetermined width determined by the required pixels to the image processing device.
2. In the image transfer system according to claim 1, The image processing device is an image transfer system that performs image processing to determine the height data of the workpiece using the light section method.
3. In the image transfer system according to claim 1, An image transfer system in which the required area is set to include the irradiation area and an adjacent area of a predetermined width that sandwiches the irradiation area.
4. In the image transfer system according to claim 1, The transfer device is an image transfer system that transfers luminance data of pixels constituting the image of the required region as image data, and also replaces the positional information of the illuminated region or the required region with luminance data and transfers it.
5. In the image transfer system according to any one of claims 1 to 4, The process performed by the transfer device to detect the irradiation area is: An extraction area is set, consisting of the required pixels, having a certain extraction width corresponding to the predetermined width of the required area, which is narrower than the width of the pixel line in the direction perpendicular to the extension direction of the line light of the image data. The calculation to determine the sum of the brightness data of the pixel group located within the extraction area is performed while shifting the extraction area within the range from the start to the end of the pixel line. The process includes determining the position coordinates of the irradiation area based on the position on the pixel line of the extraction area where the sum is maximized. The transfer device is an image transfer system that, as the sorting process, performs the process of extracting the extraction area at the position on the pixel line where the total value is maximized as the required area.
6. In the image transfer system according to any one of claims 1 to 4, The transfer device performs the process of detecting the irradiation area, For pixel lines in the image data in a direction perpendicular to the extension direction of the line light, the brightness data of the pixels constituting the pixel line is detected. Based on the position of the largest pixel where the luminance data value is maximized, a process is executed to determine the position coordinates of the illumination area. An image transfer system that, as part of the aforementioned differentiation process, performs a process to identify the region of the required pixels centered on the largest pixel as the required region.
7. In the image transfer system according to any one of claims 1 to 4, The transfer device performs the process of detecting the irradiation area, For pixel lines in the image data in a direction perpendicular to the extension direction of the line light, the brightness data of the pixels constituting the pixel line is binarized into high-brightness and low-brightness portions using a predetermined threshold. Based on the position of the maximum brightness portion among the aforementioned high-brightness portions, which has the largest width along the pixel line, the position coordinates of the illumination region are determined. An image transfer system that, as the aforementioned differentiation process, performs a process to identify the region of the required pixels centered on the central position of the maximum brightness portion as the required region.
8. In the image transfer system according to any one of claims 1 to 4, The transfer device is an image transfer system that, when multiple candidate illumination areas are detected in a single pixel line, performs one of the following processes: select one illumination area using a predetermined selection process; repeat the process of detecting the illumination areas; or transfer the image data in which multiple illumination areas have been detected as is.
9. In the image transfer system according to any one of claims 1 to 4, The transfer device performs a process to determine whether the irradiation area is contained within the required area having a predetermined width determined by the required pixels in the image data. An image transfer system that, if the irradiation area is wider than the predetermined width and therefore does not fit within the required area, attaches an error code to the image data and transfers it to the image processing device.
10. In the image transfer system according to claim 9, Image transfer system, wherein the transfer device determines that the irradiation area does not fit within the required area, and performs a process to expand the number of pixels of the required pixels that determine the predetermined width of the required area.
11. (delete)
12. While moving the workpiece relative to it in a predetermined feed direction, a line of light is shone onto the workpiece. An image transfer method comprising transferring image data obtained by capturing an image of the workpiece and its surroundings irradiated with the aforementioned line light using an imaging device, to an external device via an interface, In the aforementioned image data, the irradiation region in which the reflected light of the line light is observed is detected, A region of a predetermined width along a direction perpendicular to the extension direction of the line light, including the irradiation area, is designated as the required region, and all areas outside the required region are clearly distinguished as the unnecessary region. The maximum frame rate of the imaging sensor provided by the imaging device and the maximum transfer speed of the interface are referenced to determine the number of pixels such that the data size to be transferred is less than or equal to the transfer size determined by the maximum transfer speed, and this number of pixels is set as the required pixels that define the predetermined width of the required area. An image transfer method for transferring image data of the required region having a predetermined width determined by the required pixels to the external device.
Citation Information
Patent Citations
Automatic detection of work line
JP1988149507A
Three-dimensional input apparatus
JP2000275024A
Method and device for acquiring three-dimensional data
JP2001116528A
Height measuring device
JP2001188008A
Three-dimensional shape measurement device and robot system
JP2012220473A