Image transmission system and image transmission method
By distinguishing between necessary and unnecessary areas in the transmission device, the image data size is reduced, the interface transmission speed bottleneck problem is solved, and high-speed transmission of image data and rapid measurement are achieved.
Patent Information
- Application Number
- CN202380093561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2025-09-12
AI Technical Summary
In the prior art, the interface between the imaging device and the image processing device cannot keep up with the increasing imaging speed, resulting in the image data transmission speed becoming a bottleneck and making it impossible to achieve rapid measurement.
By distinguishing between the necessary areas and unnecessary areas required for measurement in the transmission device, only the image data of the necessary areas is transmitted, and the image data size is reduced to match the transmission speed, and data transmission adopts the camera link standard.
This enables high-speed transmission of image data even when transmission speed cannot be increased, supporting faster measurement and an expanded measurement range.
Smart Images

Figure CN120641720A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image transmission system and method for transmitting image data from an imaging device that acquires an image of a workpiece irradiated with line light to an image processing device. Background Art
[0002] For various optical measurement purposes, a workpiece is sometimes irradiated with line light and its image captured. For example, in the light section method, which optically measures the height of a workpiece, the workpiece is moved relative to the measuring optical system while being irradiated with line light and scanned. The workpiece's height is then determined using the principle of triangulation based on the captured image.
[0003] The light sectioning method requires multiple images of a workpiece. Therefore, to accelerate measurement, it is important to increase the scanning camera's imaging speed and quickly transmit the resulting image data to an image processing device that performs the image processing required for height measurement. This increase in imaging speed can be achieved by improving the performance of the imaging element mounted on the camera. However, the image data transmission speed of the interface connecting the imaging device and the image processing device is sometimes unable to keep up with the increased imaging speed. In this case, the interface becomes a bottleneck, preventing the imaging element from performing its full performance, resulting in an undesirable situation where accelerated measurement cannot be achieved.
[0004] If there are limits to increasing the transmission speed of an interface, measures can be taken to reduce the amount of transmitted image data. Patent Document 1 discloses a device that appropriately sets the ROI (Region of Interest) that determines the pixel readout range of an imaging sensor, thereby suppressing the image data size transmitted by not capturing images of areas not needed for measurement. However, the smaller the ROI, the smaller the height measurement range. Expanding the measurement range necessitates enlarging the ROI, which, in turn, fails to significantly reduce the image data size.
[0005] Prior art literature
[0006] Patent Literature
[0007] Patent Document 1: Japanese Patent Application Laid-Open No. 2000-275024 Summary of the Invention
[0008] Problems to be solved by the invention
[0009] An object of the present invention is to provide an image transmission system and method capable of reducing the size of image data as much as possible when transmitting image data from an imaging device that acquires an image obtained by irradiating a workpiece with line light to an image processing device.
[0010] An image transmission system according to one aspect of the present invention comprises: a light source for irradiating a workpiece moving relatively in a specified conveying direction with line light; a photographing device for acquiring an image of the workpiece and its surroundings irradiated with the line light; an image processing device for performing required image processing on the image data acquired by the photographing device; and a transmission device for transmitting the image data to the image processing device via an interface, wherein the transmission device performs: a process of detecting an irradiation area in the image data where reflected light of the line light is observed; and a process of distinguishing an area of a specified width including the irradiation area as a necessary area and areas other than the necessary area as unnecessary areas, wherein the transmission device transmits the image data of the necessary area to the image processing device.
[0011] Another aspect of the present invention relates to an image transmission method that irradiates a workpiece with line light while moving the workpiece relative to it along a specified conveying direction, and transmits image data obtained by capturing an image of the workpiece and its surroundings irradiated with the line light to an external device through an interface, wherein, in the image data, an irradiation area where reflected light of the line light is observed is detected, an area of a specified width including the irradiation area is distinguished as a necessary area, and areas outside the necessary area are distinguished as unnecessary areas, and the image data of the necessary area is transmitted to the external device. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a schematic diagram briefly showing the hardware configuration of the image transmission system according to the embodiment of the present invention.
[0013] Figure 2 (A) to (C) are schematic diagrams illustrating a method of measuring the height of a component (workpiece) using the light section method.
[0014] Figure 3 : is a flowchart showing an image transmission method of a comparative example.
[0015] Figure 4 It is a schematic diagram for explaining the problems of the image transmission method of the comparative example.
[0016] Figure 5 FIG. 1 is a schematic diagram schematically illustrating the image transmission method of the present invention.
[0017] Figure 6 (A) is a diagram showing an example of an image obtained by the light sectioning method. Figure 6 (B) is a diagram for explaining an unnecessary region of the image.
[0018] Figure 7 is a flowchart illustrating an image transmission method according to an embodiment of the present invention.
[0019] Figure 8 (A) to (C) are diagrams showing examples of reduction of transmitted image data.
[0020] Figure 9 This is a block diagram showing the functional structure of the image transmission system.
[0021] Figure 10 1 is a schematic diagram showing a first embodiment of the process of distinguishing between necessary areas and unnecessary areas in a pixel line.
[0022] Figure 11 1 is a schematic diagram showing a second embodiment of the process of distinguishing between necessary areas and unnecessary areas in a pixel line.
[0023] Figure 12 1 is a schematic diagram showing a third embodiment of the process of distinguishing between necessary areas and unnecessary areas in a pixel line.
[0024] Figure 13 This is a diagram showing an example of processing when a plurality of line light candidates are detected.
[0025] Figure 14 (A) and (B) are diagrams showing other processing examples when a plurality of line light candidates are detected.
[0026] Figure 15 This is a diagram showing another example of processing when a plurality of line light candidates are detected.
[0027] Figure 16 This is a diagram showing an example of processing when the line light does not converge within the number of pixels in the extraction area. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present invention will be described in detail based on the accompanying drawings. The image transmission system and image transmission method of the present invention can be applied to various devices that irradiate various workpieces such as various industrial products, semi-finished products, mechanical parts, electronic parts, food, agricultural products, etc. with linear light to capture images for the purpose of measurement, and perform the required image processing on the obtained images. For example, one of the preferred uses of the present invention is to use a component mounted on a substrate as a workpiece and measure the height of the component by a light sectioning method. In the following embodiments, a measuring device that measures the height of a component by a light sectioning method will be described. The above-mentioned measuring device is, for example, an appearance inspection machine that is assembled on a substrate mounting production line that mounts electronic components on a printed substrate, and checks whether the electronic components are mounted on the printed substrate in the correct position without defects.
[0029] [Device Structure]
[0030] Figure 1This is a schematic diagram briefly showing the hardware configuration of the image transmission system 1 of this embodiment. The image transmission 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 workpiece component C and transmits the acquired image data to the image processing device 3. The image processing device 3 performs the required image processing on the transmitted image data. The transmission cable 4 connects the camera unit 2 and the image processing device 3 so that they can communicate electrically. For example, a camera link cable that implements image data transmission compliant with the Camera Link standard (Note: CameraLink is a registered trademark of AIA) can be used as the transmission cable 4.
[0031] The camera unit 2 includes a line light source 21 (light source), a camera 22 (imaging device), and a transport device 23. The line light source 21 irradiates a component C with line light SL. Line light SL is light extending linearly in one direction. A light source device including a laser light source and optical components that convert the laser light emitted by the laser light source into slit light that expands in a fan shape can be used as the line light source 21. Component C is relatively moved in a predetermined scanning direction F (predetermined transport direction) by a moving mechanism (not shown). Therefore, the line light source 21 irradiates the component C with line light SL as it moves in the scanning direction F.
[0032] Camera 22 captures an image of component C and its surroundings illuminated by line light SL. Specifically, camera 22 captures a partial image of component C containing reflected light RL from line light SL. The projection axis of line light SL emitted from line light source 21 is set at an angle relative to the vertical direction of the camera 22's imaging optical axis. This axis configuration is used to measure the three-dimensional shape of component C using the light section method. Camera 22 includes an imaging lens 24 and an imaging sensor 25. The imaging lens 24 forms a light image containing reflected light RL on the light-receiving surface of imaging sensor 25. Imaging sensor 25 is a solid-state imaging element such as a CMOS sensor or CCD sensor, which photoelectrically converts the light image into image data.
[0033] The transmission device 23 transmits image data acquired by the camera 22 to the image processing device 3 via the transmission cable 4. When the transmission device 23 performs image transmission in accordance with the Camera Link standard, it transmits an image signal containing a synchronization signal and image data using a binary signal of a certain length (e.g., 28 bits) synchronized with a reference clock. As will be described later, when transmitting this image data, the transmission device 23 does not transmit all of the image data acquired by the camera 22, but rather deletes unnecessary areas of the image data before transmitting it.
[0034] The image processing device 3 performs image processing for obtaining height data of the component C by a light section method based on the image data of the component C acquired by the camera unit 2. Figure 1, an example of two camera units 2 connected to an image processing device 3 is shown. Alternatively, there may be one, three, or more camera units 2. The transmission cable 4 connecting the camera units 2 and the image processing device 3 transmits image signals using, for example, the LVDS (Low Voltage Differential Signaling) transmission method.
[0035] [Height measurement using the light section method]
[0036] Reference Figure 2 (A) to (C) of the figure, the height measurement of component C based on the light section method is explained. Figure 2 FIG2 (A) shows an example of a component C (workpiece) mounted on the surface PS of a substrate P. As described above, the camera 22 of the camera unit 2 has an imaging optical axis AX extending perpendicularly to the surface PS and captures an image of the component C. The line light source 21 has a projection optical axis at a predetermined intersection angle θ with the imaging optical axis AX and emits line light SL along this projection optical axis. The line light SL is irradiated onto the component C to be measured.
[0037] Figure 2 (B) shows image IM captured by camera 22 at a certain scanning position SC1 when irradiating component C with line light SL. When line light SL is irradiated from line light source 21 onto an area encompassing component C, camera 22 captures reflected light RL1 from the surface PS of substrate P surrounding component C and reflected light RL2 from the upper surface of component C. Because line light SL is oblique and component C is at a height, reflected light RL1 and reflected light RL2 are observed at different X-coordinate positions in image IM. Specifically, reflected light RL1 appears at coordinate x11, and reflected light RL2 appears at coordinate x12, which is further downstream in the scanning direction than coordinate x11.
[0038] will Figure 2 The case where the point P0 in (A) is irradiated with the line light SL is treated as a point with a calculated height of 0. Figure 2 As shown in (C), based on the principle of triangulation using the intersection angle θ, it is possible to obtain height data such that the height at coordinate x11 is h1 and the height at coordinate x12 is h2. Subsequently, while moving the line light source 21 and camera 22 downstream from scanning position SC1 in the scanning direction, camera 22 sequentially captures images at scanning positions SC2 and SC3. This results in height data for coordinates x21 and x22 at scanning position SC2, and height data for coordinates x31 and x32 at scanning position SC3. Of course, the actual scanning pitch is much narrower than illustrated.
[0039] By integrating the multiple height data points acquired through scanning, the three-dimensional shape data of component C can be determined. It should be noted that the height data acquired at scanning positions 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, for example, a height table is created that matches the height data at coordinate x12 acquired in the region of component C at scanning position SC1 with the height data at coordinate x12 acquired in the region of surface PS at a subsequent scanning position.
[0040] [Description of Comparative Example]
[0041] Figure 3 This is a flowchart illustrating the image transmission process of the image transmission system 1 according to the comparative example. First, the camera 22 of the camera unit 2 performs an operation to image a component C, serving as the imaging target (step S1). This imaging operation includes irradiating the component C with line light SL from the line light source 21 and capturing an optical image, including reflected light RL from the surface PS of the substrate P surrounding the component C, by the imaging sensor 25. Image data (luminance data) photoelectrically converted by the imaging sensor 25 is then scanned out to the transmission device 23 at a predetermined frame rate (fps). The frame rate is an indicator that determines the imaging speed of the camera 22.
[0042] Next, the image data is output from the transmission device 23 to the image processing device 3 (step S3). In data transmission compliant with the camera link standard, the transmission device 23 generates transmission data for an image signal including a synchronization signal and image data, and transmits the image signal via the transmission cable 4 using the LVDS transmission method.
[0043] The image signal is received by the image input circuit of the image processing device 3 (step S4). The image processing device 3 first uses Figure 2 According to the principles described in (B) and (C) of FIG. 1 , the image processing device 3 performs the required image processing on the transmitted image signal to obtain the height data of the component C (step S5). For example, the image processing device 3 determines the height of the component C on the image data. Figure 2 The reflected lights RL1 and RL2 of the line lights SL1 and SL2 exemplified in (B) are detected, and the height data of the component C is derived with reference to the coordinate values of the reflected lights RL1 and RL2 .
[0044] In the light sectioning method described above, only height data based on a single line of light SL can be obtained in a single image. To obtain 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 a small pitch. Due to the demand for faster production line speeds, the time required for substrate inspection, etc., is preferably short. Therefore, high-speed height measurement of component C is also required. This can be achieved by increasing the imaging speed of camera 22, that is, by increasing the frame rate of imaging sensor 25.
[0045] However, the transmission speed of the transmission cable 4, which serves as 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 transmission speed of the transmission cable 4 becomes a bottleneck, preventing the imaging sensor 25 from fully utilizing its performance, and consequently, preventing the realization of increased height measurement speed.
[0046] Figure 4 Schematic diagram for explaining the problems of the image transmission method of the comparative example. Figure 4 , an example is shown in which a first camera unit 2A and a second camera unit 2B are connected to an image processing device 3 via a transmission cable 4 with a transmission speed of 1.0 GB / sec. The imaging sensor 25 included in the first camera unit 2A is capable of scanning a 1MB frame image at 1000 fps per second. In other words, the first camera unit 2A can output image data at 1.0 GB / sec. Meanwhile, the imaging sensor 25 included in the second camera unit 2B is capable of scanning a 1MB frame image at 2000 fps per second, and can output image data at 2.0 GB / sec.
[0047] Transmission cable 4 can keep up with the output rate (1.0 GB / sec) from first camera unit 2A, but cannot keep up with the output rate (2.0 GB / sec) from second camera unit 2B. Therefore, while second camera unit 2B has a capture rate of 1 MB / 2000 fps, it can only transmit at 1 MB / 1000 fps due to the transmission speed limitations of transmission cable 4.
[0048] [Image Transmission Method of This Embodiment]
[0049] In this embodiment, to eliminate the aforementioned inconvenience and achieve faster height measurement of component C, image data obtained by camera 22 is separated into a necessary area required for measurement and other purposes and an unnecessary area not substantially used for each image data item acquired by transmission device 23. Only the image data for the necessary area is then transmitted from transmission device 23 to an external device such as image processing device 3. This differentiated transmission minimizes the size of the transmitted image data, enabling the required high-speed transmission of image data even when the interface cannot achieve faster image data transmission speeds.
[0050] Figure 5 This is a schematic diagram that briefly describes the image transmission method of this embodiment. Figure 4 The second camera unit 2B, image processing device 3, and transmission cable 4 are shown. As mentioned above, the second camera unit 2B has a shooting speed of 1 MB / 2000 fps. In this embodiment, while maintaining the shooting speed of the second camera unit 2B, the image data size is reduced in the transmission device 23 in a manner that matches the transmission speed of the transmission cable 4.
[0051] For example, before transmitting image data, the transmission device 23 performs processing to reduce the data size of the frame image obtained by a single capture by the second camera unit 2B from 1 MB to 0.5 MB. The image data 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 scans a 0.5 MB frame image at 2000 fps over a period of 1 second. This results in an output rate of 1.0 GB / sec, which matches the transmission speed of the transmission cable 4. Therefore, the second camera unit 2B's "2000 fps" imaging speed capability can be effectively utilized, contributing to faster processing.
[0052] The unnecessary region of image data will be described by taking an image acquired by imaging using the light sectioning method as an example. Figure 6 (A) is a diagram showing a single frame of image 5 obtained when height measurement is performed using the light sectioning method. This image 5 is similar to the one previously described. Figure 2 The image IM shown in (B) corresponds to the image IM. The image 5 is composed of an irradiated area 51 where the reflected light RL of the line light SL is observed and a dark area 52 where the reflected light RL is not observed. The irradiated area 51 is a rectangular area that is long in the X direction, which is the extending direction of the line light SL. Figure 2 As described in (B) of FIG. 5 , the irradiation region 51 is observed at a position corresponding to the reflected light RL1 from the periphery of the component C and the reflected light RL2 from the upper surface of the component C.
[0053] Figure 6 (B) is a diagram for explaining the unnecessary area 53 of image 5. In image 5, the only area required for height measurement by 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 Y-direction width of the irradiation area 51 in image 5 can be determined at one end and the other end (at the Figure 6 The area with the minimum Y-direction width (in the image 5) is the necessary area for height measurement. The area outside the necessary area of image 5 becomes unnecessary area 53. In other words, if the position information (coordinate values) of irradiation area 51 or the necessary area in image 5 is determined, the area outside the necessary area of image 5 can be treated as unnecessary area 53.
[0054] Even if the image data corresponding to the unnecessary area 53 is transmitted to the image processing device 3, it is not actually used, so the transmission itself can be omitted. Therefore, by transmitting only the image data of the necessary area to the image processing device 3 in the transmission device 23 and discarding the image data of the unnecessary area 53, the size of the transmitted image data can be suppressed to the necessary minimum.
[0055] Figure 7 This is a flowchart showing an example of the image transmission method of this embodiment. The processing of steps S1, S2, S3, S4 and S5 is the same as that of the previous one based on Figure 3 The steps S1 to S5 of the comparative example described in the flowchart are the same as those of the comparative example. The difference from the comparative example is that between step S2 of scanning the image data from the imaging sensor 25 and step S3 of outputting the image signal from the transmission device 23, the transmission device 23 performs a reduction process on the transmitted image data (step S10).
[0056] As image data reduction processing, the transmission device 23 performs the following: It detects the irradiation area 51 where the reflected light RL of the line light SL is observed from the image data output from the imaging sensor 25 in step S2 (step S11); and it distinguishes an area of a predetermined width including the irradiation area 51 as a necessary area, and areas outside the necessary area as unnecessary areas 53 (step S12). In the following step S3, the transmission device 23 transmits only the image data of the necessary area to the image processing device 3.
[0057] Figure 8 (A) to (C) are diagrams showing an example of a reduction process of transmitted image data. Figure 8 The image shown in (A) is referenced in 5 Figure 65 is shown in the example in (B). In step S11, the brightness value of each pixel in image 5 is evaluated for each pixel line in the Y direction perpendicular to the extension direction of the illumination area 51 of the line light SL. This determines the position information, i.e., the coordinate value, of the illumination area 51 on image 5. Several specific examples of how this brightness value is evaluated will be provided later.
[0058] In step S12, as Figure 8 As shown in (A), an area of a predetermined width in the Y direction of the image 5 containing the irradiation area 51 detected in step S11 is determined as the necessary area A1. The necessary area A1 is typically set to include the irradiation area 51 and adjacent areas of a predetermined width in the Y direction that sandwich the irradiation area 51. In other words, the image of the irradiation area 51 sandwiched between a pair of adjacent areas in the Y direction becomes the image of the necessary area A1. This image of the necessary area A1 has the advantage of easily and accurately determining the positional information of the irradiation area 51 based on the brightness contrast between the irradiation area 51, which is the bright portion, and the adjacent areas, which are the dark portions.
[0059] If the necessary area A1 is determined, the remaining part of the image 5 becomes the unnecessary area 53. If the Y direction is used as the up and down direction in the image 5, the unnecessary area 53 is set on the upper and lower sides of the necessary area A1. The XY direction width of the unnecessary area 53 depends on the XY position of the irradiation area 51. For example, in the part of the irradiation area 51 observed in the center of the Y direction of the image 5, the upper unnecessary area 53 becomes narrow in the Y direction, and the lower unnecessary area 53 becomes relatively wide in the Y direction. Assuming that the part C of the measurement object has a dome-shaped three-dimensional shape in the X direction, the irradiation area 51 in the center of the Y direction is observed as an arc shape in the image 5. In this case, the upper and lower unnecessary areas 53 are not Figure 8 The upper unnecessary region 53 is in an arc-shaped depression, and the lower unnecessary region 53 is in an arc-shaped bulge.
[0060] Figure 8 (B) schematically illustrates the image transmitted from the transmission device 23 to the image processing device 3. The transmitted image corresponds only to the required area A1 within the overall image 5. For example, if the full image width A2 in the Y direction of image 5 consists of 100 pixels, and the required area A1 in the Y direction consists of 10 pixels, the size of the transmitted image data can be reduced to approximately 1 / 10. It should be noted that the coordinate values of the irradiation area 51 of the linear light SL or the required area A1 are included in the required area A1 as data indicating the position of the required area A1. These coordinate values are used by the image processing device 3 as information indicating the position in the Y direction of the image 5 from which the required area A1 is cut out.
[0061] Figure 8 Figure (C) schematically illustrates image signal D transmitted from transmission device 23 to image processing device 3 after processing in steps S11 and S12. Image signal D includes, as image data da, brightness data d1 to d5 for pixels constituting the image of required area A1, and coordinate data D1 representing the coordinate values of illumination area 51 or required area A1. Coordinate data D1 is obtained by replacing these coordinate values with brightness data selected from 0 to 255. For example, 1 to 4 pixels are allocated for transmission of coordinate data D1.
[0062] By including the coordinate data D1, information about which coordinate area on the image 5 senses the line light SL is transmitted, so the position of the irradiated area 51 on the image can be immediately grasped, and the height measurement process can be quickly performed in the image processing device 3. In addition, because the position information of the irradiated area 51 or the required area A1 can be transmitted using the bits of the channel that transmits the image data da, there is no need to ensure a separate channel or interface for transmitting this position information.
[0063] As a conventional method for reducing the size of image data to be transmitted, there is a method of setting the ROI, which determines the readout range of the pixels of the imaging element, to be smaller. The smaller the ROI is set, the more the image data size of a single frame of image can be suppressed. However, the smaller the ROI, the smaller the measurement range of height measurement. Figure 8 For example, if the ROI is set to read only the area near the center in the Y direction, the irradiated area 51 located in the center in the X direction cannot be detected. To avoid reducing the measurement range, the ROI must be set larger, resulting in a failure to significantly reduce the image data size. In contrast, according to the present embodiment described above, after detecting the irradiated area 51 of the line light in image 5, a necessary area A1, which includes the irradiated area 51, is distinguished from an unnecessary area 53. This allows the image data size to be reduced without reducing the measurement range.
[0064] [Structure of image transmission system]
[0065] Figure 9: This is a block diagram showing the structure of an image transmission system 1 applied to the height measurement of a component C. As described above, the image transmission system 1 includes a camera unit 2 including a line light source 21, a camera 22, and a transmission device 23, and an image processing device 3. The transmission device 23 and the image processing device 3 are connected so as to be able to perform electrical communication via a transmission cable 4. As described above, in the case of performing data transmission based on the camera link standard, a camera link cable is used as the transmission cable 4, and the two are connected in a manner capable of performing LVDS communication. It should be noted that a data transmission standard different from the camera link standard may also be adopted, such as an interface based on CoaXPress or USB 3.0. Here, an example is shown in which the transmission device 23 performs data transmission based on the camera link standard.
[0066] Camera 22 captures an image of component C moving relatively in scanning direction F, illuminated by line light SL emitted by line light source 21. Transmission device 23 uses a fixed amount of binary signals synchronized with a reference clock to output an image signal containing the synchronization signal and image data acquired by camera 22. Transmission device 23 transmits this image signal to image processing device 3 via transmission cable 4.
[0067] The transmission device 23 functionally includes an image input circuit 26, an irradiation area determination unit 27, a necessary area setting unit 28, and an image output circuit 29. The image input circuit 26 receives the image from the imaging sensor 25 ( Figure 1 ) image data output at a predetermined frame rate. Furthermore, the image input circuit 26 generates a synchronization signal based on the camera link standard and arranges luminance data as image data into a predetermined number of data bits in units of a reference clock cycle.
[0068] The irradiation area determination unit 27 Figure 8 The image data of the image 5 shown in (A) is subjected to predetermined processing to detect Figure 7 The irradiation area 51 is processed as shown in step S11. Figure 8 As shown in the example of (C), the detected coordinate values of the illumination area 51 are converted into brightness data and incorporated into the empty bits of the data bits of the image data. The necessary area setting unit 28 performs the sorting process shown in step S12. The necessary area setting unit 28 sorts the area of a predetermined width including the illumination area 51 into the necessary area A1 and the area outside the necessary area A1 into the unnecessary area 53, and discards the image data of the unnecessary area 53. The image output circuit 29 converts the image signal containing the synchronization signal, the image data corresponding to the necessary area A1, and the coordinate value data into a signal capable of LVDS communication and outputs it.
[0069] The image processing device 3 includes 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 a deserializer circuit for LVDS communication and receives the synchronization signal and image signal transmitted from the transmission device 23. The image memory 32 temporarily stores the transmitted image signal. The image processing unit 33 accesses the image memory 32 as appropriate to determine the position of the irradiation area 51 corresponding to the line light SL. The height calculation unit 34 calculates the height data of the component C using the light section method based on the positional relationship of the multiple irradiation areas 51 determined on the image 5.
[0070] [Specific example of the process of distinguishing between necessary and unnecessary areas]
[0071] <First embodiment>
[0072] Figure 10 This is a schematic diagram illustrating a first embodiment of the process of distinguishing between a necessary area A1 and an unnecessary area 53 within a pixel line GL. This distinction also involves detecting the irradiation area 51 of the line light SL contained in the image 5, which is mostly occupied by a dark portion 52. The irradiation area determination unit 27 performs this process of detecting the irradiation area 51 sequentially for each pixel line GL in the Y direction. The pixel line GL is a line of pixels perpendicular to the direction (X direction) in which the line light SL extends. This applies to the second and third embodiments described below.
[0073] In the XY pixel matrix constituting the image 5, a pixel line GL in the Y direction is focused on. The pixel line GL includes a dark portion 52 having a relatively small brightness value and an irradiation area 51 consisting of a bright portion having a brightness value significantly larger than that of the dark portion 52. Since the line light SL is a thin and long light extending in the X direction, it usually appears in a narrow width at one location of a pixel line GL. In the differentiation process of the first embodiment, an extraction area SA consisting of N pixels of a certain extraction width narrower than the Y-direction width of the pixel line GL is set. In the first embodiment, the extraction area SA determines the necessary area A1. The irradiation area determination unit 27 performs calculations to calculate the total value of the brightness data of the pixel group existing in the extraction area SA while shifting the extraction area SA along the pixel line GL.
[0074] The range of shifting the extraction area SA is the range from the beginning to the end of the pixel line GL. Figure 10 In the example shown in FIG. 1 , the following processing is performed: while shifting the extraction area SA pixel by pixel from the upper end to the lower end of the pixel line GL, the total value of the luminance data of the pixel groups within the extraction area SA is calculated. The position of the irradiation area 51 is then detected based on the position on the pixel line GL of the extraction area SA where the total value is the largest.
[0075] according to Figure 10For example, at position (a), the extraction area SA does not include the irradiated area 51 and only covers the dark area 52, so the total value of the brightness data becomes a small value. At position (b), where the extraction area SA is shifted downward, the extraction area SA is close to a portion of the irradiated area 51. Therefore, the total value at position (b) is larger than that at position (a). At position (c), which is further shifted, the extraction area SA includes the entire irradiated area 51. Naturally, the total value of the brightness data at position (c) is larger than that at positions (a) and (b), indicating the maximum value. Based on this result, it can be detected that the irradiated area 51 exists within the extraction area SA at position (c).
[0076] If position (c) is determined to be the position where the total value of the luminance data reaches a maximum, the illumination area determination unit 27 uses the coordinates of the upper end of the extraction area SA as the position information indicating the upper end of the required area A1. For example, if the upper end of the required area A1 is the pixel position of the tenth 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 end of the required area A1 may be used as the coordinate data.
[0077] In the first embodiment, an extraction area SA corresponding to the Y-direction width of the required area A1 is set to detect the irradiated area 51. Therefore, once the irradiated area 51 is detected, the required area A1 is automatically determined. Therefore, the required area setting unit 28 extracts the extraction area SA at position (c) as the required area A1, and the area outside of the required area A1 is defined as the unnecessary area 53. The image data output from the image output circuit 29 includes the brightness data for the irradiated area 51 and the dark area 52 included in the extraction area SA at position (c), as well as position data obtained by converting the coordinate data (coordinate value = 10) shown as an example) into brightness data.
[0078] <Second embodiment>
[0079] Figure 11 is a schematic diagram illustrating a second embodiment of the aforementioned classification process. In the second embodiment, the position of the irradiation area 51 is determined by detecting the position where the brightness is maximum for each pixel line GL. Specifically, the irradiation area determination unit 27 examines the brightness values of the pixels constituting a pixel line GL and detects the position of the maximum pixel with the highest brightness value.
[0080] Line light SL does not have uniform light intensity across its width in the Y direction, but rather has a Gaussian distribution. Therefore, the Y-center of illuminated area 51 is typically brightest. Therefore, by detecting the position of the maximum pixel, the Y-center position of illuminated area 51 can be determined, and thus, illuminated area 51 can be detected. It should be noted that if multiple maximum pixels are detected consecutively in the Y direction, the Y-center of these pixel columns can be used as the center coordinate value of illuminated area 51.
[0081] The required area setting unit 28 defines a predetermined width centered around the maximum pixel as the required area A1. For example, a predetermined number of N pixels corresponding to the Y-direction width of the required area A1 is predetermined, and an area of N pixels centered around the maximum pixel is defined as the required area A1. Of course, the width of N pixels is narrower than the Y-direction width of the pixel line GL. This N pixel number can be the same as the number of N pixels used to define the extraction area SA in the first embodiment. A detailed example of setting the number of N pixels will be described later.
[0082] The necessary area setting unit 28 extracts the necessary area A1 determined above as the data area to be transmitted, and treats the area outside the necessary area A1 as the unnecessary area 53. The upper end or lower end of the determined necessary area A1 is set as the coordinate data of the necessary area A1. The image data output from the image output circuit 29 becomes the brightness data of the irradiated area 51 and the dark area 52 within the necessary area A1 and the position data after the coordinate data is converted into brightness data. It should be noted that the coordinate data can also be configured on either the starting side (upper side in the figure) or the ending side (lower side) of the image data of the necessary area A1. In addition, other data can also be configured in the data bits allocated for configuring the coordinate data: for example, data indicating an error, data indicating certain position information, data indicating an action flag, etc. According to the second embodiment, the position coordinates of the irradiated area 51 are determined by simply detecting the maximum value of the brightness data for each pixel line GL, thereby simplifying the detection process of the irradiated area 51.
[0083] <Third embodiment>
[0084] Figure 12 2 is a schematic diagram illustrating a third embodiment of the aforementioned segmentation process. In the third embodiment, each pixel line GL is divided into a high-brightness portion and a low-brightness portion, and the position of the irradiation area 51 is determined based on the position of the maximum high-brightness portion, where the width along the pixel line GL is the largest, among the observed high-brightness portions.
[0085] Specifically, the irradiation area determination unit 27 checks the brightness value of each pixel constituting the pixel line GL and binarizes the high brightness portion 51A, 51B and the low brightness portion 52A using a predetermined threshold value. Figure 12As illustrated, multiple high-brightness portions 51A and 51B may be detected. Assuming such a situation, the irradiation region determination unit 27 refers to the binarized area. The irradiation region determination unit 27 determines the region of the maximum high-brightness portion 51A, which has the largest width in the Y direction along the pixel line GL, among the multiple high-brightness portions 51A and 51B, as the irradiation region 51. Furthermore, the required region setting unit 28 determines the width of N pixels centered at the center position in the Y direction of the maximum high-brightness portion 51A as the required region A1.
[0086] The necessary area setting unit 28 extracts the necessary area A1 determined above as the data area to be transmitted, and performs processing to classify the area outside the necessary area A1 as an unnecessary area 53. The point that the upper end or lower end of the determined necessary area A1 is set as the coordinate data of the necessary area A1 is the same as the first and second embodiments. The image data output from the image output circuit 29 becomes the brightness data of the irradiated area 51 and the dark area 52 within the necessary area A1 and the position data after the coordinate data is converted into brightness data. Of course, the brightness data transmitted is the data before the binarization process is performed. According to the third embodiment, the irradiated area 51 can be accurately determined through the process of binarization of the high brightness part and the low brightness part, evaluation of the Y-direction width of the high brightness part, and determination of the position of the maximum high brightness part.
[0087] [Processing when multiple line light candidates are detected]
[0088] Because the line light SL is a straight line, only one irradiation area 51 is observed in a single pixel line GL. However, in actual measurement, as also illustrated in the third embodiment, multiple areas meeting the requirements for irradiation area 51, i.e., candidates for irradiation area 51, may be detected in a single pixel line GL for some reason. In this case, height measurement cannot be performed unless a single irradiation area 51 is selected from the multiple candidates. If multiple candidates for irradiation area 51 are detected, one of the following next-level processes can be selected.
[0089] Process A) A certain irradiation area 51 is selected in a predetermined selection process.
[0090] Process B) The process of detecting the irradiation area 51 is performed again.
[0091] Process C) Directly transmit the image data detected for the plurality of irradiation areas 51 .
[0092] As the above-mentioned process A, manual selection setting and automatic selection setting using a predetermined algorithm can be exemplified. Figure 13 1 is a diagram showing an example of manual selection setting when a plurality of candidates for the irradiation area 51 of the line light SL are detected. Figure 13As shown in FIG. 1A , for example, it is assumed that, during the execution of the brightness value classification processing according to the first to third embodiments, three line light candidates 51 a , 51 b , and 51 c are detected in one pixel line GL, and the remaining portion is a dark portion 52 .
[0093] Assume that the starting point of the pixel line GL is the top of the figure, and check the brightness value of the pixels from the top to the bottom. In this case, three line light candidates 51a, 51b, and 51c are detected in the order of 51a → 51b → 51c. In the manual selection setting, Figure 13 As shown in FIG. 5B , the line light candidate 51a detected initially is set to be selected as the irradiation area 51. Alternatively, Figure 13 As shown in FIG. 5C , it is set in advance that the line light candidate 51 c detected last is selected as the irradiation region 51. By manually setting the line light candidate 51 c in this manner, it is possible to simplify the selection process when a plurality of candidates for the irradiation region 51 are detected.
[0094] In the classification process described in the first to third embodiments, a setting can be deliberately made to facilitate the detection of multiple candidates for irradiation areas 51. According to the first embodiment, the positions on the pixel line GL where the sum of the luminance data of the extraction area SA reaches the maximum value M1 are detected, and the positions of other extraction areas SA whose sum of luminance data falls within the range of (maximum value M1 - coefficient R) are also included as candidates for irradiation area 51. It should be noted that coefficient R is a value arbitrarily set by the user based on experience, etc., or a value set at a predetermined ratio relative to maximum value M1.
[0095] Then, an irradiation area 51 is determined from these multiple candidates using the manual selection setting described above or the automatic selection setting method described later. If such a method is used, the accuracy of determining the irradiation area 51 can be improved. Similarly, in the second embodiment, the position of the maximum pixel whose brightness value reaches the maximum value M2 is detected, and the positions of other pixels whose brightness values converge to the range of (maximum value M2-coefficient R) are also included as candidates for the irradiation area 51. In the third embodiment, the position of the high brightness portion whose binarized area reaches the maximum value M3 is detected, and the positions of other high brightness portions whose binarized area converges to the range of (maximum value M3-coefficient R) are also included as candidates for the irradiation area 51.
[0096] Figure 14 (A) and (B) are diagrams showing an example of automatic selection setting when a plurality of candidates for the irradiation area 51 of the line light SL are detected. Figure 14 (A) shows an example of the result of referring to the pixel line adjacent to the detection target of the irradiation area 51. Figure 14In (A), an example is given in which two line light candidates 51a and 51b are detected in the pixel line GL of the detection object. In this case, the determination result of the irradiation area 51 in the pixel line GLa adjacent to the pixel line GL in the same image is referred to. Then, one of the irradiation areas 51 close to the adjacent pixel line GLa of the two line light candidates 51a and 51b is automatically selected. This is a selection process based on the fact that the position of the irradiation area 51 does not usually change significantly between the adjacent pixel lines GL and GLa. Figure 14 In the example of (A), the line light candidate 51 b close to the irradiation area 51 of the adjacent pixel line GLa is selected as the irradiation area 51 .
[0097] Figure 14 (B) shows an example of a result of referring to the previous shot taken sequentially by the light section method. Figure 14 (B) also lists an example in which two line light candidates 51a and 51b are detected in the pixel line GL of the detection object. In this case, the determination result of the irradiation area 51 in the pixel line GLb that is the same as the pixel line GL of the detection object in the image obtained in the previous shooting is referred to. Then, one of the irradiation areas 51 close to the adjacent pixel line GLb of the two line light candidates 51a and 51b is automatically selected. This is a selection process based on the following reason: in the images before and after the light cutting method taken at a narrow interval, the position of the irradiation area 51 usually does not change significantly between the same pixel lines GL and GLb. Figure 14 In the example of (B), the line light candidate 51 a close to the irradiation region 51 of the adjacent pixel line GLb is selected as the irradiation region 51 .
[0098] The above-mentioned process B is a method of detecting the irradiation area 51 of a pixel line GL by another classification process when a plurality of candidates for the irradiation area 51 are detected for a pixel line GL in a certain classification process. Figures 10 to 12 When any of the algorithms of the first to third embodiments detects a plurality of candidates for the process of classifying the required area A1 in one pixel line GL, the process of detecting the irradiation area 51 is executed again using the algorithm of the other embodiment.
[0099] For example, only by using Figure 10 In the case where a plurality of candidates for the irradiation area 51 are detected for one pixel line GL, the first embodiment of the classification process is used. Figure 11 The second embodiment or Figure 12The third embodiment of the classification process is repeated for the pixel line GL to detect the irradiation area 51. If multiple candidates for the irradiation area 51 are detected in the repeated classification process, one irradiation area 51 is determined by applying the above-mentioned manual selection setting or automatic selection setting method.
[0100] The above-mentioned process C is a method of directly transmitting the image data of the detected multiple irradiation areas 51 to the image processing device 3 and entrusting the image processing device 3 to perform the processing. Figure 15 As shown in Figures (A) and (B), two line light candidates 51a and 51b are detected in a single pixel line GL. In this case, neither the illumination area 51 nor the required area A1 for this pixel line GL is determined. In other words, no data reduction processing is performed, and image data for the full image width A2 of pixels is transmitted directly.
[0101] However, in order to enable the image processing device 3 to identify the pixel line GL that has not been subjected to the data reduction process, unique luminance data X that can be distinguished from the coordinate data of the pixel line subjected to the data reduction process is added as the coordinate data 54 . Figure 15 FIG. (A) shows an example in which the coordinate data 54 is arranged on the leading end side of the image data of the full image width A2. On the other hand, Figure 15 FIG. (B) shows an example of arranging coordinate data 54 at the end of image data of the full image width A2. In this case, coordinate data 54 is arranged after image data of N pixels from the upper end of pixel line GL to meet the requirement of matching with the pixel line after data reduction.
[0102] [Regarding the method for setting N pixels to determine the width of the required area]
[0103] In the above-mentioned classification process of the first to third embodiments, the Y-direction width of the necessary area A1 in the pixel line GL is determined by N pixels (see Figures 10 to 12 ) can be set arbitrarily by the user or automatically based on a prescribed setting criterion.
[0104] As an example of an automatic setting method, the transmission device 23 refers to the maximum frame rate of the imaging sensor 25 included in the camera 22 and the maximum transmission speed of the transmission cable 4 (interface). The device then determines the number of pixels required to keep the transmitted data size below the transmission size determined by the maximum transmission speed, and sets this number of pixels as N pixels, which determines the width of the required area A1. By adopting this automatic setting, the required area A1 can be set to a pixel count within the range that allows for high-speed transmission of image data, taking into account the maximum frame rate of the imaging sensor 25 and the maximum transmission speed of the interface.
[0105] Next, a specific example of the automatic setting is described. The transmission device 23 automatically measures the difference between the maximum frame rate of the imaging sensor 25 and the maximum transmission speed of the transmission cable 4 to determine the optimal value of N. This process can be performed according to the following steps 1 to 4.
[0106] <Step 1> Set the exposure time and ROI of the imaging sensor 25 of the camera 22 to conditions suitable for imaging the component C using the light sectioning method. The image width determined by the ROI setting is set to W, and the image height is set to H. Note that H corresponds to the Y-direction width of the pixel line GL.
[0107] <Step 2> Calculate the maximum frame rate FPS of the imaging sensor 25 when the camera 22 performs imaging under the conditions of the above-mentioned step 1.
[0108] <Step 3> Calculate the coefficient AN by which the data size per second, when shooting at the FPS calculated in Step 2, is smaller than the transmission size Cs determined by the maximum transmission speed of the transmission cable 4. At this point, the number of data bits Da of the coordinate data of the required placement area A1 is also considered. The coefficient AN is calculated using the following formula.
[0109] H×W×FPS×AN=Cs-Da×W×FPS
[0110] AN=(Cs-Da×W×FPS) / (H×W×FPS)
[0111] <Step 4> As shown in the following formula, the coefficient AN is multiplied by the height H of the ROI, and the value obtained by rounding down the decimal point is set as the number of pixels determining the Y-direction width of the required area A1 = N.
[0112] N=floor(H×AN)
[0113] [Processing when Line Light Does Not Converge into N Pixels]
[0114] In the imaging of the component C, the irradiation area 51 where the line light SL may be generated does not converge to N pixels (see Figures 10 to 12 ). This situation may occur, for example, when ambient lighting or some type of flash occurs. Alternatively, it is conceivable that the user may mistakenly set the number of N pixels. In view of this, it is preferable that the transmission device 23 executes processing to determine whether the illumination area 51 is within the predetermined required area A1 of N pixels.
[0115] In the first embodiment ( Figure 10), the determination process in the case of the above-mentioned case can be performed by detecting the length of the displacement position at which the total value of the luminance data of the extraction area SA becomes V% of the maximum value of the total value of the luminance data detected in the pixel line GL. The value of V is set as a threshold value appropriately set by the user. If the displacement position of the extraction area SA at which the total value of the luminance data is V% or more is observed for N or more consecutive pixels, it is determined that the irradiation area 51 does not converge into the required area A1. In the second embodiment ( Figure 11 ), if pixels having a luminance value of V% of the maximum luminance value are observed continuously for N or more pixels, it is determined that the irradiation area 51 does not fit within the required area A1. Figure 12 ), when the Y-direction width of the maximum highlight portion 51A exceeds N pixels, it is determined that the irradiation area 51 does not fit within the required area A1.
[0116] In the case where the irradiation area 51 does not fit within the necessary area A1 of N pixel width, as shown in FIG. Figure 16 As shown, the transmission device 23 adds an error code to the image data and transmits it to the image processing device 3. Figure 16 The figure shows an example where a line light candidate 51n with a width greater than N pixels is detected in a pixel line GL. In this case, arbitrary luminance data is assigned to data bit A1n for image data in the transmitted data. For example, luminance data with a luminance value of 0 or random luminance data is assigned to data bit A1n. Then, unique data converted from an error code to luminance data is assigned as coordinate data 54. By attaching an error code to image data during transmission, appropriate post-processing can be performed on the image processing device 3 side.
[0117] If the transmission device 23 determines that the irradiation area 51 does not fit within the required area A1, it is preferable to cause the transmission device 23 to perform appropriate countermeasures. For example, the transmission device 23 may automatically execute processing to expand the number of pixels defining the required area A1 by N, starting with the next image capture. Alternatively, the number of pixels in the area with a value greater than V% detected in the aforementioned determination process may be set as the new value N. By executing such countermeasures, the relationship between the irradiation area 51 and the required area A1 can be optimized, allowing the position of the irradiation area 51 to be accurately determined.
[0118] [Inventions included in the above-mentioned embodiments]
[0119] The embodiments described above include inventions having the following structures.
[0120] An image transmission system according to one aspect of the present invention comprises: a light source for irradiating a workpiece moving relatively in a specified conveying direction with line light; a photographing device for acquiring an image of the workpiece and its surroundings irradiated with the line light; an image processing device for performing required image processing on the image data acquired by the photographing device; and a transmission device for transmitting the image data to the image processing device via an interface, the transmission device performing: a process of detecting an irradiation area in the image data where reflected light of the line light is observed; and a process of distinguishing an area of a specified width including the irradiation area as a necessary area and areas other than the necessary area as unnecessary areas, the transmission device transmitting the image data of the necessary area to the image processing device.
[0121] Another aspect of the present invention relates to an image transmission method, which is an image transmission method in which a workpiece is irradiated with line light while being relatively moved along a specified conveying direction, and image data obtained by photographing the workpiece irradiated with the line light and its surroundings is transmitted to an external device through an interface, wherein, in the image data, an irradiation area where reflected light of the line light is observed is detected, an area of a specified width including the irradiation area is distinguished as a necessary area, and areas outside the necessary area are distinguished as unnecessary areas, and the image data of the necessary area is transmitted to the external device.
[0122] According to the above-mentioned image transmission system or image transmission method, after the irradiation area of the line light is detected in the acquired image data, a distinction is made between a necessary area including the irradiation area and unnecessary areas other than the area. Then, only the image data of the necessary area is transmitted to the image processing device or external device. That is, instead of initially limiting the shooting range as with an ROI, the necessary area is identified and transmitted for each acquired image data. As a result, image data that is indispensable for image processing such as measurement is transmitted to the image processing device, while image data of an unnecessary area is not transmitted and is essentially discarded. Therefore, the image data size can be suppressed to the necessary minimum, and even in the case where the image data transmission speed of the interface cannot be increased, high-speed transmission of the required image data can be achieved.
[0123] In the above-mentioned image transmission system, it is preferable that the image processing device executes image processing for obtaining the height data of the workpiece by a light section method.
[0124] According to this method, for each image data acquired by the imaging device, only the image data required for calculating height data using the light sectioning method is transmitted to the image processing device. This allows for faster transmission of image data corresponding to the increased imaging speed, contributing to faster height data measurement.
[0125] In the above-mentioned image transmission system, it is preferable that the necessary area is set to include the irradiation area and an adjacent area of a predetermined width sandwiching the irradiation area.
[0126] According to this method, the image of the irradiated area sandwiched between adjacent areas becomes the image of the necessary area. In other words, based on the brightness contrast between the irradiated area and the adjacent areas, it is easy to accurately determine the position information of the irradiated area. Therefore, the accuracy of measurement, etc. can be improved.
[0127] In the above-mentioned image transmission system, it is preferable that the transmission device transmits brightness data of pixels constituting the image of the necessary area as the image data, and replaces position information of the irradiation area or the necessary area with the brightness data and transmits it.
[0128] This method transmits the positional information of the illuminated area or required area, that is, information about the coordinate area on the image where the line light is perceived. This allows immediate identification of the position of the line light on the image, enabling rapid measurement and other processing. Furthermore, because the positional information of the illuminated area or required area can be transmitted using the bits of the channel that transmits brightness data as image data, there is no need to maintain a separate channel or interface for transmitting this positional information.
[0129] In the above-mentioned image transmission system, it may also be that the processing performed by the transmission device to detect the irradiation area includes the following processing: setting a certain extraction width that is narrower than the width of the pixel line of the image data in the direction orthogonal to the extension direction of the line light; while shifting the extraction width in the range from the starting end to the end end of the pixel line, performing an operation to calculate the total value of the brightness data of the pixel group existing in the extraction width; and determining the position coordinates of the irradiation area based on the position of the extraction width on the pixel line where the total value becomes the largest.
[0130] According to this aspect, since the total value of the luminance data of the pixel group existing within the extraction width is obtained while shifting the extraction width, the position of the irradiation area can be reliably detected from the image data.
[0131] In the above-mentioned image transmission system, as a process of detecting the irradiation area, the transmission device may perform the following process: for a pixel line of the image data in a direction perpendicular to the extension direction of the line light, detecting brightness data of pixels constituting the pixel line; and determining the position coordinates of the irradiation area based on the position of the maximum pixel where the value of the brightness data becomes the maximum, and as the distinguishing process, the transmission device performs a process of determining a specified width centered on the maximum pixel as the necessary area.
[0132] According to this aspect, the position coordinates of the irradiation area are determined by simply finding the maximum value of the luminance data for each pixel line, and thus the irradiation area determination process can be simplified.
[0133] In the above-mentioned image transmission system, as a process of detecting the irradiation area, the transmission device may use a prescribed threshold value to binarize the brightness data of the pixels constituting the pixel line of the image data in a direction perpendicular to the extension direction of the line light into a high-brightness portion and a low-brightness portion, and determine the position coordinates of the irradiation area based on the position of the maximum high-brightness portion in the high-brightness portion where the width along the pixel line becomes the largest. As the distinguishing process, the transmission device performs a process of determining a prescribed width centered on the central position of the maximum high-brightness portion as the necessary area.
[0134] According to this aspect, the irradiation area can be accurately determined through the process of binarization of the high-luminance portion and the low-luminance portion, evaluation of the width of the high-luminance portion, and determination of the position of the maximum high-luminance portion.
[0135] In the above-mentioned image transmission system, it is preferred that when the transmission device detects multiple candidates for the irradiation areas on a pixel line, it performs one of the following processes: selecting a certain irradiation area in a predetermined selection process, performing the process of detecting the irradiation area again, and directly transmitting the image data detected in the multiple irradiation areas.
[0136] Typically, line light is a single linear light, but in actual processing, multiple regions meeting the requirements for being an irradiation region may be detected. According to the above embodiment, when multiple irradiation regions are detected, appropriate next-stage processing can be performed.
[0137] In the above-mentioned image transmission system, the transmission device may also perform processing to determine whether the irradiation area in the image data converges within the predetermined required area. If the irradiation area does not converge within the required area, an error code is added to the image data and transmitted to the image processing device.
[0138] When the irradiation area does not converge within the required area, the edge of the irradiation area becomes unclear, making it difficult to accurately determine the position of the irradiation area. According to the above method, in such a case, an error code is added to transmit the image data, so that appropriate processing can be performed on the image processing device side.
[0139] In the above-mentioned image transmission system, preferably, when the transmission device determines that the irradiation area does not fit within the required area, it performs processing to expand the required area. This allows the relationship between the irradiation area and the required area to be optimized, and the position of the irradiation area to be accurately determined.
[0140] In the above-mentioned image transmission system, the transmission device may also refer to the maximum frame rate of the shooting sensor possessed by the shooting device and the maximum transmission speed of the interface, calculate the number of pixels so that the transmitted data size becomes less than the transmission size determined by the maximum transmission speed, and thereby set the width of the required area.
[0141] According to this aspect, a region having a necessary number of pixels capable of high-speed transmission of image data can be set in consideration of the maximum frame rate of the imaging sensor and the maximum transmission speed of the interface.
Claims
1. An image transmission system comprising: A light source irradiates a line light to the workpiece moving relatively in a specified conveying direction; a photographing device for acquiring an image of the workpiece and its surroundings irradiated with the line light; an image processing device that performs required image processing on the image data acquired by the imaging device; and a transmission device, transmitting the image data to the image processing device through an interface, The transmission device performs: performing a process of detecting, in the image data, an irradiation area where reflected light of the line light is observed; and A process of distinguishing an area of a predetermined width including the irradiation area as a necessary area and areas other than the necessary area as unnecessary areas, The transmission device transmits the image data of the necessary area to the image processing device.
2. The image transmission system according to claim 1, wherein: The image processing device performs image processing for obtaining height data of the workpiece by a light section method.
3. The image transmission system according to claim 1, wherein: The necessary area is set to include the irradiation area and an adjacent area of a predetermined width sandwiching the irradiation area.
4. The image transmission system according to claim 1, wherein: The transmission device transmits the brightness data of the pixels constituting the image of the necessary area as the image data, and replaces the position information of the irradiation area or the necessary area with the brightness data and transmits the data.
5. The image transmission system according to any one of claims 1 to 4, wherein: The process of detecting the irradiation area performed by the transmission device includes the following processes: setting a certain extraction width narrower than a width of a pixel line in a direction perpendicular to an extending direction of the line light of the image data; performing a calculation to determine a total value of luminance data of a pixel group existing within the extraction width while shifting the extraction width in a range from a start end to an end end of the pixel line; and The position coordinates of the irradiation area are determined based on the position on the pixel line of the extraction width where the total value becomes the maximum.
6. The image transmission system according to any one of claims 1 to 4, wherein: As a process of detecting the irradiation area, the transmission device performs the following process: For a pixel line of the image data in a direction perpendicular to the extending direction of the line light, detecting brightness data of pixels constituting the pixel line; and determining the position coordinates of the illumination area based on the position of the maximum pixel at which the value of the brightness data becomes the maximum, As the distinguishing process, the transmission device executes a process of determining a predetermined width centered on the maximum pixel as the necessary area.
7. The image transmission system according to any one of claims 1 to 4, wherein: As a process for detecting the irradiated area, the transmission device binarizes the brightness data of the pixels constituting the pixel line in the direction orthogonal to the extension direction of the line light of the image data into a high brightness portion and a low brightness portion using a predetermined threshold value, and determines the position coordinates of the irradiated area based on the position of the maximum high brightness portion in the high brightness portion where the width along the pixel line is the largest. As the differentiation process, the transmission device executes a process of determining a predetermined width centered at a central position of the maximum highlight portion as the necessary area.
8. The image transmission system according to any one of claims 1 to 4, wherein: When the transmission device detects multiple candidates for the irradiation areas on a pixel line, it performs one of the following processes: selecting a certain irradiation area from a predetermined selection process, performing the process of detecting the irradiation area again, and directly transmitting the image data detected for the multiple irradiation areas.
9. The image transmission system according to any one of claims 1 to 4, wherein: The transmission device performs processing for determining whether the irradiation area in the image data falls within the predetermined necessary area. If the irradiation area does not fit within the required area, an error code is added to the image data and the image data is transmitted to the image processing device.
10. The image transmission system according to claim 9, wherein: The transmission device executes a process of expanding the necessary area when it is determined that the irradiation area does not fit within the necessary area.
11. The image transmission system according to any one of claims 1 to 4, wherein: The transmission device refers to the maximum frame rate of the imaging sensor of the imaging device and the maximum transmission speed of the interface, calculates the number of pixels required for the transmitted data size to be less than the transmission size determined by the maximum transmission speed, and thereby sets the width of the necessary area.
12. An image transmission method comprising: irradiating a workpiece with a line light while relatively moving the workpiece in a predetermined conveying direction; and transmitting image data obtained by capturing an image of the workpiece irradiated with the line light and its surroundings to an external device via an interface, wherein: In the image data, an irradiation area where reflected light of the line light is observed is detected, An area of a predetermined width including the irradiation area is classified as a necessary area, and an area other than the necessary area is classified as an unnecessary area. The image data of the necessary area is transmitted to the external device.
Citation Information
Patent Citations
Three-dimensional input apparatus
JP2000275024A