Milling cutter length measuring method, device and equipment and storage medium
By using industrial camera image recognition technology, the problem of inaccurate measurement of milling cutter length by laser detection has been solved, and high-precision milling cutter length calibration has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, laser detection methods have a large measurement error for milling cutter lengths of 1 mm or less, which affects the machining accuracy of the tool axis and may lead to safety accidents.
An industrial camera is used to generate images of the material to be processed by the milling cutter during the machining process. The number of target boundaries is determined by image recognition, and the length of the milling cutter is calibrated based on the number of boundaries.
This improved the accuracy of milling cutter length measurement, reduced measurement errors, and avoided safety hazards.
Smart Images

Figure CN121631985A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of mechanical processing, in particular to a milling cutter length measurement method, device, equipment and storage medium. BACKGROUND
[0002] Milling cutter length measurement is an important step to ensure the machining accuracy of the cutter shaft during the machining of the milling cutter. The mainstream milling cutter measurement method is laser detection, but for high-precision milling cutters, the effect of laser detection is not good. For example, for a milling cutter with a diameter D less than or equal to 1 mm, the measurement error of laser detection is large, which seriously affects the machining accuracy of the cutter shaft, and may cause safety accidents such as machine collision.
[0003] Therefore, there is an urgent need for a milling cutter length measurement method to improve the measurement accuracy of milling cutter length measurement. SUMMARY
[0004] The present application provides a milling cutter length measurement method, device, equipment and storage medium to improve the measurement accuracy of milling cutter length measurement.
[0005] According to an aspect of the present application, a milling cutter length measurement method is provided, which comprises:
[0006] obtaining a candidate milling cutter length of a target milling cutter, and loading the target milling cutter to a machining device; wherein the candidate milling cutter length is a milling cutter length to be calibrated;
[0007] using an industrial camera to perform image acquisition on the machined material after the target milling cutter completes material machining on the material to be machined on the machining device, and generating a to-be-recognized material image;
[0008] based on the machining path of the target milling cutter, performing image recognition on the to-be-recognized material image, determining the number of target boundaries existing in the to-be-recognized material image, and based on the number of boundaries, calibrating the candidate milling cutter length to determine the target milling cutter length; wherein the target boundary refers to the boundary formed after the material to be machined is machined by the milling cutter.
[0009] According to another aspect of the present application, a milling cutter length measurement device is provided, which comprises:
[0010] a milling cutter loading module for obtaining a candidate milling cutter length of a target milling cutter, and loading the target milling cutter to a machining device; wherein the candidate milling cutter length is a milling cutter length to be calibrated;
[0011] an image acquisition module for using an industrial camera to perform image acquisition on the machined material after the target milling cutter completes material machining on the material to be machined on the machining device, and generating a to-be-recognized material image;
[0012] A length calibration module is configured to perform image recognition on the to-be-identified material image based on the machining path of the target milling cutter, determine a boundary quantity of a target boundary present in the to-be-identified material image, and calibrate the candidate milling cutter length based on the boundary quantity to determine a target milling cutter length. The target boundary refers to a boundary formed after the to-be-machined material is machined by the milling cutter.
[0013] According to another aspect of the present application, an electronic device is provided, which includes:
[0014] one or more processors;
[0015] a memory configured to store one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the milling cutter length measurement methods provided by the embodiments of the present application.
[0017] According to another aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement any one of the milling cutter length measurement methods provided by the embodiments of the present application.
[0018] According to another aspect of the present application, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement any one of the milling cutter length measurement methods provided by the embodiments of the present application.
[0019] The present application improves the measurement precision of the milling cutter length measurement by collecting the image of the machining result of the target milling cutter in the actual machining process, obtaining the material image of the to-be-machined material after the machining is completed, and determining the actual machining result of the to-be-machined material according to the material image, and calibrating the candidate milling cutter length of the target milling cutter. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a flowchart of a milling cutter length measurement method according to Embodiment One of the present application;
[0021] Figure 2a is a flowchart of a milling cutter length measurement method according to Embodiment Two of the present application;
[0022] Figure 2b is a machining schematic diagram of a to-be-machined material according to Embodiment Two of the present application;
[0023] Figure 3 is a structural schematic diagram of a milling cutter length measurement device according to Embodiment Three of the present application;
[0024] Figure 4Fig. 1 is a structural schematic diagram of an electronic device for realizing a milling cutter length measurement method according to Embodiment Four of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0027] Embodiment One
[0028] Figure 1 Fig. 1 is a flowchart of a milling cutter length measurement method according to Embodiment One of the present application. The present embodiment can be applied to the case of measuring the length of a milling cutter, and can be executed by a milling cutter length measurement device, which can be realized in the form of hardware and / or software, and can be configured in a computer device, such as a server. As shown in Fig. 1, the method comprises the following steps. Figure 1
[0029] S110, obtaining a candidate milling cutter length of a target milling cutter, and loading the target milling cutter into a processing device.
[0030] The candidate milling cutter length can refer to the length of the milling cutter to be calibrated. The target milling cutter can refer to the milling cutter to be measured for length.
[0031] In the embodiments of the present application, a ruler or other measuring tool can be used to measure the approximate length of the milling cutter as the candidate milling cutter length, and the target milling cutter can be loaded into the processing device with the candidate milling cutter length of the target milling cutter as the origin to process the material to be processed on the processing device.
[0032] It should be noted that in the embodiment of the present application, the processing requirement of the material to be processed is to process n steps downward, the height H of each step is equal, and the height of the n steps needs to meet the maximum processing length of the target milling cutter. The maximum processing length can refer to the length of the cutting edge of the target milling cutter used for material processing. The type of the target milling cutter is different, and the corresponding maximum processing length is also different. Alternatively, the preset number n can be adaptively set by those skilled in the art.
[0033] By limiting the height of the processing step, the single processing amount of the milling cutter is ensured to be within a reasonable range, the interference of the tool thermal effect is reduced under the premise of ensuring a certain efficiency, the accuracy is increased, and the occurrence of tool breakage due to excessive cutting amount is prevented.
[0034] Alternatively, for the target milling cutter with an outer diameter range of 0.01mm≤D≤1mm, due to the influence of the size of the milling cutter, the error of the existing length detection method will be further enlarged, and the length measurement method of the present scheme will not be limited by the size of the milling cutter.
[0035] Alternatively, in the embodiment of the present application, before the target milling cutter is loaded into the processing equipment and the material to be processed is processed, the processing equipment is pre-heated to reduce the interference of the tool thermal effect and increase the accuracy of the length measurement.
[0036] S120, using an industrial camera, after the target milling cutter completes material processing on the material to be processed on the processing equipment, image acquisition is performed on the material to be processed to generate a to-be-recognized material image.
[0037] The industrial camera can be fixedly arranged on the rack of the processing equipment, the lens axis of the industrial camera is perpendicular to the step surface of the material to be processed, and the field of view of the lens of the industrial camera covers the entire processing area of the material to be processed. Alternatively, the selection of the industrial camera can be adaptively set by those skilled in the art.
[0038] Alternatively, after the to-be-recognized material image is generated, it further includes: performing Gaussian filtering processing on the to-be-recognized material image, and performing gray value normalization processing on the to-be-recognized material image to generate a binary boundary image corresponding to the to-be-recognized material image; and performing non-maximum suppression on the gray gradient amplitude according to the gray gradient amplitude and direction of each pixel point in the to-be-recognized material image.
[0039] By processing the to-be-recognized material image, the image quality of the image is improved.
[0040] S130, based on the target milling cutter machining path, performing image recognition on the to-be-recognized material image, determining a boundary quantity of the target boundary existing in the to-be-recognized material image, and calibrating the candidate milling cutter length based on the boundary quantity to determine the target milling cutter length.
[0041] The target boundary refers to a boundary formed after the to-be-processed material is processed by the milling cutter.
[0042] It should be noted that in the embodiments of the present application, the machining path of the target milling cutter is fixed. Alternatively, the machining path of the target milling cutter can be adaptively set by those skilled in the art.
[0043] The embodiments of the present application acquire the material image of the to-be-processed material after processing by collecting the image of the processing result of the target milling cutter in the actual processing process, and determine the actual processing result of the to-be-processed material according to the material image, and calibrate the candidate milling cutter length of the target milling cutter, thereby improving the measurement accuracy of the milling cutter length measurement.
[0044] Embodiment Two
[0045] Figure 2a is a flowchart of a milling cutter length measurement method provided by Embodiment Two of the present application. The present embodiment further refines the "based on the target milling cutter machining path, performing image recognition on the to-be-recognized material image, determining a boundary quantity of the target boundary existing in the to-be-recognized material image, and calibrating the candidate milling cutter length based on the boundary quantity" based on the technical solutions of the above-mentioned embodiments. It should be noted that the parts not described in detail in the embodiments of the present application can be referred to the related descriptions of other embodiments. For example, as shown in the figure, the method comprises the following steps. Figure 2a
[0046] S210, acquiring the candidate milling cutter length of the target milling cutter, and loading the target milling cutter to the processing equipment.
[0047] S220, using an industrial camera to collect the image of the to-be-processed material after the target milling cutter completes material processing on the to-be-processed material on the processing equipment, and generating a to-be-recognized material image.
[0048] S230, using a Hough straight line detection algorithm to perform straight line fitting on the to-be-recognized material image, and determining at least one candidate boundary.
[0049] S240, determining the included angle between the candidate boundary and the first direction of the processing equipment as a first included angle.
[0050] The first direction can refer to the positive direction of the specified X axis of the processing equipment.
[0051] S250, based on the first included angle and the second included angle, determining whether the candidate boundary belongs to the target boundary.
[0052] The second included angle can be used to represent the included angle between the milling tool processing path direction and the first direction of the processing equipment.
[0053] In the embodiments of the present application, the included angle between the processing path direction of the target milling tool and the positive direction of the X-axis specified by the processing equipment can be defined as the second included angle, and the included angle between the candidate boundary and the positive direction of the X-axis specified by the processing equipment can be defined as the first included angle. Whether the candidate boundary is perpendicular to the processing path direction of the target milling tool is determined according to the first included angle and the second included angle. If it is perpendicular, it is determined that the candidate boundary is the target boundary.
[0054] Optionally, whether the candidate boundary is perpendicular to the processing path direction of the target milling tool can be determined by the following formula: if the first included angle and the second included angle satisfy , it is determined that the candidate boundary is perpendicular to the processing path direction of the target milling tool.
[0055] , wherein is a perpendicular determination angle threshold, is the second included angle, is the first included angle. Optionally, the perpendicular determination angle threshold can be adaptively set by those skilled in the art.
[0056] Optionally, after determining whether the candidate boundary belongs to the target boundary based on the first included angle and the second included angle, it further includes: screening the target boundary according to a preset pixel number threshold, and filtering the target boundary with a pixel number less than the preset pixel number threshold.
[0057] Specifically, the target boundary is screened to exclude the potential interference of false boundaries, such as interference boundaries caused by processing surface scratches and stains, and to improve the accuracy of subsequent milling tool length measurement.
[0058] S260, calibrating the candidate milling tool length based on the boundary number of the target boundary and the candidate milling tool length.
[0059] Optionally, calibrating the candidate milling tool length based on the boundary number of the target boundary and the candidate milling tool length includes: determining the actual step number of the material to be processed after processing according to the boundary number of the target boundary; and calibrating the candidate milling tool length according to the actual step number, the candidate milling tool length, and the expected step number of the material to be processed.
[0060] The expected step number can be used to represent the expected processing effect of the material to be processed before being processed. The actual step number can be used to represent the actual processing effect of the material to be processed after being processed.
[0061] For example, if the boundary number of the target boundary is 0, the actual step number of the material to be processed is 0; if the boundary number of the target boundary is not 0, the actual step number of the material to be processed is the boundary number-1. If the actual step number is greater than 0 and less than the expected step number, the target milling cutter length is L0-(n-m)H; if the actual step number is 0, the candidate milling cutter length of the target milling cutter is updated to L0-nH, and the loading height of the target milling cutter in the machining equipment is adjusted downward, and the new same type of material to be processed is processed again until the actual step number is greater than 0 and less than the expected step number; if the actual step number is equal to the expected step number, as shown in the figure, the actual step number (actual machining shape) actually machined by the milling cutter is the same as the expected step number, but it is uncertain whether the machined step meets the expected step depth, so the candidate milling cutter length of the target milling cutter needs to be updated to L0+nH, and the loading height of the target milling cutter in the machining equipment is adjusted upward, and the new same type of material to be processed is processed again until the actual step number is greater than 0 and less than the expected step number. Figure 2b
[0062] The step difference between the expected step number and the actual step number is used to calibrate the candidate milling cutter length, and the length of the target milling cutter is optimized in precision with the step height of the step, so that high-precision measurement of the length of the milling cutter is realized.
[0063] The embodiment of the application converts the measurement process of the length of the milling cutter from a microscopic direct measurement of the milling cutter to a macroscopic determination according to the machining effect of the milling cutter on the material to be processed, thereby improving the precision of the length measurement of the milling cutter.
[0064] Embodiment three
[0065] Figure 3 It is a structural schematic diagram of a milling cutter length measurement device provided by the embodiment three of the application, which can be applied to the case of measuring the length of the milling cutter. The milling cutter length measurement device can be realized in the form of hardware and / or software, and can be configured in a computer device, such as a server. As shown in the figure, the device comprises: Figure 3
[0066] The milling cutter loading module 310 is configured to obtain the candidate milling cutter length of the target milling cutter, and load the target milling cutter into the machining equipment; wherein the candidate milling cutter length is the milling cutter length to be calibrated;
[0067] The image acquisition module 320 is configured to use an industrial camera to acquire an image of the material to be processed after the target milling cutter completes material processing on the material to be processed on the machining equipment, and generate a material to be recognized image;
[0068] The length calibration module 330 is configured to perform image recognition on the to-be-identified material image based on the machining path of the target milling cutter, determine a boundary quantity of a target boundary present in the to-be-identified material image, and calibrate the candidate milling cutter length based on the boundary quantity to determine a target milling cutter length. The target boundary refers to a boundary formed after the to-be-machined material is machined by the milling cutter.
[0069] The embodiment of the present application acquires a material image of the to-be-machined material after machining by performing image acquisition on the machining result of the target milling cutter in the actual machining process, and determines the actual machining result of the to-be-machined material according to the material image, thereby calibrating the candidate milling cutter length of the target milling cutter and improving the measurement accuracy of the milling cutter length measurement.
[0070] Optionally, the length calibration module 330 comprises:
[0071] The candidate boundary detection unit is configured to perform straight line fitting on the to-be-identified material image by using a Hough straight line detection algorithm to determine at least one candidate boundary.
[0072] The first included angle determination unit is configured to determine an included angle between the candidate boundary and a first direction of the machining equipment as a first included angle. The first direction refers to a specified positive direction of an X axis of the machining equipment.
[0073] The target boundary determination unit is configured to determine whether the candidate boundary belongs to a target boundary based on the first included angle and a second included angle. The second included angle is used to represent an included angle between a machining path direction of the milling cutter and the first direction of the machining equipment.
[0074] The length calibration unit is configured to calibrate the candidate milling cutter length based on the boundary quantity of the target boundary and the candidate milling cutter length.
[0075] Optionally, the length calibration unit can be specifically configured to determine an actual step quantity of the to-be-machined material after machining according to the boundary quantity of the target boundary, and calibrate the candidate milling cutter length according to the actual step quantity, the candidate milling cutter length, and an expected step quantity of the to-be-machined material. The expected step quantity is used to represent an expected machining effect of the to-be-machined material before machining.
[0076] Optionally, the length calibration module 330 further comprises:
[0077] The boundary screening unit is configured to screen the target boundary according to a preset pixel quantity threshold, and filter the target boundary with a pixel point quantity less than the preset pixel quantity threshold.
[0078] Optionally, the apparatus further comprises:
[0079] The noise processing module is used to perform Gaussian filtering on the image of the material to be identified, and to perform grayscale normalization on the image of the material to be identified to generate a binarized boundary image corresponding to the image of the material to be identified; and to perform non-maximum suppression on the grayscale gradient magnitude based on the grayscale gradient magnitude and direction of each pixel in the image of the material to be identified.
[0080] Optionally, the industrial camera is fixedly mounted on the frame of the processing equipment, the lens axis of the industrial camera is perpendicular to the stepped surface of the material to be processed, and the field of view of the lens of the industrial camera covers the entire processing area of the material to be processed.
[0081] The milling cutter length measuring device provided in this application embodiment can execute the milling cutter length measuring method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the milling cutter length measuring method.
[0082] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.
[0083] Example 4
[0084] Figure 4 This is a schematic diagram of the structure of an electronic device 410 implementing the milling cutter length measurement method of the embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0085] like Figure 4 As shown, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory 412 or a random access memory 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 412 or loaded from storage unit 418 into the random access memory 413. The random access memory 413 can also store various programs and data required for the operation of the electronic device 410. The processor 411, read-only memory 412, and random access memory 413 are interconnected via a bus 414. An input / output interface 415 is also connected to the bus 414.
[0086] A number of components in the electronic device 410 are connected to the input / output interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0087] The processor 411 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, central processing units, graphics processing units, various specialized artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, etc. The processor 411 performs various methods and processes described above, such as the measurement method of the milling tool length.
[0088] In some embodiments, the measurement method of the milling tool length can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 410 via the read-only memory 412 and / or the communication unit 419. When the computer program is loaded onto the random access memory 413 and executed by the processor 411, one or more steps of the measurement method of the milling tool length described above can be performed. Alternatively, in other embodiments, the processor 411 can be configured as the measurement method of the milling tool length by any other appropriate means, such as by means of firmware.
[0089] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits, application specific standard products, chips, microprocessors, computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0090] A computer program for implementing the methods of the present application can be written in any combination of one or more programming languages. The computer program can be provided to a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be embodied in whole or in part (including both instructions and data) in a machine readable medium. Further, while a programmable computer is one example of a suitable apparatus for
[0091] In the context of the present application, a computer readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium can be a machine readable signal medium. More specific examples of the computer readable storage medium will include one or more lines of electrical connections, a portable computer diskette, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disc read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0092] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT or LCD monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0093] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), a blockchain network, and the Internet.
[0094] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, and solves the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server.
[0095] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in different orders, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.
[0096] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and scope of the disclosure. Any further modifications, equivalents, alternatives, and / or improvements made to the specific embodiments described above are intended to fall within the scope of the disclosure.
Claims
1. A method of measuring the length of a milling cutter, characterized in that, The method comprises the following steps: obtaining a candidate milling cutter length of a target milling cutter, and loading the target milling cutter to a machining device; wherein the candidate milling cutter length refers to a milling cutter length to be calibrated; after the target milling cutter completes material processing on a material to be processed on the machining device, using an industrial camera to collect an image of the material to be processed, and generating a to-be-recognized material image; based on a processing path of the target milling cutter, performing image recognition on the to-be-recognized material image, determining a boundary number of a target boundary existing in the to-be-recognized material image, and based on the boundary number, calibrating the candidate milling cutter length to determine a target milling cutter length; wherein the target boundary refers to a boundary formed after the material to be processed is processed by the milling cutter.
2. The method of claim 1, wherein, The step of based on the processing path of the target milling cutter, performing image recognition on the to-be-recognized material image, determining a boundary number of a target boundary existing in the to-be-recognized material image, and based on the boundary number, calibrating the candidate milling cutter length, comprises the following steps: using a Hough straight line detection algorithm to perform straight line fitting on the to-be-recognized material image, and determining at least one candidate boundary; determining an included angle between the candidate boundary and a first direction of the machining device as a first included angle; wherein the first direction refers to a specified positive direction of an X axis of the machining device; based on the first included angle and a second included angle, determining whether the candidate boundary belongs to the target boundary; wherein the second included angle is used to represent an included angle between a milling cutter processing path direction and the first direction of the machining device; based on the boundary number of the target boundary and the candidate milling cutter length, calibrating the candidate milling cutter length.
3. The method of claim 2, wherein, The step of based on the boundary number of the target boundary and the candidate milling cutter length, calibrating the candidate milling cutter length, comprises the following steps: determining an actual step number of the material to be processed after processing according to the boundary number of the target boundary; based on the actual step number, the candidate milling cutter length, and an expected step number of the material to be processed, calibrating the candidate milling cutter length; wherein the expected step number is used to represent an expected processing effect of the material to be processed before processing.
4. The method according to claim 2, characterized in that, After the step of based on the first included angle and the second included angle, determining whether the candidate boundary belongs to the target boundary, the method further comprises the following step: based on a preset pixel number threshold, screening the target boundary, and filtering the target boundary with a pixel point number less than the preset pixel number threshold.
5. The method of claim 1, wherein, After the step of generating the to-be-recognized material image, the method further comprises the following steps: performing Gaussian filtering processing on the to-be-recognized material image, and performing gray value normalization processing on the to-be-recognized material image to generate a binary boundary image corresponding to the to-be-recognized material image; and performing non-maximum suppression on a gray gradient amplitude according to a gray gradient amplitude and a direction of each pixel point in the to-be-recognized material image.
6. The method of claim 1, wherein, The industrial camera is fixedly arranged on a rack of the machining device, a lens axis of the industrial camera is perpendicular to a step surface of the material to be processed, and a lens field of view of the industrial camera covers all processing regions of the material to be processed.
7. A device for measuring the length of a milling cutter, characterized in that The method comprises the following steps: The milling cutter loading module is used to obtain a candidate milling cutter length of a target milling cutter and load the target milling cutter to a machining device; wherein the candidate milling cutter length is a milling cutter length to be calibrated; The image acquisition module is used to acquire an image of the machined material by using an industrial camera after the target milling cutter completes machining on the machined material on the machining device, and generate a to-be-recognized material image; The length calibration module is used to perform image recognition on the to-be-recognized material image based on a machining path of the target milling cutter, determine a boundary number of a target boundary existing in the to-be-recognized material image, and calibrate the candidate milling cutter length based on the boundary number to determine a target milling cutter length; wherein the target boundary refers to a boundary formed after the machined material is machined by the milling cutter.
8. An electronic device, comprising: Comprise: One or more processors; Memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the milling cutter length measurement method of any one of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the milling cutter length measurement method of any one of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the milling cutter length measurement method according to any one of claims 1-6.