CN116188468B - HDMI cable transmission letter sorting intelligent control system - Google Patents

HDMI cable transmission letter sorting intelligent control system Download PDF

Info

Publication number
CN116188468B
CN116188468B CN202310465715.3A CN202310465715A CN116188468B CN 116188468 B CN116188468 B CN 116188468B CN 202310465715 A CN202310465715 A CN 202310465715A CN 116188468 B CN116188468 B CN 116188468B
Authority
CN
China
Prior art keywords
edge
pixel point
pixel
pixel points
obtaining
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.)
Active
Application number
CN202310465715.3A
Other languages
Chinese (zh)
Other versions
CN116188468A (en
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.)
Jining Changrong Electrical Technology Co ltd
Original Assignee
Jining Changrong Electrical Technology 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 Jining Changrong Electrical Technology Co ltd filed Critical Jining Changrong Electrical Technology Co ltd
Priority to CN202310465715.3A priority Critical patent/CN116188468B/en
Publication of CN116188468A publication Critical patent/CN116188468A/en
Application granted granted Critical
Publication of CN116188468B publication Critical patent/CN116188468B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to an HDMI cable transmission sorting intelligent control system, which comprises: the data acquisition module is used for acquiring the cable surface gray level image and calculating the confidence coefficient of the edge pixel point based on the characteristic angle corresponding to the edge pixel point; the data processing module is used for acquiring associated pixel points corresponding to the edge pixel points and acquiring the preferred confidence coefficient by utilizing the characteristic angles of the associated pixel points; obtaining the deformation degree of the edge according to the preferred confidence coefficient of the edge pixel point; the defect analysis module is used for obtaining the local deformation degree of the pixel points, obtaining the difference degree according to the neighborhood pixel difference of the pixel points, and further obtaining the optimal value of the pixel points; obtaining a pixel point with the maximum optimal value as an initial point for region growth to obtain a defect region; and the transmission sorting module is used for obtaining the types of defects according to the deformation degree of the edge and the defect area, and further sorting the cables. The invention improves the efficiency and the precision of defect identification.

Description

HDMI cable transmission letter sorting intelligent control system
Technical Field
The invention relates to the technical field of image processing, in particular to an HDMI cable transmission sorting intelligent control system.
Background
HDMI (High Definition Multimedia Interface), also called high-definition multimedia interface, is a transmission line for all-digital digitized video and audio, and can be used to transmit audio and video signals without any compression. In the production process of the cable, due to factors such as processing equipment, production process, production raw materials and the like, defects such as scratches, holes and the like are inevitably caused, the defects not only damage the product performance and influence the commercial use, but also cause later potential safety hazards due to serious appearance defects, so that the sorting out of the cable containing the defects for corresponding treatment has important significance.
The existing method for detecting the defects on the surface of the cable often adopts a threshold segmentation method, and the method is easy to interfere with the selection of the threshold due to the problems of uneven illumination, uneven color and the like, so that the threshold segmentation result is inaccurate, and the cable containing the defects cannot be accurately obtained.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide an HDMI cable transmission sorting intelligent control system, which adopts the following technical scheme:
the data acquisition module is used for acquiring a cable surface gray level image, extracting edge pixel points in the image and acquiring characteristic angles corresponding to two adjacent edge pixel points; calculating the confidence coefficient of the edge pixel point according to the feature angle corresponding to the edge pixel point and all the feature angles;
the data processing module is used for marking a vertical line of the edge corresponding to the edge pixel point as a characteristic straight line, and the intersection point of the characteristic straight line and the edge on the other side is the associated pixel point of the edge pixel point; correcting the confidence coefficient of the edge pixel point by utilizing the characteristic angle of the associated pixel point to obtain a preferred confidence coefficient; obtaining the deformation degree of the edge according to the preferred confidence coefficient of the edge pixel point;
the defect analysis module is used for selecting pixel points in the cable surface gray level image according to a set rule, wherein the vertical line of the edge of the pixel points which are selected intersects with the edge at two edge pixel points, and the local deformation degree corresponding to the pixel points is obtained according to the two edge pixel points; obtaining the difference degree according to the neighborhood pixel difference of the pixel points; calculating the optimal value of the pixel point according to the local deformation degree and the difference degree, and selecting the pixel point with the maximum optimal value as an initial point for region growth so as to obtain a defect region;
and the transmission sorting module is used for obtaining the types of defects according to the deformation degree of the edges in the gray level images of the cable surface and the defect areas, and sorting the cables according to the types of the defects.
Preferably, the obtaining the feature angles corresponding to the two adjacent edge pixel points specifically includes: the inclination angle of a straight line formed by two adjacent edge pixel points is taken as a characteristic angle.
Preferably, the method for obtaining the confidence coefficient of the edge pixel point specifically includes:
counting the frequency of occurrence of different characteristic angles, and recording the characteristic angle corresponding to the maximum frequency as the characteristic angle of the edge profile; and obtaining the confidence coefficient of the edge pixel point according to the difference value of the characteristic angle corresponding to the edge pixel point and the characteristic angle of the edge contour.
Preferably, the method for acquiring the preferred confidence coefficient specifically comprises the following steps:
and acquiring the difference between gray values and characteristic angles of the edge pixel points and the corresponding associated pixel points, and correcting the confidence coefficient of the edge pixel points according to the difference between the gray values and the characteristic angles to obtain the preferred confidence coefficient of the edge pixel points.
Preferably, the obtaining the deformation degree of the edge according to the preferred confidence coefficient of the edge pixel point specifically includes:
setting a confidence coefficient threshold value, wherein the optimal confidence coefficient is larger than the confidence coefficient threshold value, and the corresponding edge pixel point is an abnormal pixel point, or else is a normal pixel point; and obtaining a straight line corresponding to the characteristic angle of the edge contour, and calculating the deformation degree of the edge according to the distance from the abnormal pixel point to the straight line.
Preferably, the setting rule specifically includes:
and counting a gray level histogram of the gray level image on the surface of the cable, obtaining a pixel point corresponding to the gray level of the maximum frequency, and selecting any pixel point which does not belong to the edge part.
Preferably, the local deformation degree is specifically a distance average value of two edge pixel points to a straight line corresponding to the characteristic angle of the corresponding edge contour.
Preferably, the obtaining the difference degree according to the neighborhood pixel difference of the pixel point is specifically:
calculating the gray value difference value of each neighborhood pixel in the pixel and 8 adjacent domains, if the gray value difference value is smaller than the threshold value, the corresponding neighborhood pixel and the pixel belong to the same class, and marking the class as a first class; if the gray value difference value is greater than or equal to the threshold value, the corresponding neighborhood pixel point and the pixel point do not belong to the same category, and the neighborhood pixel point is marked as a second category; respectively calculating the distance from the pixel point to two edge pixel points corresponding to the pixel point, acquiring surrounding pixel points of the pixel point according to the shortest distance, and acquiring the category of each neighborhood pixel point in 8 adjacent areas of the surrounding pixel point; and obtaining the difference degree corresponding to the pixel points according to the gray values of the neighborhood pixel points, the categories of which are changed in the 8 neighborhood of the pixel points and the surrounding pixel points.
The embodiment of the invention has at least the following beneficial effects:
according to the invention, the corresponding characteristic angles between two adjacent edge pixel points are obtained through the cable surface gray level image, and the characteristic angles corresponding to the edge pixel points are combined with all the characteristic angles for analysis, so that the relation between the local part of the cable edge at the edge pixel points and the whole cable edge is considered, and the confidence of the edge pixel points is obtained; the method comprises the steps of obtaining the correlation pixel points through the intersection point of the characteristic straight line corresponding to the edge pixel points and the edge on the other side, obtaining the correlation of the edge pixel points on the edge of the cable through the symmetrical characteristic of the cable, symmetrically analyzing the abnormal degree of the pixel points, correcting the confidence coefficient of the edge pixel points to obtain the accurate edge deformation degree, calculating the optimal value of the pixel points according to the local deformation degree of the pixel points and the difference degree obtained by the difference between the adjacent pixel points, obtaining the pixel point with the maximum optimal value as an initial point to perform area growth, and taking the local change condition of the cable at the position of the pixel point and the adjacent gray change condition of the pixel point into consideration, so that the initial point with better area growth effect can be obtained in a self-adaptive mode, the defect identification efficiency and the defect identification accuracy are improved, and the combination of the deformation degree of the edge and the defect area enables the cable to be accurately sorted according to the defect types.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system block diagram of an HDMI cable transmission sorting intelligent control system of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of an HDMI cable transmission sorting intelligent control system according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the HDMI cable transmission sorting intelligent control system provided by the present invention with reference to the accompanying drawings.
Examples:
the specific scene aimed by the invention is as follows: and the produced cable is subjected to defect detection by collecting cable images in the transmission process, and the mechanical arm is controlled to sort according to the defect types.
Referring to fig. 1, a system block diagram of an HDMI cable transmission sorting intelligent control system according to an embodiment of the present invention is shown, the system includes:
the data acquisition module is used for acquiring a cable surface gray level image, extracting edge pixel points in the image and acquiring characteristic angles corresponding to two adjacent edge pixel points; and calculating the confidence coefficient of the edge pixel point according to the characteristic angle corresponding to the edge pixel point and all the characteristic angles.
Firstly, an industrial camera is used for collecting cable surface images in a fixed light source mode, the images collected by the camera are RGB images, and a weighted graying method is used for graying the cable surface images. The practitioner can select other methods to gray the image according to actual conditions. In this embodiment, since the gray difference between the cable surface and the background portion such as the conveyor belt is large, the image may be processed by using the oxford threshold segmentation method, so as to eliminate the interference of the background, and obtain the cable surface gray image, and the practitioner may select other methods according to the actual situation to process the image, so as to eliminate the interference of the background, for example, the semantic segmentation method.
However, it should be noted that, in general, when the cable does not have an appearance defect, the edge contour portion of the cable in the image is two straight lines with a longer length and a smoother line, and the two straight lines are respectively located at two sides of the image, and a perpendicular line of the edge contour line is drawn through a point on the edge contour line on any side, and must be compared with a point on the edge contour line on the other side. Based on this, the cable surface gray scale image is analyzed.
And carrying out edge detection on the gray level image of the cable surface, and obtaining edge pixel points. For any edge pixel point q, acquiring an edge pixel point p adjacent to the edge pixel point q, acquiring an inclination angle of a straight line formed by the edge pixel point q and the edge pixel point p adjacent to the edge pixel point q, and recording the inclination angle as a characteristic angle of the edge pixel point q, wherein the characteristic angle is expressed as follows by a formula:
wherein,,is the characteristic angle of the edge pixel point q,andthe pixel coordinates of the edge pixel point q and the edge pixel point p, respectively, arctan is an arctan function. The method for acquiring the pixel coordinates of the pixel points is a known technique, and an operator can select a suitable method to acquire according to actual situations.
And further, obtaining the characteristic angles corresponding to all the edge pixel points according to the same method, for example, obtaining the characteristic angles by obtaining the inclination angles of the straight lines formed by the edge pixel point q and the adjacent edge pixel points p, then obtaining the adjacent edge pixel points except the edge pixel point q of the edge pixel point p, performing corresponding calculation, and the like until the characteristic angles corresponding to all the edge pixel points are obtained. It should be noted that, the corresponding characteristic angles can be obtained except for the edge pixel point acquired last time. In this embodiment, adjacent means that the distance between the edge pixel points is nearest.
And finally, counting the frequency of occurrence of all the characteristic angles, and recording the characteristic angle corresponding to the maximum frequency as the characteristic angle of the edge profile. The characteristic angles corresponding to the edge pixel points can represent the inclination angles of the cable edges at the edge pixel points, and the cable edges are in flat two straight lines when no appearance defect exists, so that the characteristic angle with the largest occurrence number corresponding to all the edge pixel points can be regarded as the inclination angle of the straight line corresponding to the cable edges and recorded as the characteristic angle of the edge profile, and the characteristic angle can reflect the inclination angle of the cable edges to a large extent.
And then the characteristic angles corresponding to the edge pixel points and the characteristic angles corresponding to the edge contours can be compared, the difference between the local inclination angle and the overall inclination angle of the cable edge at the edge pixel points is analyzed, the larger the difference between the characteristic angles is, the larger the difference between the inclination angle of the cable edge at the edge pixel points and the inclination angle of the straight line corresponding to the cable edge is, the more the edge pixel points possibly deviate from the overall edge of the cable is, the more the appearance defects are likely to appear at the edge pixel points, and therefore the confidence that the edge pixel points are abnormal pixel points can be obtained according to the difference of the characteristic angles corresponding to the edge pixel points and the edge contours, and the confidence is expressed as:
wherein,,representing the confidence corresponding to the edge pixel point q,representing the characteristic angle corresponding to the edge pixel point q,representing the characteristic angle of the edge profile, max () represents the function of maximizing.
The larger the difference value is, the larger the confidence value is, which indicates that the larger the difference between the inclination angle of the cable edge at the position of the edge pixel point q and the inclination angle of the whole cable edge is, the greater the possibility that the edge pixel point q is abnormal is, and the more appearance defects are likely to occur at the edge pixel point.
The data processing module is used for marking a vertical line of the edge corresponding to the edge pixel point as a characteristic straight line, and the intersection point of the characteristic straight line and the edge on the other side is the associated pixel point of the edge pixel point; correcting the confidence coefficient of the edge pixel point by utilizing the characteristic angle of the associated pixel point to obtain a preferred confidence coefficient; and obtaining the deformation degree of the edge according to the preferred confidence of the edge pixel point.
It should be noted that, since the cable that is qualified in production is generally regular in shape, and in the gray-scale image of the cable surface, the cable portion has a certain symmetrical characteristic. The relevance of the edge pixel points on the cable edge can be obtained through the symmetrical characteristic of the cable, the degree of abnormality of the pixel points is symmetrically analyzed, and the confidence of the edge pixel points is corrected.
Specifically, a perpendicular line passing through an edge pixel point and making an edge corresponding to the point is marked as a characteristic straight line, and an intersection point of the characteristic straight line and the edge on the other side is an associated pixel point of the edge pixel point. That is, for any edge pixel point, the corresponding characteristic straight line is perpendicular to the cable edge where the edge pixel point is located. Because the edge contour of the cable is two straight lines with longer length and smoother, the characteristic straight line of the edge pixel point can intersect with the edge of the cable contour on the other side at one point, and the edge pixel point and the corresponding associated pixel point can be regarded as two approximately symmetrical pixel points.
If the cable has no appearance defect, the characteristic angles and gray values of the edge pixel points at the symmetrical positions of the cable edge are relatively close, namely the difference is smaller, and if the cable has the appearance defect, the characteristic angles and gray values between the edge pixel points at the defect part and the related pixel points symmetrical with each other have certain difference. The invention obtains the confidence coefficient of the corrected edge pixel point as the abnormal pixel point by symmetrically analyzing the abnormal degree of the edge pixel point with certain relevance, namely corrects the confidence coefficient of the edge pixel point according to the difference between the gray value of the edge pixel point and the corresponding associated pixel point and the difference between the characteristic angles, and obtains the optimal confidence coefficient, which is expressed as follows by a formula:
wherein,,representing the preferred confidence of the edge pixel point q,representing the confidence corresponding to the edge pixel point q,andrespectively representing the gray value and the characteristic angle of the edge pixel point q,andthe gray value and the characteristic angle of the associated pixel point q' corresponding to the edge pixel point q are respectively represented, and e is a natural constant.
Andthe difference of gray values and the difference of characteristic angles between the edge pixel point q and the corresponding associated pixel point q 'are respectively represented, and when the difference of the gray values and the difference of the characteristic angles are larger, the greater the possibility that the difference exists between the edge pixel point q and the associated pixel point q' which are symmetrically associated is indicated, the greater the possibility that the edge pixel point q is an abnormal pixel point, namely the greater the value of the preferred confidence of the edge pixel point q is.
And setting a confidence coefficient threshold value, wherein the optimal confidence coefficient is larger than the confidence coefficient threshold value, and the corresponding edge pixel point is an abnormal pixel point, or else, is a normal pixel point. In this embodiment, the confidence threshold has a value of 0.85, and the practitioner can set the confidence threshold according to the actual situation.
Since the characteristic angle of the edge profile represents the inclination angle of the straight line corresponding to the cable edge, the straight line corresponding to the characteristic angle of the edge profile can be obtained through the edge pixel points with the characteristic angle identical to the characteristic angle of the edge profile. If the distance from the edge pixel point to the straight line of the corresponding edge is larger, the cable is greatly deformed at the position of the edge pixel point; if the distance from the edge pixel point to the straight line of the corresponding edge is smaller, the cable is less deformed at the position of the edge pixel point. Therefore, the deformation degree of the edge can be calculated according to the distance from the abnormal pixel point to the straight line of the corresponding edge, and the deformation degree is expressed as follows by a formula:
wherein B represents the deformation degree of the cable outline edge,represents the distance of the ith outlier pixel to the straight line of the corresponding edge,representing the number of outlier pixels,the maximum value of the distance from the abnormal pixel point to the corresponding edge line is indicated.And the average value of the distances from all the abnormal pixel points to the corresponding edge straight lines is represented, the change degree from the edge pixel points of the cable to the corresponding straight lines is represented by the ratio of the average value to the maximum value, and the larger the value is, the larger the deformation degree of the appearance edge of the cable is.
The defect analysis module is used for selecting pixel points in the cable surface gray level image according to a set rule, wherein the vertical line of the edge of the pixel points which are selected intersects with the edge at two edge pixel points, and the local deformation degree corresponding to the pixel points is obtained according to the two edge pixel points; obtaining the difference degree according to the neighborhood pixel difference of the pixel points; and calculating the optimal value of the pixel points according to the local deformation degree and the difference degree, and selecting the pixel point with the maximum optimal value as an initial point to perform region growth so as to obtain a defect region.
Firstly, it should be noted that the above steps have been performed to analyze the appearance of the cable, so as to obtain the deformation degree of the cable edge profile, which may have appearance defects, and then the defect analysis needs to be performed on the inner area of the cable profile, and when the gray level image of the cable surface is processed by using the area growth method, an initial point needs to be obtained first. In the traditional algorithm, the initial points are often selected manually, and the quality of the selected initial points directly influences the result of the region growth, so the method and the device perform the region growth through adaptively selecting the better initial points, and improve the accuracy of the region growth result.
Specifically, selecting pixel points in the cable surface gray level image according to a setting rule, wherein the setting rule specifically comprises: and acquiring gray levels corresponding to the gray values of the pixel points, counting a gray histogram of the gray image on the surface of the cable, acquiring the pixel points corresponding to the gray levels with the maximum frequency, and selecting the pixel points which do not belong to the edge part at will. For any selected pixel point, passing through the perpendicular line of the corresponding edge straight line of the pixel point, intersecting the perpendicular line with the cable edge profile at two edge pixel points respectively, calculating the average value of the distances from the two edge line pixel points to the corresponding edge straight line, and taking the average value as the local deformation degree corresponding to the pixel point.
In this embodiment, the area growing algorithm is used to obtain the area without defects in the gray level image of the cable surface, and the local deformation degree corresponding to the pixel point reflects the deformation degree of the pixel point at the positions of the contour edges on both sides, so that the larger the local deformation degree, the larger the deformation degree of the pixel point in the width direction of the cable is, which means that the more likely to have defects at the positions of the two edge pixel points corresponding to the pixel point, the less effective the pixel point is as the initial point of the area growth.
Then, the gray value difference between the neighborhood pixel point and each pixel point in the neighborhood can be obtained by comparing the gray value of the pixel point with the gray value of each pixel point in the neighborhood, namely, the gray value difference between the pixel point and each neighborhood pixel point in the neighborhood 8 neighborhood is calculated, and if the gray value difference is smaller than a threshold value, the corresponding neighborhood pixel point and the pixel point belong to the same category and are marked as a first category; if the gray value difference is greater than or equal to the threshold value, the corresponding neighborhood pixel point and the pixel point do not belong to the same category, and the category to which the neighborhood pixel point belongs is marked as a second category.
For example, the gray value difference between the pixel point a and the neighborhood pixel point in 8 adjacent areas of the pixel point is obtained and recorded asIs the gray value of the pixel point a,setting a threshold value T for the gray value of the pixel point of the u-th neighborhood in 8 neighbors of the pixel point a, wherein the value of the threshold value T is 10 in the embodiment, and when the gray value difference value is smaller than the threshold valueI.e.The pixel point of the u-th neighborhood and the pixel point a belong to the same class of pixel points and are marked as a first class; when the gray value difference is greater than or equal to a threshold value, i.eAnd if the pixel point a of the u-th neighborhood does not belong to the same class of pixel points, the class to which the pixel point a of the u-th neighborhood belongs is marked as a second class.
Since the vertical line of the line corresponding to the cable edge through the pixel points intersects with the edges corresponding to the outlines of the two sides of the cable at two edge pixel points, the distance between the pixel points and the two edge pixel points corresponding to the pixel points is calculated respectively, and the surrounding pixel points of the pixel points are acquired according to the shortest distance, namely, the pixel points are acquired at the position, which is the same as the shortest distance, of any side of the pixel points and are recorded as the surrounding pixel points, and meanwhile, the acquired surrounding pixel points are ensured not to be positioned on the outlines of the cable edge.
For example, a perpendicular line passing through the pixel point a and making a line corresponding to the edge of the cable intersects with the edges corresponding to the outlines on both sides of the cable at two edge pixel points, which are respectively denoted as an edge pixel point b and an edge pixel point c, and Euclidean distances between the pixel point a and the edge pixel points b and c are respectively calculated asAndthe smaller value is acquired, and in this embodiment, it is assumed thatIndicating that the distance between the pixel point a and the edge pixel point b is closer, the pixel point a and the edge pixel point b and the edge pixel point c are positioned on the straight line, and the pixel point a is positioned on one side of the pixel point aThe pixel points are acquired at the positions with equal distance and recorded as surrounding pixelsAnd the surrounding pixel points v and the edge pixel points b are respectively positioned at two sides of the pixel point a.
Acquiring the category of each neighborhood pixel point in 8 neighborhood of surrounding pixel points; and obtaining the difference degree corresponding to the pixel points according to the gray values of the neighborhood pixel points, the categories of which are changed in the 8 neighborhood of the pixel points and the surrounding pixel points. In this embodiment, the specific method for obtaining the number of the neighborhood pixel points with changed categories is that the total number of the neighborhood pixel points in 8 adjacent areas between the pixel points and surrounding pixel points is 8, which represents 8 adjacent pixel points in 8 directions, m=0 is given, and judgment is sequentially performed according to the 8 directions, whether the categories of the neighborhood pixel points corresponding to the pixel points and the surrounding pixel points are the same or not, if the categories are the same, the value of m is unchanged, if the categories are not the same, the value of m is added by one, and finally m is the number of the neighborhood pixel points with changed categories.
When the cable has no defect, the gray value of each pixel point in the gray image on the cable surface is relatively close, namely the gray value between the adjacent pixel points of each pixel point is relatively close, so that the effect of acquiring the initial point for region growth is relatively good, the variation condition in the adjacent pixel point at the position which is relatively close to the pixel point is combined, the corresponding difference degree of the pixel points can be acquired, and the preference degree for selecting the pixel point as the initial point is analyzed.
The categories of each neighborhood pixel point in the 8 adjacent areas of the pixel point a and the surrounding pixel point v are determined, if the categories of the neighborhood pixel points in the corresponding positions of the pixel point a and the surrounding pixel point v in the 8 adjacent areas are changed, the cable is indicated to possibly have defects at the corresponding positions, the gray value difference between the changed neighborhood pixel points is analyzed, the larger the difference is, the more the gray value change is indicated to be, the more the surrounding of the pixel point a and the surrounding pixel point v is likely to have defects, the surrounding pixel point v is closer to the pixel point a and is positioned on the same straight line, and the defect condition of the cable in the width direction can be reflected, so that the effect of the pixel point a serving as an initial point of area growth is poorer.
The calculation method of the degree of difference is formulated as:
wherein,,indicating the degree of difference corresponding to pixel a,andthe gray values of pixel a and surrounding pixel v are represented, respectively, max () represents the function of maximizing,andthe gray values of the pixel points in the u-th neighborhood in the 8 neighborhood of the pixel point a and the surrounding pixel point v are respectively represented, and m represents the number of the corresponding position types in the 8 neighborhood of the pixel point a and the surrounding pixel point v.
The gray value difference between the pixel a and the surrounding pixel v is represented,the gray value difference value is compared with a larger value to reflect the gray difference between two pixel points, and the larger the difference is, the more possible defects exist at the positions of the pixel point a and the surrounding pixel points v.The larger the ratio of the number of pixel points representing the change of the category, which indicates that the more severe the change of the corresponding positions in the neighborhood of the pixel point a and the surrounding pixel point v, the larger the degree of the difference of the corresponding positions, so the ratio will beCalculation of degree of difference as constant coefficient。
Representing the difference between the gray values of the neighboring pixel points at the positions corresponding to the pixel point a and the surrounding pixel point v,the larger the average value of the difference between the gray values of the neighborhood pixel points corresponding to the positions of the pixel point a and the surrounding pixel point v is, the larger the value is, which means that the larger the difference between the gray values of the pixel points in the neighborhood of the pixel point a and the surrounding pixel point v is, the more likely the defect exists at the positions of the pixel point a and the surrounding pixel point v.
Finally, the local deformation degree corresponding to the pixel point reflects the deformation degree of the pixel point at the edge positions of the contour at two sides, and the larger the local deformation degree is, the larger the deformation degree of the pixel point in the width direction of the cable is, which means that the more likely the cable contour edge is defective at the two edge pixel point positions corresponding to the pixel point, the less the effect of the pixel point serving as an initial point of region growth is.
The degree of difference corresponding to the pixel points reflects the gray level difference between the pixel points at the position where the pixel points are closer to each other, and the larger the difference is, the larger the gray level change of the pixel points in the width direction of the cable is, which means that defects are more likely to exist at the positions of the pixel points and surrounding pixel points, and the closer the distance between the pixel points is, the less good the effect that the pixel points serve as the initial points of region growth is.
And further calculating the optimal value of the pixel point according to the local deformation degree and the difference degree corresponding to the pixel point, and expressing the optimal value as follows by a formula:
wherein,,represents the preferred value of pixel a,indicating the local deformation degree corresponding to the pixel point a,the degree of difference of the pixel a is shown, and the larger the local deformation degree of the pixel is, the smaller the preferred value of the pixel is, which means that the more likely defects exist in the width direction of the pixel a and the pixel, and the less good the effect that the pixel is used as an initial point of region growth is.
Further, the pixel point with the maximum preferred value is selected as the initial growth point of the normal area without defects, and the growth criterion is that growth is performed when the gray value difference is smaller than the threshold value, otherwise, growth is not performed, in this embodiment, the threshold value is 10, the practitioner can set according to the actual situation, and the area growth algorithm is a known technology, which is not described herein too much. And marking the area obtained according to the area growth as a normal area, and dividing the gray level image of the cable surface into a normal area and a defect area by the area growth result.
And the transmission sorting module is used for obtaining the types of defects according to the deformation degree of the edges in the gray level images of the cable surface and the defect areas, and sorting the cables according to the types of the defects.
Specifically, the length and width of the smallest circumscribed rectangle of the defect region are obtained, and the aspect ratio corresponding to the defect region is calculated, wherein the aspect ratio can represent the shape characteristics of the defect region. The corresponding deformation degree of the cable can represent the deformation condition of the contour edge of the cable. The entropy ENT and the energy ASM corresponding to the defect area are obtained, so that the texture features in the defect area can be represented, and the method for obtaining the entropy ENT and the energy ASM is a known technology and will not be described herein too much. The length-width ratio, the deformation degree, the entropy value ENT and the energy ASM form a defect characteristic vector, the defect characteristic vector is input into a defect identification neural network of a cable, the type of the defect is output, the loss function of the network is a cross entropy loss function, the neural network is a common classification network, an implementer can select according to actual conditions, the training process of the network is a known technology, and the training process of the network is not described too much.
Further, sorting the cables according to the cable surface defect identification result, if the cables have no defects, transporting the cables normally, and if the cables have defects, selecting different mechanical arms according to the cable defect types to finish the sorting work of the cables.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the scope of the embodiments of the present application, and are intended to be included within the scope of the present application.

Claims (4)

1. An HDMI cable transmission letter sorting intelligent control system, characterized in that, this system includes:
the data acquisition module is used for acquiring a cable surface gray level image, extracting edge pixel points in the image and acquiring characteristic angles corresponding to two adjacent edge pixel points; calculating the confidence coefficient of the edge pixel point according to the feature angle corresponding to the edge pixel point and all the feature angles;
the data processing module is used for marking a vertical line of the edge corresponding to the edge pixel point as a characteristic straight line, and the intersection point of the characteristic straight line and the edge on the other side is the associated pixel point of the edge pixel point; correcting the confidence coefficient of the edge pixel point by utilizing the characteristic angle of the associated pixel point to obtain a preferred confidence coefficient; obtaining the deformation degree of the edge according to the preferred confidence coefficient of the edge pixel point;
the defect analysis module is used for selecting pixel points in the cable surface gray level image according to a set rule, wherein the vertical line of the edge of the pixel points which are selected intersects with the edge at two edge pixel points, and the local deformation degree corresponding to the pixel points is obtained according to the two edge pixel points; obtaining the difference degree according to the neighborhood pixel difference of the pixel points; calculating the optimal value of the pixel point according to the local deformation degree and the difference degree, and selecting the pixel point with the maximum optimal value as an initial point for region growth so as to obtain a defect region;
the transmission sorting module is used for obtaining the types of defects according to the deformation degree of the edges in the gray level images of the cable surface and the defect areas, and sorting the cables according to the types of the defects;
the obtaining of the characteristic angles corresponding to the two adjacent edge pixel points specifically comprises the following steps: the inclination angle of a straight line formed by two adjacent edge pixel points is recorded as a characteristic angle;
the method for acquiring the preferred confidence coefficient comprises the following steps:
acquiring the difference between gray values and characteristic angles of the edge pixel points and the corresponding associated pixel points, and correcting the confidence coefficient of the edge pixel points according to the difference between the gray values and the characteristic angles to obtain the preferred confidence coefficient of the edge pixel points;
the setting rule specifically comprises the following steps:
counting a gray level histogram of a gray level image on the surface of the cable, obtaining pixel points corresponding to the gray level of the maximum frequency, and arbitrarily selecting the pixel points which do not belong to the edge part;
the local deformation degree is specifically a distance average value of a straight line corresponding to a characteristic angle of the corresponding edge contour from two edge pixel points;
the preferred value of the pixel point is calculated according to the local deformation degree and the difference degree corresponding to the pixel point, specifically:
wherein,,representing the preferred value of pixel a, +.>Representing the local deformation degree corresponding to pixel point a, < >>The degree of difference of the pixel point a is represented, and e is a natural constant.
2. The HDMI cable transmission sorting intelligent control system of claim 1, wherein the method for obtaining the confidence of the edge pixel point comprises:
counting the frequency of occurrence of different characteristic angles, and recording the characteristic angle corresponding to the maximum frequency as the characteristic angle of the edge profile; and obtaining the confidence coefficient of the edge pixel point according to the difference value of the characteristic angle corresponding to the edge pixel point and the characteristic angle of the edge contour.
3. The HDMI cable transmission sorting intelligent control system of claim 2, wherein the obtaining the deformation degree of the edge according to the preferred confidence level of the edge pixel point is specifically:
setting a confidence coefficient threshold value, wherein the optimal confidence coefficient is larger than the confidence coefficient threshold value, and the corresponding edge pixel point is an abnormal pixel point, or else is a normal pixel point; and obtaining a straight line corresponding to the characteristic angle of the edge contour, and calculating the deformation degree of the edge according to the distance from the abnormal pixel point to the straight line.
4. The HDMI cable transmission sorting intelligent control system of claim 1, wherein the obtaining the degree of difference according to the neighborhood pixel difference of the pixel point is specifically:
calculating the gray value difference value of each neighborhood pixel in the pixel and 8 adjacent domains, if the gray value difference value is smaller than the threshold value, the corresponding neighborhood pixel and the pixel belong to the same class, and marking the class as a first class; if the gray value difference value is greater than or equal to the threshold value, the corresponding neighborhood pixel point and the pixel point do not belong to the same category, and the neighborhood pixel point is marked as a second category;
respectively calculating the distance from the pixel point to two edge pixel points corresponding to the pixel point, acquiring surrounding pixel points of the pixel point according to the shortest distance, and acquiring the category of each neighborhood pixel point in 8 adjacent areas of the surrounding pixel point;
and obtaining the difference degree corresponding to the pixel points according to the gray values of the neighborhood pixel points, the categories of which are changed in the 8 neighborhood of the pixel points and the surrounding pixel points.
CN202310465715.3A 2023-04-27 2023-04-27 HDMI cable transmission letter sorting intelligent control system Active CN116188468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310465715.3A CN116188468B (en) 2023-04-27 2023-04-27 HDMI cable transmission letter sorting intelligent control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310465715.3A CN116188468B (en) 2023-04-27 2023-04-27 HDMI cable transmission letter sorting intelligent control system

Publications (2)

Publication Number Publication Date
CN116188468A CN116188468A (en) 2023-05-30
CN116188468B true CN116188468B (en) 2023-07-21

Family

ID=86446598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310465715.3A Active CN116188468B (en) 2023-04-27 2023-04-27 HDMI cable transmission letter sorting intelligent control system

Country Status (1)

Country Link
CN (1) CN116188468B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721096B (en) * 2023-08-08 2023-11-14 东莞市南谷第电子有限公司 New energy harness quality online detection method based on artificial intelligence
CN116824516B (en) * 2023-08-30 2023-11-21 中冶路桥建设有限公司 Road construction safety monitoring and management system
CN117934455B (en) * 2024-03-19 2024-06-11 江苏盖亚环境科技股份有限公司 River water flow purification effect-based detection method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658381A (en) * 2018-11-16 2019-04-19 华南理工大学 A kind of copper face defect inspection method of the flexible IC package substrate based on super-pixel

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5859698A (en) * 1997-05-07 1999-01-12 Nikon Corporation Method and apparatus for macro defect detection using scattered light
CN104820986B (en) * 2015-04-28 2017-06-16 电子科技大学 A kind of cable online test method based on machine vision
CN108918542B (en) * 2018-08-29 2020-04-14 成都理工大学 Optical cable surface defect detection device and method
CN110853010B (en) * 2019-11-11 2022-05-13 江苏君英天达人工智能研究院有限公司 High-speed railway cable detection method based on FWA and SM
CN114842017B (en) * 2022-07-06 2022-09-27 济宁市海富电子科技有限公司 HDMI cable surface quality detection method and system
CN115115612B (en) * 2022-07-26 2022-11-04 山东安德机械科技有限公司 Surface defect detection method and system for mechanical parts
CN115629066A (en) * 2022-09-06 2023-01-20 华南理工大学 Method and device for automatic wiring based on visual guidance
CN115239735B (en) * 2022-09-23 2022-12-27 探长信息技术(苏州)有限公司 Communication cabinet surface defect detection method based on computer vision
CN115294338A (en) * 2022-09-29 2022-11-04 中威泵业(江苏)有限公司 Impeller surface defect identification method
CN115375676B (en) * 2022-10-24 2023-01-24 微山三利特不锈钢有限公司 Stainless steel product quality detection method based on image recognition
CN115861351A (en) * 2022-12-07 2023-03-28 苏州镁伽科技有限公司 Edge detection method, defect detection method and detection device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658381A (en) * 2018-11-16 2019-04-19 华南理工大学 A kind of copper face defect inspection method of the flexible IC package substrate based on super-pixel

Also Published As

Publication number Publication date
CN116188468A (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN116188468B (en) HDMI cable transmission letter sorting intelligent control system
CN114862862B (en) Pump body cold shut defect identification method and system based on image processing
CN115170576B (en) Aluminum pipe surface defect detection method based on machine vision
CN115311270B (en) Plastic product surface defect detection method
CN114937055B (en) Image self-adaptive segmentation method and system based on artificial intelligence
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN113689428A (en) Mechanical part stress corrosion detection method and system based on image processing
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN116934740B (en) Plastic mold surface defect analysis and detection method based on image processing
CN114219805B (en) Intelligent detection method for glass defects
CN108734704B (en) Transmission conductor strand breakage detection method based on gray variance normalization
CN116721107B (en) Intelligent monitoring system for cable production quality
CN116630813B (en) Highway road surface construction quality intelligent detection system
CN117764986B (en) Titanium plate surface defect detection method based on image processing
CN115631116B (en) Aircraft power inspection system based on binocular vision
CN109359604B (en) Method for identifying instrument under shadow interference facing inspection robot
CN117541582B (en) IGBT insulation quality detection method for high-frequency converter
CN114821158A (en) Dried jujube quality classification method and system based on image processing
CN117314940B (en) Laser cutting part contour rapid segmentation method based on artificial intelligence
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN116152255B (en) Modified plastic production defect judging method
CN117078678A (en) Waste silicon wafer shape detection method based on image recognition
CN115994870A (en) Image processing method for enhancing denoising
CN113763359A (en) Intelligent detection and sensing system for metal near-surface defect detection
CN113947563A (en) Cable process quality dynamic defect detection method based on deep learning

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
GR01 Patent grant
GR01 Patent grant