CN114494205A - Door and window corrosion degree determination method based on self-adaptive color grading - Google Patents

Door and window corrosion degree determination method based on self-adaptive color grading Download PDF

Info

Publication number
CN114494205A
CN114494205A CN202210102914.3A CN202210102914A CN114494205A CN 114494205 A CN114494205 A CN 114494205A CN 202210102914 A CN202210102914 A CN 202210102914A CN 114494205 A CN114494205 A CN 114494205A
Authority
CN
China
Prior art keywords
chromaticity
rust
interval
color
door
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
CN202210102914.3A
Other languages
Chinese (zh)
Other versions
CN114494205B (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.)
Jiangsu Ruigou New Material Co ltd
Original Assignee
Jiangsu Ruigou New Material 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 Jiangsu Ruigou New Material Co ltd filed Critical Jiangsu Ruigou New Material Co ltd
Priority to CN202210102914.3A priority Critical patent/CN114494205B/en
Publication of CN114494205A publication Critical patent/CN114494205A/en
Application granted granted Critical
Publication of CN114494205B publication Critical patent/CN114494205B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • 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/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a door and window corrosion degree judging method based on self-adaptive color grading, relates to the field of artificial intelligence, and is mainly used for judging the door and window corrosion degree. The method comprises the following steps: collecting rusted door and window pictures; acquiring pictures with different corrosion grades and chromaticity histograms thereof; dividing the chromatic value into chromatic intervals, and acquiring the chromatic histogram area of each chromatic interval in different corrosion grade pictures; calculating the similarity and uniqueness of each chromaticity interval; color level division is carried out, and the weight of each color level is calculated; acquiring the area proportion of each color level in the rusted door and window pictures and the area proportion of the color levels in the pictures with different rust grades; calculating the area proportion approach value of each color level; and taking the corrosion grade corresponding to the highest approach value as the corrosion degree of the corroded door and window. According to the technical means provided by the invention, the characteristic colors representing the corrosion degree are independently divided through color classification, and weights are given to the characteristic colors, so that the corrosion grade classification can be more accurately realized.

Description

Door and window corrosion degree determination method based on self-adaptive color grading
Technical Field
The invention relates to the field of artificial intelligence, in particular to a method for judging the tampering and rusting degree of people based on self-adaptive color grading.
Background
At present, the rust removal of the door and window steel plates needs to judge the rust grade firstly, and a corresponding rust removal scheme is provided according to the rust grade. However, most of the currently used techniques for identifying the corrosion grade of metal plates are electromagnetic detection, ultrasonic detection and radioisotope detection, and these detection methods have many advantages, but have the disadvantages of high detection cost, small application range and the like.
Meanwhile, in the current visual-based rust degree determination method, the rust degree is determined by the number of rust pixels, but the method can only realize simple hierarchical division and cannot fully reflect the rust degree.
Disclosure of Invention
The invention provides a door and window corrosion degree judging method based on self-adaptive color grading, which aims to solve the existing problems and comprises the following steps: collecting rusted door and window pictures and performing semantic segmentation to obtain rusted area pictures; obtaining standard corrosion pictures with different corrosion grades, and obtaining a chromaticity category set; obtaining a color hierarchy set through a chroma category intersection; acquiring the area proportion of each color level in each standard rusty picture and rusty door and window picture; calculating the similarity of each color level, calculating the uniqueness of each color level according to the similarity, and calculating the weight of each color level according to the uniqueness; and calculating the corrosion grade corresponding to the highest similarity value as the corrosion degree of the corroded door and window.
According to the technical means provided by the invention, the characteristic colors capable of representing the corrosion degree are independently divided through color classification, higher weight is given, and the corrosion grade division can be more accurately realized.
The invention adopts the following technical scheme that a door and window corrosion degree judging method based on self-adaptive color grading comprises the following steps:
and collecting the rusted door and window pictures and performing semantic segmentation to obtain rusted area pictures.
And obtaining standard rust pictures with different rust grades, converting the standard rust pictures into HSV color space, and obtaining the chromaticity histogram of the standard rust pictures with different rust grades.
And uniformly dividing the chromaticity value into a plurality of chromaticity intervals, and obtaining the chromaticity histogram area of each chromaticity interval in standard rust pictures with different rust grades.
And calculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval, and calculating the uniqueness of each corresponding chromaticity interval according to the similarity.
And carrying out color level division on the chromaticity intervals according to the uniqueness of each chromaticity interval to obtain a plurality of color levels, and calculating the weight corresponding to each color level according to the uniqueness of each chromaticity interval.
And acquiring the area proportion of each color level in the rusted door and window picture and the area proportion of each color level in each standard rusted picture with different rusty grades.
And respectively calculating the area ratio of each color level of the rusted door and window picture and the area ratio of each color level of the standard rusted picture with different rusty grades to be close to each other by utilizing the weight.
And taking the rust grade of the standard rust picture corresponding to the obtained highest approach value as the rust degree of the rusted door and window.
Further, a door and window corrosion degree determination method based on self-adaptive color grading, which is a method for calculating the similarity of the chromaticity histogram regions of all standard corrosion pictures with different corrosion grades in each corresponding chromaticity interval, and comprises the following steps:
calculating the dispersion difference R of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity intervalq
Calculating the mean value of the frequency deviation of the chromaticity histogram area of the standard rust picture with different rust grades in each corresponding chromaticity interval
Figure BDA0003492831690000021
Calculating the comprehensive increase and decrease consistency Q of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity intervalq
By said difference of dispersion RqMean value of frequency deviation
Figure BDA0003492831690000022
And comprehensive increase and decrease of consistency QqCalculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval, wherein the expression is as follows:
Figure BDA0003492831690000023
wherein, XqThe similarity of the chromaticity histogram area of the standard rust pictures with different rust grades in the corresponding qth chromaticity interval, QqRepresents the said comprehensive increase and decrease consistency corresponding to the qth chromaticity interval, RqRepresents the dispersion difference corresponding to the q-th chromaticity interval,
Figure BDA0003492831690000031
and the average value of the frequency deviation corresponding to the qth chroma interval is represented.
Further, a door and window corrosion degree judging method based on self-adaptive color grading calculates the uniqueness of each corresponding chromaticity interval according to the similarity:
calculating the expression of the uniqueness T of each chromaticity interval as follows:
Figure BDA0003492831690000032
wherein, TqDenotes the uniqueness of the qth chromaticity interval, XqAnd representing the similarity of the chrominance histogram areas of the standard rust pictures with different rust grades in the corresponding q-th chrominance interval.
Further, a door and window corrosion degree judging method based on self-adaptive color grading, wherein a method for dividing the color grades of the chromaticity intervals according to the uniqueness of each chromaticity interval comprises the following steps:
the uniqueness of T<α1The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha1<T<α2The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha2<T<α3The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha3<T<α4The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha4<T<α5The continuous chrominance interval of (a) is divided into a color hierarchy;
wherein alpha is1、α2、α3、α4、α5Is [ alpha ]15]The threshold interval of (2).
Further, a door and window corrosion degree judging method based on self-adaptive color grading calculates the weight corresponding to each color level according to the uniqueness of each chromaticity interval:
the expression for calculating the weight for each color level is:
Figure BDA0003492831690000033
where ρ isrRepresenting the r-th colour levelThe weight of the weight is calculated,
Figure BDA0003492831690000034
the uniqueness of the qth chromaticity interval in the mth color layer is shown, and e the number of chromaticity intervals in the mth color layer is shown.
Further, the door and window corrosion degree determination method based on self-adaptive color grading utilizes the weights to respectively calculate the approximate values of the area proportion of each color grade of the corroded door and window picture and the area proportion of each color grade of the standard corrosion picture with different corrosion grades:
the expression for calculating the proximity value is:
Figure BDA0003492831690000041
wherein the content of the first and second substances,
Figure BDA0003492831690000042
showing the area ratio of each color level of the rusted door and window picture and the
Figure BDA0003492831690000043
The area ratio of each color level of the standard rust picture of each rust grade is approximate to a value, WrRepresenting the area proportion occupied by the r-th color level in the rusty door and window picture,
Figure BDA0003492831690000044
indicating the r-th color level at
Figure BDA0003492831690000045
Area ratio, rho, occupied in standard rust pictures of individual rust gradesrIs the weight of the r-th color level.
Further, a door and window rust degree determination method based on self-adaptive color grading uniformly divides the chroma value into a plurality of chroma intervals, and obtains the chroma histogram area of each chroma interval in different rust grade standard rust pictures:
uniformly dividing the chromatic value into q chromatic intervals, counting the areas occupied by the chromatic histogram of the standard rust picture with different rust grades in each chromatic interval, and obtaining each chromatic interval containing
Figure BDA0003492831690000046
And (4) corresponding chromaticity histograms of standard rust pictures of various grades.
The invention has the beneficial effects that: according to the technical means provided by the invention, the characteristic colors capable of representing the corrosion degree are independently divided through color classification, higher weight is given, and the corrosion grade division can be more accurately realized.
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 method for determining corrosion degree of a door/window based on adaptive color classification according to an embodiment of the present invention;
fig. 2 is another door and window corrosion degree determination method based on adaptive color grading according to an embodiment of the present invention.
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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Example 1
As shown in fig. 1, a method for determining door and window rusting degree based on adaptive color grading according to an embodiment of the present invention includes:
101. and collecting the rusted door and window pictures and performing semantic segmentation to obtain rusted area pictures.
The scenario addressed by the present embodiment is: the door and window has a plurality of corrosion traces, and the corrosion degree of the door and window is judged by analyzing the corrosion traces, so that the door and window is convenient for further corrosion treatment.
The door and window picture is shot through the camera to the embodiment, handles the picture, carries out the corrosion degree according to characteristic information in the image and divides.
In another embodiment, the method for acquiring the door and window pictures may be any device with the functions of processing pixels and data, such as a mobile phone, a camera, and the like, and the method for acquiring the door and window pictures is not limited at all.
102. And obtaining standard rust pictures with different rust grades, converting the standard rust pictures into HSV color space, and obtaining the chromaticity histogram of the standard rust pictures with different rust grades.
Because the invention carries out corrosion degree analysis based on color characteristics, the door and window pictures need to be converted into HSV space, and H channel chrominance images are extracted, so that the door and window chrominance images can be obtained.
And acquiring corrosion example pictures of different levels of corrosion grades in a network database.
And (3) cutting out a non-rusting area: according to experience, the chromaticity threshold value of the rusty area is A ═ 15-35]In the standard chroma picture, when the chroma value h epsilon A of the pixel is kept unchanged, and when h does not belong to the range, the pixel value is replaced by
Figure BDA0003492831690000051
Here, the
Figure BDA0003492831690000052
And (4) representing the mean value of the chromaticity of the non-rust area in the door and window picture, and processing by the method to obtain the standard picture.
And correspondingly counting the processed standard corrosion grade chromaticity picture to generate a chromaticity histogram.
103. And uniformly dividing the chromaticity value into a plurality of chromaticity intervals, and obtaining the chromaticity histogram area of each chromaticity interval in standard rust pictures with different rust grades.
Uniformly dividing the chromatic value into q chromatic intervals, counting the areas occupied by the chromatic histogram of the standard rust picture with different rust grades in each chromatic interval, and obtaining each chromatic interval containing
Figure BDA0003492831690000061
And (4) corresponding chromaticity histograms of standard rust pictures of various grades.
104. And calculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval, and calculating the uniqueness of each corresponding chromaticity interval according to the similarity.
Calculating the peak deviation degree of the chromaticity histogram area of the standard rust picture with different rust grades in each corresponding chromaticity interval;
calculating the dispersion difference of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval;
calculating the mean value of the frequency deviation of the chromaticity histogram area of the standard corrosion pictures with different corrosion grades in each corresponding chromaticity interval;
calculating the comprehensive increase and decrease consistency of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval;
through the peak deviation F, the dispersion difference R and the frequency deviation mean value
Figure BDA0003492831690000062
And calculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval by comprehensively increasing and decreasing the consistency Q.
105. And carrying out color level division on the chromaticity intervals according to the uniqueness of each chromaticity interval to obtain a plurality of color levels, and calculating the weight corresponding to each color level according to the uniqueness of each chromaticity interval.
The method for dividing the chrominance intervals into color levels according to the uniqueness of each chrominance interval comprises the following steps:
the uniqueness of T<α1The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha1<T<α2The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha2<T<α3The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha3<T<α4The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha4<T<α5Is divided into a color hierarchy.
Wherein alpha is1、α2、α3、α4、α5Is [ alpha ]15]The threshold interval of (2).
Calculating the uniqueness of each color level through the similarity, and calculating the weight of the corresponding color level in standard corrosion pictures of different corrosion levels according to the multi-characteristics of each color level.
Since the area proportion of each color hierarchy in the rust pictures of different levels is different, and a representative color hierarchy exists in the rust picture of a certain level, the characteristics of the rust hierarchy can be well reflected, in this embodiment, the weight of each color hierarchy is calculated, so that the weighted approximate value of the area proportion of each color hierarchy is performed.
106. And acquiring the area proportion of each color level in the rusted door and window picture and the area proportion of each color level in each standard rusted picture with different rusty grades.
After the color levels are divided, the corresponding color areas of the standard pictures of the rust levels are divided by using the chromaticity interval of each color level, the number of pixels of each color level is counted to obtain the color area vector of each level, and the color area vector is subjected to normalization processing to obtain the area ratio.
107. And respectively calculating the area ratio of each color level of the rusted door and window picture and the area ratio of each color level of the standard rusted picture with different rusty grades to be close to each other by utilizing the weight.
And comparing the area proportion occupied by each color level in the obtained door and window sliding window corrosion picture with standard corrosion pictures with different corrosion levels respectively, and judging according to the obtained approach value.
The expression for calculating the proximity value is:
Figure BDA0003492831690000071
wherein the content of the first and second substances,
Figure BDA0003492831690000072
showing the area ratio of each color level and the second color level of the rusty door and window picture
Figure BDA0003492831690000073
The area ratio of each color level of the standard rust picture of each rust grade is approximate to a value, WrRepresenting the area proportion occupied by the r-th color level in the rusty door and window picture,
Figure BDA0003492831690000074
indicating the r-th color level at
Figure BDA0003492831690000075
Area ratio, rho, occupied in standard rust pictures of individual rust gradesrIs the weight of the r-th color level.
108. And taking the rust grade of the standard rust picture corresponding to the obtained highest approach value as the rust degree of the rusted door and window.
And judging through the calculated similarity value to obtain the corrosion grade of the standard corrosion picture corresponding to the maximum similarity value, and taking the grade as the door and window corrosion degree grade.
According to the technical means provided by the invention, the characteristic colors capable of representing the corrosion degree are independently divided through color classification, higher weight is given, and the corrosion grade division can be more accurately realized.
Example 2
As shown in fig. 2, another door and window corrosion degree determination method based on adaptive color grading according to an embodiment of the present invention includes:
201. and collecting the rusted door and window pictures and performing semantic segmentation to obtain rusted area pictures.
The scenario addressed by the present embodiment is: the door and window has a plurality of corrosion traces, and the corrosion degree of the door and window is judged by analyzing the corrosion traces, so that the door and window is convenient for further corrosion treatment. This embodiment is through shooting door and window picture, handles the picture, carries out the corrosion degree according to the interior characteristic information of image and divides.
Because the shot door and window images contain a lot of background information which can affect the quality of subsequent level division, the door and window images need to be divided first. The style and the color of the door and window are various, and the background area object is not fixed, so the invention utilizes a DNN semantic segmentation mode to identify the object in the segmented image.
The relevant content of the DNN network is as follows:
the data set used is a door and window image data set acquired on the front side.
The pixels needing to be segmented are divided into two types, namely the labeling process of the corresponding label of the training set is as follows: and in the semantic label of the single channel, the label of the pixel at the corresponding position belonging to the background class is 0, and the label of the pixel belonging to the door and window is 1.
The task of the network is classification, so the loss function used is a cross entropy loss function.
202. And obtaining standard rust pictures with different rust grades, converting the standard rust pictures into HSV color space, and obtaining the chromaticity histogram of the standard rust pictures with different rust grades.
The tarnish characteristic changes can be seen by observing images of different tarnish grades: the A-grade rust has rust spots in a small area, the B-grade rust has discrete small paint coats falling off, the C-grade rust has a concentrated rust area, the rust area presents a dense granular feeling caused by falling of rust particles, and the D-grade rust has a massive rust pit caused by falling of deep rust blocks. For the performance characteristics of different corrosion grades, the door and window corrosion grades can be divided by analyzing the door and window pictures based on the representation.
Replacing the color of the non-rusting area in the standard picture with the color of the non-rusting area in the door and window picture: obtaining example pictures with different levels of corrosion, and segmenting a non-corrosion area in a standard picture by using a color threshold, wherein the specific process comprises the following steps:
obtaining standard example pictures of different levels: and acquiring corrosion example pictures of different levels of corrosion grades in a network database.
And converting the example picture from the RGB space to the HSV space, and extracting the chrominance picture of the H channel.
And (3) cutting out a non-rusting area: according to experience, the chromaticity threshold value of the rusty area is A ═ 15-35]In the standard chroma picture, when the chroma value h epsilon A of the pixel is kept unchanged, and when h does not belong to the range, the pixel value is replaced by
Figure BDA0003492831690000091
Here, the
Figure BDA0003492831690000092
And (4) representing the mean value of the chromaticity of the non-rust area in the door and window picture, and processing by the method to obtain the standard picture.
And correspondingly counting the processed standard corrosion grade chromaticity pictures to generate a chromaticity histogram.
203. And uniformly dividing the chromaticity value into a plurality of chromaticity intervals, and obtaining the chromaticity histogram area of each chromaticity interval in standard rust pictures with different rust grades.
Uniformly dividing the chromaticity value into a plurality of chromaticity intervals, and obtaining the chromaticity histogram area of each chromaticity interval in standard rust pictures with different rust grades:
uniformly dividing the chromatic value into q chromatic intervals, counting the areas occupied by the chromatic histogram of the standard rust picture with different rust grades in each chromatic interval, and obtaining each chromatic interval containing
Figure BDA0003492831690000093
And (4) corresponding chromaticity histograms of standard rust pictures of various grades.
Taking A, B, C, D four-grade standard rust picture as an example, the histogram areas are La, Lb, Lc, Ld, i.e. in this embodiment,
Figure BDA0003492831690000094
a value of 4; obtaining the chromaticity histogram area of each standard rust level picture of each interval, and assuming that the chromaticity histogram area set of each standard rust level picture in the qth chromaticity interval is as follows:
Uq={Laq,Lbq,Lcq,Ldq}
2041. calculating the similarity of the chromaticity histogram areas of all standard rust pictures with different rust grades in each corresponding chromaticity interval, and calculating the uniqueness of each corresponding chromaticity interval according to the similarity;
the method for calculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval comprises the following steps:
calculating the dispersion difference of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval;
respectively calculating the dispersion difference of the histogram region sets, taking the qth histogram region set as an example, calculating the dispersion difference of each histogram in the region set, LaqHas a color value interval of min (ha)q)~max(haq) The frequency value corresponding to each chromaticity is
Figure BDA0003492831690000095
Analogy to this way to obtainLbq,Lcq,LdqCorresponding sequence of frequency values in LaqFor example, the histogram dispersion in the chromaticity interval is calculated as:
Figure BDA0003492831690000101
faq,iis represented by LaqThe frequency value corresponding to the ith gray-scale value in the histogram of the region,
Figure BDA0003492831690000102
is represented by LaqFrequency mean of region histogram, g represents LaqThe number of gray values in the region histogram.
The dispersion difference between the histogram regions of each level in the region histogram set is as follows:
Figure BDA0003492831690000103
σaqis represented by LaqDispersion of the region histogram, σ bqRepresents LbqDispersion of the region histogram.
Thus, the difference of the integrated dispersion of the qth chromaticity interval is averaged
Figure BDA0003492831690000104
Calculating the mean value of the frequency deviation of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval;
respectively calculating the frequency deviation mean value of the region histograms in the region histogram set to obtain a histogram region La of the corrosion grade AqFor example, the region histogram and Lb are calculated separatelyq,Lcq,LdqThe frequency deviation mean value of the histogram of the region, the frequency value corresponding to each histogram region in the chromaticity interval is
Figure BDA0003492831690000105
Rust of grade AThe mean value of the frequency deviation between the histogram region of the corrosion picture and the histogram region of the B-grade corrosion picture is
Figure BDA0003492831690000106
Figure BDA0003492831690000107
Is represented by LaqThe frequency value corresponding to the ith gray-scale value in the histogram of the region,
Figure BDA0003492831690000108
represents LbqFrequency value e corresponding to gray value of region histogram i1,e2Respectively representing the minimum gray value and the maximum gray value of the chroma interval corresponding to the region histogram set.
Obtaining the average value of frequency deviation among histograms in other regions by analogy with the method, and obtaining the comprehensive frequency deviation H of the q-th chroma interval by averagingq
Calculating the comprehensive increase and decrease consistency of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval;
calculating LaqThe frequency value fa corresponding to the chromatic value is classifiediWith an amplification of
Figure BDA0003492831690000111
ZaiIs represented by LaqFrequency value amplification of region histogram at i gray value
Analog LaqDetermining Lb by frequency value whole amplitude calculation mode of region histogram at i gray valueqFrequency value amplification Zb of region histogram at i gray valuei
The histogram of the two regions has a consistency of increasing and decreasing
Figure BDA0003492831690000112
ZaiIs represented by LaqFrequency value amplification of class at i-gray value, ZbiRepresents LbqFrequency value amplification of region histogram at i gray value, YiIs represented by LaqRegion histogram and LbqConsistency of increase and decrease of region histogram at gray value i
When the consistency Y is increased or decreasedi<2 and Zai*ZbiWhen the number is more than 0, the position is considered to be increased or decreased. The number M of the positions with the consistency increased or decreased is counted in the mode
Thus the proportion of the consistency of the two categories in the intersection is
Figure BDA0003492831690000113
M represents ZaiRegion histogram and ZbiThe number N of increase/decrease consistency chroma values between the region histograms indicates the number of histogram regions in the q-th chroma bin.
Analogy is carried out to find the increase and decrease consistency of two region histograms in the q chromaticity interval region histogram sets.
Calculating the comprehensive consistency of increase and decrease of histogram sets of Q chroma interval regions by averaging Qq
By said difference of dispersion RqMean value of frequency deviation
Figure BDA0003492831690000114
And comprehensive increase and decrease consistency QqCalculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval, wherein the expression is as follows:
Figure BDA0003492831690000115
wherein, XqThe chroma histogram area of standard rust pictures representing different rust grades corresponds to the q-th colorSimilarity between degree intervals, QqRepresents the integrated increase/decrease consistency, R, corresponding to the qth chromaticity intervalqRepresents the dispersion difference corresponding to the qth chromaticity interval,
Figure BDA0003492831690000121
and the average value of the frequency deviation corresponding to the qth chroma interval is represented.
Calculating the uniqueness of each corresponding chromaticity interval according to the similarity:
calculating the expression of the uniqueness T of each chromaticity interval as follows:
Figure BDA0003492831690000122
wherein, TqDenotes the uniqueness of the qth chromaticity interval, XqAnd representing the similarity of the chrominance histogram areas of the standard rust pictures with different rust grades in the corresponding q-th chrominance interval.
And carrying out normalization processing on the calculated uniqueness value.
2042. Carrying out color level division on the chromaticity intervals according to the uniqueness of each chromaticity interval to obtain a plurality of color levels, and calculating the weight corresponding to each color level according to the uniqueness of each chromaticity interval;
the method for dividing the chrominance intervals into color levels according to the uniqueness of each chrominance interval comprises the following steps:
the uniqueness of T<α1The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha1<T<α2The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha2<T<α3The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha3<T<α4The continuous chromaticity interval is divided into a color level;
the single piece of the Chinese characterCharacteristic alpha4<T<α5Is divided into a color hierarchy.
Wherein alpha is1、α2、α3、α4、α5Is [ alpha ]15]Threshold interval of (2), in this embodiment α1Is 0.5, alpha2Is 0.7, alpha3Is 0.85, alpha4Is 0.95, alpha5Is 1.
Calculating the weight corresponding to each color level according to the uniqueness of each chromaticity interval:
the expression for calculating the weight for each color level is:
Figure BDA0003492831690000123
where ρ isrA weight representing the r-th color level,
Figure BDA0003492831690000131
the uniqueness of the qth chromaticity interval in the mth color layer is shown, and e the number of chromaticity intervals in the mth color layer is shown.
The larger the value, the larger the difference of the color histogram distribution, i.e. the stronger the difference between the rust levels can be represented, and thus the heavier the weight.
2043. Acquiring the area proportion of each color level in the rusted door and window picture and the area proportion of each color level in each standard rusted picture with different rusty grades;
205. respectively calculating the area proportion of each color level of the rusted door and window picture and the area proportion of each color level of the standard rusted picture with different rusty grades to be close to each other by utilizing the weight;
after the color levels are divided, the corresponding color areas of the standard pictures of the rust levels are divided by using the chromaticity intervals of the levels, the number of pixels of each color level is counted to obtain the color area vector of each color level in the pictures of the rust levels, and the color area vectors are normalized to obtain the area ratio. .
And similarly, dividing to obtain the area proportion of each color level in the picture of the rusted door and window area.
And respectively calculating the area proportion of each color level of the rusted door and window picture and the area proportion of each color level of the standard rusted picture of different rusty grades to be close to a value by utilizing the weight:
the expression for calculating the proximity value is:
Figure BDA0003492831690000132
wherein the content of the first and second substances,
Figure BDA0003492831690000133
showing the area ratio of each color level of the rusted door and window picture and the
Figure BDA0003492831690000134
The area ratio of each color level of the standard rust picture of each rust grade is approximate to a value, WrRepresents the area proportion occupied by the r-th color level in the rusty door and window picture,
Figure BDA0003492831690000135
indicating the r-th color level at
Figure BDA0003492831690000136
Area ratio, rho, occupied in standard rust pictures of individual rust gradesrIs the weight of the r-th color level.
This embodiment takes A, B, C, D four-level decoration pictures as an example, that is
Figure BDA0003492831690000137
Is 4.
206. And taking the rust grade of the standard rust picture corresponding to the obtained highest approach value as the rust degree of the rusted door and window.
In this embodiment, when the approaching value of the rusted door and window picture and the a-level rusted picture is the maximum, the rusted level of the rusted door and window picture is a.
According to the technical means provided by the invention, the characteristic colors capable of representing the corrosion degree are independently divided through color classification, higher weight is given, and the corrosion grade division can be more accurately realized.
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 fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. A door and window corrosion degree judging method based on self-adaptive color grading is characterized by comprising the following steps:
collecting rusted door and window pictures and performing semantic segmentation to obtain rusted area pictures;
obtaining standard corrosion pictures with different corrosion grades, converting the standard corrosion pictures into HSV color space, and obtaining chromaticity histograms of the standard corrosion pictures with different corrosion grades;
uniformly dividing the chromaticity value into a plurality of chromaticity intervals, and acquiring a chromaticity histogram area of each chromaticity interval in standard rust pictures with different rust grades;
calculating the similarity of the chromaticity histogram areas of all standard rust pictures with different rust grades in each corresponding chromaticity interval, and calculating the uniqueness of each corresponding chromaticity interval according to the similarity;
carrying out color hierarchy division on the chrominance intervals according to the uniqueness of each chrominance interval to obtain a plurality of color hierarchies, and calculating the weight corresponding to each color hierarchy according to the uniqueness of each chrominance interval;
acquiring the area proportion of each color level in the rusted door and window picture and the area proportion of each color level in each standard rusted picture with different rusty grades;
respectively calculating the area proportion of each color level of the rusted door and window picture and the area proportion of each color level of the standard rusted picture with different rusty grades to be close to each other by utilizing the weight;
and taking the rust grade of the standard rust picture corresponding to the obtained highest approach value as the rust degree of the rusted door and window.
2. The door and window corrosion degree judging method based on the self-adaptive color grading according to claim 1, wherein the method for calculating the similarity of the chromaticity histogram regions of the standard corrosion pictures with different corrosion grades in each corresponding chromaticity interval is as follows:
calculating the dispersion difference R of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity intervalq
Calculating the mean value of the frequency deviation of the chromaticity histogram area of the standard rust picture with different rust grades in each corresponding chromaticity interval
Figure FDA0003492831680000011
Calculating the comprehensive increase and decrease consistency Q of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity intervalq
By said difference of dispersion RqMean value of frequency deviation
Figure FDA0003492831680000012
And comprehensive increase and decrease consistency QqCalculating the similarity of the chromaticity histogram areas of the standard rust pictures with different rust grades in each corresponding chromaticity interval, wherein the expression is as follows:
Figure FDA0003492831680000021
wherein XqThe chrominance histogram area of standard rust pictures representing different rust grades is in the corresponding q-th chrominance intervalDegree of similarity, QqRepresents the integrated increase/decrease consistency, R, corresponding to the qth chromaticity intervalqRepresents the dispersion difference corresponding to the qth chromaticity interval,
Figure FDA0003492831680000022
and the average value of the frequency deviation corresponding to the qth chroma interval is represented.
3. The door and window rusting degree judgment method based on adaptive color grading according to claim 2, wherein the uniqueness corresponding to each chromaticity interval is calculated according to the similarity:
calculating the expression of the uniqueness T of each chromaticity interval as follows:
Figure FDA0003492831680000023
wherein, TqDenotes the uniqueness of the qth chromaticity interval, XqAnd representing the similarity of the chrominance histogram areas of the standard rust pictures with different rust grades in the corresponding q-th chrominance interval.
4. The method for determining the rusting degree of a door and window based on the adaptive color grading according to claim 3, wherein the method for dividing the chromaticity intervals in the color grading mode according to the uniqueness of each chromaticity interval comprises the following steps:
the uniqueness of T<α1The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha1<T<α2The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha2<T<α3The continuous chromaticity interval is divided into a color level;
the uniqueness of alpha3<T<α4The continuous chromaticity interval is divided into a color level;
will be describedThe uniqueness of alpha4<T<α5The continuous chromaticity interval is divided into a color level;
wherein alpha is1、α2、α3、α4、α5Is [ alpha ]15]The threshold interval of (2).
5. The method for determining the rusting degree of a door and window based on adaptive color grading according to claim 3, wherein the weight corresponding to each color grade is calculated according to the uniqueness of each chromaticity interval:
the expression for calculating the weight for each color level is:
Figure FDA0003492831680000024
where ρ isrWeight, T, representing the r-th color levelrqThe uniqueness of the qth chromaticity interval in the mth color layer is shown, and e the number of chromaticity intervals in the mth color layer is shown.
6. The method for determining the door and window corrosion degree based on the adaptive color grading according to claim 5, wherein the weights are used for respectively calculating the approximate values of the area ratio of each color level of the corroded door and window picture and the area ratio of each color level of the standard corrosion picture with different corrosion grades:
the expression for calculating the proximity value is:
Figure FDA0003492831680000031
wherein the content of the first and second substances,
Figure FDA0003492831680000032
showing the area ratio of each color level of the rusted door and window picture and the
Figure FDA0003492831680000033
The area ratio of each color level of the standard rust picture of each rust grade is approximate to a value, WrRepresenting the area proportion occupied by the r-th color level in the rusty door and window picture,
Figure FDA0003492831680000034
indicating the r-th color level at
Figure FDA0003492831680000035
Area ratio, rho, occupied in standard rust pictures of individual rust gradesrIs the weight of the r-th color level.
7. The door and window rusting degree judging method based on the adaptive color grading according to claim 1, wherein the chromatic value is uniformly divided into a plurality of chromatic intervals, and each chromatic interval is obtained in a chromatic histogram area of a standard rusting picture with different rusting grades:
uniformly dividing the chromatic value into q chromatic intervals, counting the areas occupied by the chromatic histogram of the standard rust picture with different rust grades in each chromatic interval, and obtaining each chromatic interval containing
Figure FDA0003492831680000036
And (4) corresponding chromaticity histograms of standard rust pictures of various grades.
CN202210102914.3A 2022-01-27 2022-01-27 Door and window corrosion degree determination method based on self-adaptive color grading Active CN114494205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210102914.3A CN114494205B (en) 2022-01-27 2022-01-27 Door and window corrosion degree determination method based on self-adaptive color grading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210102914.3A CN114494205B (en) 2022-01-27 2022-01-27 Door and window corrosion degree determination method based on self-adaptive color grading

Publications (2)

Publication Number Publication Date
CN114494205A true CN114494205A (en) 2022-05-13
CN114494205B CN114494205B (en) 2023-04-18

Family

ID=81476395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210102914.3A Active CN114494205B (en) 2022-01-27 2022-01-27 Door and window corrosion degree determination method based on self-adaptive color grading

Country Status (1)

Country Link
CN (1) CN114494205B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107185854A (en) * 2017-05-17 2017-09-22 河北工业大学 The algorithm of photovoltaic cell acetes chinensis and color classification based on RGB channel
CN108416771A (en) * 2018-03-07 2018-08-17 南京工业大学 A kind of metal material corrosion area detection method based on monocular camera
CN108563991A (en) * 2018-03-08 2018-09-21 佛山市云米电器科技有限公司 Kitchen fume concentration division methods and oil smoke concentration detection and interference elimination method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107185854A (en) * 2017-05-17 2017-09-22 河北工业大学 The algorithm of photovoltaic cell acetes chinensis and color classification based on RGB channel
CN108416771A (en) * 2018-03-07 2018-08-17 南京工业大学 A kind of metal material corrosion area detection method based on monocular camera
CN108563991A (en) * 2018-03-08 2018-09-21 佛山市云米电器科技有限公司 Kitchen fume concentration division methods and oil smoke concentration detection and interference elimination method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
强振平等: "局部累积直方图在彩色图像检索中的应用", 《计算机与数字工程》 *
李正君等: "基于优化颜色直方图的图像检索方法", 《微计算机信息》 *
纪钢等: "在HSV下的材料腐蚀特征区域颜色与边界量化处理", 《重庆理工大学学报(自然科学)》 *
纪钢等: "基于腐蚀产物颜色分析的材料腐蚀程度评定方法", 《重庆理工大学学报(自然科学)》 *

Also Published As

Publication number Publication date
CN114494205B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
Guo et al. Hierarchical method for foreground detection using codebook model
WO2022099598A1 (en) Video dynamic target detection method based on relative statistical features of image pixels
CN106096610B (en) A kind of file and picture binary coding method based on support vector machines
CN115082683A (en) Injection molding defect detection method based on image processing
CN107729812B (en) Method suitable for recognizing vehicle color in monitoring scene
CN115222743A (en) Furniture surface paint spraying defect detection method based on vision
CN110210477A (en) A kind of digital instrument Recognition of Reading method
CN111967511B (en) Foundation cloud picture classification method based on heterogeneous feature fusion network
CN115331119B (en) Solid waste identification method
CN108829711B (en) Image retrieval method based on multi-feature fusion
Fung et al. A review of evaluation of optimal binarization technique for character segmentation in historical manuscripts
CN113537099A (en) Dynamic detection method for fire smoke in highway tunnel
CN116503394B (en) Printed product surface roughness detection method based on image
CN109858570A (en) Image classification method and system, computer equipment and medium
CN109190455B (en) Black smoke vehicle identification method based on Gaussian mixture and autoregressive moving average model
CN115205289B (en) Vision-based cork wood floor raw material grading method
CN106570885A (en) Background modeling method based on brightness and texture fusion threshold value
CN115100174A (en) Ship sheet metal part paint surface defect detection method
CN115131375A (en) Automatic ore cutting method
CN116246174B (en) Sweet potato variety identification method based on image processing
CN114494205B (en) Door and window corrosion degree determination method based on self-adaptive color grading
Jassim Hybrid image segmentation using discerner cluster in FCM and histogram thresholding
Fahrurozi et al. Wood classification based on edge detections and texture features selection
CN112784880B (en) Method for marking visibility grade of expressway in foggy days based on natural feature statistical method
CN115393748A (en) Method for detecting infringement trademark based on Logo recognition

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