Visual positioning method of laser marking software
By using adjustable multi-light source illumination, polarization filter and distributed system architecture in laser marking, the problem that laser marking visual positioning method in the prior art is difficult to take into account between operating cost and processing efficiency, and the laser marking effect with high precision and high speed is achieved.
Patent Information
- Application Number
- CN202411927874.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing laser marking visual positioning methods are difficult to take into account both the operating cost and the processing efficiency, the hardware requirements are demanding and the software's feasibility and effectiveness are limited, making it difficult to achieve both the marking accuracy and speed.
Adjustable multi-light source illumination and polarization filters are used for multi-angle imaging, combined with adaptive image processing algorithms and image fusion technology, and the distributed system architecture is used to decompose image processing tasks and process them in parallel to monitor and manage laser marking speed.
It improves the application efficiency of laser marking, meets the requirements of accuracy and speed, and reduces the operating cost of visual positioning, achieving a balance between complexity and operating efficiency.
Smart Images

Figure CN119693450A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of laser marking, and more specifically, to a visual positioning method of laser marking software. Background Art
[0002] Laser marking is a method of using a high-energy laser beam to make permanent marks on the surfaces of various materials. Visual positioning is a technology used to ensure marking accuracy and consistency during the laser marking process. Through cameras, image processing algorithms and computer systems, the position, direction and shape of the marked object can be accurately located, thereby guiding the laser marking machine to mark in the correct position. The visual positioning method used in industry faces a dilemma between operating costs and processing efficiency. The visual positioning technology based on computer vision not only has strict requirements on hardware such as cameras and laser equipment, but also has certain requirements on the feasibility and effectiveness of software such as image processing and pattern recognition. The existing visual positioning method used in laser marking meets the requirements of high precision and high speed, but it is difficult to control the operating cost of the overall laser marking system. Using low-level computing resources to control costs will cause stability problems in marking accuracy and marking speed that are difficult to achieve at the same time.
[0003] In order to solve the above defects, a technical solution is now proposed. Summary of the invention
[0004] The purpose of the present invention is to provide a visual positioning method for laser marking software to solve the problems in the above-mentioned background technology.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a visual positioning method of laser marking software, the specific steps of which include irradiating the object to be marked with adjustable multi-light source illumination, performing multi-angle imaging of the object to be marked with a camera based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions;
[0006] Shoot the object to be marked from multiple different angles, use adaptive image processing algorithms to process images acquired under different lighting conditions, and use image fusion technology to obtain artifact-free images;
[0007] A distributed system architecture is used to decompose image processing tasks and distribute them to multiple computing nodes for parallel processing. The complexity and maintainability of adjustable multi-light source illumination, multi-angle imaging, and distributed computing framework are evaluated.
[0008] According to the evaluation results of complexity and maintainability, the upper limit of laser marking speed is determined in combination with the accuracy and quality of visual positioning, and the laser marking speed is monitored and managed.
[0009] Preferably, the method for evaluating the positioning accuracy and image quality under different lighting conditions is:
[0010] The calibration positioning deviation span value is PD v , v is the index of different positioning accuracy evaluation indicators, and v = {1, 2, 3…b}, where b is a positive integer, the positioning accuracy evaluation indicators include the mean positioning error MPE, the maximum positioning error MaxPE and the standard deviation SD, and the calibration image quality span value is IQ s , s is the index of the image quality evaluation index, and s = {1, 2, 3…d}, where d is a positive integer. The image quality evaluation index includes peak signal-to-noise ratio PSNR and contrast CT. The positioning accuracy and image quality under different lighting conditions are evaluated by calculating the difference between the acquired image and the reference image, and the difference between the actual positioning accuracy and the reference accuracy. The calculation method is: Where DC is the illumination difference coefficient for evaluating the degree of difference, MaxCan is the highest light intensity in the illumination condition, MinCan is the lowest light intensity in the illumination condition, and SSIM is i is the structural similarity index, i is the index of the structural similarity index between the different images and the reference image, and i is a positive integer.
[0011] Preferably, the peak signal-to-noise ratio is calculated as follows:
[0012] Calculate the square of the difference between each pixel value in the acquired image and the corresponding pixel value in the reference image to obtain the square error value, add all the square error values and divide them by the total number of pixels to obtain the mean square error MSE, and calculate the peak signal-to-noise ratio PSNR based on the mean square error. The calculation expression is: Where MAX is the maximum pixel value of the image.
[0013] Preferably, the structural similarity index SSIM i The calculation method is:
[0014] Calculate the mean μ, variance σ and covariance σ of the acquired image and the reference image respectively xy , with mean representing brightness, variance representing contrast, and covariance representing structural similarity, then the brightness comparison function is The contrast comparison function is The structural similarity comparison function is In the formula, x and y represent the reference image and the acquired image respectively, C1, C2, and C3 are small positive constants used to avoid division by zero, then SSIM i =[L(x,y)] p ·[C(x,y)] k ·[S(x,y)] j , p, k, l are weight coefficients and p, k, l are all positive integers.
[0015] Preferably, the method of using an adaptive image processing algorithm to process images acquired under different lighting conditions is:
[0016] The captured images are processed using feature point detection algorithms to detect and match the same feature points in the images to ensure spatial alignment of the images. According to the correspondence between the feature points, the images are translated, rotated, scaled, and perspective transformed so that all images are aligned in the same coordinate system. The aligned images are then denoised.
[0017] The method of fusing the denoised image includes:
[0018] Perform pixel fusion on images, and select the pixel value with the largest amount of information from multiple images for fusion based on the maximum entropy principle;
[0019] Perform multi-scale fusion on the image, decompose the image into frequency components of different scales by constructing the Laplacian pyramid of the image, and reconstruct the image through inverse transformation after fusion at each scale;
[0020] Perform feature-based fusion on the image, and fuse each area according to the segmented area or feature of the image;
[0021] The method for pixel fusion based on the maximum entropy principle is:
[0022] Calculate the probability of each pixel value in the image and calculate the entropy of the entire image based on the probability;
[0023] For the pixel position to be fused, the local entropy of the pixel values of different images at the pixel position to be fused is calculated respectively, and the pixel value with the maximum local entropy is taken as the pixel value after fusion;
[0024] Different weights are assigned to each pixel value according to the reliability of different images in the fusion process, and the weighted sum is calculated as the pixel value after fusion. The weight allocation is based on the entropy, clarity, and contrast indicators of the image;
[0025] The method of multi-scale fusion of images by constructing the Laplacian pyramid of the image is:
[0026] Perform Gaussian blur and down-sampling operations on the original image to generate images with gradually reduced resolutions, forming a Gaussian pyramid;
[0027] Starting from each layer of the Gaussian pyramid, upsample the current layer image and make it the same size as the next layer image, subtract the upsampled image from the Gaussian pyramid image of the next layer to get the Laplacian pyramid image of the current layer;
[0028] The fusion rule is determined based on the weighted average of pixel values and the selection based on gradient information, and the Laplacian pyramid of the fused image is fused according to the fusion rule at the corresponding scale;
[0029] Starting from the top layer of the fused Laplacian pyramid, upsampling and adding operations are performed layer by layer. The top Laplacian pyramid image is upsampled to the size of the next layer, and added to the Laplacian pyramid image of the next layer to obtain the reconstructed image of the layer;
[0030] The reconstructed image is upsampled and added to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally a fused image is obtained.
[0031] Preferably, the method of using a distributed system architecture to decompose the image processing task and distribute it to multiple computing nodes for parallel processing is:
[0032] Decompose the image processing task into multiple subtasks, determine the task granularity according to the complexity of image processing and computing resources, determine the dependencies between the subtasks, avoid data dependency conflicts when assigning tasks, configure multiple computing nodes, including physical servers, virtual machines, and containers, design inter-node communication mechanisms to ensure that computing nodes can quickly exchange processing results and data, and design task scheduling strategies to assign image processing tasks to various computing nodes;
[0033] The complete image is divided into multiple small blocks, and each small block is processed independently. For feature extraction and edge detection processing tasks, the image is decomposed into different regions according to the regional characteristics of the image, and each region is processed by a computing node;
[0034] Decompose the image processing task into steps and assign different steps to different nodes. For batch processing of multiple images, assign the task to multiple nodes for processing at the same time.
[0035] Slice the image data and distribute the sliced data to multiple computing nodes, deploy a distributed processing framework to distribute the image processing tasks in parallel;
[0036] Use a distributed file system to store and manage image data, merge the image blocks or regional results processed by each node into a complete image, transmit and integrate the intermediate processing results of each node in sequence, and output the processing results.
[0037] The preferred method for evaluating complexity and maintainability is:
[0038] Analyze the functions and interface complexity of adjustable multi-light source lighting, multi-angle imaging, and distributed computing frameworks, and analyze the data transfer paths between components by drawing data flow diagrams;
[0039] Evaluate the hardware complexity of adjustable multi-light source illumination and multi-angle imaging, including the feasibility of light source adjustment, synchronization and calibration of imaging equipment, and equipment compatibility; analyze the interface complexity of hardware control and software integration; and evaluate the stability and reliability of communication protocols;
[0040] Define key performance indicators and conduct stress tests simulating actual usage environments to evaluate the system's performance under high load conditions. Establish a risk assessment model to calculate the cumulative fatigue of visual positioning. The calculation method is: In the formula, A c is the cumulative fatigue, D t is the number of data transmission paths, M c is the average maintenance period of hardware equipment, C n is the number of computing nodes in the distributed framework.
[0041] Preferably, the logic for monitoring and managing the laser marking speed is:
[0042] Experiments were conducted at different laser marking speeds, and the visual positioning accuracy and image quality at each speed were recorded. The relationship curve between speed, positioning accuracy, and image quality was plotted based on the experimental results to obtain the critical point of performance. The highest marking speed corresponding to the critical accuracy threshold was found on the relationship curve as the upper speed limit.
[0043] When the calculated cumulative fatigue degree A c Below the preset fatigue threshold T a And the illumination difference coefficient DC is greater than the preset difference threshold DC t When the laser marking speed reaches the upper limit, there is no running obstacle.
[0044] When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a Or the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking meets the upper speed limit, there are hidden dangers in operation;
[0045] When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a And the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking speed reaches the upper limit, it cannot reach the upper limit.
[0046] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0047] This application effectively improves the actual application efficiency of laser marking by optimizing the visual positioning method in laser marking, fully explores the working limits of software and hardware equipment in laser marking, meets the accuracy requirements of laser marking, and uses a distributed framework to disperse computing resources, lower the resource threshold of visual image processing, and reduces the dimension of laser marking image processing based on the complexity and maintainability of comprehensive visual positioning, effectively sharing the overall operating cost of visual positioning, while ensuring the requirements of laser marking accuracy and speed, and achieving a balance between complexity and operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0049] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0051] Example 1: Please refer to Figure 1 As shown, the present invention is a visual positioning method for laser marking software, and the specific steps include irradiating the object to be marked with adjustable multi-light source illumination, performing multi-angle imaging of the object to be marked with a camera based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions;
[0052] Shoot the object to be marked from multiple different angles, use adaptive image processing algorithms to process images acquired under different lighting conditions, and use image fusion technology to obtain artifact-free images;
[0053] A distributed system architecture is used to decompose image processing tasks and distribute them to multiple computing nodes for parallel processing. The complexity and maintainability of adjustable multi-light source illumination, multi-angle imaging, and distributed computing framework are evaluated.
[0054] According to the evaluation results of complexity and maintainability, the upper limit of laser marking speed is determined in combination with the accuracy and quality of visual positioning, and the laser marking speed is monitored and managed.
[0055] Adjustable multi-light source lighting evenly illuminates the target area by combining light sources of different angles and types to reduce the impact of surface reflections. The light source types of adjustable multi-light source lighting include ring light sources, diffuse light sources, oblique light sources, backlight sources, etc. The ring light sources are evenly distributed around the camera lens to provide uniform, shadowless lighting to eliminate the highlights caused by surface reflections; diffuse light sources diffuse light through scattering materials or light masks to form a soft lighting effect, which is used to reduce direct reflections to illuminate complex surfaces or materials with high reflectivity; oblique light sources project light from different angles so that the light hits the surface of the object at a lower incident angle to reduce the formation of strong reflected light on convex or concave surfaces; the backlight source is located on the back of the object to enhance the object contour and make edge detection clearer;
[0056] Adjustable multi-light source lighting sets the light source at different angles, including 0°, 45°, 90° and other positions. Through illumination at different angles, different areas of the object surface are covered to avoid strong reflection in a certain direction. A ring light source is arranged around the camera lens to ensure that the light is evenly distributed in all directions of the object to reduce the formation of local bright spots and shadows. The brightness and angle of each light source are dynamically adjusted according to the shape of the object, surface characteristics and shooting angle;
[0057] In a specific embodiment, the intensity and position of the light source are adjusted by a light source controller to adapt to the lighting requirements of different surfaces.
[0058] Adjustable multi-light source lighting combines and controls different light source types and layout strategies according to the reflective characteristics of the object surface. For example, ring light sources are used for uniform lighting, and diffuse light sources are used to reduce strong reflections and soften light. The combination of multiple light sources can obtain suitable lighting effects in different scenes.
[0059] Polarizing filters are optical filters used to control and filter light with a specific polarization direction. Polarizing filters selectively allow light waves vibrating in a specific direction to pass through, while blocking or reducing light waves vibrating in other directions. Light will be partially or completely polarized during reflection or scattering. Especially when light is reflected from a non-metallic surface, the polarization of the reflected light is strong. Polarizing filters can filter out reflected light in a specific direction, thereby reducing artifacts or light spots caused by reflected light.
[0060] The polarizing filter includes a linear polarizing filter and a circular polarizing filter.
[0061] Multi-angle imaging arranges multiple cameras, which are installed at different angles to simultaneously obtain images of the object to be marked from multiple perspectives. All cameras collect images at the same time to avoid image inconsistency caused by changes in the object or ambient light. Use a synchronization trigger or software to synchronously control the shooting timing of all cameras. The image obtained by each camera may contain different degrees of mirror reflection and artifacts. Multi-angle imaging provides a diverse data basis for subsequent image fusion.
[0062] The specific method for evaluating the positioning accuracy and image quality under different lighting conditions is as follows:
[0063] Calibrate different lighting conditions, including uniform lighting, direct lighting, weak lighting, and mixed lighting. Uniform lighting uses diffuse light sources to create uniform lighting conditions as the benchmark lighting environment. Direct lighting uses spotlights or direct light sources to simulate strong direct light to test performance in strong reflection or high light environments. Weak light reduces the ambient light intensity or uses partial occlusion to simulate low light or shadow conditions. Mixed lighting combines different types of light sources to create complex lighting environments, such as strong light in some areas and shadows in some areas, to test the adaptability of visual positioning under non-uniform lighting.
[0064] The image quality is evaluated by obtaining high-quality images under uniform illumination, and the actual position of the target is determined by using high-precision measuring equipment as the benchmark for positioning accuracy evaluation;
[0065] Collect image data of the same object or scene under different lighting conditions, ensure that other variables in the collection process remain consistent, use multi-angle imaging to take images from different angles under each lighting condition to fully evaluate the visual positioning performance, use visual positioning to automatically calibrate and record the position data of the target under different lighting conditions, and perform manual verification to ensure the accuracy of the automatic positioning results, calculate the average positioning error, maximum positioning error and standard deviation under each lighting condition, and evaluate the impact of lighting on positioning accuracy by comparing the error data under different lighting conditions;
[0066] The calibration positioning deviation span value is PD v , v is the index of different positioning accuracy evaluation indicators, and v = {1, 2, 3…b}, where b is a positive integer, the positioning accuracy evaluation indicators include the mean positioning error MPE, the maximum positioning error MaxPE and the standard deviation SD, and the calibration image quality span value is IQ s, s is the index of the image quality evaluation index, and s = {1, 2, 3…d}, where d is a positive integer. The image quality evaluation index includes peak signal-to-noise ratio PSNR and contrast CT. The positioning accuracy and image quality under different lighting conditions are evaluated by calculating the difference between the acquired image and the reference image, and the difference between the actual positioning accuracy and the reference accuracy. The calculation method is: Where DC is the illumination difference coefficient for evaluating the degree of difference, MaxCan is the highest light intensity in the illumination condition, MinCan is the lowest light intensity in the illumination condition, and SSIM is i is the structural similarity index, i is the index of the structural similarity index between the different images and the reference image, and i is a positive integer.
[0067] The peak signal-to-noise ratio is calculated as:
[0068] Calculate the square of the difference between each pixel value in the acquired image and the corresponding pixel value in the reference image to obtain the square error value, add all the square error values and divide them by the total number of pixels to obtain the mean square error MSE, and calculate the peak signal-to-noise ratio PSNR based on the mean square error. The calculation expression is: Where MAX is the maximum pixel value of the image.
[0069] Structural Similarity Index SSIM i The calculation method is:
[0070] Calculate the mean μ, variance σ and covariance σ of the acquired image and the reference image respectively xy , with mean representing brightness, variance representing contrast, and covariance representing structural similarity, then the brightness comparison function is The contrast comparison function is The structural similarity comparison function is In the formula, x and y represent the reference image and the acquired image respectively, C1, C2, and C3 are small positive constants used to avoid division by zero, then SSIM i =[L(x,y)] p ·[C(x,y)] k ·[S(x,y)] j , p, k, l are weight coefficients and p, k, l are all positive integers.
[0071] High-precision measurement equipment such as laser rangefinders or calibration plates. Other variables in the acquisition process include parameters such as camera position and focal length.
[0072] Adaptive image processing algorithms are used to process images acquired under different lighting conditions, and image fusion technology is used to obtain artifact-free images;
[0073] Analyze the grayscale histogram of the image to determine the overall brightness distribution of the image, calculate the average brightness of the image or use the data of the light intensity sensor to determine the current lighting conditions, normalize the image, apply histogram equalization to enhance the image contrast, use the CLAHE algorithm to avoid noise amplification caused by over-enhancement, and improve local contrast, use gamma correction to adjust the brightness of the image, enhance image details through an adaptive nonlinear sharpening algorithm, dynamically adjust the weight of the Laplacian operator according to the lighting conditions, while enhancing the image edges, avoid introducing unnecessary artifacts in high or low light conditions, and perform HDR synthesis by taking multiple images under different exposure conditions to cover all brightness details in the scene;
[0074] The captured images are processed using feature point detection algorithms to detect and match the same feature points in the images to ensure spatial alignment of the images. According to the correspondence between the feature points, the images are translated, rotated, scaled, and perspective transformed so that all images are aligned in the same coordinate system. The aligned images are then denoised.
[0075] The method of fusing the denoised image includes:
[0076] Perform pixel fusion on images, and select the pixel value with the largest amount of information from multiple images for fusion based on the maximum entropy principle;
[0077] Perform multi-scale fusion on the image, decompose the image into frequency components of different scales by constructing the Laplacian pyramid of the image, and reconstruct the image through inverse transformation after fusion at each scale;
[0078] The images are fused based on features, and each area is fused according to the segmented area or features of the image.
[0079] It should be noted that the features include edges, textures, etc. The weighted average method is used in the smooth area, and the maximum gradient method is used in the edge area to retain important structural information.
[0080] The method for pixel fusion based on the maximum entropy principle is:
[0081] Calculate the probability of each pixel value in the image and calculate the entropy of the entire image based on the probability;
[0082] For the pixel position to be fused, the local entropy of the pixel values of different images at the pixel position to be fused is calculated respectively, and the pixel value with the maximum local entropy is taken as the pixel value after fusion;
[0083] Different weights are assigned to each pixel value according to the reliability of different images in the fusion process, and the weighted sum is calculated as the fused pixel value. The weight allocation is based on the entropy, clarity, and contrast indicators of the image.
[0084] The method of multi-scale fusion of images by constructing the Laplacian pyramid of the image is:
[0085] Perform Gaussian blur and down-sampling operations on the original image to generate images with gradually reduced resolutions, forming a Gaussian pyramid;
[0086] Starting from each layer of the Gaussian pyramid, upsample the current layer image and make it the same size as the next layer image, subtract the upsampled image from the Gaussian pyramid image of the next layer to get the Laplacian pyramid image of the current layer;
[0087] The fusion rule is determined based on the weighted average of pixel values and the selection based on gradient information, and the Laplacian pyramid of the fused image is fused according to the fusion rule at the corresponding scale;
[0088] Starting from the top layer of the fused Laplacian pyramid, upsampling and adding operations are performed layer by layer. The top Laplacian pyramid image is upsampled to the size of the next layer, and added to the Laplacian pyramid image of the next layer to obtain the reconstructed image of the layer;
[0089] The reconstructed image is upsampled and added to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally a fused image is obtained.
[0090] It should be noted that each layer of the Gaussian pyramid represents the low-frequency information of the image at different scales. Each layer of the image is obtained by Gaussian blurring and downsampling the previous layer of the image. The Laplacian pyramid image contains the high-frequency information at the current scale. The top-level Laplacian pyramid image is the top-level image of the Gaussian pyramid.
[0091] A distributed system architecture is used to decompose image processing tasks and distribute them to multiple computing nodes for parallel processing. The complexity and maintainability of adjustable multi-light source illumination, multi-angle imaging, and distributed computing framework are evaluated.
[0092] Decompose the image processing task into multiple subtasks, determine the task granularity according to the complexity of image processing and computing resources, determine the dependencies between the subtasks, avoid data dependency conflicts when assigning tasks, configure multiple computing nodes, including physical servers, virtual machines, and containers, design inter-node communication mechanisms to ensure that computing nodes can quickly exchange processing results and data, and design task scheduling strategies to assign image processing tasks to various computing nodes;
[0093] The complete image is divided into multiple small blocks, and each small block is processed independently. For feature extraction and edge detection processing tasks, the image is decomposed into different regions according to the regional characteristics of the image, and each region is processed by a computing node;
[0094] Decompose the image processing task into steps and assign different steps to different nodes. For batch processing of multiple images, assign the task to multiple nodes for processing at the same time.
[0095] Slice the image data and distribute the sliced data to multiple computing nodes, deploy a distributed processing framework to distribute the image processing tasks in parallel;
[0096] Use a distributed file system to store and manage image data, merge the image blocks or regional results processed by each node into a complete image, transmit and integrate the intermediate processing results of each node in sequence, and output the processing results.
[0097] The regional characteristics of the image include texture, brightness, edge density, etc. The task is decomposed into steps such as denoising, enhancement, feature extraction, etc. The slicing logic is such as splitting by row or column. Commonly used distributed processing frameworks include Hadoop MapReduce, Apache Spark, Kubernetes, etc. Commonly used distributed file systems include HDFS, Ceph, GlusterFS, etc.
[0098] The methods for evaluating complexity and maintainability are:
[0099] Analyze the functions and interface complexity of adjustable multi-light source lighting, multi-angle imaging, and distributed computing frameworks, and analyze the data transfer paths between components by drawing data flow diagrams;
[0100] Evaluate the hardware complexity of adjustable multi-light source illumination and multi-angle imaging, including the feasibility of light source adjustment, synchronization and calibration of imaging equipment, and equipment compatibility; analyze the interface complexity of hardware control and software integration; and evaluate the stability and reliability of communication protocols;
[0101] Define key performance indicators and conduct stress tests simulating actual usage environments to evaluate the system's performance under high load conditions. Establish a risk assessment model to calculate the cumulative fatigue of visual positioning. The calculation method is: In the formula, A c is the cumulative fatigue, D t is the number of data transmission paths, M c is the average maintenance period of hardware equipment, C n is the number of computing nodes in the distributed framework.
[0102] Communication protocols such as I2C, SPI, TCP / IP, etc.
[0103] According to the evaluation results of complexity and maintainability, the upper limit of laser marking speed is determined in combination with the accuracy and quality of visual positioning, and the laser marking speed is monitored and managed.
[0104] Experiments were conducted at different laser marking speeds, and the visual positioning accuracy and image quality at each speed were recorded. The relationship curve between speed, positioning accuracy, and image quality was plotted based on the experimental results to obtain the critical point of performance. The highest marking speed corresponding to the critical accuracy threshold was found on the relationship curve as the upper speed limit.
[0105] When the calculated cumulative fatigue degree A c Below the preset fatigue threshold T a And the illumination difference coefficient DC is greater than the preset difference threshold DC t When the laser marking speed reaches the upper limit, there is no running obstacle.
[0106] When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a Or the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking meets the upper speed limit, there are hidden dangers in operation;
[0107] When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a And the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking speed reaches the upper limit, it cannot reach the upper limit.
[0108] This application effectively improves the actual application efficiency of laser marking by optimizing the visual positioning method in laser marking, fully explores the working limits of software and hardware equipment in laser marking, meets the accuracy requirements of laser marking, and uses a distributed framework to disperse computing resources, lower the resource threshold of visual image processing, and reduces the dimension of laser marking image processing based on the complexity and maintainability of comprehensive visual positioning, effectively sharing the overall operating cost of visual positioning, while ensuring the requirements of laser marking accuracy and speed, and achieving a balance between complexity and operating efficiency.
[0109] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0110] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of computer program goods. The computer program goods include one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0111] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0112] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0114] If the functions are implemented in the form of software functional units and sold or used as independent goods, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of software goods, and the computer software goods are stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A visual positioning method for laser marking software, characterized in that: The specific steps include illuminating the object to be marked with adjustable multi-light source illumination, imaging the object to be marked with a camera at multiple angles based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions; Shoot the object to be marked from multiple different angles, use adaptive image processing algorithms to process images acquired under different lighting conditions, and use image fusion technology to obtain artifact-free images; A distributed system architecture is used to decompose image processing tasks and distribute them to multiple computing nodes for parallel processing. The complexity and maintainability of adjustable multi-light source illumination, multi-angle imaging, and distributed computing framework are evaluated. According to the evaluation results of complexity and maintainability, the upper limit of laser marking speed is determined in combination with the accuracy and quality of visual positioning, and the laser marking speed is monitored and managed.
2. The visual positioning method of laser marking software according to claim 1, characterized in that: The method for evaluating positioning accuracy and image quality under different lighting conditions is: The calibration positioning deviation span value is PD v , v is the index of different positioning accuracy evaluation indicators, and v = {1, 2, 3…b}, where b is a positive integer, the positioning accuracy evaluation indicators include the mean positioning error MPE, the maximum positioning error MaxPE and the standard deviation SD, and the calibration image quality span value is IQ s , s is the index of the image quality evaluation index, and s = {1, 2, 3…d}, where d is a positive integer. The image quality evaluation index includes peak signal-to-noise ratio PSNR and contrast CT. The positioning accuracy and image quality under different lighting conditions are evaluated by calculating the difference between the acquired image and the reference image, and the difference between the actual positioning accuracy and the reference accuracy. The calculation method is: Where DC is the illumination difference coefficient for evaluating the degree of difference, MaxCan is the highest light intensity in the illumination condition, MinCan is the lowest light intensity in the illumination condition, and SSIM is i is the structural similarity index, i is the index of the structural similarity index between the different images and the reference image, and i is a positive integer.
3. A visual positioning method for laser marking software according to claim 2, characterized in that: The peak signal-to-noise ratio is calculated as: Calculate the square of the difference between each pixel value in the acquired image and the corresponding pixel value in the reference image to obtain the square error value, add all the square error values and divide them by the total number of pixels to obtain the mean square error MSE, and calculate the peak signal-to-noise ratio PSNR based on the mean square error. The calculation expression is: Where MAX is the maximum pixel value of the image.
4. The visual positioning method of laser marking software according to claim 2, characterized in that: Structural Similarity Index SSIM i The calculation method is: Calculate the mean μ, variance σ and covariance σ of the acquired image and the reference image respectively xy , with mean representing brightness, variance representing contrast, and covariance representing structural similarity, then the brightness comparison function is The contrast comparison function is The structural similarity comparison function is In the formula, x and y represent the reference image and the acquired image respectively, C1, C2, and C3 are small positive constants used to avoid division by zero, then SSIM i =L(x,y)] p ·[C(x,y)] k ·[S(x,y)] j , p, k, l are weight coefficients and p, k, l are all positive integers.
5. The visual positioning method of laser marking software according to claim 1, characterized in that: The method of using adaptive image processing algorithms to process images acquired under different lighting conditions is: The captured images are processed using feature point detection algorithms to detect and match the same feature points in the images to ensure spatial alignment of the images. According to the correspondence between the feature points, the images are translated, rotated, scaled, and perspective transformed so that all images are aligned in the same coordinate system. The aligned images are then denoised. The method of fusing the denoised image includes: Perform pixel fusion on images, and select the pixel value with the largest amount of information from multiple images for fusion based on the maximum entropy principle; Perform multi-scale fusion on the image, decompose the image into frequency components of different scales by constructing the Laplacian pyramid of the image, and reconstruct the image through inverse transformation after fusion at each scale; Perform feature-based fusion on the image, and fuse each area according to the segmented area or feature of the image; The method for pixel fusion based on the maximum entropy principle is: Calculate the probability of each pixel value in the image and calculate the entropy of the entire image based on the probability; For the pixel position to be fused, the local entropy of the pixel values of different images at the pixel position to be fused is calculated respectively, and the pixel value with the maximum local entropy is taken as the pixel value after fusion; Different weights are assigned to each pixel value according to the reliability of different images in the fusion process, and the weighted sum is calculated as the pixel value after fusion. The weight allocation is based on the entropy, clarity, and contrast indicators of the image; The method of multi-scale fusion of images by constructing the Laplacian pyramid of the image is: Perform Gaussian blur and down-sampling operations on the original image to generate images with gradually reduced resolutions, forming a Gaussian pyramid; Starting from each layer of the Gaussian pyramid, upsample the current layer image and make it the same size as the next layer image, subtract the upsampled image from the Gaussian pyramid image of the next layer to get the Laplacian pyramid image of the current layer; The fusion rule is determined based on the weighted average of pixel values and the selection based on gradient information, and the Laplacian pyramid of the fused image is fused according to the fusion rule at the corresponding scale; Starting from the top layer of the fused Laplacian pyramid, upsampling and adding operations are performed layer by layer. The top Laplacian pyramid image is upsampled to the size of the next layer, and added to the Laplacian pyramid image of the next layer to obtain the reconstructed image of the layer; The reconstructed image is upsampled and added to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally a fused image is obtained.
6. A visual positioning method for laser marking software according to claim 5, characterized in that: The method of using a distributed system architecture to decompose image processing tasks and assign them to multiple computing nodes for parallel processing is: Decompose the image processing task into multiple subtasks, determine the task granularity according to the complexity of image processing and computing resources, determine the dependencies between the subtasks, avoid data dependency conflicts when allocating tasks, configure multiple computing nodes, including physical servers, virtual machines, and containers, design inter-node communication mechanisms to ensure that computing nodes can quickly exchange processing results and data, and design task scheduling strategies to allocate image processing tasks to various computing nodes; The complete image is divided into multiple small blocks, and each small block is processed independently. For feature extraction and edge detection processing tasks, the image is decomposed into different regions according to the regional characteristics of the image, and each region is processed by a computing node; Decompose the image processing task into steps and assign different steps to different nodes. For batch processing of multiple images, assign the task to multiple nodes for processing at the same time. Slice the image data and distribute the sliced data to multiple computing nodes, deploy a distributed processing framework to distribute the image processing tasks in parallel; Use a distributed file system to store and manage image data, merge the image blocks or regional results processed by each node into a complete image, transmit and integrate the intermediate processing results of each node in sequence, and output the processing results.
7. A visual positioning method for laser marking software according to claim 6, characterized in that: The methods for evaluating complexity and maintainability are: Analyze the functions and interface complexity of adjustable multi-light source lighting, multi-angle imaging, and distributed computing frameworks, and analyze the data transfer paths between components by drawing data flow diagrams; Evaluate the hardware complexity of adjustable multi-light source illumination and multi-angle imaging, including the feasibility of light source adjustment, synchronization and calibration of imaging equipment, and equipment compatibility; analyze the interface complexity of hardware control and software integration; and evaluate the stability and reliability of communication protocols; Define key performance indicators and conduct stress tests simulating actual usage environments to evaluate the system's performance under high load conditions. Establish a risk assessment model to calculate the cumulative fatigue of visual positioning. The calculation method is: In the formula, A c is the cumulative fatigue, D t is the number of data transmission paths, M c is the average maintenance period of hardware equipment, C n is the number of computing nodes in the distributed framework.
8. The visual positioning method of laser marking software according to claim 7, characterized in that: The logic for monitoring and managing laser marking speed is: Experiments were conducted at different laser marking speeds, and the visual positioning accuracy and image quality at each speed were recorded. The relationship curve between speed, positioning accuracy, and image quality was plotted based on the experimental results to obtain the critical point of performance. The highest marking speed corresponding to the critical accuracy threshold was found on the relationship curve as the upper speed limit. When the calculated cumulative fatigue degree A c Below the preset fatigue threshold T a And the illumination difference coefficient DC is greater than the preset difference threshold DC t When the laser marking speed reaches the upper limit, there is no running obstacle. When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a Or the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking meets the upper speed limit, there are hidden dangers in operation; When the calculated cumulative fatigue degree A c Greater than or equal to the preset fatigue threshold T a And the illumination difference coefficient DC is less than or equal to the preset difference threshold DC t When the laser marking speed reaches the upper limit, it cannot reach the upper limit.
Citation Information
Patent Citations
Method and system to create custom products
CN105637512A
Laser marking method based on image recognition and related device
CN115890004A
Hinged cantilever deformation inspection system
WO2017188572A1