CN114937041A - Method and system for detecting defects of copper bush of oil way of automobile engine - Google Patents

Method and system for detecting defects of copper bush of oil way of automobile engine Download PDF

Info

Publication number
CN114937041A
CN114937041A CN202210874860.2A CN202210874860A CN114937041A CN 114937041 A CN114937041 A CN 114937041A CN 202210874860 A CN202210874860 A CN 202210874860A CN 114937041 A CN114937041 A CN 114937041A
Authority
CN
China
Prior art keywords
pixel
pixel point
image
defect area
darkest
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.)
Granted
Application number
CN202210874860.2A
Other languages
Chinese (zh)
Other versions
CN114937041B (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.)
Liaocheng Boyuan Efficient Technology Co ltd
Original Assignee
Liaocheng Boyuan Efficient 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 Liaocheng Boyuan Efficient Technology Co ltd filed Critical Liaocheng Boyuan Efficient Technology Co ltd
Priority to CN202210874860.2A priority Critical patent/CN114937041B/en
Publication of CN114937041A publication Critical patent/CN114937041A/en
Application granted granted Critical
Publication of CN114937041B publication Critical patent/CN114937041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

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

Abstract

The invention discloses a method and a system for detecting defects of a copper sleeve of an oil way of an automobile engine, belonging to the technical field of image processing; the method comprises the following steps: acquiring a surface image of a copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image; acquiring a darkest channel image and a brightest channel image; acquiring a first possibility that each pixel point in the darkest channel image is a pixel point in a defect area; acquiring first credibility that each pixel point in the darkest channel image is a pixel point in a defect area; acquiring pixel points belonging to the defect area; sequentially acquiring all pixel points belonging to the defect area in the surface image; and judging and acquiring the defect area on the copper sleeve according to all the pixel points belonging to the defect area. The method utilizes a computer vision technology to carry out pixel point detection on different color channels of the copper bush image, and comprehensively judges and obtains the defects of the surface of the copper bush according to the characteristics of the different color channels.

Description

Method and system for detecting defects of copper bush of oil way of automobile engine
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a system for detecting defects of a copper bush of an oil way of an automobile engine.
Background
The oil way copper sleeve of the automobile engine is an important component of the engine, and the quality of the oil way copper sleeve directly influences the quality of the engine. In the production of the oil-way copper sleeve of the automobile engine, the product has defects due to the error of process control, and the quality of the engine is directly influenced. Therefore, the product of the copper sleeve of the oil way of the automobile engine needs to be subjected to defect detection, and the product quality is ensured.
The defect detection of the automobile engine oil way copper sleeve is generally manual detection, but with the development of scientific technology, the computer vision technology is widely applied to the defect detection. In the prior art, the defects of the copper bush of the engine oil way are usually directly identified and detected based on the gray image, and the defects of the copper bush of the engine oil way are difficult to detect only by using the gray image because the surface of the copper bush of the engine oil way is smooth and the defect area is fine. Therefore, the invention provides a method for detecting the defects of the copper bush of the oil way of the automobile engine based on different color channels.
Disclosure of Invention
In order to solve the technical problem that the defects of an engine oil way copper sleeve are difficult to detect only by using a gray image in the prior art, the invention provides a method and a system for detecting the defects of the engine oil way copper sleeve.
The invention aims to provide a method for detecting the defects of a copper bush of an oil way of an automobile engine, which comprises the following steps:
acquiring a surface image of a copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image;
respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
acquiring the initial possibility that each pixel point is a pixel point of a defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image;
acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle;
acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
acquiring the initial possibility and the distribution trend of each pixel point in the darkest channel image as the pixel point of the defect area according to the initial possibility and the distribution trend of each pixel point in the darkest channel image as the pixel point of the defect area;
sequentially analogizing to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
acquiring a first credibility of each pixel point in the darkest channel image as a pixel point of a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point adjacent to the pixel point and the information entropy of the darkest channel image;
sequentially carrying out analogy to obtain a second reliability of each pixel point in the brightest channel image as a pixel point in the defect area; acquiring a third credibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, and the first reliability, the second reliability and the third reliability;
sequentially acquiring all pixel points belonging to the defect area in the surface image;
and judging and acquiring the defect area on the copper sleeve according to all pixel points belonging to the defect area.
In one embodiment, the defect area on the copper sleeve is obtained according to the following steps:
carrying out binarization processing on the surface image of the copper bush to be detected according to all pixel points belonging to the defect area, setting the pixel values of all pixel points belonging to the defect area to be 255, and setting the pixel value of a background pixel point to be 0, and obtaining a binarization image;
performing morphological opening operation processing on the binary image to obtain a plurality of connected domains formed by pixel points belonging to the defect region;
judging and acquiring that each connected domain and the adjacent connected domain are the same defect region according to the distance between each connected domain and the adjacent connected domain;
and sequentially analogizing to obtain all defect areas on the copper sleeve.
In one embodiment, the method further comprises:
and obtaining the influence degree of each defect region on the copper sleeve according to the number of the pixel points in each defect region and the total number of the pixel points in the surface image, and judging the quality of the copper sleeve according to the influence degree of each defect region on the copper sleeve.
In one embodiment, the distribution trend calculation formula of each pixel point is as follows:
Figure 161545DEST_PATH_IMAGE002
in the formula (I), the compound is shown in the specification,
Figure 100002_DEST_PATH_IMAGE003
is shown as
Figure 431989DEST_PATH_IMAGE004
The distribution trend of each pixel point;
Figure 100002_DEST_PATH_IMAGE005
is shown as
Figure 200749DEST_PATH_IMAGE004
Neighborhood of individual pixel points
Figure 152525DEST_PATH_IMAGE006
To middle
Figure 100002_DEST_PATH_IMAGE007
The pixel values of the individual pixel points, wherein,
Figure 687411DEST_PATH_IMAGE006
the value of (a) is set empirically;
Figure 332019DEST_PATH_IMAGE008
expressing the abnormal aggregation of each pixel point;
Figure 100002_DEST_PATH_IMAGE009
is shown with
Figure 319567DEST_PATH_IMAGE004
The pixels with the difference between the pixel values of the pixels smaller than the preset threshold value are
Figure 75033DEST_PATH_IMAGE010
Linear dependence at an angle, wherein
Figure 933268DEST_PATH_IMAGE010
=0~359°;
Figure 100002_DEST_PATH_IMAGE011
Representing the darkest channel in the image
Figure 545515DEST_PATH_IMAGE004
Pixel values of the pixel points;
Figure 489200DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure 100002_DEST_PATH_IMAGE013
and expressing the linear distribution correlation of the t-th pixel point approaching to the pixel point in the defect area.
In an embodiment, the calculation formula of the initial likelihood that each pixel point is a pixel point in the defect area is as follows:
Figure 100002_DEST_PATH_IMAGE015
in the formula (I), the compound is shown in the specification,
Figure 110674DEST_PATH_IMAGE016
is shown as
Figure 814626DEST_PATH_IMAGE004
The initial possibility that each pixel point is a pixel point in a defect area;
Figure 801037DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure 232018DEST_PATH_IMAGE011
representing the darkest channel in the image
Figure 594866DEST_PATH_IMAGE004
The pixel value of each pixel point.
In an embodiment, a calculation formula of the first reliability that each pixel point in the darkest channel image is a pixel point in the defect area is as follows:
Figure 162114DEST_PATH_IMAGE018
in the formula (I), the compound is shown in the specification,
Figure 100002_DEST_PATH_IMAGE019
representing the darkest channel in the image
Figure 850584DEST_PATH_IMAGE004
Each pixel point is a first credibility of the pixel points in the defect area;
Figure 768862DEST_PATH_IMAGE020
denotes the first
Figure 404242DEST_PATH_IMAGE004
The maximum difference value of the pixel values of the pixel points and the adjacent pixel points;
Figure 100002_DEST_PATH_IMAGE021
representing the number of pixel points in the darkest channel image;
Figure 888313DEST_PATH_IMAGE022
the entropy of information representing the darkest channel image.
In an embodiment, the pixel points belonging to the defect area are obtained according to the following steps:
acquiring the final possibility of each pixel point according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, the first credibility, the second credibility and the third credibility:
and judging and obtaining the pixel points belonging to the defect area according to the final possibility of each pixel point.
In one embodiment, the darkest channel image is obtained by setting the pixel value of each pixel point in the surface image to the minimum value in three channels; the brightest channel image is obtained by setting the pixel value of each pixel point in the surface image to the maximum value in three channels.
In one embodiment, the method further comprises:
dividing the surface gray scale map into a plurality of block areas;
acquiring the characteristic quantity of each block area according to the gray value in each block area and the occurrence frequency of the gray value;
acquiring the characteristic difference of each block area according to the characteristic quantity of all the block areas;
judging whether the copper bush image to be detected has defects according to the characteristic difference;
and judging to obtain a defect area when the copper bush image to be detected has defects.
The second purpose of the invention is to provide a system for detecting the defects of the copper bush of the oil way of the automobile engine, which comprises the following components:
the image acquisition module is used for acquiring a surface image of the copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image; respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
the initial possibility obtaining module is used for obtaining the initial possibility that each pixel point is a pixel point in the defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
the trend acquisition module is used for acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image; acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle; acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
the probability obtaining module is used for obtaining the first probability that each pixel point in the darkest channel image is a pixel point in the defect area according to the initial probability and the distribution trend of each pixel point in the darkest channel image as the pixel point in the defect area; sequentially carrying out analogy to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
the reliability obtaining module is used for obtaining a first reliability of each pixel point in the darkest channel image as a pixel point in a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point in the neighborhood thereof and the information entropy of the darkest channel image; sequentially analogizing to obtain a second credibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third reliability that each pixel point in the surface gray-scale image is a defect area pixel point;
the defect area pixel point acquisition module is used for judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, and the first reliability, the second reliability and the third reliability; sequentially acquiring all pixel points belonging to the defect area in the surface image;
and the defect area acquisition module is used for judging and acquiring the defect area on the copper sleeve according to all the pixel points belonging to the defect area.
The beneficial effects of the invention are:
according to the method and the system for detecting the defects of the copper bush of the oil circuit of the automobile engine, images possibly with defects are preliminarily judged through the difference of the gray levels of the pixel points of the images, and unnecessary calculation amount is reduced; secondly, acquiring a darkest channel image and a brightest channel image according to the minimum value and the maximum value of the image pixel points in the three color channels, and comprehensively judging the possibility that the pixel points belong to the pixel points in the defect area by combining a surface gray scale image so as to identify the pixel points in the defect area; and then, the reliability of identifying the pixel points in the defect area of the corresponding channel image is taken as a weight, and the pixel point information of the defect area is reflected to the maximum extent, so that the defect area is identified more accurately. Compared with the prior art that the defect of the surface of the copper sleeve is judged through a single gray scale image, the defect area of the surface of the copper sleeve can be accurately obtained, and therefore the quality influence degree of the copper sleeve of the engine oil way can be judged.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart showing the general steps of an embodiment of a method for detecting a defect of a copper bush of an oil passage of an automobile engine.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention addresses the following scenarios: the automobile engine oil way copper sleeve mainly protects an automobile engine oil pipe and prevents the damage of the oil pipe. When the quality of copper sheathing has the hidden danger, its protective properties worsens, leads to the potential safety hazard grow of oil pipe. The quality of the copper sleeve is affected by the defects of cracks and the like on the surface of the copper sleeve. The method utilizes a computer vision technology to carry out pixel point detection on different color channels of the copper bush image, and comprehensively judges and obtains the defects of the surface of the copper bush according to the characteristics of the different color channels.
The method for detecting the defects of the copper bush of the oil way of the automobile engine comprises the steps of firstly, preliminarily judging images possibly with defects by utilizing the difference of gray levels of image pixel points, and reducing unnecessary calculated amount; secondly, acquiring images of different color channels, and identifying pixel points in a defect area according to different performances of the different color channels on the defect; and then, the information characteristics of the channel images with different colors are taken as weights, so that the pixel point information of the defect area is reflected to the maximum extent, and the defect area is identified more accurately.
The invention provides a method for detecting the defects of a copper bush of an oil way of an automobile engine, which is shown in figure 1 and comprises the following steps:
s1, acquiring a surface image of the copper bush to be detected; performing graying processing on the surface image to obtain a surface gray image; respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
in this embodiment, a computer vision technology is used to detect the defect of the oil-way copper bush for the automobile engine, and an image of the surface of the copper bush needs to be obtained. For obtaining the surface image of the circular tube type copper sleeve, a rotatable clamping device is needed firstly, a camera is installed above the clamping device, the clamping device clamps the copper sleeve to shoot an image, then the clamping device rotates 180 degrees to shoot another image, the obtained two images jointly represent the surface information of the current copper sleeve, and the two images are needed to be analyzed for the defect detection of the current copper sleeve. After the image is obtained, performing semantic segmentation on the image to obtain an image of the copper bush region, wherein subsequent image processing is based on the image of the copper bush region, namely the surface image of the copper bush to be detected; and then, carrying out graying processing on the surface image to obtain a surface gray-scale image.
It should be noted that the pixel points in the copper bush defect region have the characteristics of pixel value and distribution, that is, the pixel value in the defect region is low, and meanwhile, the pixel points in the defect region have aggregative property or certain distribution tendency. Therefore, in this embodiment, the probability that the pixel point is the pixel point of the defect region is determined by different reaction degrees of the dark channel image, the bright channel image and the gray level image of the image to the defect and combining the characteristics of the pixel point of the defect region, and the final pixel point of the defect region is determined by taking the information characteristics of each color channel image as a weight.
In order to reduce unnecessary calculation amount, images which are possibly defective are screened out by utilizing the difference of gray levels of pixel points of the images; the specific steps for screening defective images are as follows:
dividing the surface gray scale map into a plurality of block areas;
acquiring the characteristic quantity of each block area according to the gray value in each block area and the occurrence frequency of the gray value;
acquiring the characteristic difference of each block area according to the characteristic quantity of all the block areas;
judging whether the copper bush image to be detected has defects according to the characteristic difference;
and judging to obtain a defect area when the copper bush image to be detected has defects.
In the embodiment, the surface gray level image is firstly subjected to blocking processing, and as the surface of the oil way copper sleeve has the characteristic of smoothness and uniformity, when the surface has no defects, the characteristic difference of each blocking area is small; respectively calculating the characteristic quantity of each block image, wherein the difference of the characteristic quantity of each block image represents the possibility of defects in the image;
for the areas with defects, the difference of the gray values of the defective pixel points can construct the characteristic quantity of the block areas through the difference of the gray values of the pixel points and the information entropy of the gray images; the calculation formula is as follows:
Figure 216526DEST_PATH_IMAGE024
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE025
is shown as
Figure 887679DEST_PATH_IMAGE026
Characteristic quantities of the individual block regions;
Figure DEST_PATH_IMAGE027
representing the gray value in the block area;
Figure 391997DEST_PATH_IMAGE028
representing gray values in block areas
Figure 933837DEST_PATH_IMAGE027
The frequency of occurrence; n represents the number of gray scale values in the image;
Figure DEST_PATH_IMAGE029
is shown as
Figure 964110DEST_PATH_IMAGE026
Variance of gray values of pixel points in each block area; specific calculation formula is as followsThe following:
Figure 591400DEST_PATH_IMAGE030
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE031
is shown as
Figure 99742DEST_PATH_IMAGE026
In each block area
Figure 761668DEST_PATH_IMAGE032
The gray value of each pixel point;
Figure DEST_PATH_IMAGE033
representing the mean value of the gray values of all the pixel points;
Figure 228421DEST_PATH_IMAGE034
denotes the first
Figure 343008DEST_PATH_IMAGE026
The total number of pixels in each block region.
For the entire image, the difference in the feature quantity within each block region represents the possibility of a defect in the image; therefore, the differences of the features in all the block regions are calculated; the calculation formula is as follows:
Figure 123882DEST_PATH_IMAGE036
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE037
representing the number of blocks in the image;
Figure 437051DEST_PATH_IMAGE038
a variance representing a feature amount of each block image;
Figure 280898DEST_PATH_IMAGE025
is shown as
Figure 882781DEST_PATH_IMAGE026
Characteristic quantities of the individual block regions;
Figure DEST_PATH_IMAGE039
is shown as
Figure 998504DEST_PATH_IMAGE040
Feature quantities of the respective block regions;
Figure DEST_PATH_IMAGE041
a difference value representing a feature amount between the block images;
Figure 900601DEST_PATH_IMAGE042
representing the feature difference of each block region;
Figure 177999DEST_PATH_IMAGE042
the larger the difference of the characteristics of the partitioned areas is, the more possible defects exist in the whole image;
at this time, the threshold value is set based on the empirical value
Figure DEST_PATH_IMAGE043
In a
Figure 532757DEST_PATH_IMAGE044
Judging that the current gray level image possibly has defects; when the defects possibly existing in the current gray level image are identified, accurate analysis is further carried out, the defect area in the image is identified, and then the influence of the defects on the quality of the engine oil way copper sleeve is judged.
Judging and screening images with possible defects according to the steps;
it should be noted that, when there is a defect in the image, the pixel value of the defect area is low, but the representation in the image is not obvious, and it is known from the dark channel prior theory that the value of a certain color channel of the defect area may be very low, so the image defect can be identified by means of the dark channel concept of the image;
in this embodiment, the minimum value of the image pixel points in the three color channels is obtained in the surface image of the copper bush to be detected, and is defined as the darkest channel, so as to obtain the darkest channel image, specifically expressed as:
Figure 921013DEST_PATH_IMAGE046
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE047
respectively represent the first in the image
Figure 943196DEST_PATH_IMAGE004
The values of the R, G, B components of each pixel,
Figure 125915DEST_PATH_IMAGE048
representing the darkest channel image obtained. At this time, for the pixel point of the defect area, the pixel value of the darkest channel may be lower due to the lower pixel value of the pixel point; therefore, the pixel points which are possibly in the defect area can be screened out according to the pixel value pair of the darkest channel of the image.
S2, acquiring the initial possibility that each pixel point is a pixel point in the defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
the calculation formula of the initial possibility that each pixel point is a defect area pixel point is as follows:
Figure DEST_PATH_IMAGE049
in the formula (I), the compound is shown in the specification,
Figure 233548DEST_PATH_IMAGE016
is shown as
Figure 162846DEST_PATH_IMAGE004
Each pixel being a pixel in a defective areaAn initial likelihood;
Figure 351119DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure 970320DEST_PATH_IMAGE011
representing the darkest channel in the image
Figure 768511DEST_PATH_IMAGE004
The pixel value of each pixel point.
At this time, the process of the present invention,
Figure 232991DEST_PATH_IMAGE050
the smaller the pixel value representing the pixel point, i.e. the smaller the pixel value of the pixel point,
Figure 509993DEST_PATH_IMAGE016
the larger the size, the more likely it is to be a defective area pixel.
S3, acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image;
acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle;
acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
it should be noted that, the distribution of the pixel points in the defect area is mainly represented as an aggregate distribution, and meanwhile, due to the difference of the defects, the distribution rules of the pixel points are different; the distribution of pixel points for point-like defects is mainly a clustered distribution; for the strip-shaped or strip-shaped defects, the distribution of the pixel points has a certain aggregation tendency, namely the distribution of the pixel points has directionality.
In the present embodiment, the distribution tendency calculation formula of each pixel point is as follows:
Figure DEST_PATH_IMAGE051
in the formula (I), the compound is shown in the specification,
Figure 831253DEST_PATH_IMAGE005
is shown as
Figure 116741DEST_PATH_IMAGE004
Neighborhood of individual pixel points
Figure 89638DEST_PATH_IMAGE006
To middle
Figure 144182DEST_PATH_IMAGE007
The pixel values of the individual pixel points, wherein,
Figure 839606DEST_PATH_IMAGE006
is set empirically, in the present embodiment
Figure 612390DEST_PATH_IMAGE052
Figure DEST_PATH_IMAGE053
Representing a neighborhood
Figure 215409DEST_PATH_IMAGE006
The mean value of the pixel values of the middle pixel points;
Figure 390039DEST_PATH_IMAGE008
expressing the abnormal aggregation of each pixel point;
Figure 521943DEST_PATH_IMAGE009
is shown with
Figure 516444DEST_PATH_IMAGE004
The difference between the pixel values of the pixels is less than a preset thresholdIs at
Figure 391996DEST_PATH_IMAGE054
Linear dependence at an angle, wherein
Figure 421132DEST_PATH_IMAGE054
=0~359°;
Figure DEST_PATH_IMAGE055
Represent
Figure 258025DEST_PATH_IMAGE010
At 0-359 DEG
Figure 5401DEST_PATH_IMAGE009
A maximum value;
Figure 419065DEST_PATH_IMAGE011
representing the darkest channel in the image
Figure 302707DEST_PATH_IMAGE004
Pixel values of the individual pixel points;
Figure 510835DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure 479928DEST_PATH_IMAGE056
indicating the degree of the t-th pixel approaching the defective area pixel, i.e.
Figure DEST_PATH_IMAGE057
The larger the size is, the more likely the t-th pixel point is to be a pixel point of a defect area;
Figure 228441DEST_PATH_IMAGE013
expressing the linear distribution correlation of the t-th pixel point approaching to the pixel point of the defect area; the closer the pixel point distribution is to a straight line, the higher the correlation is;
Figure 966590DEST_PATH_IMAGE003
Is shown as
Figure 876777DEST_PATH_IMAGE004
The distribution trend of each pixel point reflects the aggregation and linear correlation of the pixel points in the defect area.
S4, acquiring the first possibility that each pixel point in the darkest channel image is a pixel point in the defect area according to the initial possibility and the distribution trend of each pixel point in the darkest channel image as the pixel point in the defect area;
in this embodiment, the probability that a pixel is a pixel in a defect area is determined by combining the initial probability that the pixel is the pixel in the defect area and the distribution trend of the pixels, and a first probability calculation formula that each pixel in the darkest channel image is the pixel in the defect area is as follows:
Figure DEST_PATH_IMAGE059
in the formula (I), the compound is shown in the specification,
Figure 195150DEST_PATH_IMAGE016
is shown as
Figure 950617DEST_PATH_IMAGE004
The initial possibility that each pixel point is a pixel point in a defect area;
Figure 808851DEST_PATH_IMAGE003
is shown as
Figure 624361DEST_PATH_IMAGE004
The distribution trend of each pixel point;
Figure 568046DEST_PATH_IMAGE060
is shown in the darkest channel image
Figure 861624DEST_PATH_IMAGE004
A first likelihood that an individual pixel is a pixel of a defect region;
Figure DEST_PATH_IMAGE061
are all combined with
Figure 371103DEST_PATH_IMAGE060
In a positive correlation, i.e.
Figure 623093DEST_PATH_IMAGE061
The greater the value of (a) is,
Figure 54074DEST_PATH_IMAGE060
the larger the size, the highest probability of indicating a pixel as a defective region pixel is.
Sequentially analogizing to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
in this embodiment, the first possibility of the pixel point belonging to the defect region under the darkest channel image is obtained according to the above method, and since the darkest channel reflects the difference of the pixel point of the original image and has limitation, at this time, the possibility that the pixel point belongs to the pixel point of the defect region needs to be continuously judged through the brightest channel image and the original grayscale image, wherein the brightest channel image is an image formed by the maximum value of three-channel pixel values of each pixel point in the original surface image, and is the brightest channel image; at the moment, the second possibility that each pixel point is judged and obtained as a pixel point in a defect area for the brightest channel image and the third possibility that each pixel point is judged and obtained as a pixel point in the defect area for the surface gray-scale image are respectively expressed as
Figure 151343DEST_PATH_IMAGE062
Figure DEST_PATH_IMAGE063
S5, acquiring first credibility of each pixel point in the darkest channel image as a pixel point in a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point in the neighborhood thereof and the information entropy of the darkest channel image;
sequentially analogizing to obtain a second credibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third credibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
in connection with
Figure 249749DEST_PATH_IMAGE060
Figure 672640DEST_PATH_IMAGE062
Figure 325338DEST_PATH_IMAGE063
Judging the possibility that pixel points in the image are defect areas; the possibility that the judged pixel points of different images are the pixel points of the defect area can be different, so that the image matching needs to be carried out according to the characteristics of the images
Figure 217509DEST_PATH_IMAGE060
Figure 904842DEST_PATH_IMAGE062
Figure 233055DEST_PATH_IMAGE063
And carrying out weighted summation to obtain the possibility that the final pixel point is the pixel point of the defect area.
In this embodiment, first, for the identification of the pixel points in the defect area in the image, the higher the contrast and the information content of the image are, the more obvious the characteristics of the defect area are, so the reliability of the possibility of the pixel points in the identified defect area is higher, and therefore, the reliability of the possibility of judging the pixel points to be the pixel points in the defect area in the corresponding image needs to be obtained through the characteristics of the original surface image; the first credibility calculation formula for each pixel point in the darkest channel image as a pixel point in the defect area is as follows:
Figure 373050DEST_PATH_IMAGE018
in the formula (I), the compound is shown in the specification,
Figure 812121DEST_PATH_IMAGE020
denotes the first
Figure 619540DEST_PATH_IMAGE004
The maximum difference value of the pixel values of the pixel points and the adjacent pixel points reflects the difference of the pixel values of the adjacent pixel points;
Figure 118655DEST_PATH_IMAGE021
representing the number of pixel points in the darkest channel image;
Figure 745945DEST_PATH_IMAGE064
expressing the pixel difference mean value of all pixel points in the image and reflecting the pixel difference of the image;
Figure 988708DEST_PATH_IMAGE022
the information entropy of the darkest channel image is represented, and the information entropy is obtained in the prior art and is not described again;
Figure 916212DEST_PATH_IMAGE019
representing the darkest channel in the image
Figure 586228DEST_PATH_IMAGE004
Each pixel point is a first credibility of the pixel points in the defect area; the larger the entropy of the image information is, the richer the image information is, the larger the difference of the image pixel points is, and the more obvious the contrast of the image pixel points is, so that the difference and the contrast of the entropy of the image information and the image pixel points are
Figure 700815DEST_PATH_IMAGE019
All present positive correlation, so the larger the difference between the image information entropy and the image pixel points,
Figure 747268DEST_PATH_IMAGE019
the larger the value of (A), i.e. the darkest channel in the image
Figure 263700DEST_PATH_IMAGE004
The higher the first confidence level that each pixel is a pixel in the defect area.
At the moment, calculating a second credibility that each pixel point in the brightest channel image is a pixel point in the defect area and a third credibility that each pixel point in the surface gray-scale image is a pixel point in the defect area according to the method; are respectively represented as
Figure DEST_PATH_IMAGE065
Figure 904285DEST_PATH_IMAGE066
S6, judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, the first reliability, the second reliability and the third reliability; sequentially acquiring all pixel points belonging to the defect area in the surface image;
the pixel points belonging to the defect area are obtained according to the following steps:
obtaining the final possibility of each pixel point according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, the first credibility, the second credibility and the third credibility:
and judging and acquiring the pixel points belonging to the defect area according to the final possibility of each pixel point.
In this embodiment, the reliability of the pixel points in the defect area identified in the corresponding image is used as a weight, and the possibility that the pixel points obtained after grouping are the pixel points in the defect area is judged; the final probability calculation formula of each specific pixel point as a defect area pixel point is as follows:
Figure 240588DEST_PATH_IMAGE068
in the formula (I), the compound is shown in the specification,
Figure 90732DEST_PATH_IMAGE060
representing the darkest channel in the image
Figure 461671DEST_PATH_IMAGE004
A first likelihood that an individual pixel is a pixel of a defect region;
Figure 473489DEST_PATH_IMAGE062
indicating the brightest channel in the image
Figure 828247DEST_PATH_IMAGE004
A second possibility that each pixel point is a pixel point in the defect area;
Figure 950924DEST_PATH_IMAGE063
expressing the surface grayscale map
Figure 441948DEST_PATH_IMAGE004
A third possibility that each pixel point is a pixel point in a defect area;
Figure 890247DEST_PATH_IMAGE019
representing the darkest channel in the image
Figure 201143DEST_PATH_IMAGE004
Each pixel point is a first credibility of the pixel points in the defect area;
Figure 127510DEST_PATH_IMAGE065
indicating the brightest channel in the image
Figure 473041DEST_PATH_IMAGE004
Each pixel point is the second credibility of the pixel point in the defect area;
Figure 92241DEST_PATH_IMAGE066
expressing the surface grayscale map
Figure 893363DEST_PATH_IMAGE004
Each pixel point is a third credibility of the pixel point in the defect area;
Figure DEST_PATH_IMAGE069
and representing the final possibility that each pixel point is a pixel point in the defect area.
In the process of identifying the pixel points in the defect area in the image, the higher the contrast and the information content of the image are, the more obvious the characteristics of the defect area are, so that the higher the credibility of each pixel point as the pixel point in the defect area is, and the higher the possibility of each pixel point as the pixel point in the defect area is; in addition, the first and second substrates are,
Figure 420159DEST_PATH_IMAGE019
representing the darkest channel in the image
Figure 620196DEST_PATH_IMAGE004
The first confidence level of the probability that each pixel is a pixel in the defect area is shown
Figure DEST_PATH_IMAGE071
Comprehensively judging the possibility that each pixel point is the pixel point of the defect area in the darkest channel image by representing the credibility and the possibility that each pixel point is the pixel point of the defect area; therefore, the possibility of comprehensively judging that each pixel point is a pixel point of a defect area in the darkest channel image, the brightest channel image and the surface gray-scale image is added to be used as the final possibility of finally determining that each pixel point is a pixel point of the defect area, and all the pixel points belonging to the defect area in the surface image are judged and screened out; in addition, can be prepared by
Figure 675877DEST_PATH_IMAGE019
Figure 226944DEST_PATH_IMAGE065
Figure 760693DEST_PATH_IMAGE066
The weight value of the pixel point possibility which is regarded as the defective area is obtained
Figure 80816DEST_PATH_IMAGE004
Each pixel point is the final possibility of a pixel point in the defect area.
At this time, the threshold value is set empirically
Figure 776240DEST_PATH_IMAGE072
When is coming into contact with
Figure DEST_PATH_IMAGE073
Then, it is judged
Figure 80182DEST_PATH_IMAGE069
To a corresponding second
Figure 152043DEST_PATH_IMAGE004
Each pixel point is a pixel point of the defect area. And sequentially acquiring all pixel points belonging to the defect area in the surface image.
And S7, judging and acquiring the defect area on the copper sleeve according to all the pixel points belonging to the defect area.
The defect area on the copper sleeve is obtained according to the following steps:
carrying out binarization processing on the surface image of the copper bush to be detected according to all pixel points belonging to the defect area, setting the pixel values of all pixel points belonging to the defect area to be 255, and setting the pixel value of a background pixel point to be 0, and obtaining a binarization image;
performing morphological opening operation processing on the binary image to obtain a plurality of connected domains formed by pixel points belonging to the defect region;
judging and acquiring that each connected domain and the adjacent connected domain are the same defect region according to the distance between each connected domain and the adjacent connected domain;
and sequentially analogizing to obtain all defect areas on the copper sleeve.
It should be noted that, according to the above method, all the pixels in the defect area are obtained in the image. Since the pixels in the defect area have aggregation properties and the defect area has a certain size, the final defect area needs to be determined according to the obtained characteristics of the pixels in the defect area.
In this embodiment, if a pixel point in a defect area protrudes from a surface image, binarization processing needs to be performed on the surface image, that is, the pixel value of the pixel point in the defect area is set to 255, and the pixel value of a background pixel point is set to 0, so as to obtain a binarized image;
at the moment, morphological opening operation processing is carried out on the binary image to obtain a plurality of connected domains formed by the pixel points in the defect region.
Because the defect area has a certain size, the size of a connected domain formed by all the pixel points of the defect area in the binary image needs to be calculated at the moment and is expressed as
Figure 326673DEST_PATH_IMAGE074
Figure DEST_PATH_IMAGE075
And expressing the number of connected domains formed by the identified pixel points of the defect region in the binary image. Then determining whether the defect regions are the same through the distance between the connected regions;
according to the first
Figure 258244DEST_PATH_IMAGE076
The distance between a connected domain and its nearest connected domain is expressed as
Figure DEST_PATH_IMAGE077
At this time, the threshold value is set empirically
Figure 783903DEST_PATH_IMAGE078
Figure DEST_PATH_IMAGE079
Indicating that the two connected domains are the same defect area at present;
therefore, all defect areas in the image are judged, namely all defects in the oil way copper sleeve of the automobile engine are detected.
S8, obtaining the influence degree of each defect area on the copper sleeve according to the number of pixel points in each defect area and the total number of the pixel points in the surface image, and judging the quality of the copper sleeve according to the influence degree of each defect area on the copper sleeve;
it should be noted that, for the influence of the defect of the copper bush of the engine oil way on the quality of the copper bush, the judgment is mainly performed according to the size of the defect area.
In this embodiment, the number of pixels in the defect area identified in the engine oil passage copper bush image is represented as
Figure 190614DEST_PATH_IMAGE080
At this time, the influence of the defect area on the engine oil way copper bush is expressed as:
Figure 219750DEST_PATH_IMAGE082
in the formula (I), the compound is shown in the specification,
Figure 522555DEST_PATH_IMAGE080
is shown as
Figure DEST_PATH_IMAGE083
The number of pixels in each defect area,
Figure 704486DEST_PATH_IMAGE084
representing the total number of pixel points of the image.
Figure DEST_PATH_IMAGE085
Shows the influence degree of the defective area on the engine oil way copper sleeve,
Figure 917818DEST_PATH_IMAGE085
the larger the size, the more serious the defects of the engine oil way copper bush are.
At this time, the threshold value is set empirically
Figure 801460DEST_PATH_IMAGE086
When the temperature is higher than the set temperature
Figure DEST_PATH_IMAGE087
And at the moment, judging that the current engine oil way copper sleeve is a defective product.
When in use
Figure 806325DEST_PATH_IMAGE088
Then the current defect is a tolerable defect without affecting its quality.
In the embodiment, the computer vision technology is utilized to perform pixel point detection on different color channels of the copper bush image, and the defects on the surface of the copper bush are comprehensively judged and obtained according to the characteristics of the different color channels.
The invention provides a system for detecting the defect of a copper bush of an oil way of an automobile engine, which comprises:
the image acquisition module is used for acquiring a surface image of the copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image; respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
the initial possibility obtaining module is used for obtaining the initial possibility that each pixel point is a pixel point in the defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
the trend acquisition module is used for acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image; acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle; acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
the probability obtaining module is used for obtaining the first probability that each pixel point in the darkest channel image is a pixel point in the defect area according to the initial probability and the distribution trend of each pixel point in the darkest channel image as the pixel point in the defect area; sequentially analogizing to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
the reliability obtaining module is used for obtaining a first reliability of each pixel point in the darkest channel image as a pixel point in a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point adjacent to the pixel point and the information entropy of the darkest channel image; sequentially analogizing to obtain a second credibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third credibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
the defect area pixel point acquisition module is used for judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, and the first reliability, the second reliability and the third reliability; sequentially acquiring all pixel points belonging to the defect area in the surface image;
and the defect area acquisition module is used for judging and acquiring the defect area on the copper sleeve according to all the pixel points belonging to the defect area.
In conclusion, according to the method and the system for detecting the defects of the copper bush of the oil circuit of the automobile engine, the images possibly with the defects are preliminarily judged through the difference of the gray levels of the image pixel points, so that the unnecessary calculated amount is reduced; secondly, acquiring images of different color channels, and identifying pixel points in a defect area according to different performances of the different color channels on the defect; and then, the information characteristics of the channel images with different colors are taken as weights, so that the pixel point information of the defect area is reflected to the maximum extent, and the defect area is identified more accurately.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The method for detecting the defects of the copper bush of the oil way of the automobile engine is characterized by comprising the following steps of:
acquiring a surface image of a copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image;
respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
acquiring the initial possibility that each pixel point is a pixel point of a defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image;
acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle;
acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
acquiring a first possibility that each pixel point in the darkest channel image is a pixel point in a defect area according to the initial possibility and distribution trend of each pixel point in the darkest channel image being a pixel point in the defect area;
sequentially analogizing to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
acquiring a first credibility of each pixel point in the darkest channel image as a pixel point of a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point adjacent to the pixel point and the information entropy of the darkest channel image;
sequentially carrying out analogy to obtain a second reliability of each pixel point in the brightest channel image as a pixel point in the defect area; acquiring a third reliability that each pixel point in the surface gray-scale image is a defect area pixel point;
judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, and the first reliability, the second reliability and the third reliability;
sequentially acquiring all pixel points belonging to the defect area in the surface image;
and judging and acquiring the defect area on the copper sleeve according to all pixel points belonging to the defect area.
2. The method for detecting the defects of the copper bush of the oil way of the automobile engine according to claim 1, wherein the defect area on the copper bush is obtained according to the following steps:
carrying out binarization processing on the surface image of the copper bush to be detected according to all pixel points belonging to the defect area, setting the pixel values of all pixel points belonging to the defect area to be 255, and setting the pixel value of a background pixel point to be 0, and obtaining a binarization image;
performing morphological opening operation processing on the binary image to obtain a plurality of connected domains formed by pixel points belonging to the defect region;
judging and acquiring that each connected domain and the adjacent connected domain are the same defect region according to the distance between each connected domain and the adjacent connected domain;
and sequentially obtaining all defect areas on the copper sleeve by analogy.
3. The method for detecting the defects of the copper bush of the oil way of the automobile engine according to claim 2, characterized by further comprising the following steps of:
and obtaining the influence degree of each defect area on the copper sleeve according to the number of the pixel points in each defect area and the total number of the pixel points in the surface image, and judging the quality of the copper sleeve according to the influence degree of each defect area on the copper sleeve.
4. The method for detecting the defects of the copper bush of the oil circuit of the automobile engine according to claim 1, wherein the distribution trend calculation formula of each pixel point is as follows:
Figure 827344DEST_PATH_IMAGE002
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE003
denotes the first
Figure 841436DEST_PATH_IMAGE004
The distribution tendency of each pixel point;
Figure DEST_PATH_IMAGE005
denotes the first
Figure 845164DEST_PATH_IMAGE004
Neighborhood of individual pixel points
Figure 755351DEST_PATH_IMAGE006
To middle
Figure DEST_PATH_IMAGE007
The pixel values of the individual pixel points, wherein,
Figure 745829DEST_PATH_IMAGE006
the value of (a) is set empirically;
Figure 501295DEST_PATH_IMAGE008
expressing the abnormal aggregation of each pixel point;
Figure DEST_PATH_IMAGE009
is shown with
Figure 625109DEST_PATH_IMAGE004
The pixels with the difference between the pixel values of the pixels smaller than the preset threshold value are
Figure 175039DEST_PATH_IMAGE010
Linear dependence at an angle, wherein
Figure 118724DEST_PATH_IMAGE010
=0~359°;
Figure DEST_PATH_IMAGE011
Representing the darkest channel in the image
Figure 209040DEST_PATH_IMAGE004
Pixel values of the individual pixel points;
Figure 921781DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure DEST_PATH_IMAGE013
and expressing the linear distribution correlation of the t pixel point approaching to the pixel point of the defect area.
5. The method for detecting the defect of the copper bush of the oil circuit of the automobile engine according to claim 4, wherein the calculation formula of the initial possibility that each pixel point is a pixel point of the defect area is as follows:
Figure DEST_PATH_IMAGE015
in the formula (I), the compound is shown in the specification,
Figure 970508DEST_PATH_IMAGE016
is shown as
Figure 135911DEST_PATH_IMAGE004
The initial possibility that each pixel point is a pixel point in a defect area;
Figure 233180DEST_PATH_IMAGE012
representing the darkest pixel value in the darkest channel image;
Figure 66006DEST_PATH_IMAGE011
representing the darkest channel in the image
Figure 223318DEST_PATH_IMAGE004
The pixel value of each pixel point.
6. The method for detecting the defects of the copper bush of the oil circuit of the automobile engine according to claim 1, wherein a calculation formula of a first reliability of each pixel point in the darkest channel image as a pixel point of a defect area is as follows:
Figure 601648DEST_PATH_IMAGE018
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE019
representing the darkest channel in the image
Figure 33767DEST_PATH_IMAGE004
Each pixel point is a first credibility of the pixel points in the defect area;
Figure 721100DEST_PATH_IMAGE020
is shown as
Figure 49313DEST_PATH_IMAGE004
The maximum difference value of the pixel values of the pixel points and the adjacent pixel points;
Figure DEST_PATH_IMAGE021
representing the number of pixel points in the darkest channel image;
Figure 454886DEST_PATH_IMAGE022
the entropy of information representing the darkest channel image.
7. The method for detecting the defect of the copper bush of the oil way of the automobile engine according to claim 1, wherein the pixel points belonging to the defect area are obtained by judging according to the following steps:
obtaining the final possibility of each pixel point according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, the first credibility, the second credibility and the third credibility:
and judging and obtaining the pixel points belonging to the defect area according to the final possibility of each pixel point.
8. The method for detecting the defects of the copper bush of the oil circuit of the automobile engine according to claim 1, wherein the darkest channel image is obtained by setting the pixel value of each pixel point in the surface image to be the minimum value in three channels; the brightest channel image is obtained by setting the pixel value of each pixel point in the surface image to the maximum value in three channels.
9. The method for detecting the defects of the copper bush of the oil way of the automobile engine according to claim 1, characterized by further comprising the following steps:
dividing the surface gray scale map into a plurality of block areas;
acquiring the characteristic quantity of each block area according to the gray value in each block area and the occurrence frequency of the gray value;
acquiring the characteristic difference of each block area according to the characteristic quantity of all the block areas;
judging whether the copper sleeve image to be detected has defects or not according to the characteristic difference;
and judging to obtain a defect area when the copper bush image to be detected has defects.
10. The utility model provides an automobile engine oil circuit copper sheathing defect detecting system which characterized in that includes:
the image acquisition module is used for acquiring a surface image of the copper sleeve to be detected; performing graying processing on the surface image to obtain a surface gray image; respectively acquiring a darkest channel image and a brightest channel image according to three-channel pixel values of each pixel point in the surface image;
the initial possibility obtaining module is used for obtaining the initial possibility that each pixel point is a pixel point in the defect area according to the pixel value of each pixel point in the darkest channel image and the darkest pixel value;
the trend acquisition module is used for acquiring the abnormal aggregation of each pixel point according to the pixel value of the neighborhood pixel point of each pixel point in the darkest channel image; acquiring the linear distribution correlation of each pixel according to the pixel value of each pixel in the darkest channel image, the darkest pixel value and the linear correlation of the pixel with the difference of the pixel value of each pixel being smaller than a preset threshold value at any angle; acquiring the distribution trend of each pixel point according to the abnormal aggregation and linear distribution correlation of each pixel point in the darkest channel image;
the probability obtaining module is used for obtaining the first probability that each pixel point in the darkest channel image is a pixel point in the defect area according to the initial probability and the distribution trend of each pixel point in the darkest channel image as the pixel point in the defect area; sequentially analogizing to obtain a second possibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third possibility that each pixel point in the surface gray-scale image is a pixel point in the defect area;
the reliability obtaining module is used for obtaining a first reliability of each pixel point in the darkest channel image as a pixel point in a defect area according to the maximum difference value of the pixel value of each pixel point in the darkest channel image and the pixel value of the pixel point adjacent to the pixel point and the information entropy of the darkest channel image; sequentially analogizing to obtain a second credibility that each pixel point in the brightest channel image is a pixel point in the defect area; acquiring a third reliability that each pixel point in the surface gray-scale image is a defect area pixel point;
the defect area pixel point acquisition module is used for judging and acquiring pixel points belonging to the defect area according to the first possibility, the second possibility and the third possibility of each pixel point in the darkest channel image, and the first reliability, the second reliability and the third reliability; sequentially acquiring all pixel points belonging to the defect area in the surface image;
and the defect area acquisition module is used for judging and acquiring the defect area on the copper sleeve according to all the pixel points belonging to the defect area.
CN202210874860.2A 2022-07-25 2022-07-25 Method and system for detecting defects of copper bush of oil way of automobile engine Active CN114937041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210874860.2A CN114937041B (en) 2022-07-25 2022-07-25 Method and system for detecting defects of copper bush of oil way of automobile engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210874860.2A CN114937041B (en) 2022-07-25 2022-07-25 Method and system for detecting defects of copper bush of oil way of automobile engine

Publications (2)

Publication Number Publication Date
CN114937041A true CN114937041A (en) 2022-08-23
CN114937041B CN114937041B (en) 2022-10-25

Family

ID=82869264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210874860.2A Active CN114937041B (en) 2022-07-25 2022-07-25 Method and system for detecting defects of copper bush of oil way of automobile engine

Country Status (1)

Country Link
CN (1) CN114937041B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883403A (en) * 2023-09-07 2023-10-13 山东国宏生物科技有限公司 Soybean quality detection method based on machine vision

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529270B1 (en) * 1999-03-31 2003-03-04 Ade Optical Systems Corporation Apparatus and method for detecting defects in the surface of a workpiece
CN201527404U (en) * 2009-04-24 2010-07-14 湖南科创信息技术股份有限公司 Online detector for flaw of glass with surface amboss
CN105957061A (en) * 2016-04-22 2016-09-21 武汉理工大学 Methods for making threshold graph and detecting picture for rotary crown cover
CN108174165A (en) * 2018-01-17 2018-06-15 重庆览辉信息技术有限公司 Electric power safety operation and O&M intelligent monitoring system and method
CN109142366A (en) * 2018-06-13 2019-01-04 广东拓斯达科技股份有限公司 Spherical housing defect inspection method, device and computer readable storage medium
CN109490311A (en) * 2018-10-25 2019-03-19 武汉精立电子技术有限公司 Backlight panel defect detecting system and method based on multi-angled shooting
CN110867392A (en) * 2019-11-19 2020-03-06 上海华力微电子有限公司 Wafer defect scanning method
CN111033710A (en) * 2017-08-24 2020-04-17 科磊股份有限公司 Defect detection on transparent or translucent wafers
CN111079588A (en) * 2019-12-03 2020-04-28 北京字节跳动网络技术有限公司 Image processing method, device and storage medium
CN112200246A (en) * 2020-10-09 2021-01-08 河北工业大学 Training method of SVM classifier and petrochemical storage tank corrosion defect segmentation method
CN113095331A (en) * 2021-04-22 2021-07-09 合肥工业大学 Visual question answering method, system and equipment for appearance defects of electric equipment and storage medium thereof
CN113344865A (en) * 2021-05-21 2021-09-03 深圳中科精工科技有限公司 Method, device, equipment and medium for detecting surface defects of smooth object
CN113421261A (en) * 2021-08-23 2021-09-21 金成技术有限公司 Structural member production process defect detection method based on image processing
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing
CN113554632A (en) * 2021-07-30 2021-10-26 沭阳天勤工具有限公司 Artificial intelligence-based workpiece detection optimization method in turbid water body
CN113686879A (en) * 2021-09-09 2021-11-23 杭州利珀科技有限公司 Optical film defect visual detection system and method
US20220036541A1 (en) * 2020-07-29 2022-02-03 Tata Consultancy Services Limited Identification of defect types in liquid pipelines for classification and computing severity thereof
CN114359270A (en) * 2022-03-09 2022-04-15 山东华硕汽车配件科技有限公司 Computer vision-based automobile engine oil way copper bush defect detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114359275B (en) * 2022-03-16 2022-06-07 南通俊朗智能科技有限公司 Hydraulic gear pump defect detection method and system based on artificial intelligence

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529270B1 (en) * 1999-03-31 2003-03-04 Ade Optical Systems Corporation Apparatus and method for detecting defects in the surface of a workpiece
CN201527404U (en) * 2009-04-24 2010-07-14 湖南科创信息技术股份有限公司 Online detector for flaw of glass with surface amboss
CN105957061A (en) * 2016-04-22 2016-09-21 武汉理工大学 Methods for making threshold graph and detecting picture for rotary crown cover
CN111033710A (en) * 2017-08-24 2020-04-17 科磊股份有限公司 Defect detection on transparent or translucent wafers
CN108174165A (en) * 2018-01-17 2018-06-15 重庆览辉信息技术有限公司 Electric power safety operation and O&M intelligent monitoring system and method
CN109142366A (en) * 2018-06-13 2019-01-04 广东拓斯达科技股份有限公司 Spherical housing defect inspection method, device and computer readable storage medium
CN109490311A (en) * 2018-10-25 2019-03-19 武汉精立电子技术有限公司 Backlight panel defect detecting system and method based on multi-angled shooting
CN110867392A (en) * 2019-11-19 2020-03-06 上海华力微电子有限公司 Wafer defect scanning method
CN111079588A (en) * 2019-12-03 2020-04-28 北京字节跳动网络技术有限公司 Image processing method, device and storage medium
US20220036541A1 (en) * 2020-07-29 2022-02-03 Tata Consultancy Services Limited Identification of defect types in liquid pipelines for classification and computing severity thereof
CN112200246A (en) * 2020-10-09 2021-01-08 河北工业大学 Training method of SVM classifier and petrochemical storage tank corrosion defect segmentation method
CN113095331A (en) * 2021-04-22 2021-07-09 合肥工业大学 Visual question answering method, system and equipment for appearance defects of electric equipment and storage medium thereof
CN113344865A (en) * 2021-05-21 2021-09-03 深圳中科精工科技有限公司 Method, device, equipment and medium for detecting surface defects of smooth object
CN113554632A (en) * 2021-07-30 2021-10-26 沭阳天勤工具有限公司 Artificial intelligence-based workpiece detection optimization method in turbid water body
CN113421261A (en) * 2021-08-23 2021-09-21 金成技术有限公司 Structural member production process defect detection method based on image processing
CN113686879A (en) * 2021-09-09 2021-11-23 杭州利珀科技有限公司 Optical film defect visual detection system and method
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing
CN114359270A (en) * 2022-03-09 2022-04-15 山东华硕汽车配件科技有限公司 Computer vision-based automobile engine oil way copper bush defect detection method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
H. CHEN, J ET AL: "Robust Dislocation Defects Region Segmentation for Polysilicon Wafer Image With Random Texture Background", 《 ACCESS》 *
LIYONG ET AL: "Road detection algorithm for Autonomous Navigation Systems based on dark channel prior and vanishing point in complex road scenes", 《ROBOTICS AND AUTONOMOUS SYSTEMS》 *
谢志江: "热态重轨表面缺陷检测技术", 《计量学报》 *
郑金华等: "暗通道图像增强技术在数字射线检测中的应用", 《玻璃钢/复合材料》 *
高敏: "基于机器视觉的印刷品图像在线缺陷检测方法研究", 《中国优秀硕士论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883403A (en) * 2023-09-07 2023-10-13 山东国宏生物科技有限公司 Soybean quality detection method based on machine vision
CN116883403B (en) * 2023-09-07 2023-11-14 山东国宏生物科技有限公司 Soybean quality detection method based on machine vision

Also Published As

Publication number Publication date
CN114937041B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN114359270B (en) Computer vision-based automobile engine oil way copper sleeve defect detection method
CN116109644B (en) Surface defect detection method for copper-aluminum transfer bar
CN115690108A (en) Aluminum alloy rod production quality evaluation method based on image processing
CN116091504B (en) Connecting pipe connector quality detection method based on image processing
CN115984272B (en) Semitrailer axle defect identification method based on computer vision
CN114820625B (en) Automobile top block defect detection method
CN116721107B (en) Intelligent monitoring system for cable production quality
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN115239727B (en) PCB surface defect detection method
CN114937041B (en) Method and system for detecting defects of copper bush of oil way of automobile engine
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN115861307B (en) Fascia gun power supply driving plate welding fault detection method based on artificial intelligence
CN114359253A (en) Image pollution detection method and system based on convolutional neural network
CN116109577A (en) Printing label defect detection system and method
CN115953409A (en) Injection molding surface defect detection method based on image processing
CN115471476A (en) Method, device, equipment and medium for detecting component defects
CN116664567A (en) Solid insulation switch cabinet quality assessment method and system
CN114881961A (en) Glass fiber plate crack detection method and device
CN117237747B (en) Hardware defect classification and identification method based on artificial intelligence
CN114677348A (en) IC chip defect detection method and system based on vision and storage medium
CN114155226A (en) Micro defect edge calculation method
CN116229438B (en) Spinning quality visual identification system
CN117388263A (en) Hardware terminal quality detection method for charging gun
CN117274211A (en) Screen defect detection method and device, terminal equipment and storage medium
CN112053356B (en) Method and device for detecting defects at pins of plastic packaged semiconductor

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