CN115082481B - Image enhancement method for gear - Google Patents

Image enhancement method for gear Download PDF

Info

Publication number
CN115082481B
CN115082481B CN202211009335.0A CN202211009335A CN115082481B CN 115082481 B CN115082481 B CN 115082481B CN 202211009335 A CN202211009335 A CN 202211009335A CN 115082481 B CN115082481 B CN 115082481B
Authority
CN
China
Prior art keywords
area
gray level
gear tooth
image
defect
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
CN202211009335.0A
Other languages
Chinese (zh)
Other versions
CN115082481A (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 Yulin Industrial Design Co ltd
Original Assignee
Liaocheng Yulin Industrial Design 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 Yulin Industrial Design Co ltd filed Critical Liaocheng Yulin Industrial Design Co ltd
Priority to CN202211009335.0A priority Critical patent/CN115082481B/en
Publication of CN115082481A publication Critical patent/CN115082481A/en
Application granted granted Critical
Publication of CN115082481B publication Critical patent/CN115082481B/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
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • G06T5/70
    • G06T5/90
    • 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/12Edge-based segmentation
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20164Salient point detection; Corner detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Abstract

The invention relates to the technical field of image data processing, in particular to an image enhancement method for a gear, which comprises the steps of collecting an RGB (red, green and blue) image of the gear to obtain a corresponding gray level image, and obtaining the distribution probability of an initial histogram of each gray level according to a gray level histogram of the gray level image; obtaining each gear tooth area in the gray level image by utilizing image example segmentation, and calculating the collapsing angle defect coefficient of each gear tooth area; assigning a weight to each pixel point in the gray level image based on the collapsing angle defect coefficient and the position of each pixel point; and calculating the defect probability of the broken angle section corresponding to each gray level based on the weight, obtaining the histogram distribution probability of each gray level by combining the initial histogram distribution probability, and obtaining an equalized histogram according to the histogram distribution probability to complete the image enhancement of the gray level image. Different weights are given to each pixel point in the gray level image of the gear, so that the image enhancement effect is better, and the detail information of the position suspected to be the corner collapse flaw is enhanced.

Description

Image enhancement method for gear
Technical Field
The invention relates to the technical field of image data processing, in particular to an image enhancement method for a gear.
Background
The gear is used as a common and very important transmission part and is widely used in various mechanical equipment. The quality of the gear is crucial to the whole equipment, and if defects exist, the gear is likely to be damaged in the using process, and even the whole mechanical equipment is caused to be failed and scrapped. At present, three kinds of appearance defects of the gear, namely, corner breakage, bruise and scratch, are mainly detected by the defect of the gear in a machine vision mode generally, but the traditional image enhancement method in the machine vision mode has poor enhancement effect and no pertinence on the gear image, and particularly, the details of the corner breakage defect are blurred in the image enhancement process, so that the subsequent image analysis mode is not favorable for identifying and analyzing the defects in the image.
Disclosure of Invention
In order to solve the above technical problem, an object of the present invention is to provide an image enhancement method for a gear, which adopts the following technical solutions:
collecting RGB images of the gear to obtain corresponding gray level images; obtaining the distribution probability of an initial histogram of each gray level according to a gray level histogram of a gray level image;
obtaining each gear tooth area in the gray level image by utilizing image example segmentation; acquiring an edge image of each gear tooth area to detect angular points in the edge image, and respectively calculating the coarse area disorder degree of each gear tooth area according to the distance between the angular points in the gear tooth areas; respectively calculating the central abundance of the rough area of each gear tooth area according to the total number of the angular points in the gear tooth area and the gray values of pixel points around the angular points; taking the ratio of the disorder degree of the rough area to the center richness degree of the rough area as the break angle defect coefficient of each gear tooth area;
dividing each gear tooth area into a defective area and a non-defective area by utilizing threshold segmentation; assigning a weight 1 to a pixel point in a non-gear tooth area in a gray scale image, and respectively assigning weights to pixel points in a defect area and a non-defect area of each gear tooth area based on the collapsing angle defect coefficient of each gear tooth area and gray scale values of other pixel points in areas around the pixel points;
calculating the defect probability of the broken angle section corresponding to each gray level based on the weight of each pixel point in the gray level image, and taking the product of the defect probability of the broken angle section of each gray level and the distribution probability of the initial histogram as the distribution probability of the histogram of the corresponding gray level; and obtaining an equalized histogram based on the histogram distribution probability, and completing image enhancement of the gray level image by using the equalized histogram.
Further, the method for acquiring the rough area disorder degree of each gear tooth area comprises the following steps:
calculating the rough area disorder degree corresponding to each corner point in the current gear tooth area, and selecting the minimum rough area disorder degree as the rough area disorder degree of the current gear tooth area; the calculation formula of the disorder degree of the rough area is as follows:
Figure 226272DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 402038DEST_PATH_IMAGE002
the disorder degree of the rough area;
Figure 655165DEST_PATH_IMAGE003
is a corner point
Figure 269686DEST_PATH_IMAGE004
And a first step of
Figure 127920DEST_PATH_IMAGE005
The distance between the other corner points;
Figure 802484DEST_PATH_IMAGE006
is a corner point
Figure 749099DEST_PATH_IMAGE004
Respectively calculating the average distance from the other angular points in the current gear tooth area;
Figure 104994DEST_PATH_IMAGE007
the number of other corner points in the current gear tooth area.
Further, the method for acquiring the richness of the rough area center of each gear tooth area comprises the following steps:
selecting an angular point corresponding to the disorder degree of a rough area of the current gear tooth area, and acquiring the angular point which is centered on the angular point in the gray level image
Figure 676790DEST_PATH_IMAGE008
A window area is based on
Figure 194359DEST_PATH_IMAGE008
Calculating the rough region center abundance of the current gear tooth region by the gray value of the pixel points in the window and the total number of the angular points in the current gear tooth region, wherein the calculation formula of the rough region center abundance is as follows:
Figure 359761DEST_PATH_IMAGE009
wherein, the first and the second end of the pipe are connected with each other,
Figure 253767DEST_PATH_IMAGE010
the central richness of the rough area;
Figure 948579DEST_PATH_IMAGE011
is composed of
Figure 371470DEST_PATH_IMAGE008
Within the window area
Figure 132490DEST_PATH_IMAGE005
The gray value of each pixel point;
Figure 98696DEST_PATH_IMAGE012
is composed of
Figure 910664DEST_PATH_IMAGE008
Average gray values of all pixel points in the window area;
Figure 973297DEST_PATH_IMAGE013
for the front wheel teethTotal number of corner points within a region.
Further, the method for respectively assigning weights to the pixel points in the defective area and the non-defective area of each gear tooth area includes:
Figure 237926DEST_PATH_IMAGE014
wherein, the first and the second end of the pipe are connected with each other,
Figure 739314DEST_PATH_IMAGE015
is the weight;
Figure 272365DEST_PATH_IMAGE016
indicating that the pixel point is in the defect area;
Figure 630534DEST_PATH_IMAGE017
indicating that the pixel points are in the non-defective area;
Figure 54562DEST_PATH_IMAGE018
the sum of the collapse angle defect coefficients of all gear tooth areas in the gray level image is obtained;
Figure 31745DEST_PATH_IMAGE019
is the first to which a pixel belongs
Figure 552725DEST_PATH_IMAGE005
The coefficient of the broken angle defect of each gear tooth area;
Figure 19479DEST_PATH_IMAGE020
to be centred on a pixel point
Figure 136995DEST_PATH_IMAGE021
The gray value variance of all pixel points in the window area;
Figure 42503DEST_PATH_IMAGE022
the sum of the gray value variances of all the pixel points in the gear area where the pixel points are located.
Further, the method for calculating the defect probability of the broken angle section corresponding to each gray level based on the weight of each pixel point in the gray level image comprises the following steps:
adding the weight of each pixel point under the same gray level, and enabling the addition result to be the weight of the broken angle section flaw of the corresponding gray level;
and adding the breakover angle section flaw weights of all gray levels to obtain a breakover angle section flaw weight sum, and enabling the ratio between the breakover angle section flaw weight of each gray level and the breakover angle section flaw weight sum to be the probability of the breakover angle section flaw of the corresponding gray level.
The embodiment of the invention at least has the following beneficial effects: aiming at the characteristics that different gear positions show different light reflection degrees and a plurality of sections of the defect of the gear breakout angle correspond to a plurality of orientations when a gear material is under the same light source, different weights are given to each pixel point in the gray image of the gear, so that the image enhancement effect is better, meanwhile, on the premise of meeting the requirement of image enhancement, the detail information of the position suspected to be the breakout angle defect is pertinently enhanced, and great convenience is provided for the subsequent identification and detection of the breakout angle defect of the gear.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating steps of an image enhancement method for a gear according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the image enhancement method for a gear according to the present invention, its specific implementation, structure, features and effects will be given with reference to the accompanying drawings and preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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 image enhancement method for the gear provided by the present invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of an image enhancement method for a gear according to an embodiment of the present invention is shown, where the method includes the following steps:
s001, collecting an RGB image of the gear to obtain a corresponding gray image; and obtaining the distribution probability of the initial histogram of each gray level according to the gray level histogram of the gray level image.
Specifically, a CCD camera is used for collecting RGB images of the gear, and the obtained RGB images are preprocessed by using median filtering, so that the influence caused by noise and part of external interference is eliminated, and the accuracy of subsequent analysis is enhanced; and converting the preprocessed RGB image into a gray image.
Obtaining a gray level histogram of the gray level image, obtaining the distribution probability of the initial histogram of each gray level according to the gray level histogram, and obtaining the gray level
Figure 558935DEST_PATH_IMAGE023
Initial histogram distribution probability of (2)
Figure 258906DEST_PATH_IMAGE024
Wherein
Figure 860789DEST_PATH_IMAGE025
Is the total number of pixel points in the grayscale image,
Figure 242092DEST_PATH_IMAGE026
represents a gray value of
Figure 740594DEST_PATH_IMAGE023
The number of the pixels.
S002, segmenting by utilizing an image example to obtain each gear tooth area in the gray level image; acquiring an edge image of each gear tooth area to detect angular points in the edge image, and respectively calculating the coarse area disorder degree of each gear tooth area according to the distance between the angular points in the gear tooth areas; respectively calculating the central abundance of the rough area of each gear tooth area according to the total number of the angular points in the gear tooth area and the gray values of pixel points around the angular points; and taking the ratio of the irregularity degree of the rough area to the richness degree of the center of the rough area as the break-angle defect coefficient of each gear tooth area.
Specifically, due to the irradiation of light, the structure of the gear and the material property, the gear tooth part of the gear can reflect light to different degrees, the gray value in the area which is strongly reflected after being irradiated by the light source is extremely large, the gray value in the area which is not irradiated by the light source is extremely small, and the gray value in the area which is irradiated by the light source but does not reflect light is in an intermediate value, so that the gray range of pixel points in the gray image is more, the effect of the common histogram equalization method on gray image enhancement is poorer, the histogram equalization method is improved, the image enhancement is realized by using the improved histogram equalization method, namely, the histogram distribution probability in the common histogram equalization process is optimized, and the image enhancement is realized by using the optimized histogram distribution probability.
And (3) segmenting each gear tooth in the gray level image by using the CenterMask trained according to the gear image database in the image example segmentation, wherein one gear tooth corresponds to one region to obtain a plurality of gear tooth regions.
Because the section of the gear collapse angle position is messy and rough, the hollow is uneven and is divided into a plurality of irregular small sections, each small section faces to different directions and has different light reflection degrees corresponding to the same light source, and therefore, a higher weight is given to a region possibly belonging to the gear collapse angle according to the specific characteristics of the gear collapse angle.
And acquiring a corresponding edge image by using a canny operator for each gear tooth area, and acquiring corner points in the edge image, namely the corner points in the gear tooth area, by using Harris corner point detection. In order to prevent the influence on subsequent analysis caused by too many corners in a small area where details are more in the gray level image, a non-maximum suppression algorithm is adopted to screen the corners by using the gray level values at the corners, and only the corners with high contribution to feature description are reserved.
Respectively calculating the distance between each angular point and other angular points according to the angular point position in any gear tooth area, such as the angular point
Figure 486833DEST_PATH_IMAGE004
With others
Figure 107170DEST_PATH_IMAGE007
The distances between the corner points are respectively recorded as
Figure 354481DEST_PATH_IMAGE027
Figure 111084DEST_PATH_IMAGE028
,…,
Figure 559383DEST_PATH_IMAGE029
Obtaining this
Figure 263421DEST_PATH_IMAGE007
Mean value of individual distances
Figure 924210DEST_PATH_IMAGE006
Calculating angular points from these distances
Figure 394374DEST_PATH_IMAGE004
Corresponding coarse area clutter
Figure 747995DEST_PATH_IMAGE002
Then, the calculation formula of the disorder degree of the rough area is:
Figure 342925DEST_PATH_IMAGE030
wherein the content of the first and second substances,
Figure 946686DEST_PATH_IMAGE003
is a corner point
Figure 881144DEST_PATH_IMAGE004
And a first
Figure 795879DEST_PATH_IMAGE005
The distance between the other corner points.
The rough area disorder degree corresponding to each corner point in any gear tooth area can be obtained by utilizing a calculation formula of the rough area disorder degree
Figure 612526DEST_PATH_IMAGE002
Selecting the minimum disorder degree of the rough area as the disorder degree of the rough area corresponding to the gear tooth area, and recording the disorder degree as the disorder degree of the rough area
Figure 880696DEST_PATH_IMAGE031
It should be noted that the rough area is in disorder when the distances between the corner points and other corner points are smaller
Figure 731977DEST_PATH_IMAGE002
The smaller the disorder degree of the rough area is, the more disordered parts in the gear tooth area are used for measuring the uniform distribution of the angular points, and when the angular points are distributed more uniformly, the smaller the disorder degree of the rough area in the corresponding gear tooth area is; since the tooth break angle is usually found in a small portion of the tooth, and the angular point corresponds to each position where the hollow is uneven in the defect or the edge direction of the small section changes, the angular point is more concentrated and uniform, so the more obvious the feature is, the more likely the tooth region contains the defect.
Selecting rough area disorder
Figure 820544DEST_PATH_IMAGE031
Corresponding corner pointSelecting the gray image centered at the corner according to the position of the corner
Figure 62169DEST_PATH_IMAGE008
Window according to
Figure 930768DEST_PATH_IMAGE008
Calculating the rough region center richness of the gear tooth region by the gray value of the pixel point in the window
Figure 230031DEST_PATH_IMAGE010
Then, the calculation formula of the richness of the center of the rough area is:
Figure 830777DEST_PATH_IMAGE032
wherein, the first and the second end of the pipe are connected with each other,
Figure 215491DEST_PATH_IMAGE011
is composed of
Figure 828393DEST_PATH_IMAGE008
In the window first
Figure 982163DEST_PATH_IMAGE005
Gray values of the pixel points;
Figure 816127DEST_PATH_IMAGE012
is composed of
Figure 563503DEST_PATH_IMAGE008
Average gray values of all pixel points in the window;
Figure 101800DEST_PATH_IMAGE013
the total number of the angular points in the gear tooth area is used for amplifying the value of the central richness of the rough area according to the specific number of the angular points in the gear tooth area.
When the gray value difference of pixel points in the window is larger and the number of angle points in the gear tooth area is larger, the central richness of the rough area
Figure 581848DEST_PATH_IMAGE010
The larger.
It should be noted that, the central position of the window is the disorder degree of the rough area
Figure 55555DEST_PATH_IMAGE031
The position of the corresponding corner point is the position which is most likely to be the center of the flaw part in the area which is likely to contain the flaw; the coarser the flaw area is, the larger the difference of the reflection conditions of the same light source is, the larger the difference of the gray values of the pixel points in the corresponding gear tooth area is, so that the coarse area is measured by adopting the difference of the gray values of the pixel points near the position and the number of the angular points.
By utilizing the method, the rough area disorder degree of each gear tooth area can be obtained
Figure 149281DEST_PATH_IMAGE031
And coarse area center richness
Figure 835478DEST_PATH_IMAGE010
. Due to the rough area clutter in the wheel tooth area
Figure 963839DEST_PATH_IMAGE031
And coarse area center richness
Figure 139606DEST_PATH_IMAGE010
Can reflect the unique characteristic of the defect of the gear break angle, and the break angle defect coefficient of each gear tooth area is obtained according to the characteristic
Figure 321627DEST_PATH_IMAGE033
And then, the calculation formula of the collapse angle defect coefficient is as follows:
Figure 873831DEST_PATH_IMAGE034
roughness in wheel tooth area
Figure 856699DEST_PATH_IMAGE031
Smaller, coarse region center richness
Figure 672208DEST_PATH_IMAGE010
The larger the tooth area, the greater the coefficient of chipping
Figure 474948DEST_PATH_IMAGE033
The larger.
Step S003, dividing each gear tooth area into a flaw area and a non-flaw area by utilizing threshold segmentation; and assigning a weight 1 to a pixel point in a non-gear tooth area in the gray image, and assigning weights to pixel points in a defect area and a non-defect area of each gear tooth area respectively based on the collapsing angle defect coefficient of each gear tooth area and gray values of other pixel points in areas around the pixel points.
Specifically, the collapse angle defect coefficient of each gear tooth area is obtained by the method of step S002
Figure 565264DEST_PATH_IMAGE033
And setting a broken angle defect coefficient threshold, and when the broken angle defect coefficient of the gear tooth area is greater than the broken angle defect coefficient threshold, determining that the gear tooth area contains obvious defects.
Because the flaw is a part of the part, and the part of the flaw is concave to the inside of the part, the received and reflected light is less, and the corresponding area is darker, so the gray value of the pixel point corresponding to the flaw should be larger. Dividing the defective area in each gear tooth area by utilizing Otsu threshold segmentation to further obtain the defective area and the non-defective area in each gear tooth area, wherein the Otsu threshold segmentation method comprises the following steps: obtaining a gray threshold of the gear area through an inter-class variance method, taking pixel points with gray values larger than or equal to the gray threshold as defective pixel points, taking pixel points with gray values smaller than the gray threshold as non-defective pixel points, and dividing the gear area into a defective area and a non-defective area according to the defective pixel points and the non-defective pixel points. Because the defect of the break angle mainly occurs at the gear tooth position of the gear, a weight 1 is given to the pixel points which do not belong to the gear tooth area in the gray level image, and the weight more than 1 is given to the pixel points which belong to the gear tooth area in the gray level image. Considering that a flaw area and a non-flaw area exist in the gear tooth area, and then based on the collapsing angle flaw coefficient of each gear tooth area and the gray values of other pixel points in the area around the pixel point, respectively giving weights to the pixel points in the flaw area and the non-flaw area of each gear tooth area, the calculation formula of the weights of the pixel points in the flaw area and the non-flaw area is as follows:
Figure 280935DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 126400DEST_PATH_IMAGE015
is the weight;
Figure 557381DEST_PATH_IMAGE016
indicating that the pixel point is in the defect area;
Figure 451388DEST_PATH_IMAGE017
indicating that the pixel points are in the non-defective area;
Figure 877690DEST_PATH_IMAGE018
the sum of the collapse angle defect coefficients of all gear tooth areas in the gray level image is obtained;
Figure 831740DEST_PATH_IMAGE019
is the first to which a pixel belongs
Figure 487367DEST_PATH_IMAGE005
The coefficient of the breakout defect of each gear tooth area;
Figure 247382DEST_PATH_IMAGE035
is to show to
Figure 200294DEST_PATH_IMAGE005
Collapse of individual tooth regionsCarrying out normalization processing on the corner defect coefficients;
Figure 387562DEST_PATH_IMAGE020
to be centred on a pixel point
Figure 527556DEST_PATH_IMAGE021
The gray value variance of all pixel points in the window area;
Figure 625350DEST_PATH_IMAGE022
the sum of the gray value variances of all the pixel points in the gear area where the pixel points are located.
Step S004, calculating the broken angle section flaw probability corresponding to each gray level based on the weight of each pixel point in the gray level image, and taking the product of the broken angle section flaw probability of each gray level and the initial histogram distribution probability as the histogram distribution probability of the corresponding gray level; and obtaining an equalization histogram based on the histogram distribution probability, and completing the image enhancement of the gray level image by using the equalization histogram.
Specifically, the weight of each pixel point in the grayscale image can be obtained by using the method for obtaining the weight in step S003, the weights of each pixel point at the same grayscale level are added, the addition result is the weight of the broken angle section defect at the corresponding grayscale level, and the weight of the broken angle section defect at each grayscale level in the grayscale image is further obtained, and then the grayscale level is obtained
Figure 167190DEST_PATH_IMAGE023
The weight of the defect of the broken angle section is
Figure 197463DEST_PATH_IMAGE036
Calculating the defect probability of the corner break section corresponding to each gray level according to the weight of the corner break section defect of each gray level, wherein the calculation formula of the defect probability of the corner break section is as follows:
Figure 355912DEST_PATH_IMAGE037
wherein the content of the first and second substances,
Figure 864253DEST_PATH_IMAGE038
is a gray scale
Figure 57337DEST_PATH_IMAGE023
The probability of chipping of the broken corner section;
Figure 258511DEST_PATH_IMAGE039
the defect probability of the broken angle section of all gray levels is the sum.
According to grey level
Figure 638677DEST_PATH_IMAGE023
Initial histogram distribution probability of
Figure 230937DEST_PATH_IMAGE040
And probability of fault of broken angle section
Figure 278528DEST_PATH_IMAGE038
Calculating gray levels
Figure 385024DEST_PATH_IMAGE023
Histogram distribution probability of (2)
Figure 518065DEST_PATH_IMAGE041
I.e. by
Figure 633789DEST_PATH_IMAGE042
Further, histogram distribution probability of each gray level in the gray level image is obtained, and in order to ensure that the sum of the histogram distribution probabilities corresponding to each gray level is a fixed value 1, the histogram distribution probability is compared with the distribution probability
Figure 535886DEST_PATH_IMAGE043
Normalizing and recording histogram distribution probability
Figure 78863DEST_PATH_IMAGE041
The corresponding normalized histogram distribution probability is
Figure 230358DEST_PATH_IMAGE044
Will gray scale
Figure 152702DEST_PATH_IMAGE023
The cumulative distribution probability of (a) is defined as:
Figure 909306DEST_PATH_IMAGE045
i.e. to adjust the grey level
Figure 623184DEST_PATH_IMAGE023
All previous grey levels and including grey levels
Figure 465238DEST_PATH_IMAGE023
The normalized histogram distribution probabilities of (a) are added.
Mapping the gray-scale image into an enhanced image with approximately uniform gray-scale distribution by accumulating the distribution probability, wherein the corresponding mapping relation is as follows:
Figure 922764DEST_PATH_IMAGE046
wherein the content of the first and second substances,
Figure 205978DEST_PATH_IMAGE047
is the difference between the maximum and minimum gray levels in the gray scale image,
Figure 356336DEST_PATH_IMAGE048
the values in parentheses are rounded.
And balancing the gray level histogram based on the mapping relation of each gray level to obtain a balanced histogram, wherein the gray levels in the balanced histogram are distributed uniformly, and then obtaining the gray level image after image enhancement according to the balanced histogram.
It should be noted that, in the process of obtaining the cumulative distribution probability, different weights are given to different pixel points according to the characteristic of the defect of the corner break, that is, the more likely the weight corresponding to the pixel point in the corner break region is larger, the gray value obtained after the equalization of the gray value corresponding to the pixel point with the larger weight is larger, and the gray value obtained after the equalization of the gray value corresponding to the pixel point with the smaller weight is smaller, so that the characteristic has a larger contrast ratio between the defect portion where the corner break occurs and the portion without the defect point on the image, and is beneficial to the subsequent identification and analysis of the defect of the corner break.
In summary, the embodiment of the present invention provides an image enhancement method for a gear, which acquires an RGB image of the gear to obtain a corresponding grayscale image, and obtains an initial histogram distribution probability of each grayscale level according to a grayscale histogram of the grayscale image; obtaining each gear tooth area in the gray level image by utilizing image example segmentation, and calculating the collapsing angle defect coefficient of each gear tooth area; assigning a weight to each pixel point in the gray level image based on the collapsing angle defect coefficient and the position of each pixel point; and calculating the defect probability of the break-angle section corresponding to each gray level based on the weight, obtaining the histogram distribution probability of each gray level by combining the initial histogram distribution probability, and obtaining an equalized histogram according to the histogram distribution probability to complete the image enhancement of the gray level image. Different weights are given to each pixel point in the gray level image of the gear, so that the image enhancement effect is better, and the detail information of the position suspected to be the corner collapse flaw is enhanced.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit of the present invention are intended to be included therein.

Claims (2)

1. An image enhancement method for a gear, the method comprising the steps of:
collecting RGB images of the gear to obtain corresponding gray level images; obtaining the distribution probability of an initial histogram of each gray level according to a gray level histogram of a gray level image;
each gear tooth area in the gray level image is obtained by utilizing image example segmentation; acquiring an edge image of each gear tooth area to detect angular points in the edge image, and respectively calculating the coarse area disorder degree of each gear tooth area according to the distance between the angular points in the gear tooth areas; respectively calculating the central abundance of the rough area of each gear tooth area according to the total number of the angular points in the gear tooth area and the gray values of pixel points around the angular points; taking the ratio of the irregularity degree of the rough area to the richness degree of the center of the rough area as the collapsing angle defect coefficient of each gear tooth area;
dividing each gear tooth area into a defective area and a non-defective area by utilizing threshold segmentation; assigning a weight 1 to a pixel point in a non-gear tooth area in a gray scale image, and respectively assigning weights to pixel points in a defect area and a non-defect area of each gear tooth area based on the collapsing angle defect coefficient of each gear tooth area and gray scale values of other pixel points in areas around the pixel points;
calculating the defect probability of the broken angle section corresponding to each gray level based on the weight of each pixel point in the gray level image, and taking the product of the defect probability of the broken angle section of each gray level and the distribution probability of the initial histogram as the distribution probability of the histogram of the corresponding gray level; obtaining an equalization histogram based on the histogram distribution probability, and completing image enhancement of a gray level image by using the equalization histogram;
the method for acquiring the disorder degree of the rough area of each gear tooth area comprises the following steps:
calculating the disorder degree of the rough area corresponding to each corner point in the current gear tooth area, and selecting the minimum disorder degree of the rough area as the disorder degree of the rough area of the current gear tooth area; the calculation formula of the disorder degree of the rough area is as follows:
Figure 147456DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE003
the disorder degree of the rough area;
Figure 205410DEST_PATH_IMAGE004
is a corner point
Figure DEST_PATH_IMAGE005
And a first step of
Figure 72959DEST_PATH_IMAGE006
The distance between the other corner points;
Figure DEST_PATH_IMAGE007
is a corner point
Figure 331902DEST_PATH_IMAGE005
Respectively calculating the average distance from the other angular points in the current gear tooth area;
Figure 492756DEST_PATH_IMAGE008
the number of other corner points in the current gear tooth area is set;
the method for acquiring the richness of the rough area center of each gear tooth area comprises the following steps:
selecting an angular point corresponding to the disorder degree of a rough area of the current gear tooth area, and acquiring the angular point which is centered on the angular point in the gray level image
Figure DEST_PATH_IMAGE009
Window area of based on
Figure 416718DEST_PATH_IMAGE009
Calculating the central abundance of the rough area of the current gear tooth area by the gray value of the pixel points in the window and the total number of the angular points in the current gear tooth area, wherein the central abundance of the rough area has the calculation formula:
Figure DEST_PATH_IMAGE011
wherein the content of the first and second substances,
Figure 143366DEST_PATH_IMAGE012
the central richness of the rough area;
Figure DEST_PATH_IMAGE013
is composed of
Figure 760161DEST_PATH_IMAGE009
Within the window area
Figure 736207DEST_PATH_IMAGE006
The gray value of each pixel point;
Figure 542489DEST_PATH_IMAGE014
is composed of
Figure 592485DEST_PATH_IMAGE009
Average gray values of all pixel points in the window area;
Figure DEST_PATH_IMAGE015
the total number of angular points in the current gear tooth area is obtained;
the method for respectively giving weight values to the pixel points in the flaw area and the non-flaw area of each gear tooth area comprises the following steps:
Figure DEST_PATH_IMAGE017
wherein the content of the first and second substances,
Figure 911339DEST_PATH_IMAGE018
is the weight;
Figure DEST_PATH_IMAGE019
indicating that the pixel point is in the defect area;
Figure 781206DEST_PATH_IMAGE020
indicating that the pixel point is in a non-defective area;
Figure DEST_PATH_IMAGE021
the sum of the collapse angle defect coefficients of all gear tooth areas in the gray level image is obtained;
Figure 46972DEST_PATH_IMAGE022
is the first to which a pixel point belongs
Figure 341687DEST_PATH_IMAGE006
The coefficient of the breakout defect of each gear tooth area;
Figure DEST_PATH_IMAGE023
to be centred on a pixel point
Figure 51017DEST_PATH_IMAGE024
The gray value variance of all pixel points in the window area;
Figure DEST_PATH_IMAGE025
the sum of the gray value variances of all the pixel points in the gear tooth area where the pixel points are located.
2. The image enhancement method for the gear according to claim 1, wherein the method for calculating the probability of the defect of the corner break section corresponding to each gray level based on the weight of each pixel point in the gray level image comprises:
adding the weight of each pixel point under the same gray level, and enabling the addition result to be the defect weight of the broken angle section of the corresponding gray level;
and adding the weight of the breakover angle section defects of all gray levels to obtain the weight sum of the breakover angle section defects, wherein the ratio of the weight of the breakover angle section defects of each gray level to the weight sum of the breakover angle section defects of the corresponding gray level is the probability of the breakover angle section defects of the corresponding gray level.
CN202211009335.0A 2022-08-23 2022-08-23 Image enhancement method for gear Active CN115082481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211009335.0A CN115082481B (en) 2022-08-23 2022-08-23 Image enhancement method for gear

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211009335.0A CN115082481B (en) 2022-08-23 2022-08-23 Image enhancement method for gear

Publications (2)

Publication Number Publication Date
CN115082481A CN115082481A (en) 2022-09-20
CN115082481B true CN115082481B (en) 2022-11-15

Family

ID=83245318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211009335.0A Active CN115082481B (en) 2022-08-23 2022-08-23 Image enhancement method for gear

Country Status (1)

Country Link
CN (1) CN115082481B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294123B (en) * 2022-10-08 2023-03-24 淄博永丰环保科技有限公司 Corrugated board quality detection method based on image vision
CN115311176B (en) * 2022-10-12 2023-03-07 江苏菲尔浦物联网有限公司 Night image enhancement method based on histogram equalization
CN115375686B (en) * 2022-10-25 2023-01-24 山东鲁玻玻璃科技有限公司 Glass edge flaw detection method based on image processing
CN116228804B (en) * 2023-05-10 2023-07-18 山东省地质测绘院 Mineral resource identification method based on image segmentation
CN116433657B (en) * 2023-06-08 2023-08-25 金乡县明耀玻璃有限公司 Toughened glass scratch area image enhancement method based on computer vision
CN116843584B (en) * 2023-09-01 2023-11-07 浙江鼎立实业有限公司 Image data optimization enhancement method
CN117115174B (en) * 2023-10-25 2024-02-06 张家港市金阳工具有限公司 Automatic detection method and system for appearance of pliers
CN117173158B (en) * 2023-10-25 2024-01-30 深圳市德海威实业有限公司 Intelligent detection method and system for quality of precise connector
CN117474927B (en) * 2023-12-28 2024-03-26 山东太阳耐磨件有限公司 Driving tooth production quality detection method based on artificial intelligence
CN117635507B (en) * 2024-01-26 2024-04-09 深圳市精森源科技有限公司 Plastic particle online visual detection method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609918A (en) * 2012-02-15 2012-07-25 国家海洋局第二海洋研究所 Image characteristic registration based geometrical fine correction method for aviation multispectral remote sensing image
CN104574326A (en) * 2013-10-15 2015-04-29 无锡华润矽科微电子有限公司 Method and device for performing histogram equalization processing on image
CN106570499A (en) * 2016-10-28 2017-04-19 南京航空航天大学 Object tracking method based on probability graph model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2589218B1 (en) * 2010-06-30 2021-01-20 Tata Consultancy Services Limited Automatic detection of moving object by using stereo vision technique
CN104680500A (en) * 2015-02-07 2015-06-03 江西科技学院 Image intensification algorithm based on histogram equalization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609918A (en) * 2012-02-15 2012-07-25 国家海洋局第二海洋研究所 Image characteristic registration based geometrical fine correction method for aviation multispectral remote sensing image
CN104574326A (en) * 2013-10-15 2015-04-29 无锡华润矽科微电子有限公司 Method and device for performing histogram equalization processing on image
CN106570499A (en) * 2016-10-28 2017-04-19 南京航空航天大学 Object tracking method based on probability graph model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Image Local Features Description Through Polynomial Approximation;Fawad;《IEEE Access 》;20191213;全文 *
基于多视觉特征的图像复杂度评价及应用;殷昆燕;《中国优秀硕士学位论文全文数据库》;20160815;全文 *

Also Published As

Publication number Publication date
CN115082481A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN115082481B (en) Image enhancement method for gear
CN116721106B (en) Profile flaw visual detection method based on image processing
CN114842017B (en) HDMI cable surface quality detection method and system
CN114723701B (en) Gear defect detection method and system based on computer vision
CN114359270B (en) Computer vision-based automobile engine oil way copper sleeve defect detection method
CN115082451B (en) Stainless steel soup ladle defect detection method based on image processing
CN116030060B (en) Plastic particle quality detection method
CN116309559B (en) Intelligent identification method for production flaws of medium borosilicate glass
CN115330645B (en) Welding image enhancement method
CN116740058B (en) Quality detection method for solid state disk matched wafer
CN117011292B (en) Method for rapidly detecting surface quality of composite board
CN116740061B (en) Visual detection method for production quality of explosive beads
CN116990323B (en) High-precision printing plate visual detection system
CN115290663B (en) Mini LED wafer appearance defect detection method based on optical detection
CN115035113A (en) Nondestructive testing method for production defects of mobile phone data line based on X-ray
CN115511907B (en) Scratch detection method for LED screen
CN116993731B (en) Shield tunneling machine tool bit defect detection method based on image
CN115690105A (en) Milling cutter scratch detection method based on computer vision
CN117011291B (en) Watch shell quality visual detection method
CN115984272A (en) Semitrailer axle defect identification method based on computer vision
CN111429361A (en) Bacterial colony counting method based on machine vision
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116612112B (en) Visual inspection method for surface defects of bucket
CN117152129A (en) Visual detection method and system for surface defects of battery cover plate
CN115254674B (en) Bearing defect sorting method

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