Milling cutter shape three-dimensional reconstruction method based on multi-scale fusion view angle

By pre-processing and depth image generation of milling cutters based on multi-scale fusion perspective methods, the problem that the prior art cannot provide the three-dimensional morphology information of milling cutters is solved, and high-precision three-dimensional reconstruction and wear detection are achieved.

CN119941978APending Publication Date: 2025-05-06GENERAL TECH GRP MASCH TOOL ENG RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411802113.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art cannot provide three-dimensional morphological information of milling cutters and cannot fully reflect the tool wear.

Method used

Using a method based on a multi-scale fusion viewing angle, the image is preprocessed by acquiring the sequence of images to be processed, the focus evaluation value of each pixel position is determined, the target depth image is generated, and the three-dimensional reconstruction of the milling cutter is performed based on this.

Benefits of technology

High-precision three-dimensional reconstruction of the milling cutter morphology is realized, accurate milling cutter 3-dimensional morphology information is provided, and the tool wear situation can be more comprehensively reflected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941978A_ABST
    Figure CN119941978A_ABST
Patent Text Reader

Abstract

The invention provides a milling cutter morphology three-dimensional reconstruction method based on a multi-scale fusion view angle, and the method comprises the steps: obtaining a to-be-processed image sequence, carrying out the preprocessing of images in the to-be-processed image sequence, and obtaining a plurality of processed images, and the to-be-processed image sequence is obtained through the imaging of a to-be-reconstructed milling cutter; based on the gray value of each pixel position in the processed image, a focusing evaluation value of each pixel position under each imaging focal length is determined, and the focusing evaluation value reflects the imaging definition degree; determining a depth value corresponding to each pixel position based on the focusing evaluation value of each pixel position under different imaging focal lengths, and generating a target depth image based on the depth value of each pixel position; and performing three-dimensional reconstruction on the to-be-reconstructed milling cutter based on the target depth image and the processing image. According to the method, high-precision three-dimensional reconstruction of the shape of the milling cutter can be realized, and accurate three-dimensional shape information of the milling cutter is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspectives. Background Art

[0002] Milling cutter wear has a significant impact on the surface integrity of the milled workpiece, so milling cutter wear detection is crucial in precision machining research. Excessive wear of the milling cutter will lead to increased cutting forces, increased cutting temperatures, and may induce vibration. The evaluation of tool wear depends on multiple key parameters, including cutting forces, vibrations, sound, spindle power, cutting temperatures, and geometric characteristics. Milling cutters are particularly complex to evaluate wear status due to their different diameters, tip angles, and complex geometric structures.

[0003] At present, the detection methods of milling cutter wear mainly include indirect methods, which mainly focus on acoustic emission signals, vibration signals, cutting force signals and two-dimensional tool images to monitor the status of milling cutters. However, the indirect method cannot provide three-dimensional morphological information of the milling cutter and cannot fully reflect the wear of the tool. Summary of the invention

[0004] The present invention provides a three-dimensional reconstruction method of milling cutter shape based on multi-scale fusion perspective, which is used to solve the defect that the prior art cannot provide three-dimensional shape information of the milling cutter, realize three-dimensional reconstruction of the milling cutter shape, and provide accurate three-dimensional shape information of the milling cutter.

[0005] The present invention provides a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective, comprising: Acquire a sequence of images to be processed, and pre-process the images in the sequence of images to be processed to obtain a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; Determining a focus evaluation value of each pixel position at each imaging focal length based on a grayscale value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; Determine the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position at different imaging focal lengths, and generate a target depth image based on the depth value of each pixel position; Based on the target depth image and the processed image, the milling cutter to be reconstructed is three-dimensionally reconstructed.

[0006] According to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention, the images in the image sequence to be processed are preprocessed to obtain multiple processed images, including: The images in the to-be-processed image sequence are subjected to rolling guided filtering processing to obtain a plurality of the processed images.

[0007] According to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention, the image sequence to be processed includes multiple image groups, each image group includes multiple images, and the images in an image group correspond to the same imaging focal length. The step of obtaining the image sequence to be processed includes: Imaging the milling cutter to be reconstructed in various lighting scenes at the same imaging focal length to obtain an image in the image group; The subarea lights turned on in each lighting scene are different, and the subarea lights are set at different positions of the milling cutter to be reconstructed.

[0008] According to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention, the focusing evaluation value of each pixel position at each imaging focal length is determined based on the gray value of each pixel position in the processed image, including: The focus evaluation value of the target pixel position at the target focal length is determined by a preset formula, and the preset formula is: ; in, Indicates the target pixel position The focus evaluation value, For is the local window centered on is the Laplace operator and A gradient matrix obtained by convolution, Indicates the pixel position in the i-th image in the image group corresponding to the target focal length The gray value at , a and b are weight coefficients.

[0009] According to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention, the focus evaluation value of each pixel position under different imaging focal lengths is used to determine the depth value corresponding to each pixel position, including: Fitting the focus evaluation values ​​at target pixel positions at different imaging focal lengths to obtain a fitting curve, and determining an optimal focus evaluation value based on the fitting curve; The depth value corresponding to the target pixel position is determined based on the imaging focal length value corresponding to the optimal focus evaluation value.

[0010] According to a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention, the target depth image is generated based on the depth value of each pixel position, including: The depth values ​​of each pixel position are combined according to the pixel position to obtain an initial depth image; Using different window sizes to smooth the depth values ​​in the initial depth image to obtain a plurality of processed depth images; The initial depth images are fused to obtain the target depth image.

[0011] The present invention also provides a device for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective, comprising: An image preprocessing module is used to obtain a sequence of images to be processed, and preprocess the images in the sequence of images to be processed to obtain a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; A focus evaluation module, used to determine a focus evaluation value of each pixel position at each imaging focal length based on the gray value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; A depth information acquisition module, used to determine the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position under different imaging focal lengths, and generate a target depth image based on the depth value of each pixel position; A three-dimensional reconstruction module is used to perform three-dimensional reconstruction of the milling cutter to be reconstructed based on the target depth image and the processed image.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements any of the above-mentioned methods for three-dimensional reconstruction of milling cutter morphology based on multi-scale fusion perspectives.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for three-dimensional reconstruction of milling cutter morphology based on multi-scale fusion perspective as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for three-dimensional reconstruction of milling cutter morphology based on multi-scale fusion perspectives.

[0015] The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention obtains a sequence of images to be processed, pre-processes the images in the sequence of images to be processed, and obtains multiple processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed, and the order in the sequence of images to be processed corresponds to the imaging focal length; based on the gray value of each pixel position in the processed image, the focus evaluation value of each pixel position under each imaging focal length is determined, and the focus evaluation value reflects the quality of the imaging focal length; based on the focus evaluation value of each pixel position under different imaging focal lengths, the depth value corresponding to each pixel position is determined; based on the depth value of each pixel position, a target depth image is generated, and based on the target depth image and the processed image, the milling cutter to be reconstructed is three-dimensionally reconstructed. In this way, by pre-processing the image sequence, the quality of the milling cutter image is improved, and the best focus position of each pixel position is determined by the focus evaluation value under different focal lengths to generate a depth map for three-dimensional reconstruction, high-precision three-dimensional reconstruction of the milling cutter shape can be achieved, and accurate three-dimensional shape information of the milling cutter can be provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a schematic flow chart of the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention.

[0018] Figure 2 It is a schematic diagram of the image processing process in the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective provided by the present invention.

[0019] Figure 3 It is a schematic diagram of the process of generating a target depth map based on focusing evaluation curve fitting in the three-dimensional reconstruction method of the milling cutter morphology based on multi-scale fusion perspective provided by the present invention.

[0020] Figure 4 It is a reconstruction result diagram based on a multi-partition focusing evaluation operator in the three-dimensional reconstruction method of the milling cutter morphology based on a multi-scale fusion perspective provided by the present invention.

[0021] Figure 5 This is a diagram of the three-dimensional reconstruction results of two milling cutters in an embodiment of the method for three-dimensional reconstruction of milling cutter morphology based on multi-scale fusion perspective provided by the present invention.

[0022] Figure 6 It is a structural schematic diagram of a milling cutter morphology three-dimensional reconstruction device based on multi-scale fusion perspective provided by the present invention.

[0023] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Combine the following Figure 1-Figure 5 The present invention describes a method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective. Figure 1 As shown, the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective includes the following steps: S110, obtaining a sequence of images to be processed, performing filtering processing on images in the sequence of images to be processed, and obtaining a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed, and the order of the images in the sequence of images to be processed corresponds to the imaging focal length; S120, determining a focus evaluation value of each pixel position at each imaging focal length based on the grayscale value of each pixel position in the processed image, where the focus evaluation value reflects the clarity of the imaging; S130, determining a depth value corresponding to each pixel position based on a focus evaluation value of each pixel position at different imaging focal lengths, and generating a target depth image based on the depth value of each pixel position; S140 , performing three-dimensional reconstruction of the milling cutter to be reconstructed based on the target depth image and the processed image.

[0026] The milling cutter to be reconstructed is a milling cutter that needs to be three-dimensionally reconstructed. The method provided by the present invention images the milling cutter to be reconstructed to obtain a sequence of images to be processed, and three-dimensionally reconstructs the milling cutter to be reconstructed based on the sequence of images to be processed, thereby generating three-dimensional morphological information of the milling cutter to be reconstructed, providing data support for wear detection of the milling cutter to be reconstructed.

[0027] The image sequence to be processed is obtained by imaging the milling cutter to be reconstructed. The order of the images in the image sequence to be processed can be based on the imaging focal length, that is, images with the same imaging focal length correspond to the same sequence number in the image sequence to be processed. After the image sequence to be processed is obtained, the image sequence to be processed is preprocessed to improve the image quality.

[0028] In a possible implementation, preprocessing is performed on images in a sequence of images to be processed to obtain a plurality of processed images, including: The images in the image sequence to be processed are processed by rolling guided filtering to obtain multiple processed images.

[0029] In one embodiment of the method provided by the present invention, images in the image sequence to be processed are preprocessed by rolling guided filtering, and the rolling guided filter (RGF) is an improved guided filter. It adapts to the local characteristics of the image by dynamically adjusting the window size, so that a larger window is used in the flat area and a smaller window is used in the edge area, so as to achieve the purpose of better retaining image details while removing noise. The two main processes of RGF include a small structure removal process and an edge recovery process.

[0030] The small structure removal process uses a Gaussian filter to remove small structure information such as texture details. Input image The image (i.e. the image in the image sequence to be processed) after small structure elimination is expressed as: ; in, and represents the pixel coordinates in the image, for The gray value of the point, for The neighborhood pixel set of a point. is the standard deviation, controlling the window size of the Gaussian filter kernel, and the pixel distance is less than The small-scale structure will be smoothed, but at the same time the larger-scale structure will be blurred.

[0031] Edge restoration process: Use bilateral filter (BF, bilateral filter) as a joint filter to gradually restore the large-scale structure edge through iteration. In the first iteration, the image after the small structure is removed in the first step is As the input image and guide image. In the next iteration, the input image is fixed to the original image , and the guidance image is updated to the output of the previous iteration As the number of iterations increases, the large-scale structure and edge information of the image will gradually be restored more clearly. Edge recovery is expressed as: ; in, is the number of iterations, For the The output image of the iteration is and for middle Point and The gray value of the point, is the control range weight.

[0032] The output image of the rolling guided filter can be obtained from the above two formulas: .

[0033] For each image in the to-be-processed image sequence, the above processing method may be used to process it and obtain a corresponding processed image.

[0034] After obtaining the processed image, the focus evaluation value of each pixel position at each imaging focal length is determined based on the grayscale value of each pixel position in the processed image at different imaging focal lengths. The focus evaluation value reflects the clarity of the imaging, that is, the quality of the imaging focal length can be evaluated.

[0035] In a possible implementation of the present invention, in order to further highlight the edges and details of the milling cutter in all directions in the image, a ring light source with different partitions can be used to image the milling cutter to be reconstructed, so as to provide more accurate detail information on the tip of the milling cutter. Specifically, the image sequence to be processed includes multiple image groups, each image group includes multiple images, and the images in an image group correspond to the same imaging focal length. The image sequence to be processed is obtained, including: The milling cutter to be reconstructed is imaged in various lighting scenes at the same imaging focal length to obtain an image in an image group; The partition lights turned on in each lighting scene are different, and each partition light is set at a different position of the milling cutter to be reconstructed.

[0036] like Figure 2 As shown, taking a 4-partitioned ring light source as an example, one partition is opened for imaging each time, and the four-partitioned light source is controlled to realize cyclic acquisition of the milling cutter tip, and the grayscale values ​​of the corresponding pixels of the four images at each step are found. The weighted score pixels are used to calculate the mean and the sum to realize the focus evaluation operator based on multi-partition Laplace. Specifically, based on the grayscale value of each pixel position in the processed image, the focus evaluation value of each pixel position at each imaging focal length is determined, including: The focus evaluation value of the target pixel position at the target focal length is determined by a preset formula, and the preset formula is: ; in, Indicates the target pixel position The focus evaluation value, For is the local window centered on is the Laplace operator and A gradient matrix obtained by convolution, , Indicates the pixel position in the i-th image in the image group corresponding to the target focal length The gray value at , a and b are weight coefficients.

[0037] The value of the Laplace operator L is as follows: .

[0038] In the above formula, a and b are weight coefficients corresponding to the partitions, which are used to adjust the contribution of different partitions. The contribution of each partition is based on the distribution of the milling cutter blade to be reconstructed, for example Figure 2 In the case shown in , we can take a=1 and b=0.5.

[0039] From the previous description, we can see that for a pixel position , for each image group, a corresponding focus evaluation value can be obtained, reflecting the imaging clarity of the pixel position under the imaging focal length corresponding to the image group. In one possible implementation of the method provided by the present invention, the imaging focal length value corresponding to the processed image with the highest corresponding focus evaluation value can be directly selected as the depth value corresponding to the target pixel position. In another possible implementation, the limited focus evaluation values ​​can be fitted to obtain a more accurate optimal focus evaluation value. Specifically, based on the focus evaluation values ​​of each pixel position under different imaging focal lengths, the depth value corresponding to each pixel position is determined, including: Fitting the focus evaluation values ​​of the target pixel positions at different imaging focal lengths to obtain a fitting curve, and determining the optimal focus evaluation value based on the fitting curve; The depth value corresponding to the target pixel position is determined based on the imaging focal length value corresponding to the optimal focus evaluation value.

[0040] In the method provided by the present invention, the focus evaluation values ​​of the pixel positions at different imaging focal lengths are fitted to obtain a fitting curve, such as Figure 3 As shown. The fitting curve can reflect the change in imaging clarity of the pixel position at different focal lengths, and the imaging focal length corresponding to the best focus evaluation value can be obtained based on the fitting curve. Since the focus evaluation curve is discrete and discontinuous, by fitting the focus evaluation curve, the image frame number corresponding to the actual maximum focus evaluation value of each pixel position can be found from the focus evaluation curve to determine the depth information. Fitting operator The focus evaluation curve can be used to find the relationship between each pixel The imaging focal length of the image corresponding to the actual maximum focus evaluation value is the depth information of the point . is given by: ; in, Corresponding to any suitable fitting operator, represents the image focus evaluation value, Indicates the frame (image) number in the image sequence.

[0041] The fitting operator can be a Gaussian interpolation fitting operator, a nearest neighbor interpolation fitting operator, a spline interpolation fitting operator, a polynomial fitting operator, etc. It has been found through research that the focus evaluation value curve shows a Gaussian distribution trend. In the method provided by the present invention, a Gaussian fitting method is used to perform fitting calculation to obtain a fitting curve. Suppose there is a set of test data ( , ), (𝑖= 1,2,3, ⋯ ), it can be described by Gaussian function: ; in, is the optimal focus evaluation value of the focus evaluation curve. is the image number corresponding to the best focus evaluation value, is the standard deviation of the measurement.

[0042] After the above steps, the depth value corresponding to each pixel position can be obtained, and based on the depth value, three-dimensional reconstruction can be achieved, thereby achieving three-dimensional reconstruction without a depth camera. In one possible implementation, three-dimensional reconstruction can be performed directly based on the depth value corresponding to each pixel position. In one embodiment of the method provided by the present invention, in order to further improve the accuracy of the depth information and obtain a more accurate reconstruction result, the depth values ​​corresponding to each pixel position obtained based on the above steps are further processed to generate a target depth image for three-dimensional reconstruction.

[0043] Specifically, based on the depth values ​​of each pixel position, a target depth image is generated, including: The depth values ​​of each pixel position are combined according to the pixel position to obtain an initial depth image; Using different window sizes, the depth values ​​in the initial depth image are smoothed to obtain multiple processed depth images; The initial depth images are fused to obtain the target depth image.

[0044] The method provided by the present invention uses different window sizes to smooth the initial depth image to obtain processed depth images of different levels, and then further fuses them. The depth information of images with different window sizes is fused to produce a more accurate reconstruction result. As the window size decreases, the performance of traditional zoom microscopy methods may produce inaccurate depth information due to poor texture or noise. Conversely, as the window size increases, the depth map may reduce the impact of noise, but may cause over-smoothing.

[0045] In an embodiment of the method provided by the present invention, a weighted hierarchical method is used to consider the depth results of different window sizes. After obtaining the depth value based on the above steps, the height maps of different window sizes are fused to obtain a more accurate reconstruction result. A weighted hierarchical method is used to consider the depth results under different window sizes. Figure 3 As shown, for the initial depth image, four windows of different sizes can be used for smoothing. Specifically, the processed depth images are sorted according to the processing window size to obtain a multi-layer height information image. The highest layer usually contains noise, and the lower layers can be used to estimate the target depth map. Finally, the weight distribution is used to calculate the optimal depth value, as shown in the following formula: ; in are the different weight values ​​assigned to the sorted windows, which are 0.1, 0.2, 0.3, and 0.4 respectively. Indicates the processed depth image under the i-th window size Depth information at.

[0046] By fusing the depth information of different window sizes and combining the advantages and disadvantages of each window, a target depth map that can retain details and has strong noise resistance is generated. The target depth map has both global smoothness and local detail preservation. Based on this target depth map, a more accurate reconstruction result can be finally produced.

[0047] Based on the target depth map and combined with the sample information of the processed image, a 3D shape model of the milling cutter to be reconstructed can be generated. Specifically, for each pixel position , calculate its 3D coordinates according to its depth value in the target depth image: At the same time, the color and texture information of the processed image processed by the rolling guided filter is mapped to the 3D point cloud to generate a complete 3D model.

[0048] The three-dimensional reconstruction result generated by the method provided by the present invention is as follows Figure 4 and Figure 5 As shown, Figure 4 is the reconstruction result based on the multi-partition Laplace focusing evaluation operator, Figure 5 (a) and (b) are the 3D reconstruction results of the two milling cutters respectively.

[0049] In summary, in one embodiment of the method provided by the present invention, the image sequence is preprocessed by a rolling guided filter, which effectively removes small-scale structural noise, while retaining the edges and details of the image, thereby improving the quality of the milling cutter image. Based on the multi-partition Laplace focusing evaluation operator, the edges and details of the image in all directions are highlighted, further improving the clarity and accuracy of the milling cutter morphology. Through the Gaussian fitting algorithm, the optimal focus position of each pixel is accurately obtained, and high-precision three-dimensional reconstruction of the milling cutter morphology is achieved. Through multi-window depth information fusion, the accuracy and reliability of three-dimensional reconstruction are further improved.

[0050] The following is a description of the milling cutter morphology 3D reconstruction device based on multi-scale fusion perspective provided by the present invention. The milling cutter morphology 3D reconstruction device based on multi-scale fusion perspective described below and the milling cutter morphology 3D reconstruction method based on multi-scale fusion perspective described above can be referred to each other. Figure 6 As shown, the milling cutter morphology three-dimensional reconstruction device based on multi-scale fusion perspective provided by the present invention includes: An image preprocessing module 610 is used to obtain a sequence of images to be processed, preprocess the images in the sequence of images to be processed, and obtain a plurality of processed images. The sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; A focus evaluation module 620 is used to determine a focus evaluation value of each pixel position at each imaging focal length based on the gray value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; The depth information acquisition module 630 is used to determine the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position under different imaging focal lengths, and generate a target depth image based on the depth value of each pixel position; The three-dimensional reconstruction module 640 is used to perform three-dimensional reconstruction of the milling cutter to be reconstructed based on the target depth image and the processed image.

[0051] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a method for three-dimensional reconstruction of the milling cutter shape based on a multi-scale fusion perspective, the method comprising: obtaining a sequence of images to be processed, pre-processing the images in the sequence of images to be processed, and obtaining a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; based on the gray value of each pixel position in the processed image, determining the focus evaluation value of each pixel position at each imaging focal length, the focus evaluation value reflecting the imaging clarity; based on the focus evaluation value of each pixel position at different imaging focal lengths, determining the depth value corresponding to each pixel position, and generating a target depth image based on the depth value of each pixel position; and based on the target depth image and the processed image, performing three-dimensional reconstruction on the milling cutter to be reconstructed.

[0052] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0053] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the three-dimensional reconstruction method of the milling cutter morphology based on a multi-scale fusion perspective provided by the above-mentioned methods, and the method includes: obtaining a sequence of images to be processed, preprocessing the images in the sequence of images to be processed, and obtaining multiple processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; based on the grayscale value of each pixel position in the processed image, determining the focus evaluation value of each pixel position at each imaging focal length, and the focus evaluation value reflects the clarity of the imaging; based on the focus evaluation value of each pixel position at different imaging focal lengths, determining the depth value corresponding to each pixel position, and generating a target depth image based on the depth value of each pixel position; based on the target depth image and the processed image, performing three-dimensional reconstruction of the milling cutter to be reconstructed.

[0054] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the three-dimensional reconstruction method of the milling cutter morphology based on a multi-scale fusion perspective provided by the above-mentioned methods, the method comprising: acquiring a sequence of images to be processed, preprocessing the images in the sequence of images to be processed, and obtaining a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; determining a focus evaluation value of each pixel position at each imaging focal length based on the grayscale value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; determining a depth value corresponding to each pixel position based on the focus evaluation value of each pixel position at different imaging focal lengths, and generating a target depth image based on the depth value of each pixel position; and reconstructing the milling cutter to be reconstructed in three dimensions based on the target depth image and the processed image.

[0055] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0056] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for three-dimensional reconstruction of milling cutter morphology based on multi-scale fusion perspective, characterized in that: include: Acquire a sequence of images to be processed, and pre-process the images in the sequence of images to be processed to obtain a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; Determining a focus evaluation value of each pixel position at each imaging focal length based on a grayscale value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; Determine the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position at different imaging focal lengths, and generate a target depth image based on the depth value of each pixel position; Based on the target depth image and the processed image, the milling cutter to be reconstructed is three-dimensionally reconstructed.

2. The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective according to claim 1 is characterized in that: The preprocessing of the images in the to-be-processed image sequence to obtain a plurality of processed images comprises: The images in the to-be-processed image sequence are subjected to rolling guided filtering processing to obtain a plurality of the processed images.

3. The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective according to claim 1, characterized in that: The image sequence to be processed includes a plurality of image groups, each image group includes a plurality of images, and the images in an image group correspond to the same imaging focal length. The step of acquiring the image sequence to be processed includes: Imaging the milling cutter to be reconstructed in various lighting scenes at the same imaging focal length to obtain an image in the image group; The subarea lights turned on in each lighting scene are different, and the subarea lights are set at different positions of the milling cutter to be reconstructed.

4. The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective according to claim 3 is characterized in that: Determining the focus evaluation value of each pixel position at each imaging focal length based on the grayscale value of each pixel position in the processed image includes: The focus evaluation value of the target pixel position at the target focal length is determined by a preset formula, and the preset formula is: ; in, Indicates the target pixel position The focus evaluation value, For is the local window centered on is the Laplace operator and A gradient matrix obtained by convolution, Indicates the pixel position in the i-th image in the image group corresponding to the target focal length The gray value at , a and b are weight coefficients.

5. The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective according to claim 1, characterized in that: The determining of the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position at different imaging focal lengths includes: Fitting the focus evaluation values ​​at target pixel positions at different imaging focal lengths to obtain a fitting curve, and determining an optimal focus evaluation value based on the fitting curve; The depth value corresponding to the target pixel position is determined based on the imaging focal length value corresponding to the optimal focus evaluation value.

6. The method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective according to claim 1, characterized in that: The method of generating a target depth image based on the depth value of each pixel position includes: The depth values ​​of each pixel position are combined according to the pixel position to obtain an initial depth image; Using different window sizes to smooth the depth values ​​in the initial depth image to obtain a plurality of processed depth images; The initial depth images are fused to obtain the target depth image.

7. A three-dimensional reconstruction device for milling cutter morphology based on multi-scale fusion perspective, characterized in that: include: An image preprocessing module is used to obtain a sequence of images to be processed, and preprocess the images in the sequence of images to be processed to obtain a plurality of processed images, wherein the sequence of images to be processed is obtained by imaging the milling cutter to be reconstructed; A focus evaluation module, used to determine a focus evaluation value of each pixel position at each imaging focal length based on the gray value of each pixel position in the processed image, wherein the focus evaluation value reflects the clarity of the imaging; A depth information acquisition module, used to determine the depth value corresponding to each pixel position based on the focus evaluation value of each pixel position under different imaging focal lengths, and generate a target depth image based on the depth value of each pixel position; A three-dimensional reconstruction module is used to perform three-dimensional reconstruction of the milling cutter to be reconstructed based on the target depth image and the processed image.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for three-dimensional reconstruction of milling cutter shape based on multi-scale fusion perspective as described in any one of claims 1 to 6 is implemented.