CN115471486A - Switch interface integrity detection method - Google Patents

Switch interface integrity detection method Download PDF

Info

Publication number
CN115471486A
CN115471486A CN202211190970.3A CN202211190970A CN115471486A CN 115471486 A CN115471486 A CN 115471486A CN 202211190970 A CN202211190970 A CN 202211190970A CN 115471486 A CN115471486 A CN 115471486A
Authority
CN
China
Prior art keywords
image
gray level
network interface
new
gray
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202211190970.3A
Other languages
Chinese (zh)
Inventor
韦振
魏荣生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspector Information Technology Suzhou Co ltd
Original Assignee
Inspector Information Technology Suzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspector Information Technology Suzhou Co ltd filed Critical Inspector Information Technology Suzhou Co ltd
Priority to CN202211190970.3A priority Critical patent/CN115471486A/en
Publication of CN115471486A publication Critical patent/CN115471486A/en
Priority to LU504273A priority patent/LU504273B1/en
Priority to PCT/CN2023/086364 priority patent/WO2023126030A1/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4007Interpolation-based scaling, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Abstract

The invention discloses a switch interface integrity detection method, and relates to the field of machine vision. The method mainly comprises the following steps: acquiring a gray image of an exchanger image containing a network interface, and performing bilinear interpolation on the gray image to acquire an up-sampling image; performing histogram equalization on the up-sampled image to obtain an enhanced image, and determining the gray level mapped by each new gray level according to the frequency occupancy ratio of the up-sampled image and the frequency occupancy ratio of the up-sampled image to all new gray levels in the up-sampled image in the histogram equalization process, wherein the new gray level is the gray level existing in the up-sampled image but not existing in the gray level image; and matching by using a standard network interface template to determine whether an abnormal network interface exists in the enhanced image and locate the abnormal network interface. The embodiment of the invention can simultaneously test all network interfaces contained in the target image without sequentially carrying out visual inspection, thereby shortening the time required by inspection.

Description

Switch interface integrity detection method
Technical Field
The application relates to the field of machine vision, in particular to a switch interface integrity detection method.
Background
The switch can cause the network interface of the switch to be damaged to a certain extent due to the collision and other reasons existing in the transportation process, so that the subsequent use is influenced due to poor contact at the network interface.
Therefore, after the batch of switches is transported to the point of sale or the point of inventory, the relevant personnel need to extract a certain proportion of the switches from the batch to perform a visual inspection, and check the integrity of each network interface one by one during the visual inspection to determine that no abnormal network interface exists in the inspected batch.
However, the network interface is small in size, and in order to ensure the accuracy of the detection result, an inspector tends to invest a lot of time to perform the inspection, and even so, it may be difficult to ensure the inspection accuracy, and the visual inspection is prone to visual fatigue to further reduce the inspection efficiency and accuracy.
Disclosure of Invention
Aiming at the technical problem, the invention provides a switch interface integrity detection method, which comprises the steps of carrying out graying and bilinear interpolation on a front image of a switch containing a network interface to obtain an up-sampling image, respectively determining mapped gray levels for a new gray level in the up-sampling image and gray levels except the new gray level to obtain a target image containing more details, and finally realizing the integrity detection of the network interface in the switch in a template matching mode. All network interfaces contained in the target image can be tested simultaneously without visual inspection in sequence, so that the time required for inspection is shortened, the visual fatigue caused by manual visual inspection is effectively avoided, and the accuracy and the efficiency of the integrity inspection of the network interfaces of the switch are improved.
The embodiment of the invention provides a method for detecting the integrity of an interface of a switch, which comprises the following steps:
the method comprises the steps of collecting a front image of the switch including a network interface, carrying out graying to obtain a gray image, and carrying out up-sampling on the gray image through bilinear interpolation to obtain an up-sampling image.
Performing histogram equalization on the up-sampled image to obtain an enhanced image, and respectively determining each new gray level in the up-sampled image and the mapped gray level of the gray level except the new gray level in the histogram equalization process, wherein the mapped gray level of each new gray level is respectively determined according to the frequency occupancy ratio of the mapped gray level in the up-sampled image and the frequency occupancy ratio of the mapped gray level to all new gray levels in the up-sampled image, and the new gray level is a gray level existing in the up-sampled image but not existing in the gray image.
And performing template matching on the enhanced image by using a template corresponding to the standard network interface, judging whether an abnormal network interface exists in the enhanced image according to a matching result, and positioning the abnormal network interface under the condition that the abnormal network interface exists.
Further, in the method for detecting the integrity of the switch interface, the determination of the gray level mapped by each new gray level according to the frequency ratio of the gray level in the up-sampled image and the frequency ratio of the gray level to all new gray levels in the up-sampled image includes:
and respectively determining the value mapped by the cumulative distribution function of each new gray level according to the frequency ratio of each new gray level in the up-sampled image and the ratio of the frequency ratio of each new gray level to all new gray levels in the up-sampled image, wherein the larger the ratio of each new gray level to the frequency ratio of all new gray levels in the up-sampled image is, the smaller the value mapped by the cumulative distribution function corresponding to each new gray level is.
And respectively determining the mapped gray level of each new gray level according to the mapped value of the cumulative distribution function of each new gray level.
Further, in the method for detecting the integrity of the interface of the switch, template matching is performed on the enhanced image by using a template corresponding to the standard network interface, and whether an abnormal network interface exists in the enhanced image is judged according to a matching result, including:
and obtaining the similarity between the template corresponding to the standard network interface and a region to be detected in the enhanced image, wherein the region to be detected is a region in the enhanced image, which is as large as the template.
And under the condition that the similarity is greater than a preset first threshold value, judging that the area to be detected is the area where the normal network interface is located.
And under the condition that the similarity is not greater than a preset first threshold, judging whether the similarity is greater than a preset second threshold, if so, judging the area to be detected as the area where the abnormal interface is located, wherein the preset second threshold is smaller than the preset first threshold.
Further, in the switch interface integrity detection method, the similarity is a structural similarity SSIM.
Further, in the method for detecting integrity of an interface of a switch, the similarity is a pearson correlation coefficient.
Further, in the method for detecting the integrity of the interface of the switch, before acquiring the front image of the switch including the network interface, the method further includes: and setting parallel light to irradiate the switch containing the network interface.
Further, in the method for detecting the integrity of the switch interface, after performing histogram equalization on the up-sampled image to obtain an enhanced image, the method further includes: and carrying out edge detection on the enhanced image, and taking the edge detection result as a new enhanced image.
Further, in the switch interface integrity detection method, an operator used for edge detection is any one of a Roberts operator, a Prewitt operator, a Sobel operator and a Canny operator.
Further, the method for detecting integrity of the interface of the switch further includes: and locating the abnormal network interface under the condition that the abnormal network interface exists.
Compared with the prior art, the embodiment of the invention provides a method for detecting the integrity of the interface of the switch, which has the following beneficial effects: all network interfaces contained in the target image can be tested simultaneously without visual inspection in sequence, so that the time required for inspection is shortened, the visual fatigue caused by manual visual inspection is effectively avoided, and the accuracy and the efficiency of the integrity inspection of the network interfaces of the switch are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for detecting integrity of an interface of a switch according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; in the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
An embodiment of the present invention provides a method for detecting integrity of an interface of a switch, as shown in fig. 1, including:
step S101, collecting a front image of the switch including a network interface, carrying out graying to obtain a gray image, and carrying out up-sampling on the gray image through bilinear interpolation to obtain an up-sampled image.
Step S102, performing histogram equalization on the up-sampled image to obtain an enhanced image, and respectively determining each new gray level in the up-sampled image and the gray level mapped by the gray levels except the new gray level in the histogram equalization process, wherein the new gray level is the gray level existing in the up-sampled image but not existing in the gray level image.
And determining the gray level mapped by each new gray level according to the frequency ratio of the gray level to the frequency ratio of all new gray levels in the up-sampled image.
And S103, performing template matching on the enhanced image by using a template corresponding to the standard network interface, judging whether an abnormal network interface exists in the enhanced image according to a matching result, and positioning the abnormal network interface under the condition that the abnormal network interface exists.
Through the steps, all network interfaces contained in the enhanced image can be tested at the same time without carrying out visual inspection in sequence, so that the time required by inspection is shortened, the visual fatigue caused by manual visual inspection is effectively avoided, and the accuracy and the efficiency of the integrity inspection of the network interfaces of the switch are improved.
The embodiment of the invention aims to: the integrity detection of a rated network interface existing in the switch is realized through technical means such as machine vision, image processing and the like, the time required by detection is shortened, and the detection precision is improved.
Further, step S101, a front image of the switch including the network interface is collected and grayed to obtain a grayscale image, and the grayscale image is up-sampled by bilinear interpolation to obtain an up-sampled image.
Can set up multilayer goods shelves and be used for depositing the switch, simultaneously with the unified orientation of switch to carry out the collection that contains the image of network interface one side in the switch, the resolution ratio performance of camera needs to be high enough, can set up indoor ambient light in advance, guarantees that ambient light is bright enough and even, makes the presentation of detail part more clear on the image of gathering.
Because different switches may have different positions on the shelf, a blind area of view may exist in the image acquisition device, and thus a complete front image of the switch including the network interface may not be captured.
In the embodiment of the invention, the image acquisition equipment is moved and the image is shot in a mode that the image acquisition equipment is arranged on the front face of the switch containing the network interface in parallel, and finally all the shot images are spliced to obtain the front face image of the switch, so that the adverse effects on the acquired image due to different distances from different positions in the switch to the lens of the image acquisition equipment can be effectively avoided.
Optionally, before the front image of the switch including the network interface is collected, parallel light can be arranged in a parallel mode to irradiate the switch including the network interface, so that the details of the switch interface can be better presented in the collected front image, and the integrity detection precision of the switch interface in the follow-up process is improved.
The collected image is subjected to conventional gray processing, the influence of redundant color factors is removed, and the calculated amount in the detection process can be effectively reduced. The graying process comprises the following steps: and taking the maximum value of pixel values of pixel points in the front image of the switch containing the network interface in three channels of RGB as the gray value of the pixel points in the gray image.
The appearance detection of the batch switch interface mainly aims at the deformation and the defect of the metal copper contact, but the deformation or the damage possibly existing in the metal copper contact is difficult to be effectively found in a short time through visual observation, so that the integrity detection efficiency of the network interface of the switch is limited.
The method comprises the steps that a plurality of network interfaces exist in one side of an exchanger, which comprises the network interfaces, so that if the network interfaces are directly processed, the area corresponding to each network interface is small, and a more accurate detection result cannot be obtained.
It should be noted that, the image scaling may be implemented by using bilinear interpolation, and the scaling step of the image by using bilinear interpolation is as follows: calculating scaling factors between the target picture and the original picture, wherein the scaling factors respectively comprise the proportion in the row direction and the proportion in the column direction; reversely deducing the virtual pixel position in the original picture from the pixel position of the target picture by using the scaling factor; and finding four pixel points adjacent in the width and height directions according to the virtual pixel positions, and performing bilinear interpolation calculation on the four pixel points to obtain a pixel value in the target image. Specifically, each pixel of the image output by the bilinear interpolation algorithm is the result of the operation of four pixels (2 × 2) in the original image.
Further, step S102, histogram equalization is performed on the up-sampled image to obtain an enhanced image, and in the histogram equalization process, each new gray level in the up-sampled image and the gray level mapped by the gray levels other than the new gray level are respectively determined.
And determining the gray level mapped by each new gray level according to the frequency count ratio of the gray level to the up-sampled image and the ratio of the gray level to the frequency count of all new gray levels in the up-sampled image, wherein the new gray level is a gray level existing in the up-sampled image but not existing in the gray image.
In the embodiment of the invention, the histogram equalization is used for carrying out contrast enhancement on the image so as to improve the definition of the fuzzy edge contour, but during the histogram equalization, the gray levels with less pixel number distribution may be lost indiscriminately or be unobvious, so that the copper contact plates with less pixel point distribution and the edge gray levels are not obvious, and the integrity detection of the subsequent network interface cannot be effectively carried out.
After bilinear interpolation is carried out, the generated pixel points are possible to be in an edge high-frequency area or a uniform low-frequency area of an upsampled image, the edge high-frequency area in the gray image is more likely to generate a new gray level in the upsampled image, namely, the gray level which does not exist in the original gray image is more likely to occur, because the pixel points are positioned at the high-frequency edge with gray gradient, the new gray level is more likely to occur when the adjacent pixel points are subjected to bilinear interpolation calculation, and on the contrary, in the low-frequency area with more uniform gray level, the gray level of the adjacent pixel points is closer, and the gray level generated after the bilinear interpolation calculation is the gray level which is closer to the adjacent pixel points.
Therefore, in the embodiment of the present invention, a first gray level histogram corresponding to the up-sampled image and a second gray level histogram corresponding to the gray level image may be obtained respectively, so as to screen out each new gray level existing in the first gray level histogram but not existing in the second gray level histogram.
In the embodiment of the invention, the gray level mapped by each new gray level is determined according to the frequency of each new gray level in the first gray level histogram and the proportion of the frequency of all the new gray levels in the first gray level histogram.
Histogram equalization is a simple and effective image enhancement technique, which changes the histogram of an image to change the gray scale of each pixel in the image, and is mainly used for enhancing the contrast of an image with a small dynamic range. The gray distribution in the original image may be concentrated in a narrow interval, which results in an insufficiently clear image. For example, an overexposed image will have its gray levels centered in the high brightness range, while an underexposure will have its gray levels centered in the low brightness range.
The histogram equalization is adopted, so that the histogram of the original image can be converted into a uniformly distributed form, the dynamic range of gray value difference among pixels is increased, and the effect of enhancing the integral contrast of the image is achieved. In other words, the basic principle of histogram equalization is: the gray values with more pixels in the image, namely the gray values which play a main role in the picture, are widened, and the gray values with less pixels (namely the gray values which do not play a main role in the picture) are merged, so that the contrast is increased, the image is clear, and the aim of enhancing is fulfilled.
However, for the up-sampled image obtained in the embodiment of the present invention, there are new gray levels that do not exist in the original gray map, and the existence of these new gray levels enables details of the network interface in the embodiment of the present invention to be completely retained, but if the gray histogram equalization is directly performed on the up-sampled image, these new gray levels in the enhanced image after the histogram equalization are not obvious because their frequency is small, so that the integrity detection of the network interface still cannot be performed on the basis of the enhanced image.
In the embodiment of the present invention, determining each newly generated gray level and the mapped gray levels of gray levels other than the newly generated gray level includes:
respectively determining the value of each newly-generated gray level after the cumulative distribution function mapping according to the frequency ratio of each newly-generated gray level in the up-sampled image and the frequency ratio of each newly-generated gray level to all newly-generated gray levels in the up-sampled image, wherein the larger the ratio of each newly-generated gray level to the frequency ratio of all newly-generated gray levels in the up-sampled image is, the smaller the value of each newly-generated gray level after the cumulative distribution function mapping is; and respectively determining the gray level mapped by each new gray level according to the value mapped by the cumulative distribution function of each new gray level.
Meanwhile, according to the frequency occupancy ratio of the gray levels except each new gray level in the up-sampling image, the values mapped by the cumulative distribution function of the gray levels except each new gray level are respectively determined.
Specifically, the process of obtaining the value mapped by the cumulative distribution function of each gray level in the up-sampled image includes:
Figure 74787DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 342957DEST_PATH_IMAGE002
the mapped value of the cumulative distribution function corresponding to the kth gray level, k being [0]An integer in the range, j is [0]An integer within the range, L is the total number of gray levels in the upsampled image,
Figure 131922DEST_PATH_IMAGE003
m and N are the frequency of the jth gray level, and the length and width of the image respectively.
Meanwhile, when the k-th gray level is the new gray level,
Figure 217558DEST_PATH_IMAGE004
the value of (1) is the reciprocal of the frequency ratio of the new gray level in all the new gray levels, and it should be noted that the frequency ratio of the new gray level refers to the number of the pixel points of the new gray level in the up-sampled image; when the kth gray level is the new gray level,
Figure 724763DEST_PATH_IMAGE005
thus, the value mapped by the cumulative distribution function of each gray level in the up-sampled image is obtained.
And finally, after determining the values mapped by the cumulative distribution functions of all the gray levels, normalizing the values mapped by the cumulative distribution functions of all the gray levels to the range of [0, 255] respectively to obtain the gray level after histogram equalization corresponding to each gray level in the up-sampled image.
Therefore, the image resolution is improved, the image is enhanced, and the detail information with less distribution in the image is reserved as much as possible, wherein the detail information refers to the edge information of the copper contact or the tiny damage in the image.
Optionally, after obtaining the enhanced image after histogram equalization, edge detection may be performed on the enhanced image, and an edge detection result is used as a new enhanced image, so that the calculation amount in a subsequent template matching process can be reduced.
The image Edge is the most basic feature of an image, and the Edge (Edge) refers to the discontinuity of local characteristics of the image. Abrupt changes in information such as gray scale or texture are called edges. Such as abrupt changes in gray scale, abrupt changes in color, abrupt changes in texture, etc. An edge is the end of one region and the beginning of another region, and the image can be segmented using this feature. The edges of the image have both directional and amplitude properties. Edges can typically be detected by first or second derivatives. The first derivative is the maximum value as the position of the corresponding edge, and the second derivative is the zero crossing point as the position of the corresponding edge.
The process of edge detection by the edge operator of the first derivative comprises the following steps: and performing convolution and operation on each pixel point of the image by taking the template as a kernel, and then selecting a proper threshold value to extract the edge of the image. Common edge operators for the first derivative are: roberts operators, prewitt operators, sobel operators, canny operators, etc. The process of edge detection by the edge operator of the second derivative is based on the characteristic that the zero crossing point of the second derivative, and the common edge operator with the second derivative is a Laplacian operator.
The operator adopted in the edge detection process is any one of a Roberts operator, a Prewitt operator, a Sobel operator and a Canny operator.
Optionally, the enhanced image has rich image details and clear contrast, and meanwhile, the Canny operator has the advantage of dual-threshold detection, so that edge detection can be performed by preferentially using the Canny operator.
Further, step S103, performing template matching on the enhanced image by using a template corresponding to the standard network interface, determining whether an abnormal network interface exists in the enhanced image according to a matching result, and locating the abnormal network interface when the abnormal network interface exists.
The template matching is a process of traversing the enhanced image by using a template, and meanwhile, in the traversing process, if the area to be detected is a normal area where the network interface without defects is located, the similarity between the area to be detected and the template is larger than a preset first threshold value; otherwise, under the condition that the similarity between the area to be tested and the template is not greater than the preset threshold, the area to be tested may be the area where the defective network interface is located, or the area to be tested may not be the area where the network interface is located, but because a certain similarity exists between the area where the defective network interface is located and the template, the area to be tested may be determined as the area where the abnormal network interface is located under the condition that the similarity between the template and the area to be tested is greater than the preset second threshold, so that the network interface can be positioned while the integrity test is performed on the network interface.
Specifically, the similarity in the embodiment of the present invention may be a structural similarity SSIM, a pearson correlation coefficient, or another feature value used for calculating the similarity between images.
The Structural Similarity Index (SSIM) is an index for measuring the similarity between two images, and from the perspective of image composition, structural information is defined as being independent of brightness and contrast, reflecting the attributes of the structure of an object in a scene, and distortion is modeled as a combination of three different factors, namely brightness, contrast and structure, wherein the mean value is used as the estimation of brightness, the standard deviation is used as the estimation of contrast, and the covariance is used as the measure of the structural similarity.
In statistics, a Pearson correlation coefficient (Pearson product-moment correlation coefficient, abbreviated as PPMCC or PCCs) can be used to calculate the similarity between two images.
In summary, an embodiment of the present invention provides a method for detecting integrity of an interface of an exchange, in which an up-sampled image is obtained by graying and bilinear interpolation of a front image of the exchange including a network interface, mapped gray levels are respectively determined for a new gray level and gray levels other than the new gray level in the up-sampled image, a target image including more details is obtained, and finally, integrity detection of the network interface in the exchange is achieved by template matching.
The embodiment of the invention can simultaneously test all network interfaces contained in the target image without sequentially carrying out visual inspection, thereby shortening the time required by inspection, effectively avoiding visual fatigue caused by manual visual inspection, and improving the accuracy and efficiency of the integrity inspection of the network interfaces of the switch.
The use of words such as "including," "comprising," "having," and the like in this disclosure is an open-ended term that means "including, but not limited to," and is used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the method and system of the present invention, various components or steps may be decomposed and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The above-mentioned embodiments are merely examples for clearly illustrating the present invention and do not limit the scope of the present invention. It will be apparent to those skilled in the art that other variations and modifications may be made in the foregoing description, and it is not necessary or necessary to exhaustively enumerate all embodiments herein. All designs identical or similar to the present invention are within the scope of the present invention.

Claims (9)

1. A method for detecting integrity of a switch interface is characterized by comprising the following steps:
acquiring a front image of a switch including a network interface, carrying out graying to obtain a gray image, and carrying out up-sampling on the gray image through bilinear interpolation to obtain an up-sampled image;
performing histogram equalization on the up-sampled image to obtain an enhanced image, and respectively determining each new gray level in the up-sampled image and the mapped gray level of the gray level except the new gray level in the histogram equalization process, wherein the mapped gray level of each new gray level is respectively determined according to the frequency occupancy ratio of the mapped gray level in the up-sampled image and the frequency occupancy ratio of the mapped gray level to all new gray levels in the up-sampled image, and the new gray level is a gray level which exists in the up-sampled image but does not exist in the gray image;
and carrying out template matching on the enhanced image by using a template corresponding to the standard network interface, and judging whether an abnormal network interface exists in the enhanced image according to a matching result.
2. The method of claim 1, wherein the step of determining the mapped gray level of each new gray level according to the frequency ratio of the mapped gray level to the frequency ratio of all new gray levels in the up-sampled image comprises:
respectively determining the value of each newly-generated gray level after the cumulative distribution function mapping according to the frequency ratio of each newly-generated gray level in the up-sampled image and the frequency ratio of each newly-generated gray level to all newly-generated gray levels in the up-sampled image, wherein the larger the ratio of each newly-generated gray level to the frequency ratio of all newly-generated gray levels in the up-sampled image is, the smaller the value of each newly-generated gray level after the cumulative distribution function mapping is;
and respectively determining the mapped gray level of each new gray level according to the mapped value of the cumulative distribution function of each new gray level.
3. The method for detecting the integrity of the switch interface according to claim 1, wherein the step of performing template matching on the enhanced image by using a template corresponding to the standard network interface and determining whether an abnormal network interface exists in the enhanced image according to a matching result comprises:
obtaining the similarity between a template corresponding to a standard network interface and a region to be detected in an enhanced image, wherein the region to be detected is a region in the enhanced image, which is as large as the template;
under the condition that the similarity is larger than a preset first threshold value, judging that the area to be detected is the area where the normal network interface is located;
and under the condition that the similarity is not greater than a preset first threshold, judging whether the similarity is greater than a preset second threshold, if so, judging the area to be detected as the area where the abnormal interface is located, wherein the preset second threshold is smaller than the preset first threshold.
4. The method as claimed in claim 3, wherein the similarity is Structural Similarity (SSIM).
5. The method according to claim 3, wherein the similarity is Pearson correlation coefficient.
6. The method as claimed in claim 1, wherein before collecting the image of the front side of the switch including the network interface, the method further comprises: and setting parallel light to irradiate the switch containing the network interface.
7. The method as claimed in claim 1, wherein after histogram equalization is performed on the up-sampled image to obtain an enhanced image, the method further comprises: and carrying out edge detection on the enhanced image, and taking the edge detection result as a new enhanced image.
8. The method as claimed in claim 7, wherein the operator used for edge detection is any one of Roberts operator, prewitt operator, sobel operator and Canny operator.
9. The method for detecting the integrity of the interface of the switch according to claim 1, further comprising: and locating the abnormal network interface under the condition that the abnormal network interface exists.
CN202211190970.3A 2022-09-28 2022-09-28 Switch interface integrity detection method Withdrawn CN115471486A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202211190970.3A CN115471486A (en) 2022-09-28 2022-09-28 Switch interface integrity detection method
LU504273A LU504273B1 (en) 2022-09-28 2023-04-05 Method for Detecting Integrity of Switch Interface
PCT/CN2023/086364 WO2023126030A1 (en) 2022-09-28 2023-04-05 Switch interface integrity inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211190970.3A CN115471486A (en) 2022-09-28 2022-09-28 Switch interface integrity detection method

Publications (1)

Publication Number Publication Date
CN115471486A true CN115471486A (en) 2022-12-13

Family

ID=84334398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211190970.3A Withdrawn CN115471486A (en) 2022-09-28 2022-09-28 Switch interface integrity detection method

Country Status (3)

Country Link
CN (1) CN115471486A (en)
LU (1) LU504273B1 (en)
WO (1) WO2023126030A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023126030A1 (en) * 2022-09-28 2023-07-06 探长信息技术(苏州)有限公司 Switch interface integrity inspection method
CN116703912A (en) * 2023-08-07 2023-09-05 深圳市鑫赛科科技发展有限公司 Mini-host network port integrity visual detection method

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116681696B (en) * 2023-07-27 2023-10-20 东莞雅达高精密塑胶模具有限公司 Mold quality monitoring method for automatic production equipment
CN117078679B (en) * 2023-10-16 2023-12-15 东莞百舜机器人技术有限公司 Automatic assembly line production detection method for cooling fan based on machine vision

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5481619A (en) * 1992-07-07 1996-01-02 Schwartz; Nira Inspection method using templates images, unique histogram analysis, and multiple gray levels correlated to addresses of template images
US20100278423A1 (en) * 2009-04-30 2010-11-04 Yuji Itoh Methods and systems for contrast enhancement
CN113034452B (en) * 2021-03-15 2022-09-27 南京理工大学 Weldment contour detection method
CN114494256B (en) * 2022-04-14 2022-06-14 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115471486A (en) * 2022-09-28 2022-12-13 探长信息技术(苏州)有限公司 Switch interface integrity detection method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023126030A1 (en) * 2022-09-28 2023-07-06 探长信息技术(苏州)有限公司 Switch interface integrity inspection method
CN116703912A (en) * 2023-08-07 2023-09-05 深圳市鑫赛科科技发展有限公司 Mini-host network port integrity visual detection method
CN116703912B (en) * 2023-08-07 2023-11-24 深圳市鑫赛科科技发展有限公司 Mini-host network port integrity visual detection method

Also Published As

Publication number Publication date
LU504273B1 (en) 2023-07-31
WO2023126030A1 (en) 2023-07-06

Similar Documents

Publication Publication Date Title
CN115471486A (en) Switch interface integrity detection method
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN115082464A (en) Method and system for identifying welding seam data in welding process of dust remover
KR20020077420A (en) Method for automatically detecting casting defects in a test piece
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN110517265A (en) A kind of detection method of surface defects of products, device and storage medium
CN111753794B (en) Fruit quality classification method, device, electronic equipment and readable storage medium
CN116228780B (en) Silicon wafer defect detection method and system based on computer vision
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN112669295A (en) Lithium battery pole piece defect detection method based on secondary threshold segmentation theory
CN110007493A (en) Broken bright spot detection method in liquid crystal display
CN111223078B (en) Method for determining flaw level and storage medium
CN114881961A (en) Glass fiber plate crack detection method and device
CN113176270B (en) Dimming method, device and equipment
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
CN116563298B (en) Cross line center sub-pixel detection method based on Gaussian fitting
JP6960252B2 (en) Maintenance management method for image analyzers and railway equipment parts
JP3324699B2 (en) Method and apparatus for measuring fiber diameter distribution
CN116758425A (en) Automatic acceptance checking method and device for large-base photovoltaic power station
CN111415365A (en) Image detection method and device
CN111445435A (en) No-reference image quality evaluation method based on multi-block wavelet transform
CN113834447B (en) High-dynamic laser light bar self-adaptive imaging processing method in outdoor complex environment
CN112837285B (en) Edge detection method and device for panel image
CN114742832A (en) Welding defect detection method for MiniLED thin plate
CN114693626A (en) Method and device for detecting chip surface defects and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20221213

WW01 Invention patent application withdrawn after publication