A visual recognition method for construction waste materials based on feature coding fusion

Through the visual recognition method based on feature coding fusion, the problem of traditional construction waste recycling relying on manual sorting is solved, and the rapid classification and accurate identification of construction waste materials are achieved, and the classification efficiency and accuracy are improved.

CN114580569BActive Publication Date: 2025-04-15XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210332462.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-04-15
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

Traditional construction waste recycling methods rely on manual sorting, which has problems such as harsh working environment, high labor intensity, low efficiency and high cost, and cannot meet the requirements of digital recycling and recycling of construction waste.

Method used

The visual recognition method of construction waste materials based on feature encoding fusion is adopted. Through image blocking, local spatial features are extracted, BoVW model is used for encoding, and fusion discriminant features are constructed as input to the classifier to realize the rapid classification of construction waste materials.

Benefits of technology

It has achieved accurate identification of various types of construction waste, achieved an identification accuracy of 97.92%, improved the efficiency of construction waste classification and reduced costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580569B_ABST
    Figure CN114580569B_ABST
Patent Text Reader

Abstract

The present invention discloses a visual recognition method for construction waste materials based on feature coding fusion, comprising the following steps: using a camera to collect construction waste images and preprocessing the collected data; performing non-overlapping block division on a preprocessed construction waste image; using a BoVW model based on local similarity constraints to encode the color features of the image to obtain the color bag-of-words features of the image; using a BoVW model based on local similarity constraints to encode the LBP features of the image respectively to obtain the LBP bag-of-words features of the image; fusing the features; repeating the above steps to extract the discriminant features of each image in the training set, and training a classifier using the discriminant feature set; inputting a test image, repeating the above steps, extracting the discriminant features of the image to test the classifier obtained in step five, and outputting the classification result. The present invention constructs a construction waste classification model using fused discriminant features as the input of the classifier to achieve rapid classification of construction waste materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent sorting of construction waste materials, and specifically relates to a visual recognition method for construction waste materials based on feature coding fusion. Background Art

[0002] Most construction waste has great potential for recycling. For example, large pieces of waste such as concrete and bricks can be recycled as aggregates or processed into secondary building materials. The traditional recycling method is mainly based on manual sorting of materials. This method has the main problems of poor working environment, high labor intensity, low work efficiency and high cost. In order to improve the efficiency of waste sorting, some companies have adopted color sorting, crushing and screening, magnetic separation, etc. Although these methods can alleviate the defects of manual sorting to a certain extent, they still cannot meet the requirements of digital recycling and reuse of contemporary construction waste. Therefore, designing an efficient and reasonable intelligent fine identification method for construction waste is crucial to improving its classification and recycling efficiency. Summary of the invention

[0003] In order to overcome the above technical problems, the purpose of the present invention is to provide a visual recognition method for construction waste materials based on feature coding fusion. The construction waste image is divided into blocks and local spatial features are extracted. The spatial features are encoded using a BoVW model based on local similarity constraints. Based on the idea of ​​information fusion, a fused discriminant feature is constructed as the input of the classifier to train a construction waste classification model, thereby realizing rapid classification of construction waste materials.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] A visual recognition method for construction waste materials based on feature coding fusion, comprising the following steps;

[0006] Step 1: Use a camera to collect construction waste images and pre-process the images;

[0007] Step 2: Preprocess a construction waste image Perform non-overlapping blocks;

[0008] Step 3: After the image is divided into blocks, the color features of the sub-blocks are first extracted, and then the color features are encoded using the BoVW model based on local similarity constraints to obtain the color bag-of-words features of the image.

[0009] Step 4: After the image is divided into blocks, the LBP features of the sub-blocks are first extracted, and then the LBP features are encoded using the BoVW model based on local similarity constraints to obtain the LBP bag-of-words features of the image.

[0010] Step 5: Fusion of color bag-of-words features and LBP bag-of-words features

[0011] Step 6: Build a classifier, repeat steps 1 to 5, extract the discriminant features of each image in the training set, and use the discriminant feature set Train the classifier;

[0012] Step 7: Test the classifier, input a test image, repeat steps 1 to 5, and extract the discriminant features of the image Test the classifier obtained in step 5 and output the classification results.

[0013] In the step 1, the image preprocessing is color space conversion and grayscale processing. Construction waste has different appearance characteristics such as color, shape, texture, etc. The visual system realizes classification based on these differences. It is observed that the color and texture characteristics of construction waste are more significant. The target is described by color component characteristics and LBP characteristics respectively. The image of RGB color model is converted to HSV color model;

[0014] The basic principle of grayscale processing is that after the color image is processed, it only contains brightness information but no color information. The weighted average method is used for grayscale processing, and the formula is:

[0015] gray=0.2989·R+0.5780·G+0.1140·B (1)

[0016] Where R, G, and B are the R component, G component, and B component of the RGB color model, respectively.

[0017] In the step 2, the pre-treated Non-overlapping blocks M is the number of sub-blocks, and the size of each sub-block is w×w.

[0018] In the step 3, the color features of the image are encoded using the BoVW model based on local similarity constraints to obtain the color bag of words features of the image. Hue contains the color information of the image and is a significant feature for distinguishing materials of different colors. The H component in the HSV model is used as the target feature, and the distribution characteristics of the H component are extracted as color features using the histogram statistical method. The BoVW model is a product that introduces the bag-of-words model in the field of information retrieval into the field of computer vision. It has the characteristics of not being limited to the number of underlying features and the feature resolution ability that does not depend on the specific feature type. According to steps one and two, the color features of the image are encoded using the BoVW model. Considering the local similarity of spatial features, a BoVW model based on local constraints is constructed. In feature encoding, the frequency histograms of the nearest N visual words are used to express the image, that is, for any visual word, by calculating the Euclidean distance between it and the visual word, the N visual words with the smallest distance are found to replace the current visual word, and finally the frequency is counted, and the image content is expressed as a visual word frequency histogram;

[0019] The specific method is:

[0020] Step 3.1: After processing the images in the training set according to the methods of steps 1 and 2, the chromaticity map H, saturation map S and brightness map V of the HSV model are obtained. For each sub-block b m Use the weighted average method to extract image color features. The weighted average formula is:

[0021] color=1·H+0·S+0·V (2)

[0022] In the formula, H, S, and V are the H component, S component, and V component of the HSV color model, respectively. That is, the histogram of the H component is extracted as the color feature vector to characterize the color characteristics of the image, and a 256-dimensional feature vector is obtained after normalization. For images The color feature vector of the mth sub-block in an image is composed of the color feature vectors of all sub-blocks in an image, which can be expressed as

[0023] Step 3.2: Construct a color visual word bag. The specific method is:

[0024] Step 3.2.1: Construction waste image training set The color features of each image of the i-th (i=1,2,3,4,5) class of materials are extracted according to the method in step 3.1 to form the color feature set of the i-th class of material images. Where T i is the total number of images of the i-th category of materials;

[0025] Step 3.2.2: Use K-means clustering algorithm to cluster the color feature set of the i-th material image Clustering is performed to obtain cluster centers, and regard these cluster centers as visual words to form a Bag of Color Visual Words

[0026] Step 3.2.3: Repeat steps 3.2.1 and 3.2.2 to build and combine the color visual word bags of the five types of material images to form the color visual word bags used for training and testing. Where K col is the number of visual words, and its size is

[0027] Step 3.3: Perform statistical encoding of image features based on the color feature word bag. The specific method is as follows:

[0028] Step 3.3.1: Given an image of construction waste Extract and count image color features according to the method in step 3.1

[0029] Step 3.3.2: For image color features Each feature vector in (i.e. visual vocabulary), find the distance according to formula (3) Minimum N visual words.

[0030]

[0031] in is the replacement feature vector The nth visual word of ;

[0032] Step 3.3.3: Repeat step 3.3.2 to count the frequencies of all visual words used to replace the visual vocabulary of the image sub-block, and obtain the LBP visual word frequency distribution histogram representing the image, and use K col dimensional feature vector Indicates that The color visual word bag feature for this image.

[0033] In the fourth step, the LBP features of the image are encoded using the BoVW model based on local similarity constraints to obtain the LBP bag-of-words features of the image. According to step 1 and step 2, the LBP features of the image are encoded using the BoVW model based on local constraints in step 3. The specific method is as follows:

[0034] Step 4.1: After processing the training set images according to the methods of steps 1 and 2, a grayscale image is obtained. For each sub-block b mExtract LBP features. The extraction of LBP features is to calculate and count the LBP value of each pixel in a 3×3 neighborhood. The histogram of LBP values ​​is the LBP feature of the image. The calculation formula of LBP value is as follows:

[0035]

[0036] Among them, p is the number of neighborhood pixels, g c is the gray value of the center pixel (i.e., threshold), g i is the gray value of the neighboring pixels in the neighborhood, s(·) is the sign function, which can be expressed as:

[0037]

[0038] According to the above operation, the LBP value of each pixel of the image is calculated respectively. The vector obtained by counting all LBP values ​​as a histogram and normalizing them is the LBP feature of the image. Considering the high dimension of the original LBP feature, this paper adopts the uniform mode LBP operator. The LBP feature of an image can be expressed as in For images The LBP feature vector of the mth sub-block in;

[0039] Step 4.2: Construct texture visual word bag. The specific method is as follows: Same as step 3.2, first extract the LBP feature set of the i-th material in the training set image Then, the K-means clustering algorithm is used to cluster the LBP feature set of the i-th material image. Clustering is performed to establish the color visual word bag of the i-th material image, and finally the color visual word bags of the five types of material images are combined to form the LBP visual word bag used for training and testing. Number of sight words

[0040] Step 4.3: Based on the texture feature word bag, the image is statistically encoded. The specific method is the same as step 3.3. Given an image, find the distance according to formula (6) Minimum N visual words;

[0041]

[0042] in is the replacement feature vector The nth visual word of the image sub-block is counted, and all the visual words used to replace the visual vocabulary of the image sub-block are obtained to obtain the K LBP Dimensional texture visual word frequency distribution histogram vector Right now The texture visual word bag feature for this image.

[0043] In step 5, the color bag of words feature and LBP bag-of-words features The specific method for fusion processing is as follows:

[0044] Combined with the image characteristics, considering that both the color bag of words feature and the LBP bag of words feature have limitations in the discriminative description of construction waste targets, the color visual bag of words feature obtained in step 3 and step 4 is used to describe the construction waste target. and texture visual word bag features To fuse, that is, to connect and Composition of fusion encoding features To fully describe the image content, as shown in formula (6):

[0045]

[0046] In step 6, the discriminant features of each image in the construction waste training set are extracted, and the discriminant feature set expected by the training set is used. Train the classifier, repeat steps 1 to 5, extract the training set {B t The discriminant features of each image in And form the discriminant feature set Used to train the classifier, T is the number of images in the training set. Considering the small sample characteristics of construction waste targets, the support vector machine (SVM) is introduced as a classifier to identify the target.

[0047] In step 7, the classifier is tested. Input a test image, repeat steps 1 to 5, and extract the discriminant features of the test image. Used to test the construction waste classification model obtained in step six and output the classification results.

[0048] Beneficial effects of the present invention:

[0049] The present invention uses five types of construction waste material image databases to successfully achieve accurate recognition of multiple types of construction waste. Under appropriate parameter selection, the present invention achieved a recognition accuracy rate of 97.92%. Compared with other algorithms for the recognition effect of construction waste images, the present invention has good recognition performance.

[0050] The present invention is applicable to the classification of construction waste, improves the efficiency of existing construction waste classification methods, and saves costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a diagram showing an example of a construction waste image dataset.

[0052] Figure 2 It is a flow chart of the present invention.

[0053] Figure 3 Schematic diagram of the image process for the BoVW model.

[0054] Figure 4 Schematic diagram of the LBP value calculation process.

[0055] Figure 5 Schematic diagram of the impact of different numbers of cluster centers K in this application.

[0056] Figure 6 Schematic diagram of the impact of different numbers of clustering centers K on the color and LBP bag-of-words model on the second set of data sets.

[0057] Figure 7 Schematic diagram of the influence of different N values ​​(K=400) during feature encoding. DETAILED DESCRIPTION

[0058] The present invention will be further described in detail below in conjunction with the accompanying drawings.

[0059] Combination Figure 1 , Figure 2 , specifically including the following steps:

[0060] Step 1: Collect sample sets using a camera.

[0061] In the step 1, the present invention selects 5 common types of construction waste for classification and uses a camera to collect target images. The images used in the experiment are all the largest circumscribed rectangular parts of the construction waste targets; all training screenshots of the images of the color and LBP visual dictionary are obtained; the number of training images is 100 for each type of target images, for a total of 500; the number of test images is 25 for each type of target images, for a total of 125. Figure 1 This is an example of a construction waste image dataset.

[0062] Step 2: Preprocess the collected data.

[0063] In step 2, the image preprocessing is color space conversion and grayscale processing. There are many types of construction waste, such as concrete, hard plastic and bricks. Construction waste has different appearance characteristics such as color, shape, texture, etc. The visual system can classify them according to these differences. It has been observed that the color and texture characteristics of construction waste are more significant, so this paper describes the target with color component features and LBP features respectively.

[0064] At present, most images are stored in the RGB model, but the RGB color model cannot reflect human visual perception very well. As a visual color model that can measure human psychological perception, the colors in the HSV model space are independent of each other, which can more accurately describe the color category and other features of objects. It is widely used to calculate the color information in images. Therefore, this paper converts the image of the RGB color model into the HSV color model.

[0065] The basic principle of grayscale processing is that after color image processing, it only contains brightness information but no color information. The weighted average method is used for grayscale conversion, and the formula is:

[0066] gray=0.2989·R+0.5780·G+0.1140·B (1)

[0067] Where R, G, and B are the R component, G component, and B component of the RGB color model, respectively.

[0068] Step 3: Take an image of construction waste Perform non-overlapping block processing.

[0069] In step 3, after analyzing a large number of construction waste images, it was found that the color and LBP features of the construction waste in an image were unevenly distributed. For example, in the brick image, some parts of the target are darker in color and some are lighter in color; in the foam image, some parts of the target have relatively more texture information and some are less. Color features are based on pixel features, and when expressed using color histograms, they cannot describe the local color of the image. In addition, this paper encountered different feature dimensions when extracting LBP features. To solve these problems, this paper preprocessed the Non-overlapping blocks M is the number of sub-blocks, and the size of each sub-block is w×w.

[0070] Step 4: Encode the color features of the image using the BoVW model based on local similarity constraints to obtain the color bag of words features of the image

[0071] In step 4, hue contains the color information of the image, which is a significant feature for distinguishing materials of different colors. Therefore, this paper takes the H component in the HSV model as the target feature and uses the histogram statistical method to extract the distribution characteristics of the H component as the color feature. The BoVW model is a product of introducing the bag-of-words model in the field of information retrieval into the field of computer vision. It has the characteristics of not being limited to the number of underlying features and the feature resolution ability that does not depend on the specific feature type. According to steps 2 and 3, this paper uses the BoVW model to encode the color features of the image. The BoVW model describes the image process as follows: Figure 3As shown. When encoding features, the nearest neighbor principle is usually used to count the frequency of occurrence of target image features in a set of visual words, ignoring the local similarity of spatial features. Therefore, this paper introduces the basic idea of ​​locality-constrained linear coding [] (Locality-constrained Linear Coding, LLC) to construct a BoVW model based on local constraints. In feature encoding, this paper uses the frequency histogram of the nearest N visual words to express the image, that is, for any visual word, by calculating the Euclidean distance between it and the visual word, find the N visual words with the smallest distance to replace the current visual word, and finally count the frequency and express the image content with the visual word frequency histogram. The specific method is:

[0072] Step 4.1: After processing the images in the training set according to the methods of steps 2 and 3, the chromaticity map H, saturation map S and brightness map V of the HSV model are obtained. For each sub-block b m Use the weighted average method to extract image color features. The weighted average formula is:

[0073] color=1·H+0·S+0·V (2)

[0074] In the formula, H, S, and V are the H component, S component, and V component of the HSV color model, respectively. That is, the histogram of the H component is extracted as the color feature vector to characterize the color characteristics of the image, and a 256-dimensional feature vector is obtained after normalization. For images The color feature vector of the mth sub-block in an image is composed of the color feature vectors of all sub-blocks in an image, which can be expressed as

[0075] Step 4.2: Construct a color visual word bag. The specific method is:

[0076] Step 4.2.1: Construction waste image training set The color features of each image of the i-th (i=1,2,3,4,5) class of materials are extracted according to the method in step 4.1 to form the color feature set of the i-th class of material images. Where T i is the total number of images of the i-th category of materials.

[0077] Step 4.2.2: Use K-means clustering algorithm to cluster the color feature set of the i-th material image Clustering is performed to obtain cluster centers, and regard these cluster centers as visual words to form a Bag of Color Visual Words

[0078] Step 4.2.3: Repeat steps 4.2.1 and 4.2.2 to build and combine the color visual word bags of the five types of material images to form the color visual word bags used for training and testing. Where K col is the number of visual words, and its size is

[0079] Step 4.3: Perform statistical encoding of image features based on the color feature word bag. The specific method is as follows:

[0080] Step 4.3.1: Given an image of construction waste Extract and count image color features according to the method in step 3.1

[0081] Step 4.3.2: For image color features Each feature vector in (i.e. visual vocabulary), find the distance according to formula (3) Minimum N visual words.

[0082]

[0083] in is the replacement feature vector The nth visual word of .

[0084] Step 4.3.3: Repeat step 3.3.2 to count the frequencies of all visual words used to replace the visual vocabulary of the image sub-block, and obtain the LBP visual word frequency distribution histogram representing the image, and use K col dimensional feature vector Indicates that The color visual word bag feature for this image.

[0085] Step 5: Use the BoVW model based on local similarity constraints to encode the LBP features of the image and obtain the LBP bag-of-words features of the image.

[0086] In the step five, texture is a common characteristic of the surface of an object. It shows the structural information of the surface of the object. Different materials show different characteristics and are not affected by color changes. For example, the texture characteristics of hard plastic and foam, both of which are white, are very different. The former has a smooth surface, while the latter has a closed-cell honeycomb structure. Texture features describe the law of the spatial distribution of grayscale in the neighborhood of image pixels, and can intuitively describe the characteristics of the object. Currently, commonly used texture features include Local Binary Patterns (LBP), Histogram of Oriented Gradient (HOG), etc. Among them, the LBP algorithm has the advantages of low computational complexity, rotation invariance and grayscale invariance. This paper uses the LBP algorithm to extract the texture features of construction waste images. According to steps two and three, this paper uses the BoVW model to encode the color features of the image. The specific method is:

[0087] Step 5.1: After processing the training set images according to the methods of steps 2 and 3, a grayscale image is obtained. For each sub-block b m Extract LBP features. The extraction of LBP features is to calculate and count the LBP value of each pixel in a 3×3 neighborhood, and use the histogram of the LBP value as the LBP feature of the image. The LBP value is calculated as follows: Figure 4 As shown. The LBP value formula is as follows:

[0088]

[0089] Among them, p is the number of neighborhood pixels, g c is the gray value of the center pixel (i.e., threshold), g i is the gray value of the neighboring pixels in the neighborhood, s(·) is the sign function, which can be expressed as:

[0090]

[0091] According to the above operation, the LBP value of each pixel in the image is calculated respectively. All LBP values ​​are counted as histograms and normalized to obtain the vector as the LBP feature of the image. Considering the high dimension of the original LBP feature, this paper adopts the uniform mode LBP operator. Then the LBP feature of an image can be expressed as in For images The LBP feature vector of the mth sub-block in .

[0092] Step 5.2: Construct texture visual word bag. The specific method is as follows: Same as step 4.2, first extract the LBP feature set of the i-th material in the training set image Then, the K-means clustering algorithm is used to cluster the LBP feature set of the i-th material image. Clustering is performed to establish the color visual word bag of the i-th material image, and finally the color visual word bags of the five types of material images are combined to form the LBP visual word bag used for training and testing. Number of sight words

[0093] Step 5.3: Based on the texture feature word bag, the image is statistically encoded. The specific method is the same as step 4.3. Given an image, find the distance according to formula (6) Minimum N visual words.

[0094]

[0095] in is the replacement feature vector Count all the visual words used to replace the visual vocabulary of the image sub-block and get the K representing the image LBP Dimensional texture visual word frequency distribution histogram vector Right now The texture visual word bag feature for this image.

[0096] Step 6: Feature fusion.

[0097] In step 6, the color bag of words feature and LBP bag-of-words features The specific method for fusion processing is as follows:

[0098] Combined with the image characteristics, this paper uses the color visual word bag features obtained in steps 4 and 5 and texture visual word bag features To fuse, that is, to connect and Composition of fusion encoding features To fully describe the image content, as shown in formula (6):

[0099]

[0100] Step 7: Train the classifier.

[0101] In step 7, the discriminant features of each image in the construction waste training set are extracted, and the discriminant feature set expected by the training set is used. Train the classifier. Repeat steps 2 to 6 to extract the training set {B t The discriminant features of each image in And form the discriminant feature set Used to train the classifier, T is the number of images in the training set. Considering the small sample characteristics of construction waste targets, the support vector machine (SVM) is introduced as a classifier to identify the target.

[0102] Step 8: Test the classifier.

[0103] In step 8, the classifier is tested. A test image is input, and steps 1 to 5 are repeated to extract the discriminant features of the test image. Used to test the construction waste classification model obtained in step six and output the classification results.

[0104] In order to determine the effectiveness of the visual recognition method for construction waste materials based on feature coding fusion, we first analyzed the number of cluster centers K and the N value in the coding process, and then conducted a comparative experiment with other algorithms for identifying construction waste. Figure 5 , 6, 7 and Table 1. Figure 5 (a) It can be seen that when K = 400, the average recognition accuracy of the proposed algorithm reaches the highest, which is 97.44%. The highest recognition accuracy on the five data sets is 98.4% and the lowest is 96.8%. Figure 5 (b) It can be seen that as the number of cluster centers K increases, the running time of a single image in the test set gradually increases. After multiple experiments, it was found that when the number of visual words is 400, the recognition effect of the present invention is stable. Figure 6 (a) It can be seen that within a certain range, as K increases, the recognition accuracy of the color and LBP bag-of-words model increases, and the visual word bag describes the image better; but when K reaches a certain value, the accuracy decreases. Figure 6 (b) It can be seen that the larger the K value is, the longer it takes to recognize an image. Figure 7 It can be seen that when K = 400 is selected, as the N value increases in the feature encoding process, the average recognition accuracy of the algorithm in this paper shows an upward-downward trend. When N = 3, the average recognition accuracy reaches a maximum of 97.92%, which is 0.48% higher than the average accuracy when N = 1. Therefore, selecting a suitable N value can improve the recognition accuracy of the algorithm in this paper.

[0105] Table 1 shows the performance analysis experimental results of the present invention. It can be seen from the data that the above methods can all realize the identification of construction waste, but the accuracy of the method of the present invention in identifying construction waste is better than other methods, showing the effectiveness of the method of the present invention in identifying construction waste.

[0106] Table 1 Comparison of recognition accuracy and running time of various features

[0107]

[0108]

Claims

1. A visual recognition method for construction waste materials based on feature coding fusion, characterized in that: The steps include: Step 1: Use a camera to collect construction waste images and pre-process the images; Step 2: Preprocess a construction waste image Perform non-overlapping blocks; Step 3: After the image is divided into blocks, the color features of the sub-blocks are extracted, and then the color features are encoded using the BoVW model based on local similarity constraints to obtain the color bag of words features of the image. The color features of the image are encoded using the BoVW model based on local similarity constraints to obtain the color bag of words features of the image. Hue contains the color information of the image and is a significant feature for distinguishing materials of different colors. The H component in the HSV model is used as the target feature, and the distribution characteristics of the H component are extracted as color features using the histogram statistical method. The BoVW model is a product that introduces the bag-of-words model in the field of information retrieval into the field of computer vision. It has the characteristics of not being limited to the number of underlying features and the feature resolution ability that does not depend on the specific feature type. According to steps one and two, the color features of the image are encoded using the BoVW model. Considering the local similarity of spatial features, a BoVW model based on local constraints is constructed. In feature encoding, the frequency histograms of the nearest N visual words are used to express the image, that is, for any visual word, by calculating the Euclidean distance between it and the visual word, the N visual words with the smallest distance are found to replace the current visual word, and finally the frequency is counted, and the image content is expressed as a visual word frequency histogram; Step 4: After the image is divided into blocks, the LBP features of the sub-blocks are extracted, and then the LBP features are encoded using the BoVW model based on local similarity constraints to obtain the LBP bag-of-words features of the image. Step 5: Fusion of color bag-of-words features and LBP bag-of-words features Step 6: Build a classifier, repeat steps 1 to 5, extract the discriminant features of each image in the training set, and use the discriminant feature set Train the classifier; Step 7: Build a classifier, input a test image, repeat steps 1 to 5, and extract the discriminant features of the image Test the classifier obtained in step 5 and output the classification results; In the step 4, the specific method is: Step 4.1: After processing the training set images according to the methods of steps 1 and 2, a grayscale image is obtained. For each sub-block b m Extract LBP features. The extraction of LBP features is to calculate and count the LBP value of each pixel in a 3×3 neighborhood. The histogram of LBP values ​​is the LBP feature of the image. The calculation formula of LBP value is as follows: Among them, p is the number of neighborhood pixels, g c is the gray value of the center pixel, i.e., the threshold value, g i is the gray value of the neighboring pixels in the neighborhood, s(·) is the sign function, which can be expressed as: According to the above operation, the LBP value of each pixel of the image is calculated respectively. All LBP values ​​are counted as histograms and normalized to obtain the vector as the LBP feature of the image. Considering the high dimension of the original LBP feature, the uniform mode LBP operator is used. The LBP feature of an image can be expressed as in For images The LBP feature vector of the mth sub-block in; Step 4.2: Construct texture visual word bag. The specific method is as follows: Same as step 3.2, first extract the LBP feature set of the i-th material in the training set image Then, the K-means clustering algorithm is used to cluster the LBP feature set of the i-th material image. Clustering is performed to establish the color visual word bag of the i-th material image, and finally the color visual word bags of the five types of material images are combined to form the LBP visual word bag used for training and testing. Number of sight words Step 4.3: Based on the texture feature word bag, the image is statistically encoded. The specific method is the same as step 3.

3. Given an image, find the distance according to formula (6) Minimum N visual words; in is the replacement feature vector The nth visual word of the image sub-block is counted, and all the visual words used to replace the visual vocabulary of the image sub-block are obtained to obtain the K LBP Dimensional texture visual word frequency distribution histogram vector Right now The texture visual word bag feature for this image.

2. According to claim 1, a method for visual recognition of construction waste materials based on feature coding fusion is characterized in that: In the step 1, the image preprocessing is color space conversion and grayscale processing. Construction waste has different appearance characteristics in color, shape, and texture. The visual system realizes classification based on these differences. It is observed that the color and texture characteristics of construction waste are more significant. The target is described by color component characteristics and LBP characteristics respectively, and the image of RGB color model is converted into HSV color model; The basic principle of grayscale processing is that after the color image is processed, it only contains brightness information but no color information. The weighted average method is used for grayscale processing, and the formula is: gray=0.2989·R+0.5780·G+0.1140·B (1) Where R, G, and B are the R component, G component, and B component of the RGB color model, respectively.

3. The method for visual recognition of construction waste materials based on feature coding fusion according to claim 1 is characterized in that: In the step 2, the pre-treated Non-overlapping blocks M is the number of sub-blocks, and the size of each sub-block is w×w.

4. The method for visual recognition of construction waste materials based on feature coding fusion according to claim 1 is characterized in that: In the step three, The specific method is: Step 3.1: After processing the images in the training set according to the methods of steps 1 and 2, the chromaticity map H, saturation map S and brightness map V of the HSV model are obtained. For each sub-block b m The weighted average method is used to extract image color features. The weighted average formula is: color=1·H+0·S+0·V (2) In the formula, H, S, and V are the H component, S component, and V component of the HSV color model, respectively. That is, the histogram of the H component is extracted as the color feature vector to characterize the color characteristics of the image, and a 256-dimensional feature vector is obtained after normalization. For images The color feature vector of the mth sub-block in an image is composed of the color feature vectors of all sub-blocks in an image, which can be expressed as Step 3.2: Construct a color visual word bag. The specific method is: Step 3.2.1: Construction waste image training set The color features of each image of the i-th material are extracted according to the method in step 3.1, where i = 1, 2, 3, 4, 5, forming the color feature set of the i-th material image Where T i is the total number of images of the i-th category of materials; Step 3.2.2: Use K-means clustering algorithm to cluster the color feature set of the i-th material image Clustering is performed to obtain cluster centers, and regard these cluster centers as visual words to form a Bag of Color Visual Words Step 3.2.3: Repeat steps 3.2.1 and 3.2.2 to build and combine the color visual word bags of the five types of material images to form the color visual word bags used for training and testing. Where K col is the number of visual words, and its size is Step 3.3: Perform statistical encoding of image features based on the color feature word bag. The specific method is as follows: Step 3.3.1: Given an image of construction waste Extract and count image color features according to the method in step 3.1 Step 3.3.2: For image color features Each feature vector in That is, visual vocabulary, according to formula (3) to find the distance Minimum N visual words; in is the replacement feature vector The nth visual word of ; Step 3.3.3: Repeat step 3.3.2 to count the frequencies of all visual words used to replace the visual vocabulary of the image sub-block, and obtain the LBP visual word frequency distribution histogram representing the image, and use K col dimensional feature vector Indicates that The color visual word bag feature for this image.

5. The method for visual recognition of construction waste materials based on feature coding fusion according to claim 1 is characterized in that: In step 5, the color bag of words feature and LBP bag-of-words features The specific method for fusion processing is as follows: Combined with the image characteristics, considering that both the color bag of words feature and the LBP bag of words feature have limitations in the discriminative description of construction waste targets, the color visual bag of words feature obtained in step 3 and step 4 is used to describe the construction waste target. and texture visual word bag features To fuse, that is, to connect and Composition of fusion encoding features To fully describe the image content, as shown in formula (6):

6. The method for visual recognition of construction waste materials based on feature coding fusion according to claim 1 is characterized in that: In step 6, the discriminant features of each image in the construction waste training set are extracted, and the discriminant feature set expected by the training set is used. Train the classifier, repeat steps 1 to 5, extract the training set {B t The discriminant features of each image in And form the discriminant feature set Used to train the classifier, T is the number of images in the training set. Considering the small sample characteristics of construction waste targets, the support vector machine (SVM) is introduced as a classifier to identify the target.

7. The method for visual recognition of construction waste materials based on feature coding fusion according to claim 1 is characterized in that: In step 7, the classifier is tested by inputting a test image and repeating steps 1 to 5 to extract the discriminant features of the test image. Used to test the construction waste classification model obtained in step six and output the classification results.

Citation Information

Patent Citations

  • Remote sensing image classification method based on multi-feature fusion

    CN102622607A

  • Vehicle body color identification method based on local restriction linearity coding

    CN105184299A