A method for detecting the width of a pole piece material of a photoelectric sensor
By denoising the original image of the photoelectric sensor and tracking the edges of the pole material with the depth-first search algorithm, the problem that ambient light affects the image acquisition effect is solved, image processing stability and data processing speed are improved, sensor performance and measurement accuracy are improved.
Patent Information
- Application Number
- CN202410652260.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-05-24
AI Technical Summary
In the prior art, ambient light of different intensities will affect the image acquisition effect, reduce the stability of image processing, and when data is sent by different devices, it will greatly reduce the processing speed of data and reduce the performance of sensors.
By acquiring the original image of the photoelectric sensor with a transparent plate with a filter, performing noise reduction processing, edge detection, image grayscale value of edge pixel points is obtained, and sending it to the FPGA chip for information processing. Based on the depth-first search algorithm, multiple edges of the pole material of the photoelectric sensor are tracked, and pixel differences between multiple parallel edges and no overlapping positions are selected to obtain the width information of the material.
Improves the stability of image processing, enhances data processing speed, improves sensor performance, and improves measurement accuracy, and obtains more comprehensive material characteristics.
Smart Images

Figure CN118623769B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of material detection, and in particular to a method for detecting the width of a pole piece material of a photoelectric sensor. Background Art
[0002] With the advancement of science and technology, photoelectric sensors have been widely used in industrial automation, robotics and other fields.
[0003] The working principle of photoelectric sensors is to detect the existence of objects or changes in their motion states through photoelectric conversion. However, in traditional detection methods, in complex industrial environments, ambient light of varying intensities will affect image acquisition and reduce the stability of image processing. In addition, by sending the image grayscale value to the FPGA chip, which then stores the data and sends it to the microcontroller for processing, sending data between different devices will greatly reduce the data processing speed and reduce the performance of the sensor.
[0004] Therefore, the present invention proposes a method for detecting the width of a pole piece material of a photoelectric sensor. Summary of the invention
[0005] The present invention provides a method for detecting the width of a pole piece material of a photoelectric sensor, which is used to solve the defects in the prior art that ambient light of different intensities will affect the image acquisition effect, reduce the stability of image processing, and the data transmission in different devices will greatly reduce the data processing speed and reduce the performance of the sensor.
[0006] In one aspect, the present invention provides a method for detecting the width of a pole piece material of a photoelectric sensor, comprising:
[0007] Step 1: obtaining an original image of a photoelectric sensor of a transparent plate with a filter, and performing noise reduction on the original image;
[0008] Step 2: Perform edge detection on the denoised image, obtain the image grayscale value of the edge pixel, and send the image grayscale value to the FPGA chip for information processing;
[0009] Step 3: Tracking multiple edges of the pole piece material of the photoelectric sensor based on the processing result and according to a depth-first search algorithm;
[0010] Step 4: According to the tracking results, the pixel differences of multiple parallel edges without overlapping positions are selected to obtain the width information of the material.
[0011] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, an original image of a photoelectric sensor of a transparent plate with a filter is obtained, comprising:
[0012] Acquire the brightness and spectral range of the light source, and determine a camera equipped with an optical lens according to the brightness and spectral range;
[0013] Determine shooting requirements, and adjust camera parameters according to the shooting requirements;
[0014] Obtaining a high-transmittance filter, and obtaining a type of photoelectric sensor of a transparent plate adapted to light of different wavelengths based on the high-transmittance filter;
[0015] The original image of the photoelectric sensor of the transparent plate with the filter is obtained according to the parameters of the camera and the type of the photoelectric sensor.
[0016] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, denoising the original image comprises:
[0017] Acquire a noise feature of an image according to the original image;
[0018] Selecting a corresponding noise reduction algorithm based on the noise characteristics of the image and application requirements;
[0019] The parameters of the noise reduction algorithm are adjusted according to the noise reduction purpose, and the original image is denoised based on the adjusted noise reduction algorithm.
[0020] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, edge detection is performed on a noise-reduced image, image grayscale values of edge pixels are obtained, and the image grayscale values are sent to an FPGA chip for information processing, including:
[0021] Use the Canny algorithm to perform edge detection on the denoised image;
[0022] The image grayscale value of each edge pixel is obtained based on the corresponding relationship between the edge detection result and the original image in an index mapping manner;
[0023] Obtain information processing requirements, and adjust the operating frequency and timing parameter values of the FPGA chip according to the information processing requirements;
[0024] The image grayscale value is sent to the adjusted FPGA chip for information processing of image binarization and morphological operation.
[0025] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, multiple edges of the pole piece material of the photoelectric sensor are tracked based on the processing result and according to a depth-first search algorithm, including:
[0026] Use a depth-first search algorithm to traverse and trace the edges in the pole piece material;
[0027] During the traversal process, a set of visited nodes is maintained and the information of visited boundary points is recorded to avoid repeated visits;
[0028] For each new edge, all its endpoints are added as new nodes to the queue to be visited, and the new nodes are visited according to priority;
[0029] Based on the visited boundary point information, an internal point set of the pole piece material of the photoelectric sensor is constructed;
[0030] Perform centroid and average distance processing on each internal point to determine the tracking result.
[0031] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, pixel differences of multiple parallel edges without overlap are selected according to tracking results to obtain material width information, including:
[0032] Constructing an edge image of a pole piece material of the photoelectric sensor according to the tracking result;
[0033] Based on the corner detection algorithm, each edge in the edge image is located and segmented into individual corner points;
[0034] Calculate the difference between adjacent pixels based on the pixel value corresponding to each individual corner point;
[0035] A threshold value of adjacent pixel differences is set according to actual conditions, and edge pixel points are determined according to the threshold value;
[0036] Record the position and direction of all edge pixels, and use interpolation methods to estimate the length and direction of the edge;
[0037] The corner points of all edges are merged into a data structure, the average value of the distances from the corner points to the adjacent corner points is calculated, and the width of the pole piece material of the photoelectric sensor is obtained according to the average value.
[0038] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, the brightness and spectral range of a light source are obtained, and a camera equipped with an optical lens is determined according to the brightness and spectral range, including:
[0039] Acquire an illumination image of the light source, and determine the brightness of the light source based on the illumination image using a brightness detection algorithm;
[0040] The light source is split by a dispersion system, and the spectral range of the light source is determined according to the distribution of the dispersed light;
[0041] Determining shooting condition parameters for the light source according to the brightness and spectral range;
[0042] The screening range of cameras equipped with optical lenses is determined according to shooting condition parameters, and an adapted target camera is selected within the screening range.
[0043] According to a method for detecting the width of a pole piece material of a photoelectric sensor provided by the present invention, the noise characteristics of the image are obtained according to the original image, including:
[0044] Divide the original image into multiple regional images of equal area;
[0045] Perform Fourier transformation on the digital signal corresponding to each regional image, and determine the distribution of discrete points in each regional image according to the transformation result;
[0046] Sampling the target digital signal at each discrete point to obtain a sample vector for each discrete point;
[0047] Calculate the covariance matrix of each area image based on the sample vectors of all discrete points;
[0048] Obtain all amplitudes of the covariance matrix and sort them in descending order to obtain the sorting result;
[0049] Select multiple target amplitudes that are less than or equal to a preset threshold value according to the sorting result, and use the target amplitudes as the amplitudes corresponding to the noise signal;
[0050] The noise signal power is estimated according to the target amplitude, and the noise signal distribution characteristics in each area image are determined according to the noise signal power;
[0051] Determine the noise pixel points in each area image according to the distribution characteristics of the noise signal;
[0052] Obtain the pixel value of each noise pixel, perform convolution calculation on the pixel value and the convolution kernel, and obtain the convolution value of each noise pixel;
[0053] Calculate the average value of each convolution value to obtain the noise level in each area image. If the noise level is greater than a preset noise threshold, the area image is determined to be a noise area image.
[0054] The noise intensity and frequency characteristics are determined according to the noise signal distribution in the noise area image.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] By reducing the noise of the original image of the photoelectric sensor of the transparent plate with a filter, the image acquisition effect can be guaranteed, the stability of image processing can be improved, the edge detection of the denoised image is performed, and the grayscale value is obtained, and the grayscale value is sent to the FPGA chip for information processing, which can greatly improve the data processing speed and enhance the performance of the sensor. Furthermore, according to the depth-first search algorithm, multiple edges of the material are tracked, and the pixel differences at multiple positions are selected to determine the width information of the material, which can improve the measurement accuracy and obtain more comprehensive material properties. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 This is one of the flow charts of the method for detecting the width of the electrode material of the photoelectric sensor provided by the embodiment of the present invention;
[0059] Figure 2 This is the second flow chart of the method for detecting the width of the electrode material of the photoelectric sensor provided in the embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] Embodiment 1:
[0062] The embodiment of the present invention provides a method for detecting the width of a pole piece material of a photoelectric sensor, such as Figure 1 As shown, the method mainly includes the following steps:
[0063] Step 1: obtaining an original image of a photoelectric sensor of a transparent plate with a filter, and performing noise reduction on the original image;
[0064] Step 2: Perform edge detection on the denoised image, obtain the image grayscale value of the edge pixel, and send the image grayscale value to the FPGA chip for information processing;
[0065] Step 3: Tracking multiple edges of the pole piece material of the photoelectric sensor based on the processing result and according to a depth-first search algorithm;
[0066] Step 4: According to the tracking results, the pixel differences of multiple parallel edges without overlapping positions are selected to obtain the width information of the material.
[0067] In this embodiment, the filter is an optical element used to filter spectral components of specific wavelengths in light. The filter can be used to change the color balance, contrast or clarity of the picture, such as: ultraviolet filter, visible light filter, polarization filter.
[0068] In this embodiment, the original image refers to an image of the photoelectric sensor that has not been processed in any way.
[0069] In this embodiment, noise reduction refers to a process in which certain algorithms and technical means are used during the digital image processing process to reduce the impact of image noise and improve image quality.
[0070] In this embodiment, edge detection is a method of computer vision and digital image processing, which is used to identify boundaries or edges in an image, thereby extracting a region of interest.
[0071] In this embodiment, the image grayscale value is a quantitative representation of the brightness value of each pixel in the image. In a grayscale image, the color of each pixel is determined by its corresponding grayscale value. The grayscale value ranges from 0 to 255, corresponding to a gradient from black to white.
[0072] In this embodiment, the FPGA chip is an integrated circuit with high flexibility and reconfigurability, which can be used to implement various digital signal processing and artificial intelligence applications. The FPGA chip allows users to program the hardware logic on site, so that it can adapt to different algorithms, data structures and computing needs.
[0073] In this embodiment, depth-first search is a method of traversing or searching a tree or graph, and the basic idea is to start from a starting node, go as far as possible along a path until you can no longer go forward, then backtrack to the previous node and try other branches until you find an unvisited node or reach the end of the graph.
[0074] In this embodiment, pixel difference refers to the color difference between two adjacent pixels. Pixel difference is an important indicator for describing image quality because it affects the clarity and variability of the image. If the color difference between two adjacent pixels is very small, then they will be regarded as similar pixels; conversely, if the color difference is large, then they will be regarded as different pixels. Therefore, the smaller the pixel difference, the higher the image quality.
[0075] In this embodiment, the width information of the material generally refers to the size range of the material in the transverse direction (such as the length direction).
[0076] The beneficial effects of the above technical solution are: by reducing the noise of the original image of the photoelectric sensor of the transparent plate with a filter, the image acquisition effect can be guaranteed, the stability of image processing will be improved, the edge detection of the denoised image is performed, and the grayscale value is obtained, and the grayscale value is sent to the FPGA chip for information processing, which can greatly improve the data processing speed and enhance the performance of the sensor. Furthermore, according to the depth-first search algorithm, multiple edges of the material are tracked, and the pixel differences of multiple positions are selected to determine the width information of the material, which can improve the measurement accuracy and obtain more comprehensive material properties.
[0077] Embodiment 2:
[0078] Based on Example 1, the embodiment of the present invention obtains the original image of the photoelectric sensor of the transparent plate with the filter, such as Figure 2 As shown, including:
[0079] S01: Acquire the brightness and spectral range of the light source, and determine a camera equipped with an optical lens according to the brightness and spectral range;
[0080] S02: Determine shooting requirements, and adjust camera parameters according to the shooting requirements;
[0081] S03: Obtain a high-transmittance filter, and obtain a type of photoelectric sensor of a transparent plate adapted to light of different wavelengths based on the high-transmittance filter;
[0082] S04: Acquire an original image of the photoelectric sensor of the transparent plate with a filter according to the parameters of the camera and the type of the photoelectric sensor.
[0083] In this embodiment, the brightness of the light source refers to the intensity of the light emitted by the light source.
[0084] In this embodiment, the spectral range refers to the spectral interval covered in the spectral analysis, usually ranging from the minimum wavelength to the maximum wavelength.
[0085] In this embodiment, the parameters of the camera include: sensor type, clarity, frame rate, and resolution.
[0086] In this embodiment, the photoelectric sensor is a device that can convert an optical signal into an electrical signal, such as a photoelectric switch, a photoelectric encoder, or a photodiode.
[0087] The beneficial effects of the above technical solution are: adjusting the camera parameters according to the shooting requirements and obtaining the type of photoelectric sensor of the transparent plate that adapts to light of different wavelengths, determining the original image of the photoelectric sensor of the transparent plate with a filter, which can improve the image quality and enhance the signal-to-noise ratio of the image.
[0088] Embodiment 3:
[0089] Based on Example 2, the embodiment of the present invention performs noise reduction on the original image, including:
[0090] Acquire a noise feature of an image according to the original image;
[0091] Selecting a corresponding noise reduction algorithm based on the noise characteristics of the image and application requirements;
[0092] The parameters of the noise reduction algorithm are adjusted according to the noise reduction purpose, and the original image is denoised based on the adjusted noise reduction algorithm.
[0093] In this embodiment, the noise characteristics of the image refer to randomly distributed and irregular areas in the image, which may cause image distortion and non-uniformity.
[0094] In this embodiment, the goal of the noise reduction algorithm is to reduce or eliminate the noise in the audio signal to make the sound heard clearer, such as: mean filtering, median filtering, Gaussian filtering.
[0095] In this embodiment, the purpose of noise reduction may be to improve image quality, improve image visualization effect, and enhance image feature information.
[0096] In this embodiment, the parameters of the noise reduction algorithm include: filter size and type, downsampling rate, and Gaussian kernel bandwidth.
[0097] The beneficial effects of the above technical solution are: selecting the corresponding denoising algorithm through the noise characteristics of the image and the application requirements, adjusting the characteristics of the denoising algorithm according to the denoising purpose, and performing denoising according to the adjusted denoising algorithm can improve the denoising speed, as well as the denoising efficiency and accuracy of the image.
[0098] Embodiment 4:
[0099] Based on Example 3, the embodiment of the present invention performs edge detection on the denoised image, obtains the image grayscale value of the edge pixel point, and sends the image grayscale value to the FPGA chip for information processing, including:
[0100] Use the Canny algorithm to perform edge detection on the denoised image;
[0101] The image grayscale value of each edge pixel is obtained based on the corresponding relationship between the edge detection result and the original image in an index mapping manner;
[0102] Obtain information processing requirements, and adjust the operating frequency and timing parameter values of the FPGA chip according to the information processing requirements;
[0103] The image grayscale value is sent to the adjusted FPGA chip for information processing of image binarization and morphological operation.
[0104] In this embodiment, the Canny algorithm is an image processing algorithm applied in the field of edge detection.
[0105] In this embodiment, edge detection is a method of computer vision and digital image processing, which is used to identify boundaries or edges in an image, thereby extracting a region of interest.
[0106] In this embodiment, index mapping refers to mapping a certain attribute value in the original data set to the value of a corresponding attribute in a new data set to achieve the purpose of data visualization or optimization.
[0107] In this embodiment, the image grayscale value is a quantitative representation of the brightness value of each pixel in the image. In a grayscale image, the color of each pixel is determined by its corresponding grayscale value. The grayscale value ranges from 0 to 255, corresponding to a gradient from black to white.
[0108] In this embodiment, the operating frequency of the FPGA chip refers to the number of clock cycles that can be executed in a unit time. The higher the operating frequency, the faster the processing speed of the FPGA chip.
[0109] In this embodiment, the timing parameters of the FPGA chip are a set of parameters that describe the behavior of its internal timing control unit, such as clock frequency, timing budget, and static timing analysis.
[0110] In this embodiment, image binarization is a process of converting an image into an image consisting of only black and white, with the purpose of setting the grayscale values of all pixels in the image to 0 or 255, so that the black and white parts of the image are clearly distinguished.
[0111] In this embodiment, the morphological operation is a transformation and operation based on shape and structure, and is used to implement functions such as image enhancement, extraction and modification, such as smoothing, edge detection, connection, and opening operations.
[0112] The beneficial effects of the above technical solution are: the image grayscale value of each edge pixel is obtained by the correspondence between the detection result of edge detection using the Canny algorithm and the original image, the operating frequency and timing parameter values of the FPGA chip are adjusted according to the information processing requirements, and the image grayscale value is sent to the adjusted FPGA chip for information processing, which can improve the information processing efficiency and enhance the image at the same time.
[0113] Embodiment 5:
[0114] Based on Example 4, the embodiment of the present invention tracks multiple edges of the pole piece material of the photoelectric sensor based on the processing results and according to the depth-first search algorithm, including:
[0115] Use a depth-first search algorithm to traverse and trace the edges in the pole piece material;
[0116] During the traversal process, a set of visited nodes is maintained and the information of visited boundary points is recorded to avoid repeated visits;
[0117] For each new edge, all its endpoints are added as new nodes to the queue to be visited, and the new nodes are visited according to priority;
[0118] Based on the visited boundary point information, an internal point set of the pole piece material of the photoelectric sensor is constructed;
[0119] Perform centroid and average distance processing on each internal point to determine the tracking result.
[0120] In this embodiment, depth-first search is a method of traversing or searching a tree or graph, and the basic idea is to start from a starting node, go as far as possible along a path until you can no longer go forward, then backtrack to the previous node and try other branches until you find an unvisited node or reach the end of the graph.
[0121] In this embodiment, the boundary point information refers to the coordinates of feature points in the edge area of the image, and is usually used to describe the edge structure of the image.
[0122] In this embodiment, inside the photoelectric sensor, the set of material points constituting the structural unit of the sensor may be a set of various microscopic particles (such as atoms, molecules) constituting the sensor.
[0123] In this embodiment, the centroid refers to the center point in a two-dimensional matrix where the sum of distances from all pixels to the center point of the matrix is the smallest. Centroid processing is the process of finding the centroid of each point in a three-dimensional point set.
[0124] The beneficial effects of the above technical solution are: using a depth-first search algorithm to traverse and track each edge in the pole piece material, for each new edge, all its endpoints are added as new nodes to the queue to be visited, the new nodes are visited according to priority, and the internal point set of the pole piece material is constructed based on the visited boundary point information, which can more accurately judge the distance of each point to the nearest neighbor, thereby improving the performance of the tracking algorithm, and at the same time more accurately obtain the information of the pole piece material.
[0125] Embodiment 6:
[0126] Based on Example 5, the embodiment of the present invention selects pixel differences of multiple parallel edges without overlapping positions according to the tracking results to obtain width information of the material, including:
[0127] Constructing an edge image of a pole piece material of the photoelectric sensor according to the tracking result;
[0128] Based on the corner detection algorithm, each edge in the edge image is located and segmented into individual corner points;
[0129] Calculate the difference between adjacent pixels based on the pixel value corresponding to each individual corner point;
[0130] A threshold value of adjacent pixel differences is set according to actual conditions, and edge pixel points are determined according to the threshold value;
[0131] Record the position and direction of all edge pixels, and use interpolation methods to estimate the length and direction of the edge;
[0132] The corner points of all edges are merged into a data structure, the average value of the distances from the corner points to the adjacent corner points is calculated, and the width of the pole piece material of the photoelectric sensor is obtained according to the average value.
[0133] In this embodiment, the edge image refers to an image composed of multiple edges of the tracked pole piece material.
[0134] In this embodiment, corner point detection is to identify the boundaries of corners from the input image. A corner point is the intersection of two sides of a corner. Therefore, the goal of corner point detection is to find these intersection points in the image.
[0135] In this embodiment, the pixel value corresponding to the corner point means that the position of each corner point is represented by a pair of coordinates, and these coordinates map the vertex of the corner to the pixel in the image.
[0136] In this embodiment, the threshold of the adjacent pixel difference may be 30.
[0137] In this embodiment, interpolation is a technique used to fill in missing frames in an image or video sequence, allowing missing data points to be filled in on the time axis.
[0138] The beneficial effects of the above technical solution are: each edge in the edge graphic is located through a corner point detection algorithm and divided into separate corner points, the difference between adjacent pixels is calculated based on the pixel value corresponding to each separate corner point, the length and direction of the edge are estimated based on the position and direction of the edge pixel points using an interpolation method, all corner points are merged, and the average value of the distance from the corner point to the adjacent corner point is calculated, which can improve the accuracy of obtaining the width of the pole piece material.
[0139] Embodiment 7:
[0140] Based on Example 6, the embodiment of the present invention obtains the brightness and spectral range of the light source, and determines a camera equipped with an optical lens according to the brightness and spectral range, including:
[0141] Acquire an illumination image of the light source, and determine the brightness of the light source based on the illumination image using a brightness detection algorithm;
[0142] The light source is split by a dispersion system, and the spectral range of the light source is determined according to the distribution of the dispersed light;
[0143] Determining shooting condition parameters for the light source according to the brightness and spectral range;
[0144] The screening range of cameras equipped with optical lenses is determined according to shooting condition parameters, and an adapted target camera is selected within the screening range.
[0145] In this embodiment, the brightness detection algorithms are used to detect local brightness information in an image. These algorithms can automatically identify black or white areas in an image.
[0146] In this embodiment, the brightness of the light source generally refers to the intensity of the light emitted by the light source, that is, the brightness of the light.
[0147] In this embodiment, the dispersion system refers to an optical system that can separate and present light of different wavelengths. In the dispersion system, when light passes through different media or structures, due to the speed difference of light of different wavelengths, they will cause different degrees of deflection in the medium. This phenomenon is called dispersion, which allows light of different wavelengths to be separated.
[0148] In this embodiment, splitting the light source means that during the splitting process, when white light passes through a transparent material called a prism, a dispersion phenomenon occurs, that is, the light is decomposed into a spectrum of seven colors, which are red, orange, yellow, green, cyan, blue, and purple.
[0149] In this embodiment, the dispersion light distribution refers to the color separation phenomenon caused by the difference in light speed of different wavelengths when the light passes through certain media, such as continuous distribution, refraction distribution, and interference distribution.
[0150] In this embodiment, the spectral range of the light source refers to the energy distribution of light radiated by the light source at different wavelengths.
[0151] In this embodiment, the shooting condition parameter is, for example, pixel density, which may require a camera with 60 million pixels or a camera with 45 million pixels.
[0152] The beneficial effect of the above technical solution is: by using the brightness detection algorithm to determine the brightness of the light source and the spectral range of the light source, the shooting condition parameters for the light source are determined, and a suitable camera is selected according to the shooting condition parameters, so as to ensure the clarity of the captured image.
[0153] Embodiment 8:
[0154] Based on Example 7, the embodiment of the present invention obtains the noise characteristics of the image according to the original image, including:
[0155] Divide the original image into multiple regional images of equal area;
[0156] Perform Fourier transformation on the digital signal corresponding to each regional image, and determine the distribution of discrete points in each regional image according to the transformation result;
[0157] Sampling the target digital signal at each discrete point to obtain a sample vector for each discrete point;
[0158] Calculate the covariance matrix of each area image based on the sample vectors of all discrete points;
[0159] Obtain all amplitudes of the covariance matrix and sort them in descending order to obtain the sorting result;
[0160] Select multiple target amplitudes that are less than or equal to a preset threshold value according to the sorting result, and use the target amplitudes as the amplitudes corresponding to the noise signal;
[0161] The noise signal power is estimated according to the target amplitude, and the noise signal distribution characteristics in each area image are determined according to the noise signal power;
[0162] Determine the noise pixel points in each area image according to the distribution characteristics of the noise signal;
[0163] Obtain the pixel value of each noise pixel, perform convolution calculation on the pixel value and the convolution kernel, and obtain the convolution value of each noise pixel;
[0164] Calculate the average value of each convolution value to obtain the noise level in each area image. If the noise level is greater than a preset noise threshold, the area image is determined to be a noise area image.
[0165] The noise intensity and frequency characteristics are determined according to the noise signal distribution in the noise area image.
[0166] In this embodiment, the original image refers to an image of the photoelectric sensor that has not been processed in any way.
[0167] In this embodiment, the digital signal corresponding to the image refers to the process of converting the image into a digital representation. In this process, each pixel of the image is converted into a binary bit (0 or 1) for representing the image in the computer memory. This digital signal contains all the pixel values in the image, which constitute the image matrix.
[0168] In this embodiment, Fourier transform refers to transforming a function from one domain (such as time domain) to another domain (such as frequency domain).
[0169] In this embodiment, the discrete point distribution refers to the distribution of pixels (or discrete points) in the image in a two-dimensional or three-dimensional space.
[0170] In this embodiment, the target digital signal of the discrete point may refer to specific information extracted or recognized from the image, which may be features such as shape, color, texture, etc. of the object of interest, or the relative position and motion trajectory between objects.
[0171] In this embodiment, the sample vector of discrete points refers to a vector composed of a group of discrete data points, and these data points can be any form of information representation, such as integers, floating point numbers, category labels, etc.
[0172] In this embodiment, the covariance matrix of an image is a mathematical tool for describing the local structure and similarity of an image. The similarity between adjacent pixels is measured by comparing the distances between them. When calculating the covariance matrix of an image, the image needs to be divided into blocks first, which can be achieved by calculating the distance from each pixel on the image to the surrounding pixels. Then, these distances are squared and arranged in reverse order into a two-dimensional array. Finally, these distance values are used to construct a covariance matrix, in which each row and column corresponds to a small area in the image.
[0173] In this embodiment, the amplitude of the covariance matrix is an important indicator for measuring the local structure of an image. The amplitude can be used to measure properties such as the overall intensity, contrast, and detail level of local texture of the image.
[0174] In this embodiment, the preset threshold is 0.95.
[0175] In this embodiment, the noise signal power refers to the additional noise power generated in the communication system due to various reasons (such as loss on the transmission line, stray interference, etc.).
[0176] In this embodiment, the distribution characteristics of the noise signal generally refer to its probability density function, which is a function that describes the strength of the noise signal within a specific frequency range, such as uniform distribution, Gaussian distribution, and triangular distribution.
[0177] In this embodiment, noise pixels generally refer to random abnormal pixels in an image, and the values of these pixels may be significantly different from those of surrounding pixels, or may be close to an average value or an edge value.
[0178] In this embodiment, the convolution kernel is a special weight matrix used in a neural network layer. In the convolutional neural network, the convolution kernel is responsible for performing local weighted summation on the original input feature map to generate a new feature map.
[0179] In this embodiment, the noise level is a measurement indicator used to measure the strength of noise in a sound signal.
[0180] In this embodiment, the noise signal distribution in the image refers to the distribution of regions where abnormal pixel values appear in the image.
[0181] In this embodiment, the frequency characteristics of noise refer to the characteristics of noise signals that appear at different frequencies in time and space.
[0182] The beneficial effects of the above technical solution are: the original image is divided into multiple regional images of equal size, the digital signals of these regional images are Fourier transformed to determine the distribution of discrete points in each regional image, the sample vector of each discrete point is obtained and combined into a covariance matrix, all amplitudes of the covariance matrix are analyzed, the power of the noise signal is estimated according to the target amplitude, the noise signal can be spectrally analyzed, the frequency characteristics of the noise signal can be determined, and the appropriate threshold is selected according to these characteristics to screen the noise signal, and at the same time, the need for manual intervention can be reduced, the degree of automation of the processing can be improved, the distribution characteristics of the noise signal in each regional image are determined, and the noise pixel points in each regional image are obtained, and the convolution operation is performed to obtain the convolution value of each pixel point, and the noise degree inside each regional image is obtained. It is judged whether the regional image is a noise regional image, and the intensity and frequency characteristics of the noise are determined according to the distribution characteristics of the noise signal in the noise regional image, which can more accurately describe the quality of the image, and also more accurately describe the characteristics of the noise, which is convenient for subsequent image denoising.
[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting the width of a pole piece material of a photoelectric sensor, characterized in that: include: Step 1: obtaining an original image of a photoelectric sensor of a transparent plate with a filter, and performing noise reduction on the original image; Step 2: Perform edge detection on the denoised image, obtain the image grayscale value of the edge pixel, and send the image grayscale value to the FPGA chip for information processing; Step 3: Tracking multiple edges of the pole piece material of the photoelectric sensor based on the processing result and according to a depth-first search algorithm; Step 4: Select the pixel differences of multiple parallel edges without overlap according to the tracking results to obtain the width information of the material; The step of reducing noise on the original image includes: Acquire a noise feature of an image according to the original image; Selecting a corresponding noise reduction algorithm based on the noise characteristics of the image and application requirements; The parameters of the noise reduction algorithm are adjusted according to the noise reduction purpose, and the original image is denoised based on the adjusted noise reduction algorithm; Wherein, acquiring the noise characteristics of the image according to the original image includes: Divide the original image into multiple regional images of equal area; Perform Fourier transformation on the digital signal corresponding to each regional image, and determine the distribution of discrete points in each regional image according to the transformation result; Sampling the target digital signal at each discrete point to obtain a sample vector for each discrete point; Calculate the covariance matrix of each area image based on the sample vectors of all discrete points; Obtain all amplitudes of the covariance matrix and sort them in descending order to obtain the sorting result; Select multiple target amplitudes that are less than or equal to a preset threshold value according to the sorting result, and use the target amplitudes as the amplitudes corresponding to the noise signal; The noise signal power is estimated according to the target amplitude, and the noise signal distribution characteristics in each area image are determined according to the noise signal power; Determine the noise pixel points in each area image according to the distribution characteristics of the noise signal; Obtain the pixel value of each noise pixel, perform convolution calculation on the pixel value and the convolution kernel, and obtain the convolution value of each noise pixel; Calculate the average value of each convolution value to obtain the noise level in each area image. If the noise level is greater than a preset noise threshold, the area image is determined to be a noise area image. The noise intensity and frequency characteristics are determined according to the noise signal distribution in the noise area image.
2. The method for detecting the width of the electrode material of the photoelectric sensor according to claim 1, characterized in that: Get the raw image of the photosensor with the transparent plate with the filter, including: Acquire the brightness and spectral range of the light source, and determine a camera equipped with an optical lens according to the brightness and spectral range; Determine shooting requirements, and adjust camera parameters according to the shooting requirements; Obtaining a high-transmittance filter, and obtaining a type of photoelectric sensor of a transparent plate adapted to light of different wavelengths based on the high-transmittance filter; The original image of the photoelectric sensor of the transparent plate with the filter is obtained according to the parameters of the camera and the type of the photoelectric sensor.
3. The method for detecting the width of the electrode material of the photoelectric sensor according to claim 1, characterized in that: Perform edge detection on the denoised image, obtain the image grayscale value of the edge pixel point, and send the image grayscale value to the FPGA chip for information processing, including: Use the Canny algorithm to perform edge detection on the denoised image; The image grayscale value of each edge pixel is obtained based on the corresponding relationship between the edge detection result and the original image in an index mapping manner; Obtain information processing requirements, and adjust the operating frequency and timing parameter values of the FPGA chip according to the information processing requirements; The image grayscale value is sent to the adjusted FPGA chip for information processing of image binarization and morphological operation.
4. The method for detecting the width of the electrode material of the photoelectric sensor according to claim 1, characterized in that: Based on the processing results and according to the depth-first search algorithm, multiple edges of the pole piece material of the photoelectric sensor are tracked, including: Use a depth-first search algorithm to traverse and trace the edges in the pole piece material; During the traversal process, a set of visited nodes is maintained and the information of visited boundary points is recorded to avoid repeated visits; For each new edge, all its endpoints are added as new nodes to the queue to be visited, and the new nodes are visited according to priority; Based on the visited boundary point information, an internal point set of the pole piece material of the photoelectric sensor is constructed; Perform centroid and average distance processing on each internal point to determine the tracking result.
5. The method for detecting the width of the electrode material of the photoelectric sensor according to claim 1, characterized in that: According to the tracking results, the pixel differences of multiple parallel edges without overlap are selected to obtain the width information of the material, including: Constructing an edge image of a pole piece material of a photoelectric sensor according to the tracking result; Based on the corner detection algorithm, each edge in the edge image is located and segmented into individual corner points; Calculate the difference between adjacent pixels based on the pixel value corresponding to each individual corner point; A threshold value of adjacent pixel differences is set according to actual conditions, and edge pixel points are determined according to the threshold value; Record the position and direction of all edge pixels, and use interpolation methods to estimate the length and direction of the edge; The corner points of all edges are merged into a data structure, the average value of the distances from the corner points to the adjacent corner points is calculated, and the width of the pole piece material of the photoelectric sensor is obtained according to the average value.
6. The method for detecting the width of the electrode material of the photoelectric sensor according to claim 2, characterized in that: Acquiring the brightness and spectral range of the light source, and determining a camera equipped with an optical lens according to the brightness and spectral range, comprising: Acquire an illumination image of the light source, and determine the brightness of the light source based on the illumination image using a brightness detection algorithm; The light source is split by a dispersion system, and the spectral range of the light source is determined according to the distribution of the dispersed light; Determining shooting condition parameters for the light source according to the brightness and spectral range; The screening range of cameras equipped with optical lenses is determined according to shooting condition parameters, and an adapted target camera is selected within the screening range.
Citation Information
Patent Citations
Non-cooperative target quick contour tracking method
CN107169972A
Camera, system and detection method for width detection of lithium battery pole piece
CN113313711A