A Visual Positioning Method for Laser Marking Software
Through adjustable multi-light source lighting, polarization filters and distributed system architecture, the contradiction between the laser marking system in accuracy and speed is solved, and efficient resource allocation and cost control is achieved.
Patent Information
- Application Number
- CN202411927874.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing laser marking visual positioning methods are difficult to control the system operating costs while ensuring accuracy and speed, especially in the allocation of hardware and software resources.
Adjustable multi-light source illumination and polarization filters are used for multi-angle imaging, combined with adaptive image processing and image fusion technology, the distributed system architecture is used to decompose image processing tasks, and process them in parallel at multiple computing nodes, and the upper limit of laser marking speed is determined by evaluating complexity and maintainability.
It improves the practical application efficiency of laser marking, reduces the resource threshold for visual positioning, balances the requirements of accuracy and speed, and reduces the overall operating cost.
Smart Images

Figure CN119693450B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser marking, and more specifically, the present invention is a visual positioning method for laser marking software. Background Art
[0002] Laser marking is a method of making permanent marks on the surfaces of various materials using high-energy laser beams. Visual positioning is a technology used in the laser marking process to ensure marking accuracy and consistency. Through cameras, image processing algorithms, and computer systems, the position, orientation, and shape of the object to be marked are accurately located, so as to guide the laser marking machine to mark at the correct position. The visual positioning methods used in industry face a dilemma between operating costs and processing efficiency. The visual positioning technology based on computer vision not only has strict requirements for hardware such as cameras and laser devices, but also has certain requirements for the feasibility and effectiveness of software such as image processing and pattern recognition. For the existing visual positioning methods applied to laser marking, if they meet the requirements of high precision and high speed, it is difficult to control the operating cost of the overall laser marking system. If low-level computing resources are used to control the cost, there are stability problems that are difficult to have both in marking accuracy and marking speed.
[0003] To solve the above defects, a technical solution is 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 background art.
[0005] To achieve the above purpose, the present invention provides the following technical solution: A visual positioning method for laser marking software, the specific steps include irradiating the object to be marked through adjustable multi-source illumination, imaging the object to be marked from multiple angles through a camera based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions;
[0006] Taking pictures of the object to be marked from multiple different angles, processing the images obtained under different lighting conditions using an adaptive image processing algorithm, and using image fusion technology to obtain an artifact-free image;
[0007] Adopting a distributed system architecture to decompose and distribute the image processing tasks to multiple computing nodes for parallel processing, and evaluating the complexity and maintainability of the adjustable multi-source illumination, multi-angle imaging, and distributed computing framework;
[0008] According to the evaluation results of complexity and maintainability, combined with the accuracy and quality of visual positioning, determine the upper limit of the laser marking speed, and monitor and manage the laser marking speed.
[0009] Preferably, the method for evaluating the positioning accuracy and image quality under different lighting conditions is:
[0010] The calibration positioning deviation crossing value is PD v , where v is the index of different positioning accuracy evaluation metrics, and v = {1, 2, 3... b}, where b is a positive integer. The positioning accuracy evaluation metrics include the mean positioning error MPE, the maximum positioning error MaxPE, and the standard deviation SD. The calibration image quality crossing value is IQ s , where s is the index of the image quality evaluation metrics, and s = {1, 2, 3... d}, where d is a positive integer. The image quality evaluation metrics include the peak signal-to-noise ratio PSNR and the contrast CT. The positioning accuracy and image quality under different illumination conditions are evaluated by calculating the differences between the acquired image and the reference image, and the differences between the actual positioning accuracy and the reference accuracy. The calculation method is In the formula, 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, SSIM i is the structural similarity index, and i is the index of the structural similarity index between different images and the reference image, and i is a positive integer.
[0011] Preferably, the calculation method of the peak signal-to-noise ratio is as follows:
[0012] The square error value is obtained by calculating the square of the difference between each pixel value in the acquired image and the corresponding pixel value in the reference image. The mean square error MSE is obtained by adding all the square error values and dividing by the total number of pixels. The peak signal-to-noise ratio PSNR is calculated based on the mean square error. The calculation expression is In the formula, MAX is the maximum pixel value of the image.
[0013] Preferably, the structural similarity index SSIM i is calculated as follows:
[0014] The mean μ, variance σ, and covariance σ are calculated for the acquired image and the reference image respectively xy , with the mean representing brightness, the variance representing contrast, and the covariance representing structural similarity. Then the brightness comparison function 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, and 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 , where p, k, and l are weight coefficients and p, k, and l are all positive integers.
[0015] Preferably, the method for processing images acquired under different lighting conditions using an adaptive image processing algorithm is as follows:
[0016] Apply a feature point detection algorithm to the acquired image, detect and match the same feature points in the image to ensure the spatial alignment of the image. According to the correspondence of the feature points, perform translation, rotation, scale transformation, and perspective transformation on the image so that all images are aligned in the same coordinate system, and then perform denoising processing on the aligned image;
[0017] The methods for performing fusion processing on the denoised image include:
[0018] Perform pixel fusion on the image, and select the pixel value with the largest amount of information from multiple images for fusion based on the principle of maximum entropy;
[0019] Perform multi-scale fusion on the image. Decompose the image into frequency components of different scales by constructing a Laplacian pyramid of the image, perform fusion at each scale, and then reconstruct the image through inverse transformation;
[0020] Perform feature-based fusion on the image, and perform fusion on each region according to the segmentation regions or features of the image;
[0021] The method for performing pixel fusion based on the principle of maximum entropy is as follows:
[0022] Calculate the probability of each pixel value in the image and calculate the entropy of the entire image according to the probability;
[0023] For the pixel positions to be fused, calculate the local entropy of the pixel values of different images at the pixel positions to be fused respectively, and use the pixel value with the largest local entropy as the fused pixel value;
[0024] Assign different weights to each pixel value according to the reliability of different images during the fusion process, calculate the weighted sum as the fused pixel value, and the assignment of weights is based on the entropy, sharpness, and contrast metrics of the image;
[0025] The method for performing multi-scale fusion on the image by constructing a Laplacian pyramid of the image is as follows:
[0026] Perform Gaussian blur and downsampling operations on the original image to generate images with gradually decreasing resolutions, forming a Gaussian pyramid;
[0027] Starting from each layer of the Gaussian pyramid, upsample the current layer image and make its size the same as that of the next layer image, subtract the upsampled image from the Gaussian pyramid image of the next layer to obtain the Laplacian pyramid image of the current layer;
[0028] Determine the fusion rule based on the weighted average of pixel values and the selection based on gradient information, and perform fusion on the Laplacian pyramid of the images to be fused according to the fusion rule at the corresponding scale;
[0029] Starting from the top layer of the fused Laplacian pyramid, perform upsampling and addition operations layer by layer. Upsample the Laplacian pyramid image of the top layer to the size of the next layer, and add it to the Laplacian pyramid image of the next layer to obtain the reconstructed image of this layer;
[0030] Upsample the reconstructed image and add it to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally obtain the fused image.
[0031] Preferably, the method of decomposing and distributing the image processing tasks to multiple computing nodes for parallel processing using a distributed system architecture is as follows:
[0032] Decompose the image processing task into multiple subtasks, determine the task granularity according to the complexity of the image processing and the computing resources, determine the dependency relationship between each subtask, avoid data dependency conflicts during task allocation, configure multiple computing nodes, where the computing nodes include physical servers, virtual machines and containers, design the inter-node communication mechanism to ensure that the computing nodes can quickly exchange processing results and data, and design the task scheduling strategy to distribute the image processing task to each computing node;
[0033] Divide the complete image into multiple small blocks and process each small block independently. For feature extraction and edge detection processing tasks, decompose the image 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 step by step and assign different steps to different nodes. For batch processing of multiple images, assign the tasks to multiple nodes for processing at the same time;
[0035] Slice the image data and distribute the sliced data to multiple computing nodes, and deploy a distributed processing framework to perform parallel distribution processing on the image processing tasks;
[0036] Use a distributed file system to store and manage the image data, merge the image blocks or regional results processed by each node into a complete image, sequentially transfer and integrate the intermediate processing results of each node, and output the processing results.
[0037] Preferably, the method for evaluating complexity and maintainability is as follows:
[0038] Analyze the functions and interface complexities of adjustable multi-light source illumination, multi-angle imaging, and distributed computing frameworks, and analyze the data transfer paths between various 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 devices, and device compatibility. Analyze the interface complexity between hardware control and software integration, and evaluate the stability and reliability of communication protocols;
[0040] Define key performance indicators and conduct stress tests under simulated actual usage environments. Evaluate the performance of the system under high - load conditions, establish a risk - assessment model to calculate the cumulative fatigue degree of visual positioning, and the calculation method is In the formula, A c is the cumulative fatigue degree, D t is the number of data transfer paths, M c is the average maintenance cycle of hardware devices, 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 as follows:
[0042] Conduct experiments at different laser marking speeds, record the visual positioning accuracy and image quality at each speed, draw the relationship curves of speed vs. positioning accuracy and image quality based on the experimental results, obtain the performance critical point, and find the highest marking speed corresponding to the critical accuracy threshold on the relationship curve as the speed upper - limit value;
[0043] When the calculated cumulative fatigue degree A c is lower than the preset fatigue threshold T a and the light - intensity difference coefficient DC is greater than the preset difference threshold DC t then the marking laser marking meets the speed upper - limit value and there are no operation obstacles;
[0044] When the calculated cumulative fatigue degree A c is greater than or equal to the preset fatigue threshold T a or the light - intensity difference coefficient DC is less than or equal to the preset difference threshold DC t then the marking laser marking meets the speed upper - limit value and there are operation potential hazards;
[0045] When the calculated cumulative fatigue degree A c is greater than or equal to the preset fatigue threshold T a and the light - intensity difference coefficient DC is less than or equal to the preset difference threshold DC t then the marking laser marking cannot reach the speed upper - limit value.
[0046] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0047] Through the optimization of the visual positioning method in laser marking, the actual application efficiency of laser marking is effectively improved. By fully exploring the working limits of software and hardware devices in laser marking, while meeting the accuracy requirements of laser marking, a distributed framework is used to disperse computing power resources, reducing the resource threshold for visual image processing. Considering the complexity and maintainability in visual positioning, the dimensionality of image processing in laser marking is reduced, effectively sharing the overall operating cost of visual positioning. At the same time, the requirements for laser marking accuracy and speed are ensured, achieving a balance between complexity and operating efficiency. Brief Description of the Drawings
[0048] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0049] Figure 1 It is the flowchart of the method of the present invention. Detailed Embodiments
[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0051] Embodiment 1: Please refer to Figure 1 As shown, the present invention is a visual positioning method for a laser marking software. The specific steps include irradiating the object to be marked through adjustable multi-source illumination, imaging the object to be marked from multiple angles through a camera based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions;
[0052] Taking pictures of the object to be marked from multiple different angles, processing the images obtained under different lighting conditions using an adaptive image processing algorithm, and using image fusion technology to obtain an artifact-free image;
[0053] Using a distributed system architecture to decompose and distribute the image processing tasks to multiple computing nodes for parallel processing, and evaluating the complexity and maintainability of the adjustable multi-source illumination, multi-angle imaging, and distributed computing framework;
[0054] According to the evaluation results of complexity and maintainability, combined with the accuracy and quality of visual positioning, determine the speed limit of laser marking, and monitor and manage the laser marking speed.
[0055] Adjustable multi - light source illumination evenly illuminates the target area by combining light sources of different angles and types to reduce the influence of reflection on the object surface. The light source types of adjustable multi - light source illumination include ring light sources, diffused light sources, oblique light sources, backlight sources, etc. The ring light sources are evenly distributed around the camera lens, providing uniform shadow - free illumination to eliminate the bright spots caused by surface reflection; the diffused light source diffuses light through a scattering material or a light mask to form a soft lighting effect, which is used to reduce direct reflection for illuminating complex surfaces or materials with high reflectivity; the oblique light source projects light from different angles, so that the light irradiates the object surface at a lower incident angle to reduce the formation of strong reflected light on convex or concave surfaces; the backlight source is located behind the object, which is used to enhance the object contour and make the edge detection clearer;
[0056] Adjustable multi - light source illumination sets the light sources at different angles, including positions such as 0°, 45°, 90°, etc. Through the illumination of different angles, different areas of the object surface are covered to avoid strong reflection in a certain direction. The ring light sources are arranged around the camera lens to ensure that the light is evenly distributed in all directions of the object, so as to reduce the formation of local bright spots and shadows. According to the shape, surface characteristics and shooting angle of the object, the brightness and angle of each light source are dynamically adjusted;
[0057] In a specific embodiment, the intensity and position of the light source are adjusted by a light source controller to meet the lighting requirements of different surfaces.
[0058] Adjustable multi - light source illumination combines and controls different light source types and arrangement strategies according to the reflection characteristics of the object surface. For example, the ring light source is used for uniform illumination, and the diffused light source is used to reduce strong reflection and soften the light. By combining multiple light sources, a suitable lighting effect can be obtained in different scenarios.
[0059] A polarization filter is an optical filter used to control and filter light of a specific polarization direction. The polarization filter selectively allows 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 relatively strong. The polarization filter can filter out the reflected light in a specific direction, thereby reducing the artifacts or light spots caused by the reflected light;
[0060] The polarization filter includes a linear polarization filter and a circular polarization filter.
[0061] Multi - angle imaging obtains images of the object to be marked from multiple perspectives by arranging multiple cameras installed at different angles simultaneously. All cameras capture images at the same time to avoid image inconsistencies caused by object or ambient light changes. The shooting timing of all cameras is controlled using a synchronous trigger or through software synchronization. The images obtained by each camera may contain different degrees of specular 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. The lighting conditions include uniform lighting, direct lighting, low - light lighting, and mixed lighting. Uniform lighting uses a diffused light source to create a uniform lighting condition as the reference lighting environment. Direct lighting uses a spotlight or a direct light source to simulate strong direct light to test the performance in a strong reflection or high - light environment. Low - light lighting reduces the ambient light intensity or uses partial occlusion to simulate conditions in a low - light or shadow environment. Mixed lighting creates a complex lighting environment by combining different types of light sources, such as strong light in some areas and shadows in other areas, to test the adaptability of visual positioning under non - uniform lighting.
[0064] Taking obtaining high - quality images under uniform lighting as the benchmark for image quality evaluation and using a high - precision measuring device to determine the actual position of the target as the benchmark for positioning accuracy evaluation.
[0065] Collect image data of the same object or scene under different lighting conditions, ensuring that other variables during the collection process remain consistent. Use the multi - angle imaging method to take images from different angles under each lighting condition to comprehensively evaluate the visual positioning performance. Under different lighting conditions, use visual positioning to automatically calibrate and record the position data of the target, and conduct 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. By comparing the error data under different lighting conditions, evaluate the impact of lighting on positioning accuracy.
[0066] The calibrated positioning deviation crossing value is PD v , where v is the index of different positioning accuracy evaluation metrics, and v = {1, 2, 3...b}, where b is a positive integer. The positioning accuracy evaluation metrics include the mean positioning error MPE, maximum positioning error MaxPE, and standard deviation SD. The calibrated image quality crossing 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 the peak signal-to-noise ratio PSNR and the contrast CT. The positioning accuracy and image quality under different lighting conditions are evaluated by calculating the differences between the acquired image and the reference image, and the differences between the actual positioning accuracy and the reference accuracy. The calculation method is In the formula, DC is the lighting difference coefficient for evaluating the degree of difference, MaxCan is the highest light intensity in the lighting condition, MinCan is the lowest light intensity in the lighting condition, and SSIM i is the structural similarity index, and i is the index of the structural similarity index between different images and the reference image, and i is a positive integer.
[0067] The calculation method of the peak signal-to-noise ratio is:
[0068] The square error value is obtained by calculating the square of the difference between each pixel value in the acquired image and the corresponding pixel value in the reference image. All the square error values are added up and divided by the total number of pixels to obtain the mean square error MSE. The peak signal-to-noise ratio PSNR is calculated based on the mean square error. The calculation expression is In the formula, MAX is the maximum pixel value of the image.
[0069] The structural similarity index SSIM i The calculation method is:
[0070] The mean μ, variance σ, and covariance σ are calculated for the acquired image and the reference image respectively xy , using the mean to represent brightness, the variance to represent contrast, and the covariance to represent structural similarity. Then the brightness comparison function 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, and 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 , and p, k, and l are weight coefficients and p, k, and l are all positive integers.
[0071] High-precision measurement devices such as laser rangefinders or calibration plates, etc. Other variables during the acquisition process include parameters such as the camera position and focal length.
[0072] An adaptive image processing algorithm is used to process the images obtained under different lighting conditions, and an image fusion technology is used to obtain an artifact-free image;
[0073] Analyze the grayscale histogram of the image to judge the overall brightness distribution of the image. Determine the current lighting conditions by calculating the average brightness of the image or using the data of the light intensity sensor. Normalize the image, apply histogram equalization to enhance the image contrast, adopt the CLAHE algorithm to avoid noise amplification caused by over-enhancement, and at the same time enhance the local contrast. Use gamma correction to adjust the brightness of the image, enhance the image details through an adaptive non-linear sharpening algorithm, dynamically adjust the weight of the Laplacian operator according to the lighting conditions, and avoid introducing redundant artifacts under high-light or low-light conditions while enhancing the image edges. Perform HDR synthesis by taking multiple images under different exposure conditions to cover all brightness details in the scene;
[0074] Apply the feature point detection algorithm to the acquired images. Detect and match the same feature points in the images to ensure the spatial alignment of the images. According to the corresponding relationship of the feature points, perform translation, rotation, scale transformation and perspective transformation on the images, so that all images are aligned in the same coordinate system, and denoise the aligned images;
[0075] The methods for fusing the denoised images include:
[0076] Perform pixel fusion on the images, and select the pixel value with the largest amount of information from multiple images for fusion based on the principle of maximum entropy;
[0077] Perform multi-scale fusion on the images. Decompose the images into frequency components of different scales by constructing the Laplacian pyramid of the images, perform fusion at each scale, and then reconstruct the images through inverse transformation;
[0078] Perform feature-based fusion on the images, and fuse each region according to the segmentation regions or features of the images.
[0079] It should be noted that the features include edges, textures, etc. The weighted average method is used in the smooth regions, and the maximum gradient method is used in the edge regions to retain important structural information.
[0080] The method for pixel fusion based on the principle of maximum entropy is:
[0081] Calculate the probability of each pixel value appearing in the image and calculate the entropy of the entire image according to the probability;
[0082] For the pixel positions to be fused, calculate the local entropy of the pixel values of different images at the pixel positions to be fused respectively, and use the pixel value with the largest local entropy as the fused pixel value;
[0083] Assign different weights to each pixel value according to the reliability of different images during the fusion process, calculate the weighted sum as the fused pixel value, and the weight assignment is based on the entropy, sharpness, and contrast metrics of the images.
[0084] The method for multi-scale fusion of an image by constructing the Laplacian pyramid of the image is as follows:
[0085] Perform Gaussian blur and downsampling operations on the original image to generate images with gradually decreasing resolutions, forming a Gaussian pyramid;
[0086] Starting from each layer of the Gaussian pyramid, upsample the current layer image and make its size the same as that of the next layer image, subtract the upsampled image from the Gaussian pyramid image of the next layer to obtain the Laplacian pyramid image of the current layer;
[0087] Determine the fusion rule according to the weighted average based on pixel values and the selection based on gradient information, and perform fusion on the Laplacian pyramid of the images to be fused at the corresponding scales according to the fusion rule;
[0088] Starting from the topmost layer of the fused Laplacian pyramid, perform upsampling and addition operations layer by layer, upsample the Laplacian pyramid image of the topmost layer to the size of the next layer, and add it to the Laplacian pyramid image of the next layer to obtain the reconstructed image of this layer;
[0089] Upsample the reconstructed image and add it to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally obtain the fused image.
[0090] It should be noted that each layer of the Gaussian pyramid represents the low-frequency information of the image at different scales, and each layer of the image is obtained by performing Gaussian blur and downsampling on the previous layer image. The Laplacian pyramid image contains the high-frequency information at the current scale, and the topmost Laplacian pyramid image is the topmost image of the Gaussian pyramid.
[0091] Adopt a distributed system architecture to decompose the image processing task and allocate it to multiple computing nodes for parallel processing, and evaluate the complexity and maintainability of adjustable multi-light source illumination, multi-angle imaging, and distributed computing frameworks;
[0092] Decompose the image processing task into multiple subtasks, determine the granularity of the tasks according to the complexity of the image processing and computing resources, determine the dependency relationship between each subtask, avoid data dependency conflicts during task allocation, configure multiple computing nodes, and the computing nodes include physical servers, virtual machines, and containers. Design an inter-node communication mechanism to ensure that the computing nodes can quickly exchange processing results and data, and design a task scheduling strategy to allocate the image processing task to each computing node;
[0093] Divide the complete image into multiple small blocks and process each small block independently. For feature extraction and edge detection processing tasks, decompose the image 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 tasks step by step, and assign different steps to different nodes. For batch processing of multiple images, assign the tasks to multiple nodes for processing simultaneously;
[0095] Slice the image data, distribute the sliced data to multiple computing nodes, and deploy a distributed processing framework to perform parallel distribution processing on the image processing tasks;
[0096] Use a distributed file system to store and manage the image data, merge the image blocks or regional results processed by each node into a complete image, sequentially transfer and integrate the intermediate processing results of each node, and output the processing results.
[0097] The regional characteristics of the image include, such as, texture, brightness, edge density. The tasks are decomposed step by step into denoising, enhancement, feature extraction, etc. The slicing logic is, for example, splitting by rows or columns. Commonly used distributed processing frameworks include Hadoop MapReduce, Apache Spark, Kubernetes, etc. Commonly used distributed file systems such as HDFS, Ceph, GlusterFS, etc.
[0098] The methods for evaluating complexity and maintainability are as follows:
[0099] Analyze the functions and interface complexities of the adjustable multi-light source illumination, multi-angle imaging, and distributed computing framework, and analyze the data transfer paths between various components by drawing data flow diagrams;
[0100] Evaluate the hardware complexity of the adjustable multi-light source illumination and multi-angle imaging, including the feasibility of light source adjustment, synchronization and calibration of imaging devices, and device 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 under simulated actual usage environments, evaluate the performance of the system under high-load conditions, establish a risk assessment model to calculate the cumulative fatigue degree of visual positioning, and the calculation method is In the formula, A c is the cumulative fatigue degree, D t is the number of data transfer paths, M c is the average maintenance cycle of hardware devices, 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, combined with the accuracy and quality of visual positioning, determine the upper limit of the laser marking speed, and monitor and manage the laser marking speed.
[0104] Experiments are carried out at different laser marking speeds, and the visual positioning accuracy and image quality at each speed are recorded. According to the experimental results, the relationship curves between speed and positioning accuracy, and image quality are plotted to obtain the performance critical point. The highest marking speed corresponding to the critical accuracy threshold on the relationship curve is taken as the speed upper limit value;
[0105] When the calculated cumulative fatigue degree A c is lower than the preset fatigue threshold T a and the light difference coefficient DC is greater than the preset difference threshold DC t the marked laser marking meets the speed upper limit value and there are no operation obstacles;
[0106] When the calculated cumulative fatigue degree A c is greater than or equal to the preset fatigue threshold T a or the light difference coefficient DC is less than or equal to the preset difference threshold DC t the marked laser marking meets the speed upper limit value and there are operation potential hazards;
[0107] When the calculated cumulative fatigue degree A c is greater than or equal to the preset fatigue threshold T a and the light difference coefficient DC is less than or equal to the preset difference threshold DC t the marked laser marking cannot reach the speed upper limit value.
[0108] Through the optimization of the visual positioning method in laser marking, this application effectively improves the actual application efficiency of laser marking, fully explores the working condition limits of software and hardware devices in laser marking, while meeting the laser marking accuracy requirements, uses a distributed framework to disperse computing power resources, reduces the resource threshold of visual image processing, reduces the dimension of the image processing in laser marking in terms of the complexity and maintainability in comprehensive visual positioning, effectively shares the overall operation cost of visual positioning, and at the same time ensures the requirements of laser marking accuracy and speed, achieving a balance between complexity and operation efficiency.
[0109] The above formulas are all dimensionless and take their numerical values for calculation. The formula is obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters in the formula are set by technicians in the field according to the actual situation.
[0110] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired or wireless (such as infrared, wireless, microwave, etc.) means. 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 a data center that contains a collection of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0111] It should be understood that in various embodiments of the present application, the order numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0112] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present 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 foregoing method embodiments, and will not be described herein again.
[0114] When the above-described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0115] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A visual positioning method for a laser marking software, characterized in that The specific steps include irradiating the object to be marked by adjustable multi - light - source illumination, imaging the object to be marked from multiple angles through a camera based on a polarization filter, and evaluating the positioning accuracy and image quality under different lighting conditions; Taking pictures of the object to be marked from multiple different angles, processing the images obtained under different lighting conditions using an adaptive image - processing algorithm, and using image - fusion technology to obtain an artifact - free image; Adopting a distributed - system architecture to decompose and distribute the image - processing tasks to multiple computing nodes for parallel processing, and evaluating the complexity and maintainability of the adjustable multi - light - source illumination, multi - angle imaging, and distributed - computing framework; According to the evaluation results of complexity and maintainability, combined with the accuracy and quality of visual positioning, determining the upper limit of the laser - marking speed, and monitoring and managing the laser - marking speed; The method for evaluating the positioning accuracy and image quality under different lighting conditions is: The calibration positioning deviation crossing value is , where v is the index of different positioning accuracy evaluation metrics, and , where b is a positive integer. The positioning accuracy evaluation metrics include the mean positioning error MPE, the maximum positioning error MaxPE, and the standard deviation SD. The calibration image quality crossing value is , where s is the index of the image quality evaluation metrics, and , where d is a positive integer. The image quality evaluation metrics include the peak signal-to-noise ratio PSNR and the contrast CT. The positioning accuracy and image quality under different illumination conditions are evaluated by calculating the differences between the acquired image and the reference image, and between the actual positioning accuracy and the reference accuracy. The calculation method is , where in the formula, is the illumination difference coefficient for evaluating the degree of difference, is the highest light intensity in the illumination condition, is the lowest light intensity in the illumination condition, is the structural similarity index, and i is the index of the structural similarity index between different images and the reference image, and i is a positive integer; The method for evaluating the complexity and maintainability is: Analyzing the functions and interface complexities of the adjustable multi - light - source illumination, multi - angle imaging, and distributed - computing framework, and analyzing the data transfer paths between various components by drawing data - flow diagrams; Evaluating the hardware complexity of the adjustable multi - light - source illumination and multi - angle imaging, including the feasibility of light - source adjustment, synchronization and calibration of imaging devices, and device compatibility, analyzing the interface complexity between hardware control and software integration, and evaluating the stability and reliability of communication protocols; Define key performance indicators and conduct stress tests under simulated actual usage environments to evaluate the system's performance under high-load conditions. Establish a risk assessment model to calculate the cumulative fatigue degree of visual positioning. The calculation method is , where is the cumulative fatigue degree,[[]] is the number of data transfer paths,[[]] is the average maintenance cycle of hardware devices,[[]] is the number of computing nodes in the distributed framework.[[]] 2. The visual positioning method of a laser marking software according to claim 1, characterized in that, The calculation method of the peak signal - to - noise ratio is: 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 squared error value, sum all the squared error values and divide by the total number of pixels to obtain the mean squared error MSE, and calculate the peak signal-to-noise ratio PSNR based on the mean squared error. The calculation formula is , where MAX is the maximum pixel value of the image.
3. The visual positioning method of a laser marking software according to claim 1, characterized in that, Structural similarity index The calculation method is as follows: Calculate the mean of the acquired image and the reference image respectively , variance and covariance . Represent the brightness by the mean, the contrast by the variance, and the structural similarity by the covariance. Then the brightness comparison function , the contrast comparison function is , and the structural similarity comparison function is . In the formula, x and y represent the reference image and the acquired image respectively, is a small positive constant used to avoid division by zero. Then , is the weight coefficient and are all positive integers.
4. A visual positioning method for a laser marking software according to claim 1, characterized in that, The method for processing the images obtained under different lighting conditions using an adaptive image - processing algorithm is: Processing the collected images using a feature - point detection algorithm, detecting and matching the same feature points in the images to ensure the spatial alignment of the images, and performing translation, rotation, scale transformation, and perspective transformation on the images according to the corresponding relationships of the feature points so that all images are aligned in the same coordinate system, and denoising the aligned images; The methods for performing fusion processing on the denoised images include: Performing pixel - level fusion on the images, and selecting the pixel value with the largest amount of information from multiple images for fusion based on the principle of maximum entropy; Performing multi - scale fusion on the images, decomposing the images into frequency components of different scales by constructing a Laplacian pyramid of the images, performing fusion at each scale, and then reconstructing the images through inverse transformation; Performing feature - based fusion on the images, and fusing each region separately according to the segmented regions or features of the images; The method for performing pixel - level fusion based on the principle of maximum entropy is: Calculating the probability of each pixel value in the image and calculating the entropy of the entire image according to the probability; For the pixel positions to be fused, respectively calculating the local entropy of the pixel values of different images at the pixel positions to be fused, and taking the pixel value with the largest local entropy as the fused pixel value; Assigning different weights to each pixel value according to the reliability of different images during the fusion process, calculating the weighted sum as the fused pixel value, and the assignment of weights is based on the entropy, sharpness, and contrast metrics of the images; The method for performing multi - scale fusion on the images by constructing a Laplacian pyramid of the images is: Performing Gaussian blurring and down - sampling operations on the original image to generate images with gradually decreasing resolutions, forming a Gaussian pyramid; Starting from each layer of the Gaussian pyramid, upsample the current layer image to make its size the same as that of the next layer image, and subtract the upsampled image from the Gaussian pyramid image of the next layer to obtain the Laplacian pyramid image of the current layer; Determine the fusion rule based on the weighted average of pixel values and the selection based on gradient information, and fuse the Laplacian pyramids of the images to be fused according to the fusion rule at the corresponding scale; Starting from the top layer of the fused Laplacian pyramid, perform upsampling and addition operations layer by layer. Upsample the Laplacian pyramid image of the top layer to the size of the next layer, and add it to the Laplacian pyramid image of the next layer to obtain the reconstructed image of this layer; Upsample the reconstructed image and add it to the Laplacian pyramid image of the next layer until the size of the original image is reached, and finally obtain the fused image.
5. A visual positioning method for a laser marking software according to claim 4, characterized in that The method of decomposing and distributing image processing tasks to multiple computing nodes for parallel processing using a distributed system architecture is as follows: 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 each subtask, avoid data dependency conflicts during task allocation, configure multiple computing nodes, where the computing nodes include physical servers, virtual machines, and containers, design an inter-node communication mechanism to ensure that computing nodes can quickly exchange processing results and data, and design a task scheduling strategy to distribute the image processing task to each computing node; Divide the complete image into multiple small blocks and process each block independently. For feature extraction and edge detection processing tasks, decompose the image 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 step by step and assign different steps to different nodes. For batch processing of multiple images, assign the tasks to multiple nodes for processing simultaneously; Slice the image data and distribute the sliced data to multiple computing nodes, and deploy a distributed processing framework to perform parallel distribution processing on the image processing task; 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, sequentially transfer and integrate the intermediate processing results of each node, and output the processing results.
6. The visual positioning method of a laser marking software according to claim 1, characterized in that The logic for monitoring and managing the laser marking speed is as follows: Conduct experiments at different laser marking speeds, record the visual positioning accuracy and image quality at each speed, draw the relationship curves of speed vs. positioning accuracy and image quality based on the experimental results, obtain the performance critical point, and find the highest marking speed corresponding to the critical accuracy threshold on the relationship curve as the speed upper limit value; When the calculated cumulative fatigue degree is lower than the preset fatigue threshold and the light difference coefficient is greater than the preset difference threshold at this time, it is marked that the laser marking meets the speed upper limit value and there is no operation obstacle; When the calculated cumulative fatigue degree is greater than or equal to a preset fatigue threshold or the light intensity difference coefficient is less than or equal to a preset difference threshold it is marked that the laser marking meets the speed upper limit value and there are operation hazards; When the calculated cumulative fatigue degree is greater than or equal to a preset fatigue threshold and the light intensity difference coefficient is less than or equal to a preset difference threshold it is marked that the laser marking cannot reach the speed upper limit value.
Citation Information
Patent Citations
Method and system to create custom products
CN105637512A
Hinged cantilever deformation inspection system
WO2017188572A1