A data synchronization transmission method for metal panel production line

By segmenting and reordering the greyscale images of metal panel wall switches, LZ77 compression is solved, the problem of high dependence of the LZ77 algorithm is reduced, the risk of data loss is improved, and transmission efficiency and storage optimization are improved.

CN118945276BActive Publication Date: 2024-12-17HANGZHOU HONGSHI ELECTRICAL
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411400391.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-17
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

The existing LZ77 compression algorithm in the transmission of grayscale images of metal panel wall switches, the higher the dependence on the front the next time, resulting in an increase in the risk of data loss and affecting transmission efficiency and storage optimization.

Method used

By segmenting the grayscale image of the metal panel wall switch, analyzing the symmetry and overlap of the jack area, and reordering it and compressing it to reduce the dependence of important data.

Benefits of technology

It reduces the risk of loss of important data, improves the reliability and efficiency of data transmission, and optimizes the utilization of storage and transmission bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945276B_ABST
    Figure CN118945276B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of digital information transmission, and in particular to a data synchronization transmission method for a metal panel production line, comprising: performing image segmentation on a grayscale image of a metal panel wall switch, obtaining a jack area of ​​each metal panel wall switch grayscale image, obtaining the standard degree of the jack area of ​​the metal panel wall switch grayscale image, obtaining the importance of the metal panel wall switch grayscale image in combination with the overlap of pixel points of the jack area of ​​continuous metal panel wall switch grayscale images, reordering the metal panel wall switch grayscale images, performing LZ77 compression, and then performing data synchronization transmission. The present invention reorders the metal panel wall switch grayscale images according to their importance, changes the degree of dependence of important images on previous images, and reduces the risk of important data loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of digital information transmission, and in particular to a data synchronization transmission method for a metal panel production line. Background Art

[0002] For each metal panel wall switch produced on the automatic production line, the image file after shooting is usually large, which will take up more bandwidth and space during transmission and storage. Therefore, compression is very necessary. Compression can help reduce the delay of image transmission in the production line, optimize data transmission and storage, and improve overall production efficiency.

[0003] Generally, for each grayscale image of a metal panel wall switch on an automatic production line, the LZ77 compression algorithm can effectively identify and utilize repeated patterns in different images. By compressing these repeated parts, the amount of data that actually needs to be transmitted can be significantly reduced, thereby saving transmission bandwidth. However, the LZ77 algorithm uses the data that appeared before to replace the current repeated data through pointers and length information. The later the data is, the higher the dependence on the previous data is, and the greater the risk of loss is. Summary of the invention

[0004] The invention provides a data synchronization transmission method for a metal panel production line to solve the existing problems.

[0005] The data synchronization transmission method for a metal panel production line of the present invention adopts the following technical solution:

[0006] An embodiment of the present invention provides a data synchronization transmission method for a metal panel production line, the method comprising the following steps:

[0007] Get grayscale images of metal panel wall switches in chronological order on an automatic production line;

[0008] Performing image segmentation on a plurality of grayscale images of metal panel wall switches to obtain a socket area of ​​each grayscale image of the metal panel wall switch;

[0009] Analyze the symmetry of the socket area of ​​any metal panel wall switch grayscale image to obtain the standard of the socket area of ​​the metal panel wall switch grayscale image; analyze the overlap of pixel points in the socket area of ​​continuous metal panel wall switch grayscale images, and combine the standard of the socket area of ​​continuous metal panel wall switch grayscale images to obtain the importance of any metal panel wall switch grayscale image;

[0010] The grayscale images of the metal panel wall switches are reordered according to their importance, and then LZ77 compression is performed before data synchronization transmission is performed.

[0011] Furthermore, the image segmentation of the plurality of metal panel wall switch grayscale images to obtain the socket area of ​​each metal panel wall switch grayscale image includes the following specific methods:

[0012] Determine a number of growth seed points in the socket area according to the grayscale value of any pixel and the grayscale difference between the pixel and neighboring pixels;

[0013] Perform regional growth on several growth seeds in the socket area according to the similarity of grayscale, determine the termination condition of regional growth according to the grayscale difference between the pixel and the adjacent pixels, and obtain the possibility that any pixel is the termination pixel;

[0014] All growth seed points are traversed until the probability that the pixel point reached is the termination pixel point is greater than a preset threshold, and the socket area of ​​the grayscale image of any metal panel wall switch is obtained.

[0015] Furthermore, the specific method for obtaining the plurality of growth seed points in the socket area according to the gray value of any pixel and the gray difference between the pixel and the neighboring pixel is as follows:

[0016] According to the grayscale difference between any pixel point and the pixel points in the first neighborhood, the difference between the pixel point and the pixel points in the first neighborhood is obtained; according to the grayscale difference between any pixel point and the pixel points in the second neighborhood, the possibility that any pixel point is a mark is obtained, and the first neighborhood and the second neighborhood are both preset ranges;

[0017] According to the grayscale value of any pixel, the grayscale difference between the pixel and the neighboring pixels, and the possibility that the pixel is a mark, the possibility that the arbitrary pixel is a growth seed point of the socket area is obtained; the grayscale value of any pixel and the possibility that the pixel is a mark are both inversely proportional to the possibility that the pixel is a growth seed point of the socket area, and the grayscale difference between any pixel and the neighboring pixels is directly proportional to the possibility that the pixel is a growth seed point of the socket area;

[0018] The pixel points whose probability of being the growth seed points of the plug-in area is greater than the preset first parameter are recorded as the growth seed points of the plug-in area.

[0019] Furthermore, the specific method for obtaining the difference between the pixel and the pixel in the first neighborhood according to the grayscale difference between the arbitrary pixel and the pixel in the first neighborhood and the possibility of the arbitrary pixel leaving a mark according to the grayscale difference between the arbitrary pixel and the pixel in the second neighborhood is:

[0020] For any pixel point, the grayscale value of the pixel point is subtracted from the grayscale values ​​of all pixels in the first neighborhood and the absolute value is taken, the absolute values ​​of all differences are summed up to obtain the difference between the pixel point and the pixels in the first neighborhood; the grayscale value of the pixel point is subtracted from the grayscale values ​​of all pixels in the second neighborhood and the absolute value is taken, the absolute values ​​of all differences are summed up to obtain the possibility of the pixel point leaving a mark.

[0021] Furthermore, the plurality of growth seeds in the socket region are subjected to region growth according to grayscale similarity, and the termination condition of the region growth is determined according to the grayscale difference between the pixel point and the adjacent pixel points. The specific method for obtaining the possibility that any pixel point is the termination pixel point is as follows:

[0022] Obtain Z pixels in the first neighborhood of any pixel that are closest to the grayscale value of the pixel, and record them as similar pixels of the pixel;

[0023] The Z is a preset first parameter;

[0024] Obtain a fitting circle between any pixel point and similar pixel points, obtain B pixel points on the fitting circle that are closest to the pixel point, obtain the sum of grayscale differences between the B pixel points and the pixel point, and record it as the first grayscale error of the pixel point;

[0025] Obtain a fitting straight line between any pixel point and similar pixel points, obtain B pixel points on the fitting straight line that are closest to the pixel point, obtain the sum of grayscale differences between the B pixel points and the pixel point, and record it as the second grayscale error of the pixel point;

[0026] B is a preset second parameter;

[0027] According to the grayscale value of the pixel, the grayscale difference between the pixel and adjacent pixels, and the difference between the first grayscale error and the second grayscale error of the pixel, the possibility of the pixel being the termination pixel is obtained;

[0028]

[0029] in, Indicates The pixels are the possibilities of the termination pixels; Indicates The gray value of a pixel, Indicates The number of similar pixels to a pixel, Indicates The pixel Gray values ​​of similar pixels; Indicates The first grayscale error of pixels, Indicates The second grayscale error of pixels; represents the minimum function, represents the absolute value function, Represents an exponential function with a natural constant as its base.

[0030] Furthermore, the symmetry of the socket area of ​​the grayscale image of any metal panel wall switch is analyzed to obtain the standard degree of the socket area of ​​the grayscale image of the metal panel wall switch, including the specific method of:

[0031] Get the symmetry axis of the socket area of ​​any metal panel wall switch grayscale image;

[0032] According to the gray value difference of the corresponding pixels on both sides of the symmetry axis of the socket area, the standard degree of the socket area is obtained:

[0033]

[0034] in, For the The standardization of the socket area of ​​a grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of a pixel, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of the pixel point symmetrical about the symmetry axis, represents the absolute value function, Represents an exponential function with a natural constant as its base.

[0035] Furthermore, the specific method for obtaining the symmetry axis of the socket area of ​​the grayscale image of any metal panel wall switch is:

[0036] A coordinate system is established for all grayscale images of metal panel wall switches, with the lower left pixel as the coordinate origin, the horizontal right direction of the lower left pixel as the positive direction of the X axis, and the vertical upward direction of the lower left pixel as the positive direction of the Y axis;

[0037] For any grayscale image of a metal panel wall switch, obtain the mean of the horizontal coordinates of the pixels in all the socket areas, record it as the horizontal coordinate of the symmetry axis, and the vertical line where the horizontal coordinate of the symmetry axis is located is the symmetry axis of the socket area of ​​the metal panel wall switch grayscale image.

[0038] Furthermore, the analysis of the overlap of the pixel points in the socket area of ​​the continuous metal panel wall switch grayscale image, combined with the standard degree of the socket area of ​​the continuous metal panel wall switch grayscale image, obtains the importance of any metal panel wall switch grayscale image, including the specific method of:

[0039] Obtain the socket correspondence degree of the continuous metal panel wall switch grayscale image;

[0040] According to the standard degree and the socket correspondence degree between any metal panel wall switch grayscale image and the adjacent metal panel wall switch grayscale image, the importance of the metal panel wall switch grayscale image is obtained:

[0041]

[0042] in, Indicates The importance of the grayscale image of a metal panel wall switch; , , Respectively represent , , The standardization of the socket area of ​​a grayscale image of a metal panel wall switch; , Indicates Grayscale image of a metal panel wall switch and The socket correspondence degree of the grayscale image of the metal panel wall switch, Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch; represents an exponential function with a natural constant as base, Represents the maximum and minimum normalization function.

[0043] Furthermore, the specific method for obtaining the socket correspondence degree of the grayscale image of the continuous metal panel wall switch is:

[0044] Overlap the symmetry axes of the socket areas of the continuous metal panel wall switch grayscale images, and record it as the maximum overlap of the continuous metal panel wall switch grayscale images;

[0045]

[0046] in, Indicates Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch, Indicates Grayscale image of a metal panel wall switch and The number of overlapping pixels of the grayscale images of the metal panel wall switch under the condition of maximum overlap, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, represents the absolute value function.

[0047] Furthermore, the grayscale images of the metal panel wall switches are reordered according to their importance, and then LZ77 compressed and then synchronously transmitted, including the specific method of:

[0048] The metal panel wall switch grayscale images are reordered in descending order of their importance to obtain a new metal panel wall switch grayscale image sequence, and then the new metal panel wall switch grayscale image sequence is compressed by LZ77 to obtain compressed data, which is uploaded to the cloud storage server through data synchronization transmission.

[0049] The beneficial effects of the technical solution of the present invention are: separating the socket area through region growing, analyzing the importance of these sockets in terms of compliance with standards, determining the importance of the final metal panel wall switch grayscale image through continuous images in time sequence, reordering the images according to their importance, changing the degree of dependence of important images on previous images, and reducing the risk of important data loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.

[0051] Figure 1 A flowchart of the steps of a data synchronization transmission method for a metal panel production line according to the present invention;

[0052] Figure 2 A schematic diagram of a jack provided in the present invention. DETAILED DESCRIPTION

[0053] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data synchronization transmission method for a metal panel production line proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0054] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0055] The following describes in detail a specific scheme of a data synchronization transmission method for a metal panel production line provided by the present invention in conjunction with the accompanying drawings.

[0056] See also Figure 1 , which shows a flowchart of a data synchronization transmission method for a metal panel production line provided by an embodiment of the present invention, the method comprising the following steps:

[0057] Step S001: Obtain grayscale images of metal panel wall switches sorted in chronological order on an automatic production line.

[0058] Specifically, in order to implement the data synchronization transmission method for a metal panel production line proposed in this embodiment, it is first necessary to collect the grayscale image of the metal panel wall switch on the automatic production line. The specific process is as follows:

[0059] A monitoring position is preset on the automatic production line of metal panel wall switches, and a pressure sensor and a camera are installed at the monitoring position. When the metal panel wall switch passes through the monitoring position, the pressure sensor transmits a response value, and the camera simultaneously obtains a grayscale image of the metal panel wall switch. A time period is preset, and the camera collects all metal panel wall switch images within the preset time period, grayscales all metal panel wall switch images, obtains several metal panel wall switch grayscale images, and sorts them in chronological order.

[0060] It should be noted that the metal panel wall switch grayscale image sequence includes a plurality of metal panel wall switch grayscale images and corresponding acquisition moments.

[0061] So far, the grayscale image sequence of the metal panel wall switch is obtained through the above method.

[0062] Step S002: performing image segmentation on a plurality of metal panel wall switch grayscale images to obtain a socket area of ​​each metal panel wall switch grayscale image.

[0063] It should be noted that in the grayscale image of the metal panel wall switch, the detailed changes in the background (such as traces left on the metal surface) are not the key, and the socket is the most prominent feature, so it is first necessary to perform image segmentation on the grayscale image of the metal panel wall switch to separate the socket area.

[0064] It should be noted that for the grayscale image of the metal panel wall switch, the socket area is a connected area with obvious boundaries and features, and the region growing algorithm can segment the connected areas with the same features and provide good boundary information and segmentation results. Therefore, the region growing algorithm is used to perform image segmentation on the grayscale image of the metal panel wall switch.

[0065] It should be noted that the steps of the region growing algorithm include: determining the growth seed points, determining the conditions for region growing, and determining the termination conditions for region growing. Therefore, the process of segmenting the socket area of ​​each metal panel wall switch grayscale image is: according to the grayscale value of any pixel point, the grayscale difference between the pixel point and the neighboring pixel points, determine several growth seed points of the socket area; grow several growth seeds according to the similarity of grayscale, and determine the termination conditions for region growing according to the grayscale difference between the pixel point and the neighboring pixel points.

[0066] Step 2.1, determining a number of growth seed points in the socket area according to the grayscale value of any pixel and the grayscale difference between the pixel and neighboring pixels.

[0067] It should be noted that the grayscale value of the pixel points in the socket area is smaller than that in the other areas, and the greater the difference, the stronger the contrast; at the same time, the grayscale value of the pixel points in the trace area is also smaller. In order to avoid interference from the trace area, the grayscale value difference between the pixel point and the neighboring pixel points in the vertical direction should be compared. If the difference is small, it means that the pixel point is more likely to be a trace area, and the possibility of being a seed point for the growth of the socket area is smaller. Therefore, the possibility of the pixel point being a seed point for the growth of the socket area can be determined based on the grayscale value of any pixel point, the grayscale difference between the pixel point and the neighboring pixel points, and the possibility of the pixel point being a trace.

[0068] First, according to the grayscale difference between any pixel point and the pixel points in the first neighborhood, the difference between the pixel point and the pixel points in the first neighborhood is obtained.

[0069] It should be noted that the first neighborhood is a preset range, which is preset based on experience as the range of any pixel point. The neighborhood can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0070] As an embodiment, a method for obtaining the difference between any pixel point and the pixel points in the first neighborhood is:

[0071]

[0072] in, Indicates The difference between the pixel point and the pixel point in the first neighborhood, Indicates the number of pixels in the first neighborhood of a pixel. For the The gray value of a pixel, Indicates The first neighborhood of the pixel The gray value of a pixel, represents the absolute value function.

[0073] It should be noted that Indicates The sum of the absolute values ​​of the grayscale differences between the pixel and all the pixels in the first neighborhood reflects the The grayscale difference between the pixel and the pixel in the first neighborhood, that is, The difference between the pixel point and the pixel points in the first neighborhood.

[0074] Secondly, according to the grayscale difference between any pixel and the pixels in the second neighborhood, the possibility of any pixel being a trace is obtained.

[0075] It should be noted that the trace area appears as a regular low-grayscale straight line in the vertical direction. Therefore, to determine whether a pixel point is a trace area, the grayscale difference between the pixel point and its neighboring pixels in the vertical direction can be analyzed.

[0076] As an embodiment, a method for obtaining the possibility that any pixel point is a trace is as follows:

[0077]

[0078] in, Indicates The possibility of leaving a mark is Indicates the number of pixels in the second neighborhood of a pixel. For the The gray value of a pixel, Indicates The second neighborhood of the pixel The gray value of a pixel, represents the absolute value function.

[0079] It should be noted that the second neighborhood represents a preset range of any pixel point in the vertical direction. According to experience, the second neighborhood is preset to 10 pixel points adjacent to any pixel point in the vertical direction. It can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0080] It should be noted that Indicates The sum of the grayscale differences between the pixel and the pixels in the second neighborhood. The larger the value, the greater the difference between the pixel and the pixels in the second neighborhood, and the smaller the possibility that the pixel is a mark.

[0081] Finally, according to the gray value of any pixel, the gray difference between the pixel and neighboring pixels, and the possibility that the pixel is a mark, the possibility that any pixel is a growth seed point of the socket area is obtained.

[0082] As an embodiment, a method for obtaining the possibility that any pixel point is a growth seed point of the socket area is as follows:

[0083]

[0084] in, Indicates The probability that a pixel is a growth seed point in the socket area; Indicates The gray value of each pixel; Indicates The difference between the pixel point and the pixel points in the first neighborhood; Indicates The possibility of leaving a mark is Represents the normalization function.

[0085] It should be noted that, for any pixel point, the grayscale value of the pixel point is inversely proportional to the possibility that the pixel point is the growth seed point of the hole area; the difference between the pixel point and the pixels in the first neighborhood is directly proportional to the possibility that the pixel point is the growth seed point of the hole area; the possibility that the pixel point is a mark is inversely proportional to the possibility that the pixel point is the growth seed point of the hole area.

[0086] The pixel points whose probability of being the growth seed points of the plug-in area is greater than the preset first parameter are recorded as the growth seed points of the plug-in area.

[0087] It should be noted that the preset first parameter is set to 0.5 based on experience, and can be adjusted according to actual conditions, and is not specifically limited in this embodiment.

[0088] Step 2.2, performing regional growth on several growth seeds in the socket area according to the similarity of grayscale, and determining the termination condition of regional growth according to the grayscale difference between the pixel point and the adjacent pixel points.

[0089] It should be noted that the pixels at the interface boundary all have high grayscale values, and the grayscale values ​​are continuous (if they are not continuous, it may be caused by noise). Therefore, there must be pixels with grayscale values ​​close to the pixel in the first neighborhood of the pixel. Therefore, to determine whether the pixel is a growth boundary, we must first eliminate the influence of noise points and obtain the two pixels in the first neighborhood of the pixel that are most similar to the grayscale values ​​of the pixel in question as adjacent pixels.

[0090] First, Z pixels in the first neighborhood of any pixel that are closest to the grayscale value of the pixel are obtained and recorded as similar pixels of the pixel.

[0091] It should be noted that Z is a preset first parameter, which is preset to 2 based on experience and can be adjusted according to actual conditions, and is not specifically limited in this embodiment.

[0092] It should be noted that the grayscale values ​​of the jack boundary pixels are relatively high, so the larger the grayscale value of the pixel, the more likely it is that the pixel is a growth boundary pixel. On the basis of the high grayscale value, the first neighborhood of the pixel must have a pixel with a grayscale value similar to that of the pixel (otherwise it is a noise point), so the smaller the grayscale difference between the pixel and similar pixels, the more likely the pixel is a growth boundary pixel. At the same time, Figure 2 As shown, Figure 2 This is a schematic diagram of the jack. The pixel points at the boundary of the jack must be in the form of a straight line or a circle. Therefore, when constructing a straight line or a circle between any pixel point and the adjacent pixel points, there must be a fitting line with a small grayscale difference between any pixel point and the pixel point.

[0093] Secondly, obtain the fitting circle of any pixel point and similar pixel points, obtain the B pixel points closest to the pixel point on the fitting circle, obtain the sum of the grayscale differences between the B pixel points and the pixel point, and record it as the first grayscale error of the pixel point.

[0094] It should be noted that B is a preset second parameter, which is preset to 10 based on experience and can be adjusted according to actual conditions, and is not specifically limited in this embodiment.

[0095] Then, a fitting straight line between any pixel point and similar pixel points is obtained, B pixel points closest to the pixel point on the fitting straight line are obtained, and the sum of the grayscale differences between the B pixel points and the pixel point is obtained, which is recorded as the second grayscale error of the pixel point.

[0096] Finally, according to the grayscale value of the pixel, the grayscale difference between the pixel and adjacent pixels, and the difference between the first grayscale error and the second grayscale error of the pixel, the possibility that the pixel is the termination pixel is obtained.

[0097] As an embodiment, a method for obtaining the possibility that any pixel point is a termination pixel point is as follows:

[0098]

[0099] in, Indicates The pixels are the possibilities of the termination pixels; Indicates The gray value of a pixel, Indicates The number of similar pixels to a pixel, Indicates The pixel Gray values ​​of similar pixels; Indicates The first grayscale error of pixels, Indicates The second grayscale error of pixels; represents the minimum function, represents the absolute value function, Represents an exponential function with a natural constant as its base.

[0100] It should be noted that Indicates The sum of the grayscale differences between a pixel and all similar pixels, Indicates The greater the difference between the first pixel and the adjacent pixels, the The smaller the possibility that a pixel is the termination pixel; Indicates The pixel point and the adjacent pixel points are on the fitting line and fitting circle. The part with the smallest grayscale error among the pixel point and the adjacent pixel points on the fitting line and the adjacent pixel points on the fitting circle represents the The probability that a pixel belongs to a circular boundary or a straight boundary, Indicates The greater the grayscale difference between the pixel point and the adjacent pixel points on the fitting line or fitting circle, the The smaller the probability that a pixel is the termination pixel.

[0101] For several growth seed points in the socket area, regional growth is performed according to the similarity of pixel points until the probability that the pixel point reached is the termination pixel point is greater than the preset threshold. All pixel points are traversed to obtain the socket area of ​​any metal panel wall switch grayscale image.

[0102] It should be noted that the preset threshold is set to 0.7 based on experience and can be adjusted according to actual conditions, and this embodiment does not make any specific limitation.

[0103] So far, the socket area of ​​any metal panel wall switch grayscale image is obtained through the above method.

[0104] Step S003, analyze the symmetry of the socket area of ​​the grayscale image of any metal panel wall switch, and obtain the standardization of the socket area of ​​the grayscale image of the metal panel wall switch; analyze the overlap of pixel points in the socket area of ​​continuous metal panel wall switch grayscale images, and obtain the importance of any metal panel wall switch grayscale image in combination with the standardization of the socket area of ​​continuous metal panel wall switch grayscale images.

[0105] It should be noted that, in order to sort the metal panel wall switch grayscale images according to their importance, it is first necessary to determine the importance of each metal panel wall switch grayscale image.

[0106] It should be noted that, since the embodiment of the present invention takes into account that for the metal panel wall switches produced on the production line, some unqualified sockets should be focused on, because these sockets often reflect the problems of the production line, so this embodiment obtains the standardization of the sockets through the symmetry of the sockets; for production, if there is a problem, then the continuous sockets produced will have problems (if only a single socket has a problem, it may be just an accidental factor, such as camera shake), so finally the importance of the final metal panel wall switch grayscale image is determined by the standardization of continuous images in time sequence.

[0107] Step 3.1, analyzing the symmetry of the socket area of ​​the grayscale image of any metal panel wall switch, and obtaining the standard degree of the socket area of ​​the grayscale image of the metal panel wall switch.

[0108] It should be noted that for metal panel wall switches produced on the production line, the focus should be on some unqualified sockets, because these unqualified sockets often reflect problems in the production line. The qualified socket area is an axially symmetrical figure. Therefore, for the socket area, first determine the symmetry axis, and then use the symmetry of the socket area about the symmetry axis to obtain the compliance of each socket with the standard.

[0109] First, a coordinate system is established for all grayscale images of metal panel wall switches, with the lower left pixel as the coordinate origin, the horizontal right direction of the lower left pixel as the positive direction of the X axis, and the vertical upward direction of the lower left pixel as the positive direction of the Y axis.

[0110] Secondly, for any metal panel wall switch grayscale image, obtain the mean of the horizontal coordinates of the pixel points in all the socket areas, record it as the horizontal coordinate of the symmetry axis, and the vertical line where the horizontal coordinate of the symmetry axis is located is the symmetry axis of the socket area of ​​the metal panel wall switch grayscale image.

[0111] Finally, the standard degree of the socket area is obtained according to the gray value difference of the corresponding pixel points on both sides of the symmetry axis of the socket area.

[0112] It should be noted that for the socket area of ​​any metal panel wall switch grayscale image, the better the symmetry, the higher the standardization. The symmetry can be expressed by the grayscale difference of the corresponding pixels on both sides of the symmetry axis of the socket area. The smaller the grayscale difference of all symmetrical pixels in the socket area, the better the symmetry and the higher the standardization.

[0113] As an embodiment, a method for obtaining the standard degree of the socket area of ​​any metal panel wall switch grayscale image is as follows:

[0114]

[0115] in, For the The standardization of the socket area of ​​a grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of a pixel, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of the pixel point symmetrical about the symmetry axis, represents the absolute value function, Represents an exponential function with a natural constant as its base.

[0116] It should be noted that a qualified socket area is symmetrical about the symmetry axis, so the grayscales of all pixels in the socket area obtained by region growth are more similar to those of the pixels symmetrical about the symmetry axis, that is, The smaller it is, the more standard the jack area is and the higher the degree of standardization is.

[0117] Step 3.2, analyzing the overlap of the pixels in the socket area of ​​the continuous metal panel wall switch grayscale image, combining the standard degree of the socket area of ​​the continuous metal panel wall switch grayscale image, and obtaining the importance of any metal panel wall switch grayscale image.

[0118] It should be noted that, because the importance of the metal panel wall switch grayscale image should focus on the problems existing in the production line, if there is a problem with the production line, it may cause problems with the sockets of consecutive metal panel wall switches. Therefore, the degree of correspondence of the sockets of consecutive metal panel wall switch grayscale images must also be considered to determine the importance of the final metal panel wall switch grayscale image.

[0119] First, the socket correspondence degree of the continuous metal panel wall switch grayscale image is determined.

[0120] It should be noted that the degree of socket correspondence in the grayscale image of the continuous metal panel wall switch is related to the similarity between the socket areas. The better the overlap between the socket areas and the closer the number of pixels in the socket areas, the greater the similarity between the socket areas, and the greater the socket correspondence in the grayscale image of the continuous metal panel wall switch.

[0121] As an embodiment, a method for obtaining the degree of correspondence between any continuous grayscale images of metal panel wall switches is as follows:

[0122] Overlap the symmetry axes of the socket areas of the continuous metal panel wall switch grayscale images, and record it as the maximum overlap of the continuous metal panel wall switch grayscale images;

[0123]

[0124] in, Indicates Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch, Indicates Grayscale image of a metal panel wall switch and The number of overlapping pixels of the grayscale images of the metal panel wall switch under the condition of maximum overlap, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, represents an exponential function with a natural constant as base, represents the absolute value function.

[0125] It should be noted that if the sockets between the grayscale images of the continuous metal panel wall switches are to correspond, the pixels in the socket area should correspond. Therefore, when the grayscale images of the continuous metal panel wall switches are at the maximum overlap, the greater the proportion of the number of overlapping pixels in each socket area, that is, The larger the value, the better the overlap and the higher the degree of socket correspondence. At the same time, the smaller the difference in the number of pixels in each socket area, that is, The smaller it is, the higher the similarity of the jack areas is and the higher the jack correspondence is.

[0126] Secondly, the importance of the grayscale image of the metal panel wall switch is obtained according to the standard degree and the socket correspondence degree between the grayscale image of any metal panel wall switch and the grayscale image of the adjacent metal panel wall switch.

[0127] It should be noted that the lower the standard of the grayscale image of the metal panel wall switch, the more important the grayscale image of the metal panel wall switch is. When a single socket area is standard, further analysis is performed. If only a single socket has a problem, it may be an accidental phenomenon, such as a problem caused by camera shaking. Therefore, the adjacent grayscale images of the metal panel wall switches should be observed. Because of production problems, the metal panel wall switches will have problems continuously. For adjacent images in time sequence, when the socket correspondence degree is high, the adjacent image standard is also low, which means that the image is more important.

[0128] As an embodiment, a method for obtaining the importance of a grayscale image of any metal panel wall switch is as follows:

[0129]

[0130] in, Indicates The importance of the grayscale image of a metal panel wall switch; , , Respectively represent , , The standardization of the socket area of ​​a grayscale image of a metal panel wall switch; , Indicates Grayscale image of a metal panel wall switch and The socket correspondence degree of the grayscale image of the metal panel wall switch, Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch; represents an exponential function with a natural constant as base, Represents the maximum and minimum normalization function.

[0131] It should be noted that Indicates Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch and the The standard degree of the socket area of ​​the grayscale image of the metal panel wall switch is The influence of the importance of the grayscale image of the metal panel wall switch The greater the standard degree of the socket area of ​​the grayscale image of the metal panel wall switch, the The grayscale image of the metal panel wall switch is less important, and the Grayscale image of a metal panel wall switch and The greater the degree of correspondence between the sockets of the grayscale images of the first and second metal panel wall switches, the more similar the grayscale images of the two metal panel wall switches are. The greater the importance of the grayscale image of the metal panel wall switch.

[0132] So far, the importance of any grayscale image of a metal panel wall switch is obtained through the above method.

[0133] Step S004: reorder the grayscale images of the metal panel wall switches according to their importance, perform LZ77 compression, and then perform data synchronous transmission.

[0134] The metal panel wall switch grayscale images are reordered in descending order of their importance to obtain a new metal panel wall switch grayscale image sequence, and then the new metal panel wall switch grayscale image sequence is compressed by LZ77 to obtain compressed data, which is uploaded to the cloud storage server through data synchronization transmission.

[0135] It should be noted that the LZ77 compression algorithm is a dictionary-based compression method that reduces the size of data by identifying and utilizing repeated patterns in data. Specifically, the LZ77 algorithm uses a sliding window to find the longest repeated substring and replaces the repeated part with a pointer to the repeated substring, thereby achieving the purpose of compressing data.

[0136] It should be noted that when the image data is rearranged and then LZ77 compression is applied, if the important data (i.e. the more significant content or structure in the image) is located at the later position, they may refer to or depend on the previous data. This dependency means that if the previous data is lost or damaged, the later data may not be reconstructed or restored correctly. Therefore, the later data has a higher dependence on the integrity of the previous data.

[0137] It should be noted that by performing LZ77 compression on the rearranged images and uploading them to the cloud storage service, and then using the network link to transmit the data, the key images that should be of concern are placed closer to the front. This is because the core idea of ​​LZ77 is to use previously appeared images to replace the current image. The later the image is, the higher the degree of dependence on the previous image. If there is a problem in the front, there is a high probability that there will be problems in the back as well. This technology rearranges the images and then compresses them. If a loss occurs, the risk is very small.

[0138] So far, the above method has realized the storage of the grayscale image of the metal panel wall switch and the synchronous transmission of data.

[0139] At this point, this embodiment is completed.

[0140] It should be noted that the The model is only used to represent negative correlation and constrain the output of the model to be in In the specific implementation, it can be replaced by other models with the same purpose. This embodiment is only based on The model is described as an example without any specific limitation. is the input to the model.

[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data synchronization transmission method for a metal panel production line, characterized in that: The method comprises the following steps: Get grayscale images of metal panel wall switches in chronological order on an automatic production line; Perform image segmentation on a plurality of grayscale images of metal panel wall switches to obtain a socket area of ​​each grayscale image of the metal panel wall switch; Analyze the symmetry of the socket area of ​​any metal panel wall switch grayscale image to obtain the standard of the socket area of ​​the metal panel wall switch grayscale image; analyze the overlap of pixel points in the socket area of ​​continuous metal panel wall switch grayscale images, and combine the standard of the socket area of ​​continuous metal panel wall switch grayscale images to obtain the importance of any metal panel wall switch grayscale image; The grayscale images of the metal panel wall switches are reordered according to their importance, and then LZ77 compression is performed before data synchronization transmission is performed.

2. According to claim 1, a data synchronization transmission method for a metal panel production line is characterized in that: The specific method of performing image segmentation on a plurality of metal panel wall switch grayscale images to obtain the socket area of ​​each metal panel wall switch grayscale image includes: Determine a number of growth seed points in the socket area according to the grayscale value of any pixel and the grayscale difference between the pixel and neighboring pixels; Perform regional growth on several growth seeds in the socket area according to the similarity of grayscale, determine the termination condition of regional growth according to the grayscale difference between the pixel and the adjacent pixels, and obtain the possibility that any pixel is the termination pixel; All growth seed points are traversed until the probability that the pixel point reached is the termination pixel point is greater than a preset threshold, and the socket area of ​​the grayscale image of any metal panel wall switch is obtained.

3. According to claim 2, a data synchronization transmission method for a metal panel production line is characterized in that: The specific method for obtaining the plurality of growth seed points in the socket area according to the gray value of any pixel and the gray difference between the pixel and the neighboring pixel is as follows: According to the grayscale difference between any pixel point and the pixel points in the first neighborhood, the difference between the pixel point and the pixel points in the first neighborhood is obtained; according to the grayscale difference between any pixel point and the pixel points in the second neighborhood, the possibility that any pixel point is a mark is obtained, and the first neighborhood and the second neighborhood are both preset ranges; According to the gray value of any pixel point, the gray difference between the pixel point and the neighboring pixel points, and the possibility that the pixel point is a mark, the possibility that any pixel point is a growth seed point of the socket area is obtained; The grayscale value of any pixel and the possibility that the pixel is a mark are inversely proportional to the possibility that the pixel is a growth seed point of the hole area, and the grayscale difference between any pixel and its neighboring pixels is directly proportional to the possibility that the pixel is a growth seed point of the hole area; The pixel points whose probability of being the growth seed points of the plug-in area is greater than the preset first parameter are recorded as the growth seed points of the plug-in area.

4. According to claim 3, a data synchronization transmission method for a metal panel production line is characterized in that: The specific method for obtaining the difference between an arbitrary pixel and the pixels in the first neighborhood based on the grayscale difference between the arbitrary pixel and the pixels in the first neighborhood; and obtaining the possibility that an arbitrary pixel is a mark based on the grayscale difference between the arbitrary pixel and the pixels in the second neighborhood is: For any pixel point, the grayscale value of the pixel point is subtracted from the grayscale values ​​of all pixels in the first neighborhood and the absolute value is taken, the absolute values ​​of all differences are summed up to obtain the difference between the pixel point and the pixels in the first neighborhood; the grayscale value of the pixel point is subtracted from the grayscale values ​​of all pixels in the second neighborhood and the absolute value is taken, the absolute values ​​of all differences are summed up to obtain the possibility of the pixel point leaving a mark.

5. According to claim 2, a data synchronization transmission method for a metal panel production line is characterized in that: The method of performing regional growth on several growth seeds in the socket region according to the similarity of grayscale, determining the termination condition of regional growth according to the grayscale difference between the pixel point and the adjacent pixel points, and obtaining the possibility that any pixel point is the termination pixel point is as follows: Obtain Z pixels in the first neighborhood of any pixel that are closest to the grayscale value of the pixel, and record them as similar pixels of the pixel; The Z is a preset first parameter; Obtain a fitting circle between any pixel point and similar pixel points, obtain B pixel points on the fitting circle that are closest to the pixel point, obtain the sum of grayscale differences between the B pixel points and the pixel point, and record it as the first grayscale error of the pixel point; Obtain a fitting straight line between any pixel point and similar pixel points, obtain B pixel points on the fitting straight line that are closest to the pixel point, obtain the sum of grayscale differences between the B pixel points and the pixel point, and record it as the second grayscale error of the pixel point; B is a preset second parameter; According to the grayscale value of the pixel, the grayscale difference between the pixel and adjacent pixels, and the difference between the first grayscale error and the second grayscale error of the pixel, the possibility of the pixel being the termination pixel is obtained; in, Indicates The pixels are the possibilities of the termination pixels; Indicates The gray value of a pixel, Indicates The number of similar pixels to a pixel, Indicates The pixel Gray values ​​of similar pixels; Indicates The first grayscale error of pixels, Indicates The second grayscale error of pixels; represents the minimum function, represents the absolute value function, Represents an exponential function with a natural constant as its base.

6. According to claim 1, a data synchronization transmission method for a metal panel production line is characterized in that: The specific method of analyzing the symmetry of the socket area of ​​the grayscale image of any metal panel wall switch and obtaining the standard degree of the socket area of ​​the grayscale image of the metal panel wall switch includes: Get the symmetry axis of the socket area of ​​any metal panel wall switch grayscale image; According to the gray value difference of the corresponding pixels on both sides of the symmetry axis of the socket area, the standard degree of the socket area is obtained: in, For the The standardization of the socket area of ​​a grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of a pixel, Indicates Grayscale image of a metal panel wall switch showing the jack area The gray value of the pixel point symmetrical about the symmetry axis, represents the absolute value function, Represents an exponential function with a natural constant as its base.

7. The data synchronization transmission method for a metal panel production line according to claim 6, characterized in that: The specific method for obtaining the symmetry axis of the socket area of ​​the grayscale image of any metal panel wall switch is: A coordinate system is established for all grayscale images of metal panel wall switches, with the lower left pixel as the coordinate origin, the horizontal right direction of the lower left pixel as the positive direction of the X axis, and the vertical upward direction of the lower left pixel as the positive direction of the Y axis; For any grayscale image of a metal panel wall switch, obtain the mean of the horizontal coordinates of the pixels in all the socket areas, record it as the horizontal coordinate of the symmetry axis, and the vertical line where the horizontal coordinate of the symmetry axis is located is the symmetry axis of the socket area of ​​the metal panel wall switch grayscale image.

8. The data synchronization transmission method for a metal panel production line according to claim 1, characterized in that: The analysis of the overlap of the pixel points in the socket area of ​​the continuous metal panel wall switch grayscale image, combined with the standard degree of the socket area of ​​the continuous metal panel wall switch grayscale image, obtains the importance of any metal panel wall switch grayscale image, including the specific method of: Obtain the socket correspondence degree of the continuous metal panel wall switch grayscale image; According to the standard degree and socket correspondence degree of any metal panel wall switch grayscale image and the adjacent metal panel wall switch grayscale image, the importance of the metal panel wall switch grayscale image is obtained: in, Indicates The importance of the grayscale image of a metal panel wall switch; , , Respectively represent , , The standardization of the socket area of ​​a grayscale image of a metal panel wall switch; , Indicates Grayscale image of a metal panel wall switch and The socket correspondence degree of the grayscale image of the metal panel wall switch, Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch; represents an exponential function with a natural constant as base, Represents the maximum and minimum normalization function.

9. The data synchronization transmission method for a metal panel production line according to claim 8, characterized in that: The specific method for obtaining the socket correspondence degree of the continuous metal panel wall switch grayscale image is: Overlap the symmetry axes of the socket areas of the continuous metal panel wall switch grayscale images, and record it as the maximum overlap of the continuous metal panel wall switch grayscale images; in, Indicates Grayscale image of a metal panel wall switch and The degree of correspondence between the sockets of the grayscale image of the metal panel wall switch, Indicates Grayscale image of a metal panel wall switch and The number of overlapping pixels of the grayscale images of the metal panel wall switch under the condition of maximum overlap, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, Indicates The number of pixels in the socket area of ​​the grayscale image of a metal panel wall switch, represents the absolute value function.

10. The data synchronization transmission method for a metal panel production line according to claim 1, characterized in that: The method of reordering the grayscale images of the metal panel wall switches according to their importance, performing LZ77 compression, and then performing data synchronous transmission includes the following specific methods: The metal panel wall switch grayscale images are reordered in descending order of their importance to obtain a new metal panel wall switch grayscale image sequence, and then the new metal panel wall switch grayscale image sequence is compressed by LZ77 to obtain compressed data, which is uploaded to the cloud storage server through data synchronization transmission.

Citation Information

Patent Citations

  • Picture compression method in AOI (Automatic Optic Inspection) detection system and display panel defect detection system

    CN107333124A

  • Remote monitoring system for energy consumption detection of combined air handling unit

    CN115269659A

  • Aluminum alloy auto part mold defect detection method based on image processing

    CN117011297A

  • Socket pose determination method and device, equipment and storage medium

    CN117315031A

  • Data transmission protocol of mold production intelligent monitoring system

    CN118283126A