Size detection method and size detection device
By collecting material corner information and drawing the shape through two cameras, it solves the problem of frequent focus adjustment in the existing technology, achieves efficient detection of materials with large size differences, expands the detection range and improves accuracy.
Patent Information
- Application Number
- CN202111108438.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-09-22
AI Technical Summary
Existing size detection methods require frequent adjustment of the camera focus when detecting materials with large size differences, resulting in low detection efficiency and a small range of applicable material sizes.
Two cameras are used to collect images of the width side and length side of the material respectively. The processing system obtains the side length and angle, draws the material shape and outputs size data. There is no need to collect the entire material image, which reduces focus adjustment and expands the detection range.
It achieves a wider size range of detected materials without changing the camera focal length, improves detection efficiency and accuracy, and reduces the impact on material processing and production rhythm.
Smart Images

Figure CN113670212B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual detection technology, and in particular to a size detection method and a size detection device. Background Art
[0002] For the size detection of some materials, CCD cameras are used for visual inspection. Some existing size detection methods use a single camera to capture images of the conveyed materials, and then use a computer to process the image of the entire material to obtain the corresponding size parameters. However, if a batch of materials with large size differences are to be inspected, in order to ensure that the image of the entire material can be collected, the focal length of the camera needs to be adjusted frequently when inspecting this batch of materials, and the detection efficiency is low. In other words, this method is not applicable to the size range of materials without adjusting the focal length of the camera. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a size detection method, which is applicable to a larger size range of materials without adjusting the focal length of the camera.
[0004] The invention also provides a size detection device.
[0005] According to the size detection method of the first aspect of the embodiment of the present invention, the first camera captures an image of the width side of the material to be detected, and the second camera captures an image of one of the length sides of the material; the processing system obtains the lengths of the two width sides, the length of one of the length sides, and the angle between each width side and the length side of the captured image based on the image captured by the first camera and the image captured by the second camera; the processing system draws the shape of the material and outputs the size data of the material based on the shape of the material.
[0006] The size detection method according to the embodiment of the present invention has at least the following beneficial effects: the size detection method of the present invention first obtains the length of the two width sides, the length of one of the length sides, and the angle between each width side and the length side, then draws the shape of the material, and outputs the required size data according to the drawn shape. The size detection method of the present invention does not need to capture the image of the entire material. To detect the length of the material, it is only necessary to ensure that the length side of the material is in the image acquisition area of the second camera, without considering the width of that part of the material in the image captured by the second camera; to detect the width of the material, it is only necessary to ensure that the width side of the material is in the image acquisition area of the first camera, without considering the length of that part of the material in the image of the first camera. Therefore, the size detection method of the present invention does not need to frequently adjust the focal length of the camera in order to ensure that the entire material is in the image acquisition area of the camera; without changing the focal length of the camera, the size detection method of the present invention can detect a wider range of material sizes.
[0007] According to some embodiments of the present invention, the first camera and the second camera capture images of the material when the material is in a conveying process.
[0008] According to some embodiments of the present invention, when the first camera detects the leading edge of the material, the second camera starts to capture the image of the material; when the first camera detects the trailing edge of the material, the second camera stops capturing the image of the material.
[0009] According to some embodiments of the present invention, when the first camera detects the leading edge of the material, the light source is turned on to provide lighting for the first camera and the second camera; when the first camera detects the trailing edge of the material, the light source is turned off.
[0010] According to some embodiments of the present invention, after drawing the shape of the material, the processing system calculates the difference between two diagonals of the material.
[0011] According to some embodiments of the present invention, it also includes: setting a maximum allowable deviation value, if the difference between the two diagonals of the material is greater than the maximum allowable deviation value, the processing system sends a signal to indicate that the material is unqualified.
[0012] According to the second aspect of the present invention, the size detection device includes: a loading platform capable of carrying materials to be detected; a bracket; a first camera installed on the bracket; a second camera installed on the bracket, the first camera and the second camera are both facing the loading platform, the first camera can capture images of two width sides of the material, and the second camera can capture an image of one length side of the material; a processing system can process the images captured by the first camera and the second camera to obtain the lengths of the two width sides, the length of one of the length sides, and the angle between each width side and the length side of the captured image, and draw the shape of the material.
[0013] The size detection device according to the embodiment of the present invention has at least the following beneficial effects: the size of the material can be detected by visual recognition, and a wider range of material sizes can be detected without changing the focal length of the camera.
[0014] According to some embodiments of the present invention, a conveying device is further included, wherein the conveying device is installed on the loading platform, and the conveying device is capable of carrying the material and conveying the material.
[0015] According to some embodiments of the present invention, the first camera is a line array camera.
[0016] According to some embodiments of the present invention, the second camera is an area array camera.
[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:
[0019] Figure 1 is a flow chart of the size detection method of the present invention;
[0020] Figure 2 It is a schematic diagram of the principle of the size detection method of the present invention;
[0021] Figure 3 It is a schematic diagram of the size detection device of the present invention.
[0022] Figure numerals: 101 - material, 102 - first beam, 103 - second beam, 104 - conveying device, 105 - loading platform, 106 - second camera, 107 - first camera, 108 - light source, 109 - bracket. DETAILED DESCRIPTION
[0023] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0024] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0025] In the description of the present invention, "several" means more than one, "many" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0026] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0027] In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0028] Reference Figure 1 The present invention provides a size detection method, which is suitable for detecting plate-like materials 101 (such as glass, aluminum plates, etc.), film materials, cloth materials, etc., and is mainly suitable for detecting materials 101 with a basic shape of a quadrilateral. The size detection method includes the following steps:
[0029] The first camera 107 captures images of two width sides of the material 101 to be inspected; the second camera 106 captures an image of one length side of the material 101;
[0030] The processing system obtains the lengths of the two width sides of the material 101, the length of one length side of the material 101, and the angle between each width side and the length side of the captured image according to the image captured by the first camera 107 and the image captured by the second camera 106;
[0031] The processing system draws the shape of the material 101 according to the length of the two width sides, the length of one of the length sides, and the angle between each width side and the length side of the captured image, and outputs the dimensional data of the material 101; the output dimensional data includes the length of each side side, the length of the diagonal line, the angle of each corner, etc.
[0032] To facilitate understanding of the process of this method, Figure 2 Take this as an example for a specific explanation. Figure 2 The material 101 is shown in a top view. The material 101 is a quadrilateral. The four endpoints of the material 101 are A, B, C, and D, respectively. Correspondingly, the four sides of the material 101 are AB, BC, CD, and AD, respectively. Among them, AB and CD are the length sides of the material 101, and BC and AD are the width sides of the material 101. It should be noted that the two names of "length side" and "width side" in the present invention are mainly used to distinguish two groups of edges extending in different directions in the material 101, and do not strictly limit the length of the length side to be greater than the length of the width side; in some embodiments, the length of the length side may also be less than or equal to the length of the width side. In addition, the image captured by the first camera 107 needs to include the complete width side, and the image captured by the second camera 106 needs to include the complete length side; that is, the angle between the two ends of the length side and the width side can be seen from the image captured by the first camera 107 or the second camera 106.
[0033] When the size detection of the material 101 begins, the first camera 107 and the second camera 106 both capture images of the material 101. The image capture areas and objects of the first camera 107 and the second camera 106 are different, and the processing system obtains different parameters according to the images captured by the first camera 107 and the second camera 106. The processing system obtains the length of BC and the length of AD according to the image captured by the first camera 107; the processing system obtains the length of AB, the angle between AB and AD (i.e., the size of α), and the angle between AB and BC (i.e., the size of β) according to the image captured by the second camera.
[0034] For a quadrilateral material 101, if the length of AB, the length of AD, the length of BC, the size of α and the size of β are known, if the processing system establishes a plane rectangular coordinate system with point A as the origin, then the processing system can calculate the coordinates of point B, point C and point D. Accordingly, the shape of quadrilateral ABCD (or the shape of material 101) can be accurately drawn by the processing system, and the required target size data can also be calculated. That is, in the size detection method of the present invention, the processing system processes the images collected by different cameras separately, first obtains the length of the two width sides, the length of one of the length sides and the angle between each width side and the length side, and then draws the shape of material 101 and obtains the size data required by the user. The processing system recognizes the edge of material 101 based on the collected image, and the algorithm for calculating the specific size of material 101 belongs to the well-known technology in the field of visual recognition, which will not be described in detail here.
[0035] The size detection method of the present invention detects the size of the material 101 through visual recognition. Compared with the method of detecting the size of the material 101 by detecting the angle of rotation of the roller used to convey the material 101 through an encoder, the entire detection process of the present invention is non-contact detection, which is not easy to damage the material 101, and the accuracy of the size detection of the material 101 will not be affected by mechanical errors such as roller slippage. The size detection method of the present invention has high detection accuracy.
[0036] Some existing practices directly use the image acquisition area of a single camera to cover the entire material 101, and directly obtain the shape and size of the material 101 based on the image of the single camera. However, for the detection of a batch of materials 101 with large size fluctuations, it is necessary to frequently adjust the focal length to ensure that the material 101 is in the image acquisition area of the camera as a whole.
[0037] The size detection method of the present invention does not need to capture the image of the entire material 101. To detect the length of the material 101, it is only necessary to ensure that the length side of the material 101 is within the image acquisition area of the second camera 106, without considering the width of that part of the material 101 in the image captured by the second camera 106; to detect the width of the material 101, it is only necessary to ensure that the width side of the material 101 is within the image acquisition area of the first camera 107, without considering the length of that part of the material 101 in the image of the first camera 107. Therefore, the size detection method of the present invention does not need to frequently adjust the focal length of the camera in order to ensure that the entire material 101 is within the image acquisition area of the camera; without changing the focal length of the camera, the size detection method of the present invention can detect a wider range of sizes of the material 101.
[0038] In order to improve the detection accuracy of the lengths of the two width sides of the material 101, the first camera 107 can be set as a linear array camera. Since the image acquisition area of the linear array camera is relatively narrow and long, in order to facilitate the acquisition of the required corners of the material 101, the second camera 106 can be a planar array camera. The first camera 107 and the second camera 106 can collect images of the material 101 when the material 101 is in a conveying state. In this way, there is no need to stop the material 101 specifically for size detection, which is beneficial to reduce the impact on the production rhythm of the material 101 processing, thereby improving production efficiency. When the position of the material 101 on the size detection device is as follows: Figure 3 As shown, the image acquisition area of the first camera 107 corresponds approximately to Figure 2 The image acquisition area of the second camera 106 corresponds to the E area in FIG. Figure 2 The F area in.
[0039] For a plate-like material 101 with a standard rectangular shape such as glass, the difference in diagonal lines is an important dimension parameter for measuring the quality of the material 101. Figure 1 and Figure 2 In some embodiments, the size detection method further includes: the processing system calculates the lengths of the two diagonals of the material 101 (i.e., the lengths of AC and BD) based on the shape of the drawn material 101, and calculates the difference between the lengths of the two diagonals (this difference can also be output as size data).
[0040] The processing system can also determine whether the difference between the two diagonals is greater than a preset maximum allowable deviation value. If the difference between the two diagonals is greater than the maximum allowable deviation value, the processing system can send a message to the workers in the workshop or the manager of the size detection system that the material 101 is unqualified. The information that the material 101 is unqualified can be displayed by text on the display screen or by voice; the workers in the workshop or the manager of the size detection system can take away the unqualified material 101 immediately after receiving the unqualified information, so as to prevent the unqualified material 101 from entering the subsequent production and processing flow.
[0041] Reference Figure 3The present invention provides a size detection device, which includes a loading platform 105, a bracket 109, a first camera 107, a second camera 106 and a processing system (the processing system is not shown, and can be specifically set to a computer). The loading platform 105 is used to carry the material 101, and the bracket 109 is used to install the first camera 107 and the second camera 106, and the first camera 107 and the second camera 106 face the loading platform 105. The images captured by the first camera 107 and the second camera 106 can be transmitted to the processing system through a cable, or transmitted to the processing system by wireless transmission. The processing system can obtain the length of the two width sides of the material 101 based on the image captured by the first camera 107; the processing system can obtain the length of one of the length sides of the material 101 based on the image captured by the second camera 106, and obtain the angle between each width side and the length side of the captured image.
[0042] Reference Figure 3 In some embodiments, the size detection device further includes a conveying device 104 for conveying the material 101. The conveying device 104 may be a roller conveyor, a conveyor belt conveyor, a chain plate conveyor, etc. The bracket 109 includes a first beam 102 and a second beam 103. One end of the first beam 102 is adjacent to the center of the second beam 103. The first beam 102 is arranged above the conveying device 104. The first camera 107 is installed on the first beam 102. The second beam 103 is arranged along the conveying direction of the conveying device 104 (corresponding to the conveying direction of the conveying device 104). Figure 3 The second beam 103 is located at the top of the right end of the conveying device 104, and the second camera 106 is installed on the second beam 103. The lenses of the first camera 107 and the second camera 106 are both set to face downward. Multiple first cameras 107 and second cameras 106 can be set, and multiple first cameras 107 are distributed at intervals along the width direction of the conveying device 104, and multiple second cameras 106 are distributed at intervals along the conveying direction of the conveying device 104. It should be noted that in the present invention, the conveying direction of the conveying device 104 is the length direction of the conveying device 104, corresponding to Figure 3 The direction perpendicular to the conveying device 104 (and not the up / down direction) is the width direction of the conveying device 104, corresponding to Figure 3 left / right direction in .
[0043] The processing system can stitch together the images captured by the multiple first cameras 107, and stitch together the images captured by the multiple second cameras 106. Setting up multiple first cameras 107 and second cameras 106 can make up for the deficiency of too small image acquisition area of a single first camera 107 or a single second camera 106, thereby expanding the size detection range applicable to the size detection device. It should be noted that, compared with directly stitching together multiple sub-images to form an image of the entire material 101, the size detection method of the present invention requires fewer sub-images to be stitched together, greatly reducing stitching errors, and achieving higher size detection accuracy.
[0044] Reference Figure 3 The size detection device also includes a light source 108, which is installed on the loading platform 105 or the bracket 109. The light source 108 is used to provide lighting for the first camera 107 and the second camera 106 to ensure that the quality of the images captured by the first camera 107 and the second camera 106 meets the requirements of image processing, thereby ensuring the accuracy of size detection.
[0045] Reference Figure 3 , assuming that the material is transported from the back to the front; in some embodiments, the size detection method further includes the following steps: the first camera 107 continuously captures images along the conveying direction of the material 101, when the first camera 107 detects the front edge of the material 101 (corresponding to Figure 2 After the first camera 107 detects the rear edge of the material 101 (corresponding to AD), the second camera 106 starts to collect images of the material 101; Figure 2 After BC in the figure, the second camera 106 stops collecting images of the material 101. This can shorten the continuous shooting time of the second camera 106, reduce energy consumption and increase the service life of the second camera 106. Accordingly, after the first camera 107 detects the leading edge of the material 101, the light source 108 is turned on to ensure image quality; after the first camera 107 detects the trailing edge of the material 101, the light source 108 is turned off to reduce the energy consumption of the size detection device.
[0046] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
Claims
1. A size detection method, characterized in that: include: The first camera captures an image of the width side of the material to be inspected, and the second camera captures an image of one of the length sides of the material. The image captured by the first camera includes the complete width side, and the image captured by the second camera includes the complete length side. The angles between the two ends of the length side and the width side can be seen from the image captured by the first camera or the second camera. The processing system obtains the lengths of the two width sides, the length of one of the length sides, and the angle between each width side and the length side of the captured image according to the image captured by the first camera and the image captured by the second camera; The processing system draws the shape of the material and outputs the dimension data of the material according to the shape of the material. The output dimension data includes the length of each side, the length of the diagonal line, and the angle of each corner.
2. The size detection method according to claim 1, characterized in that: The first camera and the second camera capture images of the material when the material is in a conveying process.
3. The size detection method according to claim 2, characterized in that: When the first camera detects the leading edge of the material, the second camera starts to collect images of the material; when the first camera detects the trailing edge of the material, the second camera stops collecting images of the material.
4. The size detection method according to claim 2, characterized in that: When the first camera detects the front edge of the material, the light source is turned on to provide lighting for the first camera and the second camera; when the first camera detects the rear edge of the material, the light source is turned off.
5. The size detection method according to claim 1, characterized in that: After mapping the shape of the material, the processing system calculates the difference between two diagonals of the material.
6. The size detection method according to claim 5, characterized in that: Also includes: A maximum allowable deviation value is set. If the difference between the two diagonals of the material is greater than the maximum allowable deviation value, the processing system sends a signal to indicate that the material is unqualified.
7. A size detection device, characterized in that: include: A loading platform capable of carrying the material to be tested; Bracket; A first camera, mounted on the bracket; a second camera, mounted on the bracket, the first camera and the second camera both facing the material loading platform, the first camera can capture images of two width sides of the material, the second camera can capture images of one length side of the material, the image captured by the first camera includes the complete width side, the image captured by the second camera includes the complete length side, and the angle between the two ends of the length side and the width side can be seen from the image captured by the first camera or the second camera; The processing system can process the images captured by the first camera and the second camera to obtain the lengths of the two width sides, the length of one of the length sides, and the angle between each width side and the length side of the captured image, and draw the shape of the material. The processing system can also output the size data of the material according to the shape of the material. The output size data includes the length of each side, the length of the diagonal, and the angle of each corner.
8. The size detection device according to claim 7, characterized in that: It also includes a conveying device, which is installed on the loading platform and can carry and convey the material.
9. The size detection device according to claim 8, characterized in that: The first camera is a line array camera.
10. The size detection device according to claim 9, characterized in that: The second camera is an area array camera.
Citation Information
Patent Citations
Steel bar plate dimensional measurement method and device
CN101221040A
System and method for measuring vehicle outline dimensions based on machine vision and laser light curtain
CN103453836A
Tile detection apparatus and detection method based on RGB-D camera
CN108007364A
Sheet glass edge defect detection method based on image collection
CN110596131A
Glass size measuring device and measuring method thereof
CN112504198A
Cited By
Packaging box finished product detection system based on image positioning
CN120593618A
