WO2023126030A1 - Switch interface integrity inspection method - Google Patents

Switch interface integrity inspection method Download PDF

Info

Publication number
WO2023126030A1
WO2023126030A1 PCT/CN2023/086364 CN2023086364W WO2023126030A1 WO 2023126030 A1 WO2023126030 A1 WO 2023126030A1 CN 2023086364 W CN2023086364 W CN 2023086364W WO 2023126030 A1 WO2023126030 A1 WO 2023126030A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
gray level
network interface
grayscale
switch
Prior art date
Application number
PCT/CN2023/086364
Other languages
French (fr)
Chinese (zh)
Inventor
韦振
魏荣生
Original Assignee
探长信息技术(苏州)有限公司
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 探长信息技术(苏州)有限公司 filed Critical 探长信息技术(苏州)有限公司
Publication of WO2023126030A1 publication Critical patent/WO2023126030A1/en

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 transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, 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 using 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

Definitions

  • Template matching is performed on the enhanced image by using the template corresponding to the standard network interface, judging whether there is an abnormal network interface in the enhanced image according to the matching result, and locating the abnormal network interface if there is an abnormal network interface.
  • the enhanced image is template-matched using the template corresponding to the standard network interface, and whether there is an abnormal network interface in the enhanced image is judged according to the matching result, including:
  • the cumulative distribution of each new gray level is determined respectively The value after function mapping, wherein the larger the ratio of the frequency of each new gray level to all new gray levels in the upsampled image, the smaller the value after mapping the cumulative distribution function corresponding to each new gray level; And according to the mapped value of the cumulative distribution function of each new gray level, the gray level after mapping of each new gray level is respectively determined.
  • s k is the value mapped by the cumulative distribution function corresponding to the kth gray level
  • k is an integer in the range of [0, L-1]
  • j is an integer in the range of [0, k]
  • L is the above
  • G j is the frequency of the jth gray level
  • M and N are the length and width of the image, respectively.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

Disclosed in the present invention is a switch interface integrity inspection method, relating to the field of machine vision. The method mainly comprises: obtaining a grayscale image of a switch image containing a network interface, and performing bilinear interpolation on the grayscale image to obtain an up-sampling image; performing histogram equalization on the up-sampling image to obtain an enhanced image, and in the histogram equalization process, according to a frequency ratio of the enhanced image to the up-sampling image and a frequency ratio of the enhanced image to all new grayscale levels, respectively determining a grayscale level of each new grayscale level after mapping, the new grayscale levels being the grayscale levels existing in the up-sampling image but does not exist in the grayscale image; and matching by means of a standard network interface template, so as to determine whether an abnormal network interface exists in the enhanced image, and locate the abnormal network interface. By means of embodiments of the present invention, all network interfaces contained in the target image can be inspected at the same time without sequential visual inspection, such that the duration required for inspection is shortened.

Description

一种交换机接口完好性检测方法A method for detecting integrity of switch interface 技术领域technical field
本申请涉及机器视觉领域,具体涉及一种交换机接口完好性检测方法。The present application relates to the field of machine vision, in particular to a method for detecting the integrity of a switch interface.
背景技术Background technique
交换机可能会因为运输过程中所存在的磕碰等原因,使交换机的网络接口存在一定程度的损坏,从而造成网络接口处接触不良影响后续使用。The network interface of the switch may be damaged to a certain extent due to bumps and other reasons in the transportation process, resulting in poor contact at the network interface and affecting subsequent use.
因此,在批量的交换机运往销货点或者库存点后,有关人员需要从中抽取一定比例的交换机进行目视检查,并在目视检查的过程中逐个检查每一个网络接口的完整性,以确定所检验的批次中不存在异常网络接口。Therefore, after batches of switches are shipped to the point of sale or inventory point, relevant personnel need to select a certain proportion of the switches for visual inspection, and check the integrity of each network interface one by one during the visual inspection process to determine the integrity of all switches. There are no abnormal network interfaces in the inspected batch.
然而,网络接口的尺寸较小,为了确保检测结果的准确,检查人员会倾向于投入大量的时间进行检查,即便如此,可能还是难以确保检验精度,同时,目视检查容易产生视觉疲劳从而进一步降低检验效率及精度。However, the size of the network interface is small. In order to ensure the accuracy of the test results, the inspectors tend to spend a lot of time on the inspection. Even so, it may be difficult to ensure the accuracy of the inspection. Inspection efficiency and accuracy.
发明内容Contents of the invention
针对上述技术问题,本发明提供了一种交换机接口完好性检测方法,通过对包含网络接口的交换机的正面图像进行灰度化以及双线性插值获得上采样图像,并对上采样图像中的新生灰度级以及新生灰度级以外的灰度级分别确定映射后的灰度级,获得包含更多细节的目标图像,并最终通过模板匹配的方式实现对交换机中网络接口的完整性检测。能够同时对目标图像中包含的所有网络接口进行测试而无需依次进行目视检查,从而缩短检验所需时长,且有效避免人工进行目视检查所存在的视觉疲劳,从而提高对于交换机的网络接口的完整性检验的精度及效率。In view of the above technical problems, the present invention provides a switch interface integrity detection method, which obtains an upsampled image by grayscale and bilinear interpolation on the front image of the switch containing the network interface, and detects new The gray level and the gray level other than the new gray level respectively determine the gray level after mapping, obtain the target image with more details, and finally realize the integrity detection of the network interface in the switch by means of template matching. It is possible to test all the network interfaces contained in the target image at the same time without visual inspection in sequence, thereby shortening the time required for inspection, and effectively avoiding the visual fatigue of manual visual inspection, thereby improving the network interface of the switch. Accuracy and efficiency of integrity checks.
本发明实施例提出了一种交换机接口完好性检测方法,包括:The embodiment of the present invention proposes a switch interface integrity detection method, including:
采集包含网络接口的交换机正面图像并进行灰度化获得灰度图像,通过双线性插值对灰度图像进行上采样获得上采样图像。 The front image of the switch including the network interface is collected and grayscaled to obtain a grayscale image, and the grayscale image is upsampled by bilinear interpolation to obtain an upsampled image.
对上采样图像进行直方图均衡化获得增强图像,并在直方图均衡化过程中,分别确定上采样图像中各新生灰度级以及新生灰度级以外的灰度级映射后的灰度级,其中,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定,所述新生灰度级为存在于上采样图像中但未存在于灰度图像中的灰度级。Perform histogram equalization on the upsampled image to obtain an enhanced image, and in the process of histogram equalization, determine each new gray level in the upsampled image and the gray level after gray level mapping other than the new gray level, Wherein, the gray level after mapping of each new gray level is determined according to its frequency ratio in the upsampled image and its frequency ratio to all new gray levels in the upsampled image. A grayscale is a grayscale that exists in the upsampled image but not in the grayscale image.
利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口,并在存在异常网络接口的情况下定位出异常网络接口。Template matching is performed on the enhanced image by using the template corresponding to the standard network interface, judging whether there is an abnormal network interface in the enhanced image according to the matching result, and locating the abnormal network interface if there is an abnormal network interface.
进一步的,交换机接口完好性检测方法中,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定,包括:Further, in the switch interface integrity detection method, the gray level after each new gray level is mapped according to its frequency ratio in the upsampled image and its relationship with all new gray levels in the upsampled image. Frequency ratios are determined, including:
根据每一新生灰度级在上采样图像中的频数占比,以及每一新生灰度级与上采样图像中所有新生灰度级的频数之比,分别确定每一新生灰度级的累积分布函数映射后的值,其中,每一新生灰度级与上采样图像中所有新生灰度级的频数之比越大,每一新生灰度级所对应的累积分布函数映射后的值越小。According to the frequency ratio of each new gray level in the upsampled image and the ratio of each new gray level to the frequency of all new gray levels in the upsampled image, the cumulative distribution of each new gray level is determined respectively The value after function mapping, wherein the larger the ratio of each new gray level to the frequency of all new gray levels in the upsampled image, the smaller the value after mapping the cumulative distribution function corresponding to each new gray level.
根据每一新生灰度级的累积分布函数映射后的值,分别确定每一新生灰度级映射后的灰度级。According to the mapped value of the cumulative distribution function of each newborn gray level, the mapped gray level of each newborn gray level is respectively determined.
进一步的,交换机接口完好性检测方法中,利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口,包括:Further, in the switch interface integrity detection method, the enhanced image is template-matched using the template corresponding to the standard network interface, and whether there is an abnormal network interface in the enhanced image is judged according to the matching result, including:
获得标准网络接口对应的模板与增强图像中待测区域的相似性,所述待测区域为增强图像中与所述模板等大的区域。The similarity between the template corresponding to the standard network interface and the area to be tested in the enhanced image is obtained, and the area to be tested is an area in the enhanced image that is as large as the template.
在所述相似性大于预设第一阈值的情况下,判定待测区域为正常网络接口所在的区域。In a case where the similarity is greater than the preset first threshold, it is determined that the area to be tested is an area where a normal network interface is located.
在所述相似性不大于预设第一阈值的情况下,判断相似性是否大于预设第二阈值,若判断结果为是,则将待测区域判定为异常接口所在的区域,其中,预设第二阈值小于预设第一阈值。In the case that the similarity is not greater than the preset first threshold, it is judged whether the similarity is greater than the preset second threshold, and if the judgment result is yes, the area to be tested is determined to be the area where the abnormal interface is located, wherein the preset The second threshold is smaller than the preset first threshold.
进一步的,交换机接口完好性检测方法中,所述相似性为结构相似性SSIM。Further, in the method for detecting the integrity of the switch interface, the similarity is the structural similarity SSIM.
进一步的,交换机接口完好性检测方法中,所述相似性为皮尔逊相关系数。 Further, in the method for detecting the integrity of the switch interface, the similarity is a Pearson correlation coefficient.
进一步的,交换机接口完好性检测方法中,采集包含网络接口的交换机正面图像前,还包括:设置平行光对包含网络接口的交换机进行照射。Further, in the method for detecting the integrity of the switch interface, before collecting the front image of the switch including the network interface, the method further includes: setting a parallel light to illuminate the switch including the network interface.
进一步的,交换机接口完好性检测方法中,对上采样图像进行直方图均衡化获得增强图像后,还包括:对增强图像进行边缘检测,将边缘检测结果作为新的增强图像。Further, in the switch interface integrity detection method, after performing histogram equalization on the upsampled image to obtain the enhanced image, the method further includes: performing edge detection on the enhanced image, and using the edge detection result as a new enhanced image.
进一步的,交换机接口完好性检测方法中,边缘检测所采用的算子为Roberts算子、Prewitt算子、Sobel算子以及Canny算子中的任意一种。Further, in the switch interface integrity detection method, the operator used for edge detection is any one of Roberts operator, Prewitt operator, Sobel operator and Canny operator.
进一步的,交换机接口完好性检测方法中,还包括:在存在异常网络接口的情况下定位出异常网络接口。Further, the method for detecting the integrity of the switch interface also includes: locating the abnormal network interface if there is an abnormal network interface.
本发明实施例提供了一种交换机接口完好性检测方法,相比于现有技术,本发明实施例的有益效果在于:能够同时对目标图像中包含的所有网络接口进行测试而无需依次进行目视检查,从而缩短检验所需时长,且有效避免人工进行目视检查所存在的视觉疲劳,从而提高对于交换机的网络接口的完整性检验的精度及效率。The embodiment of the present invention provides a method for detecting the integrity of a switch interface. Compared with the prior art, the beneficial effect of the embodiment of the present invention is that all network interfaces contained in the target image can be tested simultaneously without visual inspection in sequence Inspection, thereby shortening the time required for the inspection, and effectively avoiding visual fatigue caused by manual visual inspection, thereby improving the accuracy and efficiency of the integrity inspection of the network interface of the switch.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例提供的一种交换机接口完好性检测方法的流程示意图。Fig. 1 is a schematic flowchart of a method for detecting the integrity of a switch interface provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand 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 without 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" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of these features; in the description of this embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
本发明实施例提供了一种交换机接口完好性检测方法,如图1所示,包括:The embodiment of the present invention provides a switch interface integrity detection method, as shown in Figure 1, including:
步骤S101、采集包含网络接口的交换机正面图像并进行灰度化获得灰度图像,通过双线性插值对灰度图像进行上采样获得上采样图像。Step S101 , collecting a front image of a switch including a network interface and performing grayscale conversion to obtain a grayscale image, and performing upsampling on the grayscale image through bilinear interpolation to obtain an upsampled image.
步骤S102、对上采样图像进行直方图均衡化获得增强图像,并在直方图均衡化过程中,分别确定上采样图像中各新生灰度级以及新生灰度级以外的灰度级映射后的灰度级,所述新生灰度级为存在于上采样图像中但未存在于灰度图像中的灰度级。Step S102: Perform histogram equalization on the upsampled image to obtain an enhanced image, and in the process of histogram equalization, respectively determine each new gray level in the upsampled image and gray levels after gray level mapping other than the new gray level. The new gray level is a gray level that exists in the upsampled image but not in the grayscale image.
其中,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定。Wherein, the gray level after mapping of each new gray level is determined according to its frequency ratio in the upsampled image and its frequency ratio to all new gray levels in the upsampled image.
步骤S103、利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口,并在存在异常网络接口的情况下定位出异常网络接口。Step S103 , use the template corresponding to the standard network interface to perform template matching on the enhanced image, judge whether there is an abnormal network interface in the enhanced image according to the matching result, and locate the abnormal network interface if there is an abnormal network interface.
通过上述步骤,能够同时对增强图像中包含的所有网络接口的测试而无需依次进行目视检查,从而缩短检验所需时长,且有效避免人工进行目视检查所存在的视觉疲劳,从而提高对于交换机的网络接口的完整性检验的精度及效率。Through the above steps, all network interfaces included in the enhanced image can be tested simultaneously without visual inspection in sequence, thereby shortening the time required for inspection, and effectively avoiding visual fatigue caused by manual visual inspection, thereby improving the reliability of the switch. The accuracy and efficiency of the integrity verification of the network interface.
本发明实施例的目的在于:通过机器视觉以及图像处理等技术手段,实现对交换机中所存在额定网络接口的完整性检测,缩短检测所需的时长并提高检测精度。The purpose of the embodiment of the present invention is to realize the integrity detection of the rated network interface existing in the switch through technical means such as machine vision and image processing, shorten the time required for detection and improve the detection accuracy.
进一步的,步骤S101、采集包含网络接口的交换机正面图像并进行灰度化获得灰度图像,通过双线性插值对灰度图像进行上采样获得上采样图像。 Further, step S101 , collecting a front image of a switch including a network interface and performing grayscale conversion to obtain a grayscale image, and performing upsampling on the grayscale image through bilinear interpolation to obtain an upsampled image.
可以设置多层货架用于存放交换机,同时将交换机统一朝向,以便进行交换机中包含网络接口一侧的图像的采集,相机的分辨率性能需要足够高,可以提前设置室内的环境光,保证环境光足够亮且均匀,使所采集的图像上细节部分的呈现更为清晰。Multi-layer shelves can be set up to store switches, and at the same time, the switches are oriented uniformly so as to collect images on the side of the switch including the network interface. The resolution performance of the camera needs to be high enough, and the indoor ambient light can be set in advance to ensure that the ambient light Bright and uniform enough to make the details of the captured image appear more clearly.
由于不同交换机在货架上的位置可能不同,在图像采集设备中可能会存在视野盲区,从而可能拍摄不到完整的包含网络接口的交换机的正面图像,因此本发明实施例中可以设置若多个相机,并分别固定每个相机的拍摄角度,每个相机仅采集相机镜头水平视角范围内的交换机图像。Since the positions of different switches on the shelves may be different, there may be blind spots in the image acquisition device, so that a complete frontal image of the switch containing the network interface may not be captured, so multiple cameras can be set in the embodiment of the present invention , and fix the shooting angle of each camera separately, and each camera only collects the switch image within the horizontal viewing angle range of the camera lens.
本发明实施例中也可以通过将图像采集设备平行布置于包含网络接口的交换机的正面,移动图像采集设备并拍摄图像,最后将所拍摄的所有图像进行拼接,获得交换机的正面图像,如此,能够有效避免交换机中不同位置到图像采集设备的镜头距离不同,对所采集的图像的不良影响。In the embodiment of the present invention, it is also possible to arrange the image acquisition device in parallel on the front of the switch containing the network interface, move the image acquisition device and take images, and finally splicing all the captured images to obtain the front image of the switch. In this way, it is possible Effectively avoid the different lens distances between different positions in the switchboard and the image acquisition device, which may have adverse effects on the collected images.
可选的,采集包含网络接口的交换机正面图像前,还可以设置垂直于包含网络接口的交换机的平行光,对交换机进行照射,如此,有助于在所采集的正面图像中更好的呈现交换机接口处细节,从而提高后续对于网络接口处的完整性检测精度。Optionally, before collecting the front image of the switch including the network interface, parallel light perpendicular to the switch including the network interface can also be set to irradiate the switch, which helps to better present the switch in the collected front image Details of the interface, so as to improve the subsequent integrity detection accuracy of the network interface.
对采集后的图像进行常规灰度化处理,去除多余色彩因素影响,可以有效减少检测过程中的计算量。灰度化过程包括:将包含网络接口的交换机正面图像中像素点在RGB三个通道中像素值的最大值,作为所述灰度图像中的像素点的灰度值。Perform conventional grayscale processing on the collected images to remove the influence of redundant color factors, which can effectively reduce the amount of calculation in the detection process. The grayscale process includes: taking the maximum value of pixel values in the three channels of RGB in the front image of the switch including the network interface as the grayscale value of the pixel in the grayscale image.
对于批量交换机接口的外观检测,主要是针对金属铜触片的变形以及缺损,然而通过目视观察难以在短时间内有效发现其中可能会存在的变形或破损,使得对于交换机的网络接口的完整性检测效率受限。For the appearance inspection of batch switch interfaces, it is mainly aimed at the deformation and defect of metal copper contacts. However, it is difficult to effectively find possible deformation or damage in a short period of time through visual observation, making it difficult for the integrity of the network interface of the switch. Detection efficiency is limited.
同一张图像中存在着交换机的包含网络接口一侧中多个网络接口,因此,如果直接对其进行处理,每一网络接口对应的区域较小,无法获得较为精确的检测结果,因此,本发明实施例期望保留原图像中信息的同时,获得更大分辨率的图像并对其进行处理,同时双线性插值相较于最近邻插值法,所获得的上采样图像中的锯齿更少,能够使得原图像中的信息被保留得更为完整,因此,本发明实施例中利用双线性内插的方式,实现对灰度图像的上采样处理,能够分别获得上采 样后尺寸更大上采样图像,同时本发明实施例中双线性插值过程对于行以及列采用相同的上采样比例。In the same image, there are multiple network interfaces on the side of the network interface of the switch. Therefore, if it is directly processed, the area corresponding to each network interface is relatively small, and it is impossible to obtain more accurate detection results. Therefore, the present invention The embodiment expects to retain the information in the original image while obtaining a larger resolution image and processing it. At the same time, compared with the nearest neighbor interpolation method, bilinear interpolation has less aliasing in the obtained up-sampled image, which can The information in the original image is preserved more completely. Therefore, in the embodiment of the present invention, the bilinear interpolation method is used to realize the upsampling processing of the grayscale image, and the upsampled The upsampled image is larger in size after sampling, and the bilinear interpolation process in the embodiment of the present invention adopts the same upsampling ratio for rows and columns.
需要说明的是,利用双线性插值,可以实现对图像的缩放,利用双线性插值来进行图像的缩放步骤如下:计算目标图片与原始图片之间的缩放因子,其中缩放因子分别包括在行方向的比例以及列方向的比例;利用缩放因子,由目标图片像素位置反推回原始图片中的虚拟像素位置;由虚拟像素位置找到宽度和高度方向相邻的四个像素点,由四个像素点进行双线性插值计算,得出目标图像中的像素值。具体的,双线性插值算法所输出的图像的每个像素都是原图中四个像素(2×2)运算的结果。It should be noted that image scaling can be achieved by using bilinear interpolation. The steps of image scaling using bilinear interpolation are as follows: calculate the scaling factor between the target picture and the original picture, where the scaling factors are respectively included in the row The ratio of the direction and the ratio of the column direction; using the scaling factor, the pixel position of the target image is pushed back to the virtual pixel position in the original image; the four pixel points adjacent to the width and height directions are found from the virtual pixel position, and four pixels The point is calculated by bilinear interpolation to obtain the pixel value in the target image. Specifically, each pixel of the image output by the bilinear interpolation algorithm is the result of an operation of four pixels (2×2) in the original image.
进一步的,步骤S102、对上采样图像进行直方图均衡化获得增强图像,并在直方图均衡化过程中,分别确定上采样图像中各新生灰度级以及新生灰度级以外的灰度级映射后的灰度级。Further, in step S102, perform histogram equalization on the upsampled image to obtain an enhanced image, and in the process of histogram equalization, determine each new gray level in the upsampled image and the gray level mapping other than the new gray level grayscale after.
其中,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定,所述新生灰度级为存在于上采样图像中但未存在于灰度图像中的灰度级。Wherein, the gray level after mapping of each new gray level is determined according to its frequency ratio in the upsampled image and its frequency ratio to all new gray levels in the upsampled image. A grayscale is a grayscale that exists in the upsampled image but not in the grayscale image.
本发明实施例中利用直方图均衡化对图像进行对比度增强,以提高模糊边缘轮廓的清晰度,但是直方图均衡化时,可能会无差别丢失部分像素数量分布较少的灰度级,或者使这些数量较少的灰度级不明显,进而有可能导致像素点分布较少的铜触片本身以及边缘灰度级不明显,造成无法有效进行后续的网络接口的完整性检测。In the embodiment of the present invention, histogram equalization is used to enhance the contrast of the image to improve the definition of blurred edge contours. However, when the histogram is equalized, some gray levels with a small number of pixels may be lost indiscriminately, or These small number of gray levels are not obvious, which may lead to inconspicuous gray levels of the copper contacts themselves and edges with less pixel distribution, resulting in inability to effectively perform subsequent integrity detection of the network interface.
进行双线性插值后,所生成的像素点有可能在上采样图像的边缘高频区域或者均匀的低频区域,而灰度图像中边缘高频区域更有可能在上采样图像中诞生出新的灰度级,即原有的灰度图像中不存在的灰度级,因为这些像素点位于存在灰度梯度的高频边缘处,其相邻像素点进行双线性插值计算时更有可能出现新的灰度级,相反,在灰度值较为均匀的低频区域,相邻像素点的灰度值较为接近,双线性插值的计算后生成的灰度级为与这些相邻像素点较为接近的灰度级。After bilinear interpolation, the generated pixels may be in the edge high-frequency area or uniform low-frequency area of the upsampled image, while the edge high-frequency area in the grayscale image is more likely to be born in the upsampled image. Gray level, that is, the gray level that does not exist in the original grayscale image, because these pixels are located at the high-frequency edge with a gray gradient, and its adjacent pixels are more likely to appear when performing bilinear interpolation calculations The new gray level, on the contrary, in the low-frequency area where the gray value is relatively uniform, the gray value of adjacent pixels is relatively close, and the gray level generated after bilinear interpolation is relatively close to these adjacent pixels. grayscale.
因此,本发明实施例中可以分别获得上采样图像对应的第一灰度直方图,以及灰度图像对应的第二灰度直方图,以筛选出存在于第一灰度直方图但未存在于第二灰度直方图中的各新生灰度级。 Therefore, in the embodiment of the present invention, the first grayscale histogram corresponding to the upsampled image and the second grayscale histogram corresponding to the grayscale image can be obtained respectively, so as to filter out the grayscale histogram that exists in the first grayscale histogram but does not exist in the grayscale histogram. Each nascent gray level in the second gray level histogram.
本发明实施例中,每一新生灰度级映射后的灰度级,分别根据每一新生灰度级在第一灰度直方图中的频数,占所有新生灰度级在第一灰度直方图中的频数的比例进行确定。In the embodiment of the present invention, the gray levels after mapping of each new gray level account for all new gray levels in the first gray histogram according to the frequency of each new gray level in the first gray histogram. The scale of the frequencies in the graph is determined.
直方图均衡化是一种简单有效的图像增强技术,通过改变图像的直方图来改变图像中各像素的灰度,主要用于增强动态范围偏小的图像的对比度。由于原始图像中灰度分布可能集中在较窄的区间,造成图像不够清晰。例如,过曝光图像的灰度级集中在高亮度范围内,而曝光不足将使图像灰度级集中在低亮度范围内。Histogram equalization is a simple and effective image enhancement technology, which changes the gray level of each pixel in the image by changing the histogram of the image, and is mainly used to enhance the contrast of images with a small dynamic range. Because the gray distribution in the original image may be concentrated in a narrow range, the image is not clear enough. For example, the gray level of an overexposed image is concentrated in the high brightness range, while underexposure will make the gray level of the image concentrated in the low brightness range.
采用直方图均衡化,可以把原始图像的直方图变换为均匀分布的形式,这样就增加了像素之间灰度值差别的动态范围,从而达到增强图像整体对比度的效果。换言之,直方图均衡化的基本原理是:对在图像中像素个数多的灰度值(即对画面起主要作用的灰度值)进行展宽,而对像素个数少的灰度值(即对画面不起主要作用的灰度值)进行归并,从而增大对比度,使图像清晰,达到增强的目的。Using histogram equalization, the histogram of the original image can be transformed into a form of uniform distribution, which increases the dynamic range of the gray value difference between pixels, thereby achieving the effect of enhancing the overall contrast of the image. In other words, the basic principle of histogram equalization is to widen the gray value with a large number of pixels in the image (that is, the gray value that plays a major role in the picture), and to widen the gray value with a small number of pixels (that is, the gray value that plays a major role in the picture). Merge the gray values that do not play a major role in the picture), thereby increasing the contrast, making the image clear, and achieving the purpose of enhancement.
然而,对于本发明实施例中所获得的上采样图像,其中存在着原有的灰度图中所不存在的新生灰度级,这些新生灰度级的存在,能够使得本发明实施例中网络接口的细节得以完整的保留,但是如果直接对上采样图像进行灰度直方图均衡化,直方图均衡化后的增强图像中这些新生灰度级由于其频数较小,在增强图像中被保留地不明显,使得依然无法在增强图像的基础上进行网络接口的完好性检测。However, for the upsampled image obtained in the embodiment of the present invention, there are new gray levels that do not exist in the original gray scale image. The existence of these new gray levels can make the network in the embodiment of the present invention The details of the interface can be completely preserved, but if the gray level histogram equalization is directly performed on the upsampled image, these new gray levels in the enhanced image after histogram equalization are retained in the enhanced image due to their small frequency. It is not obvious, so that it is still impossible to perform integrity detection of the network interface on the basis of the enhanced image.
本发明实施例中分别确定各新生灰度级以及新生灰度级以外的灰度级映射后的灰度级,包括:In the embodiment of the present invention, each new gray level and the gray level after gray level mapping other than the new gray level are respectively determined, including:
根据每一新生灰度级在上采样图像中的频数占比,以及每一新生灰度级与上采样图像中所有新生灰度级的频数之比,分别确定每一新生灰度级的累积分布函数映射后的值,其中,每一新生灰度级与上采样图像中所有新生灰度级的频数之比越大,每一新生灰度级所对应的累积分布函数映射后的值越小;并根据每一新生灰度级的累积分布函数映射后的值,分别确定每一新生灰度级映射后的灰度级。According to the frequency ratio of each new gray level in the upsampled image and the ratio of each new gray level to the frequency of all new gray levels in the upsampled image, the cumulative distribution of each new gray level is determined respectively The value after function mapping, wherein the larger the ratio of the frequency of each new gray level to all new gray levels in the upsampled image, the smaller the value after mapping the cumulative distribution function corresponding to each new gray level; And according to the mapped value of the cumulative distribution function of each new gray level, the gray level after mapping of each new gray level is respectively determined.
同时,根据每一新生灰度级以外的灰度级在上采样图像中的频数占比,分别确定每一新生灰度级以外的灰度级的累积分布函数映射后的值。At the same time, according to the frequency ratio of the gray levels other than each new gray level in the up-sampled image, the values after the cumulative distribution function mapping of each gray level other than the new gray level are respectively determined.
具体的,上采样图像中每一灰度级的累积分布函数映射后的值的获得过程包括:
Figure PCTCN2023086364-ftappb-I100001
Specifically, the process of obtaining the value after the cumulative distribution function mapping of each gray level in the upsampled image includes:
Figure PCTCN2023086364-ftappb-I100001
其中,sk为第k个灰度级对应的累计分布函数映射后的值,k为[0,L-1]范围内的整数,j为[0,k]范围内的整数,L为上采样图像中的总灰度级数,Gj为第j个灰度级的频数,M、N分别为图像的长和宽。Among them, s k is the value mapped by the cumulative distribution function corresponding to the kth gray level, k is an integer in the range of [0, L-1], j is an integer in the range of [0, k], and L is the above The total number of gray levels in the sampled image, G j is the frequency of the jth gray level, and M and N are the length and width of the image, respectively.
同时,当第k个灰度级为新生灰度级时,g(k)的取值为该新生灰度级在所有新生灰度级中的频数占比的倒数,需要说明的是,新生灰度级的频数指的是上采样图像中为该新生灰度级的像素点的数量;如此,分别获得了上采样图像中每一灰度级的累积分布函数映射后的值。At the same time, when the kth gray level is a new-born gray level, the value of g(k) is the reciprocal of the frequency ratio of the new-born gray level in all new-born gray levels. It should be noted that the new-born gray level The frequency of the degree level refers to the number of pixels of the new gray level in the upsampled image; in this way, the values after the cumulative distribution function mapping of each gray level in the upsampled image are respectively obtained.
最后,在确定出所有灰度级的累积分布函数映射后的值后,分别对所有灰度级的累积分布函数映射后的值进行归一化至[0,255]范围内,以分别获得上采样图像中每一灰度级对应的直方图均衡化后的灰度级。Finally, after the mapped values of the cumulative distribution functions of all gray levels are determined, the mapped values of the cumulative distribution functions of all gray levels are normalized to the range [0, 255] to obtain the above The histogram-equalized gray level corresponding to each gray level in the sampled image.
如此,提高了图像分辨率,且实现了对图像的增强,尽量保留了图像中分布较少的细节信息,其中,细节信息指的是图像中的微小损伤或者铜触片的边缘信息。In this way, the image resolution is improved, and the image is enhanced, and the detail information that is less distributed in the image is retained as much as possible. The detail information refers to the tiny damage in the image or the edge information of the copper contact.
可选的,在获得直方图均衡化后的增强图像之后,可以对增强图像进行边缘检测,并将边缘检测结果作为新的增强图像,如此,能够减少后续进行模板匹配过程中的计算量。Optionally, after the histogram-equalized enhanced image is obtained, edge detection may be performed on the enhanced image, and the edge detection result may be used as a new enhanced image. In this way, the amount of calculation in the subsequent template matching process can be reduced.
图像边缘是图像最基本的特征,所谓边缘(Edge)是指图像局部特性的不连续性。灰度或结构等信息的突变处称之为边缘。例如,灰度级的突变、颜色的突变、纹理结构的突变等。边缘是一个区域的结束,也是另一个区域的开始,利用该特征可以分割图像。图像的边缘有方向和幅度两种属性。边缘通常可以通过一阶导数或二阶导数检测得到。一阶导数是以最大值作为对应的边缘的位置,而二阶导数则以过零点作为对应边缘的位置。The image edge is the most basic feature of the image, and the so-called edge (Edge) refers to the discontinuity of the local characteristics of the image. The sudden change of information such as grayscale or structure is called edge. For example, the sudden change of gray level, the sudden change of color, the sudden change of texture structure, etc. An edge is the end of one region and the beginning of another, and this feature can be used to segment an image. The edge of an image has two attributes, direction and magnitude. Edges can usually be detected by first or second derivatives. The first derivative takes the maximum value as the corresponding edge position, while the second derivative takes the zero-crossing point as the corresponding edge position.
一阶导数的边缘算子进行边缘检测的过程包括:通过模板作为核与图像的每个像素点做卷积和运算,然后选取合适的阈值来提取图像的边缘。常见的一阶导数的边缘算子有:Roberts算子,Prewitt算子,Sobel算子,Canny算子等。二阶导数的边缘算子进行边缘检测的过程依据于二阶导数过零点这一特性,常见的 有二阶导数的边缘算子有Laplacian算子。The process of edge detection by the edge operator of the first derivative includes: using the template as a kernel to perform convolution and operation with each pixel of the image, and then selecting an appropriate threshold to extract the edge of the image. Common marginal operators of the first derivative include: Roberts operator, Prewitt operator, Sobel operator, Canny operator, etc. The process of edge detection by the edge operator of the second derivative is based on the characteristic of the zero crossing point of the second derivative. The common The edge operator with second order derivative has Laplacian operator.
本发明实施例在进行边缘检测的过程中所采用的算子为Roberts算子、Prewitt算子、Sobel算子以及Canny算子中的任意一种。The operator used in the edge detection process in the embodiment of the present invention is any one of Roberts operator, Prewitt operator, Sobel operator and Canny operator.
可选的,对于增强后的图像,既有丰富的图像细节,又有清晰的对比度,与此同时Canny算子具有双阈值检测的优势,因此可以优先选择利用Canny算子进行边缘检测。Optionally, for the enhanced image, there are both rich image details and clear contrast. At the same time, the Canny operator has the advantage of dual threshold detection, so the Canny operator can be preferentially used for edge detection.
进一步的,步骤S103、利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口,并在存在异常网络接口的情况下定位出异常网络接口。Further, in step S103 , template matching is performed on the enhanced image using the template corresponding to the standard network interface, judging whether there is an abnormal network interface in the enhanced image according to the matching result, and locating the abnormal network interface if there is an abnormal network interface.
模板匹配是一个利用模板对增强图像进行遍历的过程,同时在遍历的过程中,如果待测区域为正常即不存在缺陷的网络接口所在的区域,该待测区域与模板的相似度会表现为大于预设第一阈值;否则,在待测区域与模板的相似度不大于预设阈值的情况下,待测区域可能是存在缺陷的网络接口所在的区域,也可能该待测区域并非网络接口所处的区域,但是,由于存在缺陷的网络接口所在的区域与模板之间是存在一定相似度的,因此,可以在模板与待测区域的相似度大于预设第二阈值的情况下,将该待测区域确定为异常网络接口所在的区域,如此,在实现对网络接口进行完整性测试的同时,可以实现对其中可能存在的异常网络接口的定位。Template matching is a process of traversing the enhanced image using a template. At the same time, during the traversal process, if the area to be tested is the area where the network interface is normal, that is, there is no defect, the similarity between the area to be tested and the template will be expressed as greater than the preset first threshold; otherwise, if 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 network interface However, since there is a certain degree of similarity between the region where the defective network interface is located and the template, therefore, when the similarity between the template and the region to be tested is greater than the preset second threshold, the The area to be tested is determined to be the area where the abnormal network interface is located. In this way, the location of the possible abnormal network interface can be realized while implementing the integrity test on the network interface.
具体的,本发明实施例中的相似性可以是结构相似度SSIM,也可以是皮尔逊相关系数,还可以是其他用于计算图像之间相似性的特征值。Specifically, the similarity in the embodiment of the present invention may be the structural similarity SSIM, the Pearson correlation coefficient, or other feature values used to calculate the similarity between images.
结构相似度SSIM(structural similarity index)是一种衡量两幅图像相似度的指标,其从图像组成的角度,将结构信息定义为独立于亮度、对比度的,反映场景中物体结构的属性,并将失真建模为亮度、对比度和结构三个不同因素的组合,其中均值作为亮度的估计,标准差作为对比度的估计,协方差作为结构相似程度的度量。Structural similarity SSIM (structural similarity index) is an index to measure the similarity of two images. From the perspective of image composition, structural information is defined as independent of brightness and contrast, reflecting the attributes of the object structure in the scene, and Distortion is modeled as a combination of three different factors: brightness, contrast, and structure, where the mean is an estimate of brightness, the standard deviation is an estimate of contrast, and the covariance is a measure of structural similarity.
在统计学中,皮尔逊相关系数(Pearson correlation coefficient),又称皮尔逊积矩相关系数(Pearson product-moment correlation coefficient,简称PPMCC或PCCs),可以将其应用于计算两张图像之间的相似性。 In statistics, Pearson correlation coefficient (Pearson correlation coefficient), also known as Pearson product-moment correlation coefficient (PPMCC or PCCs for short), can be applied to calculate the similarity between two images sex.
综上所述,本发明实施例提供了一种交换机接口完好性检测方法,通过对包含网络接口的交换机的正面图像进行灰度化以及双线性插值获得上采样图像,并对上采样图像中的新生灰度级以及新生灰度级以外的灰度级分别确定映射后的灰度级,获得包含更多细节的目标图像,并最终通过模板匹配的方式实现对交换机中网络接口的完整性检测。To sum up, the embodiment of the present invention provides a method for detecting the integrity of a switch interface. The upsampling image is obtained by grayscale and bilinear interpolation on the front image of the switch including the network interface, and the upsampling image The new gray level and the gray level other than the new gray level respectively determine the gray level after mapping, obtain the target image with more details, and finally realize the integrity detection of the network interface in the switch by means of template matching .
本发明实施例能够同时对目标图像中包含的所有网络接口进行测试而无需依次进行目视检查,从而缩短检验所需时长,且有效避免人工进行目视检查所存在的视觉疲劳,从而提高对于交换机的网络接口的完整性检验的精度及效率。The embodiment of the present invention can test all the network interfaces contained in the target image at the same time without visual inspection sequentially, thereby shortening the time required for inspection, and effectively avoiding visual fatigue caused by manual visual inspection, thereby improving the reliability of the switch. The accuracy and efficiency of the integrity verification of the network interface.
本发明中涉及诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。Words such as "including", "comprising", "having" and so on in the present invention are open words, mean "including but not limited to", and can be used interchangeably. As used herein, the words "or" and "and" refer to the word "and/or" and are used interchangeably therewith, unless the context clearly dictates otherwise. As used herein, the word "such as" refers to the phrase "such as but not limited to" and can be used interchangeably therewith.
还需要指出的是,在本发明的方法和系统中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be pointed out that in the method and system of the present invention, each component or each step can be decomposed and/or reassembled. These decompositions and/or recombinations should be considered equivalents of the present disclosure.
上述实施例仅仅是为清楚地说明所做的举例,并不构成对本发明的保护范围的限制。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动,这里无需也无法对所有的实施方式予以穷举。凡是与本发明相同或相似的设计均属于本发明的保护范围之内。 The above-mentioned embodiments are only examples for clear description, and do not constitute limitations on the protection scope of the present invention. For those of ordinary skill in the art, on the basis of the above description, other changes or changes in different forms can also be made, and it is not necessary and impossible to exhaustively enumerate all the implementation manners here. All designs identical or similar to the present invention fall within the protection scope of the present invention.

Claims (9)

  1. 一种交换机接口完好性检测方法,其特征在于,包括:A switch interface integrity detection method, characterized in that, comprising:
    采集包含网络接口的交换机正面图像并进行灰度化获得灰度图像,通过双线性插值对灰度图像进行上采样获得上采样图像;Collect the front image of the switch including the network interface and grayscale to obtain a grayscale image, and upsample the grayscale image through bilinear interpolation to obtain an upsampled image;
    对上采样图像进行直方图均衡化获得增强图像,并在直方图均衡化过程中,分别确定上采样图像中各新生灰度级以及新生灰度级以外的灰度级映射后的灰度级,其中,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定,所述新生灰度级为存在于上采样图像中但未存在于灰度图像中的灰度级;Perform histogram equalization on the upsampled image to obtain an enhanced image, and in the process of histogram equalization, determine each new gray level in the upsampled image and the gray level after gray level mapping other than the new gray level, Wherein, the gray level after mapping of each new gray level is determined according to its frequency ratio in the upsampled image and its frequency ratio to all new gray levels in the upsampled image. Grayscale is the grayscale present in the upsampled image but not present in the grayscale image;
    利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口。Template matching is performed on the enhanced image by using the template corresponding to the standard network interface, and whether there is an abnormal network interface in the enhanced image is judged according to the matching result.
  2. 根据权利要求1所述的一种交换机接口完好性检测方法,其特征在于,每一新生灰度级映射后的灰度级,分别根据其在上采样图像中的频数占比,以及其与上采样图像中所有新生灰度级的频数之比进行确定,包括:A method for detecting the integrity of a switch interface according to claim 1, wherein the gray level after each new gray level is mapped according to its frequency ratio in the upsampled image, and its relationship with the above The frequency ratio of all newborn gray levels in the sampled image is determined, including:
    根据每一新生灰度级在上采样图像中的频数占比,以及每一新生灰度级与上采样图像中所有新生灰度级的频数之比,分别确定每一新生灰度级的累积分布函数映射后的值,其中,每一新生灰度级与上采样图像中所有新生灰度级的频数之比越大,每一新生灰度级所对应的累积分布函数映射后的值越小;According to the frequency ratio of each new gray level in the upsampled image and the ratio of each new gray level to the frequency of all new gray levels in the upsampled image, the cumulative distribution of each new gray level is determined respectively The value after function mapping, wherein the larger the ratio of the frequency of each new gray level to all new gray levels in the upsampled image, the smaller the value after mapping the cumulative distribution function corresponding to each new gray level;
    根据每一新生灰度级的累积分布函数映射后的值,分别确定每一新生灰度级映射后的灰度级。According to the mapped value of the cumulative distribution function of each newborn gray level, the mapped gray level of each newborn gray level is respectively determined.
  3. 根据权利要求1所述的一种交换机接口完好性检测方法,其特征在于,利用标准网络接口对应的模板对增强图像进行模板匹配,根据匹配结果判断增强图像中是否存在异常网络接口,包括:A method for detecting the integrity of a switch interface according to claim 1, wherein the enhanced image is template-matched using a template corresponding to a standard network interface, and judging whether there is an abnormal network interface in the enhanced image according to the matching result, including:
    获得标准网络接口对应的模板与增强图像中待测区域的相似性,所述待测区域为增强图像中与所述模板等大的区域;Obtaining the similarity between the template corresponding to the standard network interface and the region to be tested in the enhanced image, where the region to be tested is a region of the same size as the template in the enhanced image;
    在所述相似性大于预设第一阈值的情况下,判定待测区域为正常网络接口所在的区域;When the similarity is greater than the preset first threshold, it is determined that the area to be tested is the area where the normal network interface is located;
    在所述相似性不大于预设第一阈值的情况下,判断相似性是否大于预设第二阈值,若判断结果为是,则将待测区域判定为异常接口所在的区域,其中,预设第二阈值小于预设第一阈值。 In the case that the similarity is not greater than the preset first threshold, it is judged whether the similarity is greater than the preset second threshold, and if the judgment result is yes, the area to be tested is determined to be the area where the abnormal interface is located, wherein the preset The second threshold is smaller than the preset first threshold.
  4. 根据权利要求3所述的一种交换机接口完好性检测方法,其特征在于,所述相似性为结构相似性SSIM。A method for detecting integrity of a switch interface according to claim 3, wherein the similarity is structural similarity SSIM.
  5. 根据权利要求3所述的一种交换机接口完好性检测方法,其特征在于,所述相似性为皮尔逊相关系数。A method for detecting integrity of a switch interface according to claim 3, wherein the similarity is a Pearson correlation coefficient.
  6. 根据权利要求1所述的一种交换机接口完好性检测方法,其特征在于,采集包含网络接口的交换机正面图像前,还包括:设置平行光对包含网络接口的交换机进行照射。The method for detecting the integrity of a switch interface according to claim 1, wherein before collecting the front image of the switch including the network interface, further comprising: setting parallel light to illuminate the switch including the network interface.
  7. 根据权利要求1所述的一种交换机接口完好性检测方法,其特征在于,对上采样图像进行直方图均衡化获得增强图像后,还包括:对增强图像进行边缘检测,将边缘检测结果作为新的增强图像。A method for detecting the integrity of a switch interface according to claim 1, wherein after performing histogram equalization on the upsampled image to obtain the enhanced image, further comprising: performing edge detection on the enhanced image, and using the edge detection result as a new enhanced image.
  8. 根据权利要求7所述的一种交换机接口完好性检测方法,其特征在于,边缘检测所采用的算子为Roberts算子、Prewitt算子、Sobel算子以及Canny算子中的任意一种。The method for detecting integrity of a switch interface according to claim 7, wherein the operator used for edge detection is any one of Roberts operator, Prewitt operator, Sobel operator and Canny operator.
  9. 根据权利要求1所述的一种交换机接口完好性检测方法,其特征在于,还包括:在存在异常网络接口的情况下定位出异常网络接口。 The method for detecting the integrity of a switch interface according to claim 1, further comprising: locating the abnormal network interface if there is an abnormal network interface.
PCT/CN2023/086364 2022-09-28 2023-04-05 Switch interface integrity inspection method WO2023126030A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2023126030A1 true WO2023126030A1 (en) 2023-07-06

Family

ID=84334398

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/086364 WO2023126030A1 (en) 2022-09-28 2023-04-05 Switch interface integrity inspection 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
CN116681696A (en) * 2023-07-27 2023-09-01 东莞雅达高精密塑胶模具有限公司 Mold quality monitoring method for automatic production equipment
CN117078679A (en) * 2023-10-16 2023-11-17 东莞百舜机器人技术有限公司 Automatic assembly line production detection method for cooling fan based on machine vision

Families Citing this family (2)

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

Citations (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
CN113034452A (en) * 2021-03-15 2021-06-25 南京理工大学 Weldment contour detection method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115471486A (en) * 2022-09-28 2022-12-13 探长信息技术(苏州)有限公司 Switch interface integrity detection method

Patent Citations (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
CN113034452A (en) * 2021-03-15 2021-06-25 南京理工大学 Weldment contour detection method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 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 (4)

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

Also Published As

Publication number Publication date
LU504273B1 (en) 2023-07-31
CN115471486A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
WO2023126030A1 (en) Switch interface integrity inspection method
US20080075385A1 (en) Detection and Correction of Flash Artifacts from Airborne Particulates
US8823745B2 (en) Image processing based on depth information and color data of a scene
CN109829904B (en) Method and device for detecting dust on screen, electronic equipment and readable storage medium
EP2252088A1 (en) Image processing method and system
US20010031005A1 (en) Frame decimation for structure from motion
TWI303311B (en) Inspecting method and apparatus thereof
CN112465746B (en) Method for detecting small defects in ray film
CN117274113B (en) Broken silicon wafer cleaning effect visual detection method based on image enhancement
CN109859160A (en) Almag internal defect in cast image-recognizing method based on machine vision
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
WO2017120796A1 (en) Pavement distress detection method and apparatus, and electronic device
JP2013546092A (en) Method for detecting and quantifying blur in digital images
CN112102926A (en) Image processing method, device, equipment and storage medium
CN110007493A (en) Broken bright spot detection method in liquid crystal display
CN115661187B (en) Image enhancement method for analysis of traditional Chinese medicine preparation
JP2001174227A (en) Method and device for measuring diameter distribution of fiber
CN109716355A (en) Grain boundaries identification
CN111415365A (en) Image detection method and device
CN114219758A (en) Defect detection method, system, electronic device and computer readable storage medium
CN113674180A (en) Frosted plane low-contrast defect detection method, device, equipment and storage medium
CN117173156B (en) Pole piece burr detection method, device, equipment and medium based on machine vision
CN117764989B (en) Visual-aided display screen defect detection method
JP2014135007A (en) Flat panel display automatic unevenness detection device and automatic unevenness detection method
CN117456371B (en) Group string hot spot detection method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23735134

Country of ref document: EP

Kind code of ref document: A1