Tool detection method and tool detection device
By separately acquiring the image information of the blade surface, the problem of insufficient tool detection accuracy in the existing technology is solved, higher detection precision and accuracy are achieved, and the reliability of tool detection and product quality are ensured.
Patent Information
- Application Number
- CN202111451461.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-12-01
AI Technical Summary
Existing tool detection technology has poor detection accuracy when detecting two or more blade surfaces, which leads to system misjudgment and affects product quality.
A method of separately obtaining image information of the blade surface is adopted. The first blade surface and the second blade surface are illuminated by turning on and off different light groups respectively, obtaining clear first image information and second image information, and judging the qualification of the tool based on these image information.
The precision and accuracy of tool detection are improved, ensuring the reliability of tool detection and product quality.
Smart Images

Figure CN114219846B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mechanical processing vision technology, and in particular to a tool detection method and a tool detection device. Background Art
[0002] With the rapid development of electronic products, mobile electronic devices are becoming increasingly miniaturized, ultra-thin, and lightweight. Printed circuit boards (PCBs), as key components within electronic devices, are becoming increasingly smaller and smaller to accommodate more electronic components within the same footprint. Consequently, the number of holes required on PCBs is increasing, requiring smaller and more numerous tools for drilling.
[0003] When producing cutting tools, after the cutting tools are processed, they need to be inspected using a detection device to determine whether the processed cutting tools are qualified. However, when inspecting two or more cutting edges, the detection accuracy is poor, which causes system misjudgment and leads to the outflow of defective products, which is not conducive to controlling product quality. Summary of the Invention
[0004] The main purpose of the present invention is to provide a tool detection method, aiming to solve the technical problem of poor tool detection accuracy.
[0005] To achieve the above objectives, the tool detection method proposed in the present invention includes:
[0006] The tool has a blade surface, and an image acquisition device is provided corresponding to the blade surface; the blade surface includes a first blade surface and a second blade surface inclined to each other; a first light group is provided corresponding to the first blade surface for illuminating the first blade surface, and a second light group is provided corresponding to the second blade surface for illuminating the second blade surface;
[0007] The tool detection method comprises:
[0008] Turning on the first light group to illuminate the first blade surface, turning off the second light group to obtain first image information of the first blade surface;
[0009] Turn off the first light group, turn on the second light group to illuminate the second blade surface, and obtain second image information of the second blade surface;
[0010] Whether the tool is qualified is determined based on the first image information and the second image information.
[0011] Optionally, the step of determining whether the tool is qualified according to the first image information and the second image information includes:
[0012] Acquire valid pixels in the first image information to form a first valid area of the first image;
[0013] Acquire valid pixels in the second image information to form a second valid area of the second image;
[0014] Obtaining an area difference between the first effective area and the second effective area;
[0015] Determining whether the area difference is within a preset area difference range;
[0016] Make sure the tool is qualified.
[0017] Optionally, the step of obtaining a first effective area of the first image formed by effective pixels in the first image information includes:
[0018] Capturing a first pixel point in the first image information whose grayscale value is greater than or equal to a preset value;
[0019] A first effective area of the first image formed by the first pixel is acquired.
[0020] Optionally, the step of acquiring a first effective area of the first image formed by the first pixel points includes:
[0021] Placing the first pixel points in a first matrix to form a first image;
[0022] Finding a boundary of the first image in the first matrix;
[0023] The area of the first image in the first matrix is calculated.
[0024] Optionally, before the step of calculating the area of the first image in the first matrix, the method further includes:
[0025] obtaining each boundary line of the first image in the first matrix;
[0026] Obtain the wave lines and / or gaps of each boundary line and their variation range;
[0027] Calculating the current straightness of each boundary line of the first image according to the variation of the wavy lines and / or the gaps;
[0028] Determine whether the current straightness is greater than or equal to the preset straightness;
[0029] The area of the first image in the first matrix is calculated.
[0030] Optionally, the step of obtaining a second effective area of the second image formed by effective pixels in the second image information includes:
[0031] Capturing a second pixel point in the second image information whose grayscale value is greater than or equal to a preset value;
[0032] A second effective area of the second image formed by the second pixel point is acquired.
[0033] Optionally, the step of acquiring a second effective area of the second image formed by the second pixel includes:
[0034] Placing the second pixel points in the second matrix to form the second image;
[0035] finding a boundary of the second image in the second matrix;
[0036] The area of the second image in the second matrix is calculated.
[0037] Optionally, before the step of calculating the area of the second image in the second matrix, the method further includes:
[0038] obtaining each boundary line of the second image in the second matrix;
[0039] Obtain the wave lines and / or gaps of each boundary line and their variation range;
[0040] Calculating the current straightness of each boundary line of the second image according to the variation of the wavy lines and / or the gaps;
[0041] Determine whether the current straightness is greater than or equal to the preset straightness;
[0042] The area of the second image in the second matrix is calculated.
[0043] Optionally, the step of determining whether the tool is qualified according to the first image information and the second image information includes:
[0044] Acquire valid pixel points in the first image information to form a first valid spliced image;
[0045] Acquire valid pixel points in the second image information to form a second valid stitched image;
[0046] stitching the first effective stitching image and the second effective stitching image to form a knife surface image;
[0047] Get the actual length of the blade image;
[0048] Make sure the actual length is within the preset length range;
[0049] Make sure the tool is qualified.
[0050] The application further provides a tool detection device, comprising a memory, a processor and a program stored in the memory for implementing the tool detection method, the memory is used for storing the program for implementing the tool detection method; the processor is used for executing the program for implementing the tool detection method to implement the steps of the tool detection method, wherein,
[0051] The tool detection method comprises:
[0052] Turning on the first lamp group to illuminate the first blade surface and turning off the second lamp group to obtain first image information of the first blade surface;
[0053] Turning off the first lamp group and turning on the second lamp group to illuminate the second blade surface to obtain second image information of the second blade surface;
[0054] Judging whether the tool is qualified according to the first image information and the second image information.
[0055] The tool detection method of the application, before obtaining the first image information of the first blade surface, the first lamp group is turned on to illuminate the first blade surface and the second lamp group is turned off, and then the first image information of the first blade surface is obtained; meanwhile, before obtaining the second image information of the second blade surface, the second lamp group is turned on to illuminate the second blade surface and the first lamp group is turned off, and then the second image information of the second blade surface is obtained. In this way, after obtaining the first image information, the first image information has a clear black-and-white first blade surface profile; similarly, after obtaining the second image information, the second image information has a clear black-and-white second blade surface profile. When the first image information and the second image information are processed, the accuracy of identifying the first blade surface in the first image information and the second blade surface in the second image information is improved, thereby improving the accuracy of tool identification. Compared with the current method of obtaining the first image information and the second image information at one time, the first image information and the second image information are obtained separately in the application, and after obtaining the first image information and the second image information, the first image information and the second image information both have clear black-and-white profiles, and when the first image information and the second image information are processed, the accuracy and precision of identification are improved. BRIEF DESCRIPTION OF DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only show some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from the drawings shown without creative labor.
[0057] Figure 1 It is a flowchart of an embodiment of the tool detection method of the tool detection device of the application;
[0058] Figure 2 It is a structural schematic diagram of an embodiment of a tool detection device of the present invention;
[0059] Figure 3 This is a schematic diagram of the exploded structure of an embodiment of a tool detection device of the present invention;
[0060] Figure 4 A schematic cross-sectional view of a camera module, a light source assembly, a light diffuser, a light shielding plate, and a fixing member of an embodiment of a tool detection device according to the present invention;
[0061] Figure 5 for Figure 4 A partial enlarged view of point Ⅰ in the middle;
[0062] Figure 6 This is a simplified diagram from one perspective of the tool in the tool detection device of the present invention.
[0063] Description of Figure Numbers:
[0064]
[0065] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0067] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0068] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "and / or" appearing in the full text is to include three parallel solutions. Taking "A and / or B as an example", it includes solution A, or solution B, or solutions that satisfy both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0069] The specific structure of the tool 7 detection method will be mainly described below.
[0070] Reference Figures 1 to 6 In the embodiment of the present invention, the tool 7 has a blade surface, and an image acquisition device is provided corresponding to the blade surface; the blade surface includes a first blade surface 71 and a second blade surface 72 that are inclined to each other; a first light group is provided corresponding to the first blade surface 71 for illuminating the first blade surface, and a second light group is provided corresponding to the second blade surface 72 for illuminating the second blade surface;
[0071] The tool 7 detection method includes:
[0072] Turning on the first light group to illuminate the first blade surface 71 and turning off the second light group to obtain first image information of the first blade surface 71;
[0073] Turn off the first light group, turn on the second light group to illuminate the second blade surface 72, and obtain second image information of the second blade surface 72;
[0074] Whether the tool 7 is qualified is determined based on the first image information and the second image information.
[0075] Specifically, in this embodiment, before the tool 7 detection device obtains the first image information of the first blade surface 71, it is necessary to turn on the first light group to illuminate the first blade surface 71 and turn off the second light group. This is so that after obtaining the first image information of the first blade surface 71, the first image information only contains the image of the first blade surface 71. At the same time, because the first light group only illuminates the first blade surface 71, the first image information has a clear outline of the first blade surface 71, thereby improving the efficiency of processing the first image information. At the same time, because the first image information has a clear outline of the first blade surface 71, it is beneficial to improve the accuracy of processing the first image information when processing the first image information. The specific method of obtaining the first image information of the first blade surface 71 can be through industrial camera shooting or mobile phone shooting, etc., as long as the image captured can meet the required requirements. In this example, an industrial high-definition camera is used as an example. At the same time, the industrial high-definition camera is a black and white camera, so that when processing the first image information, the efficiency of processing the first image information can be further improved.
[0076] Similarly, before the tool 7 detection device obtains the second image information of the second blade surface 72, it is necessary to turn on the second light group to illuminate the second blade surface 72 and turn off the first light group, so that after obtaining the second image information of the second blade surface 72, the second image information only has the image of the second blade surface 72. At the same time, because the second light group only illuminates the second blade surface 72, the second image information has a clear outline of the second blade surface 72, thereby improving the efficiency of processing the second image information; at the same time, because the second image information has a clear outline of the second blade surface 72, it is beneficial to improve the accuracy of processing the second image information when processing the second image information. The specific method of obtaining the second image information of the second blade surface 7271 can be through industrial camera shooting or mobile phone shooting, etc., as long as the image captured can meet the required requirements. This example takes an industrial high-definition camera as an example. At the same time, the industrial high-definition camera is a black and white camera, so that when processing the second image information, the efficiency of processing the second image information can be further improved.
[0077] Before judging whether the tool 7 is qualified according to the first image information and the second image information, the first image information needs to be processed and calculated, such as calculating the actual area of the actual first blade surface 71 in the first image information, detecting whether the profile of the actual first blade surface 71 in the first image information has a gap, and measuring the length of the actual first blade surface 71 in the first image information, and various information of the first blade surface 71, so that the information of the first blade surface 71 can be compared with the corresponding set information, when the comparison result is within the set range, it is determined that the first blade surface 71 is qualified, and the set instruction is executed, when one or more comparisons exceed the set range, it is determined that the first blade surface 71 is unqualified, and the set instruction is executed. Similarly, the second image information needs to be processed and calculated, such as calculating the actual area of the actual second blade surface 72 in the second image information, detecting whether the profile of the actual second blade surface 72 in the second image information has a gap, and measuring the length of the actual second blade surface 72 in the second image information, and various information of the second blade surface 72, so that the information of the second blade surface 72 can be compared with the corresponding set information, when the comparison result is within the set range, it is determined that the second blade surface 72 is qualified, when it is determined that the actual first blade surface 71 and the second blade surface 72 are qualified, it is determined that the tool 7 is qualified, and the corresponding instruction is executed.
[0078] The tool 7 detection method of the present application, by opening the first lamp group to illuminate the first blade surface 71 and closing the second lamp group before obtaining the first image information of the first blade surface 71, and then obtaining the first image information of the first blade surface 71, and by opening the second lamp group to illuminate the second blade surface 72 and closing the first lamp group before obtaining the second image information of the second blade surface 72, and then obtaining the second image information of the second blade surface 72. In this way, after obtaining the first image information, the first image information has a clear black and white profile of the first blade surface 71; similarly, after obtaining the second image information, the second image information has a clear black and white profile of the second blade surface 72. When the first image information and the second image information are processed, the accuracy of identifying the first blade surface 71 in the first image information and the second blade surface 72 in the second image information is improved, thereby improving the accuracy of identifying the tool 7. Compared with the current one-time acquisition of the first image information and the second image information, the present application separately acquires the first image information and the second image information, and after acquiring the first image information and the second image information, the first image information and the second image information both have clear black and white profiles, and when the first image information and the second image information are processed, the accuracy and accuracy of identification are improved.
[0079] Referring to Figure 1 and Figure 6 , whether the tool 7 is qualified according to the first image information and the second image information will be explained by way of example.
[0080] The steps of judging whether the tool 7 is qualified based on the first image information and the second image information include: obtaining the effective pixel points in the first image information to form a first effective area of the first image; obtaining the effective pixel points in the second image information to form a second effective area of the second image; obtaining the area difference between the first effective area and the second effective area; determining that the area difference is within the range of the preset area difference; and determining that the tool 7 is qualified.
[0081] Specifically, in this embodiment, the effective pixel point in the first image information refers to the image of the first blade surface 71; there are many methods to form the first effective area, such as manually extracting the image of the first blade surface 71 in the first image and calculating it, manually directly calculating the area of the first blade surface 71 in the first image, or calculating the area of the first blade surface 71 in the first image by setting corresponding parameters through corresponding software, or extracting and calculating the first blade surface 71 in the first image by setting corresponding parameters through corresponding software, etc., as long as the actual size of the first blade surface 71 can be obtained. Similarly, the effective pixel points in the second image information refer to the image of the second blade surface 72; there are many methods for forming the second effective area, such as manually extracting the image of the second blade surface 72 in the second image and calculating it, manually directly calculating the area of the second blade surface 72 in the second image, or calculating the area of the second blade surface 72 in the second image by setting corresponding parameters through corresponding software, or extracting and calculating the second blade surface in the second image by setting corresponding parameters through corresponding software, etc., as long as the actual size of the second blade surface 72 can be obtained. After obtaining the first effective area and the second effective area, the area of the first effective area and the second effective area are subtracted. When the value obtained is within the set range, it is determined that the tool 7 is qualified and a setting instruction is issued. Otherwise, the tool 7 is judged to be unqualified and a corresponding instruction is issued.
[0082] In some embodiments, the step of obtaining the first effective area of the first image formed by the effective pixel points in the first image information includes: capturing the first pixel point in the first image information whose grayscale value is greater than or equal to a preset value; and obtaining the first effective area of the first image formed by the first pixel point.
[0083] To achieve greater accuracy when obtaining the first effective area, this embodiment uses software to obtain the first effective area. The software used is not specifically limited, as long as it can implement the operations of this embodiment. When obtaining the first effective area, since the first image information is a black and white image and the first blade surface 71 is illuminated during the first image acquisition, the first blade surface 71 appears white in the first image information. When obtaining the actual image of the first blade surface 71, a setting is set to extract pixels with corresponding grayscale values. After detecting the corresponding grayscale values, the first pixel is extracted. The first effective area is then calculated by calculating the first pixel, thereby obtaining the actual area of the first blade surface 71. For example, when the first pixel is set to have a grayscale value greater than or equal to 100, pixels with grayscale values greater than or equal to 100 in the first image information are extracted, while pixels with grayscale values less than 100 in the first image information are discarded. The actual size of the first blade surface 71 is then obtained by calculating the number of pixels in the first pixel. This improves the accuracy of obtaining the first effective area.
[0084] Similarly, the step of obtaining the second effective area of the second image formed by the effective pixel points in the second image information includes: capturing the second pixel point in the second image information whose grayscale value is greater than or equal to the preset value; and obtaining the second effective area of the second image formed by the second pixel point.
[0085] To achieve greater accuracy when obtaining the second effective area, this embodiment uses software to obtain the second effective area. The software used is not specifically limited, as long as it can implement the operations of this embodiment. When obtaining the second effective area, since the second image information is a black and white image and the second blade surface 72 is illuminated during the second image acquisition, the second blade surface 72 appears white in the second image information. When obtaining the actual image of the second blade surface 72, pixels with corresponding grayscale values are extracted. After detecting the corresponding grayscale values, the second pixels are extracted. The second effective area is then calculated based on the second pixels, thereby obtaining the actual area of the second blade surface 72. For example, when the second image grayscale value is set to be greater than or equal to 100, pixels with grayscale values greater than or equal to 100 in the second image information are extracted, while pixels with grayscale values less than 100 in the second image information are discarded. The actual size of the second blade surface 72 is then calculated based on the number of pixels in the second pixel set. This improves the accuracy of obtaining the second effective area.
[0086] In some embodiments, the step of obtaining the first effective area of the first image formed by the first pixel point includes: placing the first pixel point in a first matrix to form a first image; finding the boundary of the first image in the first matrix; and calculating the area of the first image in the first matrix.
[0087] After obtaining the first pixel point, in order to facilitate the calculation of the area of the first effective pixel, the first pixel point is placed in a first matrix, which is a first plane coordinate system. Then, each pixel point on the boundary of the first pixel point is identified according to the horizontal coordinate and the vertical coordinate, and each pixel point on the boundary of the first pixel point is connected to obtain a first image. The first image is then calculated to obtain the area of the first image in the first matrix.
[0088] Similarly, the step of obtaining the second effective area of the second image formed by the second pixel point includes: placing the second pixel point in the second matrix to form the second image; finding the boundary of the second image in the second matrix; and calculating the area of the second image in the second matrix.
[0089] After obtaining the second pixel point, in order to facilitate the calculation of the area of the second effective pixel, the second pixel point is placed in a second matrix, which is a second plane coordinate system. Then, each pixel point on the boundary of the second pixel point is identified according to the horizontal coordinate and the vertical coordinate, and each pixel point on the boundary of the second pixel point is connected to obtain a second image. The second image is calculated to obtain the area of the second image in the second matrix.
[0090] In some embodiments, before the step of calculating the area of the first image in the first matrix, the step also includes: obtaining the boundary lines of the first image in the first matrix; obtaining the wavy lines and / or gaps of each boundary line and their change amplitude; calculating the current straightness of each boundary line of the first image based on the change amplitude of the wavy lines and / or gaps; determining that the current straightness is greater than or equal to the preset straightness; and calculating the area of the first image in the first matrix.
[0091] In order to more accurately determine the actual contour accuracy of the first blade surface 71, the straightness of each boundary line of the first image is preset in the first matrix. This allows the first pixel point to be placed in the first matrix to form the first image. The straightness of each boundary line can be calculated by detecting the gaps and wavy lines in the boundary lines of the first image, thereby confirming whether the first blade surface 71 is qualified. For example, when determining whether the straightness of each boundary line of the first image is qualified, the pixel points at each edge of the first image are connected in the first matrix, and the amplitudes of the wavy lines and gaps are calculated to obtain the straightness of each boundary line. The obtained straightness is then compared with the set straightness. When the obtained straightness is greater than or equal to the set straightness, the straightness of each boundary line of the first image is determined to be qualified, and the next step is to calculate the area of the first image within the first matrix.
[0092] Similarly, before the step of calculating the area of the second image in the second matrix, the step also includes: obtaining the boundary lines of the second image in the second matrix; obtaining the wavy lines and / or gaps of each boundary line and their change amplitude; calculating the current straightness of each boundary line of the second image based on the change amplitude of the wavy lines and / or gaps; determining that the current straightness is greater than or equal to the preset straightness; and calculating the area of the second image in the second matrix.
[0093] In order to more accurately determine the actual contour accuracy of the second blade surface 72, the straightness of each boundary line of the second image is preset in the second matrix. This allows the second pixel points to be placed in the second matrix to form the second image. The straightness of each boundary line can be calculated by detecting the gaps and wavy lines in the boundary lines of the second image, thereby confirming whether the second blade surface 72 is qualified. For example, when determining whether the straightness of each boundary line of the second image is qualified, the pixel points at each edge of the second image are connected in the second matrix, and the amplitudes of the wavy lines and gaps are calculated to determine the straightness of each boundary line. The obtained straightness is then compared with the set straightness. When the obtained straightness is greater than or equal to the set straightness, the straightness of each boundary line of the second image is determined to be qualified, and the next step is to calculate the area of the second image within the second matrix.
[0094] The steps of judging whether the tool 7 is qualified based on the first image information and the second image information include: obtaining valid pixel points in the first image information to form a first valid stitching image; obtaining valid pixel points in the second image information to form a second valid stitching image; stitching the first valid stitching image and the second valid stitching image to form a tool surface image; obtaining the actual length of the tool surface image; determining that the actual length is within a preset length range; and determining that the tool 7 is qualified.
[0095] In order to detect the actual size of the tool 7, the first image and the second image need to be spliced according to the actual positions of the first blade surface 71 and the second blade surface 72, so as to facilitate the measurement of the first blade surface 71 and the second blade surface 72, thereby obtaining the diameter of the tool 7. When splicing the first image and the second image, it can be done in the first matrix or the second matrix, or it can be done outside the first matrix or the second matrix. There is no specific limitation here. It is only necessary to splice the first image and the second image after extraction. For example, after extracting the first image and the second image, the first image and the second image are placed in the first matrix and spliced according to the actual spacing between the first blade surface 71 and the second blade surface 72. At the same time, the length of the spliced first image and the second image is measured to obtain the actual size of the tool 7, and then determine whether the tool 7 is within the set range. When the tool 7 is within the set range, it is determined that the tool 7 is qualified.
[0096] The present invention further provides a tool 7 detection device, characterized by comprising a memory, a processor, and a program for implementing the tool 7 detection method stored in the memory. The memory is configured to store a program for implementing the tool 7 detection method; the processor is configured to execute the program for implementing the tool 7 detection method. The specific control method for the tool 7 detection device is described in the aforementioned embodiments. Because the present tool 7 detection device utilizes all of the technical solutions of all of the aforementioned embodiments, it possesses at least all of the beneficial effects provided by the technical solutions of the aforementioned embodiments, and therefore will not be further elaborated upon herein.
[0097] In addition, the tool 7 detection device also includes: a mounting frame 1; a mounting member 2, the mounting member 2 is installed on the mounting frame 1, and the mounting member 2 is provided with a mounting position 21 for installing the tool 7; a camera module 3, the camera module 3 is installed on the mounting frame 1, the camera module 3 has a lens 31, the lens 31 is opposite to the mounting position 21, and the camera module 3 takes pictures through the lens 31; a light source, the light source is installed on the mounting frame 1, and the light source is used to switch to irradiate the first blade surface 71 or the second blade surface 72.
[0098] In this embodiment, the first blade surface 71 and the second blade surface 72 play a cutting role when drilling, and the first blade surface 71 and the second blade surface 72 are opposite and inclined to each other, and are used for cutting when drilling. The mounting frame 1 is used to support the camera module 3, the light source and the mounting part 2, etc. The camera module 3 is used to take pictures, and the type of the camera module 3 in this embodiment is preferably an industrial high-definition camera. The camera module 3 has a lens 31, and the lens 31 is used to adjust the aperture and focal length of the camera module 3. The camera module 3 is mounted on the mounting frame 1. At the same time, the lens 31 can face the upper side of the mounting frame 1, or the lower side of the mounting frame 1 or be horizontal with the camera module 3 itself, etc. There is no specific restriction here, and it is only necessary to fix the camera module 3.
[0099] Mounting member 2 is used to support cutting tool 7. The overall shape of mounting member 2 can be a rectangular parallelepiped or cylindrical, and is not specifically limited here; it only serves as a supporting medium. Mounting member 2 is mounted on mounting frame 1, adjacent to the side of lens 31 facing away from camera module 3, so that camera module 3 can capture images directed toward mounting member 2. Mounting member 2 has a mounting position 21 on the side facing lens 31, opposite lens 31. Mounting position 21 can be a hole, notch, or claw, and is not specifically limited here; it only needs to be able to accommodate and secure cutting tool 7.
[0100] The type of light source can be an LED lamp or an incandescent lamp, etc., as long as the light emitted can reach the recognition of the camera module 3. The light source is installed on the mounting bracket 1. At the same time, the light source needs to illuminate the first blade surface 71 and the second blade surface 72 separately, so that the camera module 3 can shoot the first blade surface 71 and the second blade surface 72 separately. There are many ways to illuminate the first blade surface 71 and the second blade surface 72 separately, such as: 1. Rotate the light source to illuminate the opposite side of the first blade surface 71 and the second blade surface 72; 2. Rotate the tool 7, and rotate the first blade surface 71 and the second blade surface 72 of the tool 7 to the light source illumination area respectively; 3. Set up two light sources, and aim the two light sources at the first blade surface 71 and the second blade surface 72 respectively for illumination, and at the same time, the two light sources illuminate separately. In this way, when the camera module 3 shoots the first blade surface 71 or the second blade surface 72, the light source can illuminate the first blade surface 71 or the second blade surface 72 separately. When the camera module 3 photographs the first blade surface 71 and the second blade surface 72 respectively, since the first blade surface 71 and the second blade surface 72 are inclined to each other, when the light source illuminates the first blade surface 71 or the second blade surface 72, only the blade surface illuminated by the light source can reflect the light to the camera module 3. Since other positions cannot be illuminated, the light from the blade surface cannot be reflected to the camera module 3. In this way, the photos taken by the camera module 3 have a clear outline, which improves the software's recognition when the software measures and analyzes the blade surface contour.
[0101] In one embodiment, if Figure 2 and Figure 6 As shown, the light source has a first irradiation area and a second irradiation area, the first irradiation area is used to irradiate the first blade surface 71, and the second irradiation area is used to irradiate the second blade surface 72. The tool 7 detection device also includes a light source assembly 4, which is mounted on the mounting frame 1. The light source assembly 4 is provided with a reaming hole 41 that passes through the light source assembly 4 on the side wall facing the camera module 3. The inner wall of the reaming hole 41 has a mounting bevel 42, which is arranged facing the mounting member 2 and extends along the circumference of the reaming hole 41. The light source includes a first lamp group and a second lamp group, which are mounted on the mounting bevel 42. The first lamp group forms the first irradiation area, and the second lamp group forms the second irradiation area.
[0102] Setting a first irradiation area and a second irradiation area to illuminate the first blade surface 71 and the second blade surface 72 respectively is beneficial to reducing the need to adjust the position of the tool 7 or the position of the light source when photographing the first blade surface 71 and the second blade surface 72, thereby improving the efficiency of photographing. A mounting bevel 42 is set on the peripheral wall of the reaming hole 41. The area of the mounting bevel 42 relative to the first blade surface 71 is preferably parallel to the first blade surface 71, and the area of the mounting bevel 42 relative to the second blade surface 72 is preferably parallel to the second blade surface 72, so that after the first lamp group and the second lamp group are set on the mounting bevel 42, the first lamp group and the second lamp group form the first irradiation area and the second irradiation area, and can illuminate the first blade surface 71 and the second blade surface 72 respectively, so that the camera module 3 can capture the image of the first blade surface 71 and the image of the second blade surface 72.
[0103] In one embodiment, if Figure 2 and Figure 3 As shown, the lens 31 includes a shooting end surface, and the light source assembly 4 is located between the shooting end surface and the mounting member 2. The mounting member 2 is rotatably mounted on the mounting frame 1, and the extension direction of the rotation axis of the mounting member 2 is consistent with the central axis of the reamer 41.
[0104] The photographing end face can be a convex lens or a concave lens, and this embodiment does not impose any specific restrictions, as long as it can produce the desired photograph. The light source assembly 4 is disposed between the photographing end face and the mounting member 2, which facilitates a more compact light source assembly 4 and reduces the power of the light source. Furthermore, disposing the light source at the end of the lens 31 away from the camera module 3 helps reduce interference with the light source from other foreign objects, thereby improving the reliability of the light source. The mounting position 21 is located on the rotation axis of the mounting member 2, and the extension line of the rotation axis of the mounting member 2 is aligned with the central axis of the counterbore 41. Thus, when the photographing end face photographs the first blade surface 71 and the second blade surface 72 through the counterbore 41, the first blade surface 71 and the second blade surface 72 cannot rotate out of the photographing end face's framing area. The rotation of the mounting member 2 can be achieved by a motor or an air pump, etc., and is not specifically limited here. It is sufficient to drive the rotating tool 7 by driving the mounting member 2. This allows the first blade surface 71 to be adjusted by rotating the mounting member 2 when the first irradiation area cannot illuminate the first blade surface 71, thereby improving photographing efficiency.
[0105] In one embodiment, if Figure 3 and Figure 5As shown, the tool 7 detection device also includes a light diffuser 61, which is mounted on the mounting frame 1 and located between the light source and the mounting member 2. The light diffuser 61 has a sidewall facing the light source with a clearance hole 611, which passes through the light diffuser 61 and is used to avoid the framing area of the lens 31. The tool 7 detection device also includes a light shielding plate 62, which is mounted on the mounting frame 1 and located between the light source and the mounting member 2. The light shielding plate 62 has a light exit hole 621 on the sidewall facing the camera module 3, which passes through the light shielding plate 62 and is used to emit light. The tool 7 detection device also includes a fixing part 5, which is installed on the mounting frame 1. The fixing part 5 is located between the lens 31 and the mounting part 2. The fixing part 5 is provided with a mounting hole 51 on the side wall facing the camera module 3. The mounting hole 51 passes through the fixing part 5. The light source is installed in the mounting hole 51. The light diffuser 61 is installed in the mounting hole 51 and is located between the light source and the mounting part 2. The light shielding plate 62 is installed in the mounting hole 51 and is located between the light diffuser 61 and the mounting part 2.
[0106] The overall shape of the light-diffusing plate 61 can be a rectangular plate or a circular plate, etc., and there is no specific restriction here. It only needs to output uniform light after the light from the light source passes through the light-diffusing plate 61. There is a avoidance hole 611 at the beginning of the light-diffusing plate 61. The central axis of the avoidance hole 611 is consistent with the central axis of the shooting end face, so that the shooting end face can be framed through the avoidance hole 611. The size of the avoidance hole 611 is equivalent to the size of the shooting range required by the camera module 3. The light-diffusing plate 61 is arranged between the light source and the mounting part 2, which is conducive to the light source outputting more uniform light after passing through the light-diffusing plate 61. The overall shape of the light shielding plate 62 can be a rectangular plate or a circular plate, etc., and there is no specific restriction here. It only needs to be able to block light. There is a light outlet hole 621 at the center of the light shielding plate 62. The light outlet hole 621 is used to emit light and to avoid the framing area of the lens 31. The light shielding plate 62 is arranged between the light homogenizing plate 61 and the light source plate. At the same time, the light shielding plate 62 is spaced apart from the light homogenizing plate 61 so that the light can be diffusely reflected after passing through the light homogenizing plate, thereby further improving the uniformity of the output light. The light shielding plate 62 is arranged between the light homogenizing plate 61 and the mounting member 2 to help reduce the light source from irradiating the mounting member 2, thereby reducing light pollution. The fixing member 5 is used to reduce the pollution of the light source to the environment. The mounting hole 51 is used to install the light shielding plate 62, the light homogenizing plate 61 and the light source, so that the light from the light source can be confined to the mounting hole 51, thereby reducing the pollution of the light source to the environment.
[0107] In one embodiment, the tool 7 detection device further includes a blade surface position detection assembly, which is mounted on the mounting bracket 1 and has a detection end disposed toward the mounting position 21 for detecting the position of the blade surface. To facilitate determination of the blade surface position, the mounting bracket 1 is provided with a blade surface position detection assembly, which has a detection end disposed toward the blade surface. This prevents the light source from not being able to illuminate the entire blade surface, thereby preventing an incomplete photograph from being taken.
[0108] In one embodiment, if Figure 2 As shown, the lens 31 is located on the upper side of the mounting member 2. In order to prevent dust from entering the lens 31, the lens 31 is located on the lower side of the setting module. At the same time, the mounting member 2 is located on the lower side of the lens 31. This is beneficial to prevent dust or foreign matter from falling into the lens 31 during use.
[0109] In addition, the mounting position 21 includes a mounting groove, which is configured to be at least partially adapted to be inserted into the tool 7. Providing the mounting groove for accommodating the tool 7 is conducive to improving the installation of the tool 7, thereby improving the efficiency of detection.
[0110] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made by using the contents of the present invention description and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A tool detection method, characterized in that: The tool has a blade surface, and an image acquisition device is provided corresponding to the blade surface; the blade surface includes a first blade surface and a second blade surface inclined to each other; a first light group is provided corresponding to the first blade surface for illuminating the first blade surface, and a second light group is provided corresponding to the second blade surface for illuminating the second blade surface; The tool detection method comprises: Turning on the first light group to illuminate the first blade surface, turning off the second light group to obtain first image information of the first blade surface; Turn off the first light group, turn on the second light group to illuminate the second blade surface, and obtain second image information of the second blade surface; judging whether the tool is qualified according to the first image information and the second image information; The step of judging whether the tool is qualified according to the first image information and the second image information includes: Acquire valid pixels in the first image information to form a first valid area of the first image; Acquire valid pixels in the second image information to form a second valid area of the second image; Obtaining an area difference between the first effective area and the second effective area; Determining whether the area difference is within a preset area difference range; Make sure the tool is qualified.
2. The detection method according to claim 1, wherein The step of obtaining a first effective area of the first image formed by effective pixels in the first image information includes: Capturing a first pixel point in the first image information whose grayscale value is greater than or equal to a preset value; A first effective area of the first image formed by the first pixel is acquired.
3. The detection method according to claim 2, characterized in that The step of acquiring a first effective area of the first image formed by the first pixel includes: Placing the first pixel points in a first matrix to form a first image; Finding a boundary of the first image in the first matrix; The area of the first image in the first matrix is calculated.
4. The detection method according to claim 3, characterized in that Before the step of calculating the area of the first image in the first matrix, the method further includes: obtaining each boundary line of the first image in the first matrix; Obtain the wave lines and / or gaps of each boundary line and their variation range; Calculating the current straightness of each boundary line of the first image according to the variation of the wavy lines and / or the gaps; Determine whether the current straightness is greater than or equal to the preset straightness; The area of the first image in the first matrix is calculated.
5. The detection method according to claim 1, wherein The step of acquiring a second effective area of the second image formed by effective pixels in the second image information includes: Capturing a second pixel point in the second image information whose grayscale value is greater than or equal to a preset value; A second effective area of the second image formed by the second pixel point is acquired.
6. The detection method according to claim 5, characterized in that The step of acquiring a second effective area of the second image formed by the second pixel point includes: Placing the second pixel points in a second matrix to form the second image; finding a boundary of the second image in the second matrix; The area of the second image in the second matrix is calculated.
7. The detection method according to claim 6, characterized in that Before the step of calculating the area of the second image in the second matrix, the method further includes: obtaining each boundary line of the second image in the second matrix; Obtain the wave lines and / or gaps of each boundary line and their variation range; Calculating the current straightness of each boundary line of the second image according to the variation of the wavy lines and / or the gaps; Determine whether the current straightness is greater than or equal to the preset straightness; The area of the second image in the second matrix is calculated.
8. The detection method according to claim 1, wherein The step of judging whether the tool is qualified according to the first image information and the second image information includes: Acquire valid pixel points in the first image information to form a first valid spliced image; Acquire valid pixel points in the second image information to form a second valid stitched image; stitching the first effective stitching image and the second effective stitching image to form a knife surface image; Get the actual length of the blade image; Make sure the actual length is within the preset length range; Make sure the tool is qualified.
9. A tool detection device, characterized in that: It comprises a memory, a processor and a program for implementing the tool detection method stored in the memory, wherein the memory is used to store a program for implementing the tool detection method; the processor is used to execute the program for implementing the tool detection method to implement the steps of the tool detection method as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Optical filter mirror plane defect detection method and device and terminal device
CN108918093A
Indicator light detection method and device and computer-readable storage medium
CN110441714A