CN111079797B - Image classification method and device and storage medium - Google Patents

Image classification method and device and storage medium Download PDF

Info

Publication number
CN111079797B
CN111079797B CN201911162361.5A CN201911162361A CN111079797B CN 111079797 B CN111079797 B CN 111079797B CN 201911162361 A CN201911162361 A CN 201911162361A CN 111079797 B CN111079797 B CN 111079797B
Authority
CN
China
Prior art keywords
image
classification
classified
super
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911162361.5A
Other languages
Chinese (zh)
Other versions
CN111079797A (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.)
Beike Technology Co Ltd
Original Assignee
Beike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN201911162361.5A priority Critical patent/CN111079797B/en
Publication of CN111079797A publication Critical patent/CN111079797A/en
Application granted granted Critical
Publication of CN111079797B publication Critical patent/CN111079797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses an image classification method, an image classification device and a storage medium, and particularly relates to a method for acquiring an image to be classified collected in a microwave remote sensing mode, extracting a first image characteristic and a second image characteristic from the image to be classified, respectively inputting the first image characteristic and the second image characteristic into a pre-trained classifier, acquiring a first classification label set output by the classifier according to the first image characteristic and a second classification label set output by the classifier according to the second image characteristic, performing super-pixel block segmentation on the image to be classified, determining the label coincidence degree of the first classification label set and the second classification label set in at least one super-pixel block, when the label coincidence degree in any super-pixel block is smaller than a preset threshold value, selecting at least one first classification label falling into the super-pixel block from the first classification label set, and otherwise, selecting at least one second classification label from the second classification label set. According to the method and the device, the more accurate classification label is selected according to the label contact ratio at each super-pixel block, and the classification accuracy of the image to be classified is improved.

Description

Image classification method and device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for image classification.
Background
Synthetic Aperture Radar (SAR) is a high-resolution imaging Radar that can obtain high-resolution Radar images similar to optical photography under meteorological conditions with extremely low visibility. The relative motion of the radar and the target is utilized to synthesize the radar with larger equivalent antenna aperture by using the image classification method for the real antenna aperture with smaller size, which is also called as the synthetic aperture radar. The synthetic aperture radar has the characteristics of high resolution, all-weather operation and effective identification of camouflage and penetration masks. The resulting high azimuthal resolution is comparable to that provided by a large aperture antenna. Information acquired by synthetic aperture radar has been applied to many aspects such as city planning, coverage classification, disaster prevention, environmental risk assessment, city detection and extraction, and the like.
When the SAR image with high resolution is processed, along with the improvement of the resolution, the texture edge characteristics of the SAR image tend to disappear, strong reflection occupies a dominant position, and a series of problems of high dynamic and multiplicative noise and the like occur. For the above problems, the conventional method for classifying the surface features of the SAR image is generally based on region block classification, and the conventional method generally includes two steps: and (5) extracting features and classifying by a classifier. Common methods for feature extraction include Gabor feature extraction, Gray Level Co-occurrence Matrix (GLCM) Gray Level histogram feature extraction, multi-scale local pattern histogram (MLPH) feature extraction, and the like. The classification method adopting Gabor feature extraction and GLCM gray histogram feature extraction has poor noise control effect, and the classification method adopting MLPH multi-scale local mode histogram feature extraction has poor boundary classification effect. Therefore, the accuracy of the ground object classification in the SAR is low.
Disclosure of Invention
The embodiment of the application provides an image classification method, and the problem of low accuracy in classification of images to be classified collected in a microwave remote sensing mode is solved.
The method comprises the following steps:
acquiring an image to be classified acquired in a microwave remote sensing mode;
extracting first image features and second image features with different feature categories from the image to be classified;
inputting the first image characteristic and the second image characteristic into a pre-trained classifier respectively;
acquiring a first classification label set output by the classifier according to the first image characteristic and a second classification label set output by the classifier according to the second image characteristic;
carrying out super-pixel block segmentation on the image to be classified;
determining a label overlap ratio of the first set of classification labels and the second set of classification labels within at least one of the super-pixel blocks;
when the coincidence degree of the labels in any one super pixel block is smaller than a preset threshold value, selecting at least one first classification label falling into the super pixel block from the first classification label set;
and when the label coincidence degree in any one super pixel block is larger than or equal to the preset threshold value, selecting at least one second classification label falling into the super pixel block from the second classification label set.
Optionally, determining an image boundary of the image to be classified, and performing boundary expansion around the image boundary;
and dividing the image to be classified after the boundary expansion into a plurality of image blocks, wherein partial pixel points between the adjacent image blocks are overlapped.
Optionally, respectively extracting an image texture feature and an image gray feature of at least one pixel point included in the image block, and superposing the image texture feature and the image gray feature vector on the same pixel point to serve as the first image feature of the pixel point;
respectively calculating the local histogram feature of at least one pixel point contained in the image block under the amplitude values of a plurality of different pixel points, and combining the local histogram features to generate a multi-scale local histogram feature as the second image feature of the pixel point.
Optionally, filtering at least one image block in the image to be classified through a first filter, and extracting the image texture features of at least one pixel point from the image block, wherein the image texture features include a mean and a variance of the pixel points included in the image to be classified;
generating a gray level co-occurrence matrix of each image block of the image to be classified, and calculating the image gray level characteristics of the image block according to the gray level co-occurrence matrix, wherein the image gray level characteristics comprise the mean value, entropy, contrast, variance and angular second-order distance of the pixel points contained in the image to be classified.
Optionally, a correlation coefficient of the first classification tag set and the second classification tag set is calculated within the super pixel block, and the correlation coefficient is used as the tag coincidence degree within the super pixel block.
Optionally, the number of each tag type included in the first classification tag set in the super pixel block is counted, and the tag type with the largest number is used as the first classification tag of the super pixel block.
Optionally, the number of each tag type included in the second classification tag set in the super pixel block is counted, and the tag type with the largest number is used as the second classification tag of the super pixel block.
In another embodiment of the present invention, there is provided an apparatus for image classification, including:
the first acquisition module is used for acquiring an image to be classified acquired in a microwave remote sensing mode;
the extraction module is used for extracting a first image feature and a second image feature which have different feature categories from the image to be classified;
the input module is used for respectively inputting the first image characteristics and the second image characteristics into a pre-trained classifier;
the second obtaining module is used for obtaining a first classification label set output by the classifier according to the first image characteristic and a second classification label set output according to the second image characteristic;
the segmentation module is used for carrying out super-pixel block segmentation on the image to be classified;
a first determining module for determining a label overlap ratio of the first and second classification label sets within at least one of the super-pixel blocks;
a first selecting module, configured to select, when the tag coincidence degree in any one of the super pixel blocks is smaller than a preset threshold, at least one first classification tag falling in the super pixel block from the first classification tag set;
and the second selecting module is used for selecting at least one second classification label falling into any one super pixel block from the second classification label set when the label contact ratio in the super pixel block is greater than or equal to the preset threshold value.
Optionally, the apparatus further comprises:
the second determining module is used for determining the image boundary of the image to be classified and performing boundary expansion around the image boundary;
and the dividing module is used for dividing the image to be classified after the boundary expansion into a plurality of image blocks, wherein partial pixel points between the adjacent image blocks are overlapped.
Optionally, the extraction module comprises:
the first extraction unit is used for respectively extracting the image texture feature and the image gray feature of at least one pixel point contained in the image block, and superposing the image texture feature and the image gray feature vector on the same pixel point to be used as the first image feature of the pixel point;
the second extraction unit is used for respectively calculating the local histogram feature of at least one pixel point contained in the image block under the amplitude values of a plurality of different pixel points, and combining the local histogram features to generate a multi-scale local histogram feature as the second image feature of the pixel point.
Optionally, the first extraction unit includes:
the first extraction subunit is configured to filter at least one image block in the image to be classified through a first filter, and extract the image texture feature of at least one pixel point from the image block, where the image texture feature includes a mean and a variance of the pixel point included in the image to be classified;
and the second extraction subunit is configured to generate a gray level co-occurrence matrix of each image block of the image to be classified, and calculate the image gray level features of the image blocks according to the gray level co-occurrence matrix, where the image gray level features include a mean value, an entropy, a contrast, a variance, and an angular second-order distance of the pixel points included in the image to be classified.
Optionally, the first determining module is further configured to:
and calculating a correlation coefficient of the first classification label set and the second classification label set in the super pixel block, and taking the correlation coefficient as the label coincidence degree in the super pixel block.
Optionally, the first selecting module is further configured to:
and counting the number of all the tag types contained in the first classification tag set in the super pixel block, and taking the tag type with the largest number as the first classification tag of the super pixel block.
Optionally, the second selecting module is further configured to:
and counting the number of all the tag types in a second classification tag set in the super pixel block, and taking the tag type with the largest number as the second classification tag of the super pixel block.
In another embodiment of the invention, a non-transitory computer readable storage medium is provided, storing instructions that, when executed by a processor, cause the processor to perform the steps of one of the above-described methods of image classification.
In another embodiment of the present invention, a terminal device is provided, which includes a processor for executing the steps of the image classification method.
Based on the embodiment, firstly, an image to be classified collected in a microwave remote sensing mode is obtained, a first image feature and a second image feature with different feature categories are extracted from the image to be classified, the first image feature and the second image feature are respectively input into a pre-trained classifier, further, a first classification label set output by the classifier according to the first image feature and a second classification label set output according to the second image feature are obtained, secondly, the image to be classified is subjected to super pixel block segmentation, the label overlap ratio of the first classification label set and the second classification label set in at least one super pixel block is determined, finally, when the label overlap ratio in any super pixel block is smaller than a preset threshold value, at least one first classification label falling in the super pixel block is selected from the first classification label set, and when the label overlap ratio in any super pixel block is larger than or equal to the preset threshold value, at least one second classification tag falling within the super-pel block is selected from a second classification tag set. According to the method and the device, the more accurate classification label is selected according to the label contact ratio in each super pixel block, and the classification accuracy of the image to be classified is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flow chart illustrating a method for image classification provided in embodiment 100 of the present application;
fig. 2 is a schematic diagram illustrating a specific flow of a method for image classification provided in an embodiment 200 of the present application;
fig. 3 is a schematic diagram illustrating an apparatus for classifying an image according to an embodiment 300 of the present application;
fig. 4 shows a schematic diagram of a terminal device provided in embodiment 400 of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
Based on the problems in the prior art, the embodiment of the application provides an image classification method, which is mainly applicable to the technical field of computers. And performing feature extraction by using different types of feature extraction modes in the images to be classified, and generating corresponding different classification label sets. Furthermore, after the image to be classified is subjected to superpixel segmentation, the classification labels in a certain class of classification label sets are selected in the superpixel blocks according to the label contact degrees of different classification label sets, so that the classification result of the image to be classified is optimized. The following describes the technical solution of the present invention in detail with specific embodiments to realize a method for image classification. Several of the following embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Fig. 1 is a schematic flowchart of an image classification method according to an embodiment 100 of the present application. The detailed steps are as follows:
and S11, acquiring the image to be classified collected in a microwave remote sensing mode.
In this step, the image to be classified collected by microwave remote sensing mainly refers to an SAR image collected by a synthetic aperture radar. Further, the image to be classified is obtained through a coherent imaging radar system with high resolution, namely, energy is transmitted to the shot image through an antenna, energy is received through a synthetic aperture radar, all energy is recorded through electronic equipment, and finally the image to be classified is formed. The image to be classified can record various information including phase, amplitude and intensity, and speckle noise is an inherent characteristic of the image. In addition, the resolution of the image to be classified is relatively low, and the signal-to-noise ratio is low, so that the amplitude information contained in the image to be classified is far from the imaging level of the optical image.
S12, extracting a first image feature and a second image feature with different feature categories from the image to be classified.
In the step, the acquired image to be classified is preprocessed, and a first image feature and a second image feature with different feature categories are respectively extracted from the image to be classified. The first image features mainly refer to image texture features and image gray scale features of the image to be classified, and the second image features mainly refer to multi-scale local histogram features of the image to be classified. The first image characteristic mainly aims at performing texture analysis on an image to be classified and describes local frequency information of a signal. The second image characteristic is mainly the extraction and analysis of the image gray scale (shading) spatial distribution pattern.
And S13, inputting the first image characteristic and the second image characteristic into a classifier trained in advance respectively.
In this step, the extracted first image feature and the second image feature are respectively input into corresponding classifiers. Specifically, a plurality of first image features are used as samples and input into a classifier together with a classification label corresponding to each first image feature, and the classifier is trained to generate a first image classification model. Similarly, a second image classification model is generated by performing similar operations on the second image features. The first image classification model and the second image classification model are pre-trained classifiers corresponding to the first image feature and the second image feature respectively.
S14, acquiring a first classification label set output by the classifier according to the first image characteristic and a second classification label set output by the classifier according to the second image characteristic.
In this step, after the plurality of first image features and the plurality of second image features are respectively input into corresponding pre-trained classifiers, the first image features output a first classification label set through the classifier, i.e., the first image classification model, and the second image features output a second classification label set through the classifier, i.e., the second image classification model. The first classification label set comprises a plurality of classification labels corresponding to the first image features respectively, and the second classification label set also comprises a plurality of classification labels corresponding to the second image features respectively.
S15, performing superpixel block segmentation on the image to be classified.
In this step, the original image of the image to be classified is subjected to superpixel segmentation, and the image to be classified is segmented into a plurality of superpixel blocks. Here, superpixel segmentation mainly refers to the process of subdividing a digital image into a plurality of image sub-regions (sets of pixels), also referred to as superpixels. The purpose of image segmentation is to simplify or change the representation of the image so that it is easier to understand and analyze, often for locating objects and boundaries (lines, curves, etc.) in the image. The image to be classified is subjected to super-pixel segmentation, so that more accurate image boundaries can be obtained in the image to be classified.
S16, determining the label overlapping degree of the first classification label set and the second classification label set in at least one super pixel block.
In this step, each super-pixel block is an independent unit, each super-pixel block includes a plurality of pixels, and after the first image feature and the second image feature are respectively extracted from each pixel, the corresponding first classification tag and the corresponding second classification tag may be the same or different. Therefore, the label coincidence degree of the first classification label and the second classification label corresponding to each pixel in each super pixel block is calculated. And the label contact ratio is the similarity of the first classification label and the second classification label.
S17, when the coincidence degree of the labels in any super pixel block is smaller than a preset threshold value, at least one first classification label falling into the super pixel block is selected from the first classification label set.
In this step, a preset threshold is set to distinguish which of the two classes of classification labels the pixel block is closer to. Specifically, when the overlap ratio of the labels in any super pixel block is smaller than a preset threshold, the classification label corresponding to the pixel block is considered to be more accurate as the corresponding first classification label. At this time, at least one first classification tag falling within the super pixel block is selected in the first classification tag set.
And S18, when the label coincidence degree in any super pixel block is larger than or equal to the preset threshold value, selecting at least one second classification label falling in the super pixel block from the second classification label set.
In this step, similar to step S17, when the degree of label overlap in any super pixel block is greater than or equal to the preset threshold, the classification label corresponding to the pixel block is considered to be the corresponding second classification label more accurately. At this time, at least one second classification tag falling within the super pixel block is selected in the second classification tag set.
As described above, based on the above embodiment, first, an image to be classified collected by microwave remote sensing is obtained, first image features and second image features with different feature categories are extracted from the image to be classified, the first image features and the second image features are respectively input into a pre-trained classifier, further, a first classification tag set output by the classifier according to the first image features and a second classification tag set output according to the second image features are obtained, then, a super pixel block segmentation is performed on the image to be classified, the tag coincidence degree of the first classification tag set and the second classification tag set in at least one super pixel block is determined, finally, when the tag coincidence degree in any super pixel block is smaller than a preset threshold value, at least one first classification tag falling in the super pixel block is selected from the first classification tag set, and, and when the coincidence degree of the labels in any super pixel block is greater than or equal to a preset threshold value, selecting at least one second classification label falling into the super pixel block from the second classification label set. According to the method and the device, the more accurate classification label is selected according to the label contact ratio in each super pixel block, and the classification accuracy of the image to be classified is improved.
Fig. 2 is a schematic diagram illustrating a specific flow of an image classification method according to an embodiment 200 of the present application. Wherein, the detailed process of the specific flow is as follows:
s201, acquiring an image to be classified acquired in a microwave remote sensing mode.
Here, the acquired image to be classified collected in the microwave remote sensing manner mainly refers to an SAR image collected by a synthetic aperture radar.
S202, preprocessing the image to be classified.
Here, an image boundary of each image to be classified is determined, boundary expansion is performed around the image boundary, and the image to be classified subjected to the boundary expansion is divided into a plurality of image blocks. Optionally, for the pixel point in each image to be classified, mirror reflection is performed around the boundary of the pixel point, so as to perform boundary extension on the image to be classified. And dividing the expanded image to be classified into a plurality of image blocks. And overlapping part of pixel points between adjacent image blocks.
S203, extracting first image features from the image to be classified.
And respectively extracting the image texture feature and the image gray feature of at least one pixel point contained in the image block, and superposing the image texture feature and the image gray feature vector on the same pixel point to be used as the first image feature of the pixel point.
The extraction method of the image texture features comprises the steps of filtering at least one image block in an image to be classified through a first filter, and extracting the image texture features of at least one pixel point from the image block, wherein the image texture features comprise the mean value and the variance of the pixel points contained in the image to be classified. Specifically, each image block contained in each image to be classified is filtered through a first filter, and image texture features are extracted from each image block, wherein the image texture features comprise the mean value and the variance of pixel points contained in the image to be classified. Optionally, the first filter is typically a five-scale eight-direction Gabor filter, and the frequency and direction of the Gabor filter are similar to those of the human visual system, and are suitable for representation and discrimination of image textures. The Gabor filter obtains the response condition of a certain frequency neighborhood of each image block in the image to be classified by means of a Gabor kernel, and the response condition can be regarded as the image characteristics of the image block. And obtaining the response condition of the image to be classified in different frequency neighborhoods by using a plurality of Gabor kernels with different frequencies, forming the image characteristics of the image to be classified in each frequency segment, and obtaining the image texture characteristics of the image block. And respectively calculating the mean value and the variance of pixel points contained in the image blocks corresponding to the images to be classified according to the matrix extracted by the Gabor filter in each image block so as to extract the texture features of the images.
In addition, the extraction mode of the image gray scale features is to generate a gray scale co-occurrence matrix of each image block of the image to be classified, and calculate the image gray scale features of the image blocks according to the gray scale co-occurrence matrix, wherein the image gray scale features comprise the mean value, entropy, contrast, variance and angular second-order distance of pixel points contained in the image to be classified. Specifically, a gray level co-occurrence matrix of each image block of each image to be classified is generated, and image gray level features of the image blocks are calculated according to the gray level co-occurrence matrix, wherein the image gray level features comprise a mean value, entropy, contrast, variance and angular second-order distance of pixel points contained in the image to be classified. Alternatively, the gray level co-occurrence matrix GLCM is defined by the joint probability density of two-position pixels, which reflects not only the distribution characteristics of the luminance but also the position distribution characteristics between pixels having the same luminance or close to the luminance, and is a second-order statistical characteristic about the luminance variation of the image. Calculating the average value MEA (sigma) of pixel points in the image block by using the gray level co-occurrence matrix P (i, j | d, theta)i,ji × P (i, j | d, θ), entropy ENT ═ Σi,jP (i, j | d, θ) × log { P (i, j | d, θ) }, contrast CON ═ Σi,j(i-j)2P (i, j | d, θ), variance Var ═ Σij(i-μ)2P (i, j | d, θ) and angular second moment Energy ═ Σi,jP2(i, j | d, θ), where P (i, j) represents the gray scale value of the pixel position in the gray scale co-occurrence matrix at the (i, j) coordinate, and d and θ represent the scale and direction, respectively.
Further, the image gray scale features corresponding to each pixel in the image to be classified and the image serving as example features are properly superposed to generate first image features of the image to be classified.
And S204, extracting second image characteristics from the image to be classified.
Here, local histogram features of at least one pixel point included in the image block under the amplitude values of the plurality of different pixel points are respectively calculated, and the plurality of local histogram features are combined to generate a multi-scale local histogram feature as a second image feature of the pixel point.
And S205, performing superpixel block segmentation on the image to be classified.
Here, the super-pixel segmentation of the image to be classified is mainly performed by grouping adjacent pixel points with the same or similar color, texture, brightness, and other features into the same region block. Superpixels are a group of pixels with similar characteristics, and the image is represented by dividing the whole picture into a large number of superpixels, so that the specificity of a single pixel can be reduced after processing.
In the embodiment of the application, the image to be classified is mainly segmented by a super pixel segmentation algorithm (SLIC), and each pixel is grouped according to similar characteristics between adjacent pixels. Specifically, the side length of a super pixel is set to be w, and the super pixel segmentation algorithm is utilized to perform super pixel segmentation on the image to be classified to generate a corresponding super pixel segmentation image. If an image to be classified containing N pixels is divided into K super-pixels with similar sizes, the size w multiplied by w of the super-pixels is N/K, and the distance between the cluster seed points is N/K
Figure BDA0002286442720000091
Where w may be preset based on empirical values.
And S206, determining the label overlapping degree of the first classification label set and the second classification label set in at least one super pixel block.
Here, the correlation coefficient of the first classification tag set and the second classification tag set is calculated within the super pixel block, and the correlation coefficient is taken as the tag coincidence degree within the super pixel block. The correlation coefficient is a statistical index used for reflecting the degree of closeness of correlation between variables, and is used for reflecting the similarity of the results of the two types of classification labels in a certain super-pixel block. The correlation coefficient can also be seen as covariance: a special covariance after eliminating the influence of two variable dimensions and standardization eliminates the influence of the variation amplitude of the two variables and only reflects the similarity degree of the two variables when each unit is changed. Optionally, each superpixel block in the superpixel segmentation graph is taken as an independent unit, and the label overlapping degree is calculated in each superpixel block in turn.
And S207, judging the overlap ratio of the label and the preset threshold value.
And S208, when the coincidence degree of the labels in any super pixel block is smaller than a preset threshold value, counting the number of the label types contained in the first classification label set in the super pixel block.
In this step, if the classification result corresponding to the first image feature extracted from a certain super-pixel block is a first classification tag set a and the classification result corresponding to the second image feature is a second classification tag set B, if the tag overlap ratio is smaller than a preset threshold, the classification result in a is applied to the super-pixel block, and the number of each tag type contained in the first classification tag set a in the super-pixel block is counted. The preset threshold value may be preset according to an empirical value.
S209, the label type with the largest number is taken as the first classification label of the superpixel block.
S210, when the coincidence degree of the labels in any super pixel block is larger than or equal to a preset threshold value, counting the number of the label types in the super pixel block, wherein the label types are contained in the second classification label set.
In this step, if the tag coincidence degree is greater than or equal to the preset threshold, the classification result of B is applied to the super-pixel block, and the number of each tag type in the second classification tag set B in the super-pixel block is counted.
S211, the label type with the largest number is used as the second classification label of the superpixel block.
S212, optimizing the classification labels in the super pixel blocks and classifying the images to be classified.
The image classification method is realized based on the steps. And measuring the similarity of the two classification results by adopting the label contact degree through the classification result of the first image characteristic extracted by the GLCM + Gabor characteristic extraction method and the classification result of the second image characteristic extracted by the MLPH characteristic extraction method. Then, an image to be classified is divided into super-pixel images by adopting an SLIC algorithm, each super-pixel block is used as an independent unit, the label contact ratio of two classification results in each super-pixel block is calculated in sequence, and if the label contact ratio is smaller than a preset threshold value, the pixel block is used for extracting a classification result corresponding to a first image feature by adopting a GLCM + Gabor feature extraction method; otherwise, if the label contact ratio is equal to or higher than the preset threshold, the classification result corresponding to the second image feature extracted by the MLPH feature method is applied to the pixel block, the proportion of each label type is counted in the super pixel block, and the classification label with the highest proportion is taken as the classification label of the super pixel block. The image classification method solves the problem that the boundary performance and the control noise point cannot be considered simultaneously in the traditional classification method applied to the images to be classified, particularly SAR images.
Based on the same inventive concept, the embodiment 300 of the present application further provides an apparatus for classifying an image, wherein as shown in fig. 3, the apparatus includes:
the first acquisition module 301 is used for acquiring an image to be classified acquired in a microwave remote sensing manner;
an extraction module 302, configured to extract a first image feature and a second image feature with different feature categories from an image to be classified;
an input module 303, configured to input the first image feature and the second image feature into a pre-trained classifier respectively;
a second obtaining module 304, configured to obtain a first classification label set output by the classifier according to the first image feature and a second classification label set output by the classifier according to the second image feature;
a segmentation module 305, configured to perform superpixel block segmentation on the image to be classified;
a first determining module 306 for determining a tag overlap ratio of the first set of classification tags and the second set of classification tags within the at least one super pixel block;
a first selecting module 307, configured to select, when a tag coincidence degree in any super pixel block is smaller than a preset threshold, at least one first classification tag falling into the super pixel block from a first classification tag set;
the second selecting module 308 is configured to select at least one second classification tag falling within any super-pixel block from the second classification tag set when the tag coincidence degree in the super-pixel block is greater than or equal to the preset threshold.
In this embodiment, specific functions and interaction manners of the first obtaining module 301, the extracting module 302, the inputting module 303, the second obtaining module 304, the dividing module 305, the determining module 306, the first selecting module 307, and the second selecting module 308 may refer to the description of the embodiment corresponding to fig. 1, and are not described herein again.
Optionally, the apparatus further comprises:
a second determining module 309, configured to determine an image boundary of the image to be classified, and perform boundary expansion around the image boundary;
the dividing module 310 is configured to divide the image to be classified after the boundary expansion into a plurality of image blocks, where partial pixel points between adjacent image blocks overlap.
Optionally, the extraction module 302 includes:
the first extraction unit is used for respectively extracting the image texture feature and the image gray feature of at least one pixel point contained in the image block, and superposing the image texture feature and the image gray feature vector on the same pixel point to serve as the first image feature of the pixel point;
and the second extraction unit is used for respectively calculating the local histogram feature of at least one pixel point contained in the image block under the amplitude values of a plurality of different pixel points, and combining the local histogram features to generate a multi-scale local histogram feature which is used as the second image feature of the pixel point.
Optionally, the first extraction unit includes:
the first extraction subunit is used for filtering at least one image block in the image to be classified through a first filter and extracting image texture features of at least one pixel point from the image block, wherein the image texture features comprise a mean value and a variance of the pixel points contained in the image to be classified;
and the second extraction subunit is used for generating a gray level co-occurrence matrix of each image block of the image to be classified and calculating the image gray level characteristics of the image block according to the gray level co-occurrence matrix, wherein the image gray level characteristics comprise the mean value, entropy, contrast, variance and angular second-order distance of pixel points contained in the image to be classified.
Optionally, the first determining module 306 is further configured to:
and calculating the correlation coefficient of the first classification label set and the second classification label set in the super pixel block, and taking the correlation coefficient as the label coincidence degree in the super pixel block.
Optionally, the first selecting module 307 is further configured to:
and counting the number of the label types contained in the first classification label set in the super pixel block, and taking the label type with the largest number as the first classification label of the super pixel block.
Optionally, the second selecting module 308 is further configured to:
and counting the number of the label types in the second classification label set in the super pixel block, and taking the label type with the largest number as the second classification label of the super pixel block.
As shown in fig. 4, a further embodiment 400 of the present application further provides a terminal device, which includes a processor 401, wherein the processor 401 is configured to execute the steps of the image classification method. As can also be seen from fig. 4, the terminal device provided by the above embodiment further comprises a non-transitory computer readable storage medium 402, the non-transitory computer readable storage medium 402 has a computer program stored thereon, and the computer program is executed by the processor 401 to perform the steps of the above-mentioned method for image classification. In practice, the terminal device may be one or more computers, as long as the computer-readable medium and the processor are included.
In particular, the storage medium can be a general-purpose storage medium, such as a removable disk, a hard disk, a FLASH, etc., and the computer program on the storage medium, when executed, can perform the steps of one of the image classification methods described above. In practical applications, the computer readable medium may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer readable storage medium carries one or more programs which, when executed, enable performance of the steps of a method of image classification as described above.
According to embodiments disclosed herein, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example and without limitation: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, without limiting the scope of the present disclosure. In the embodiments disclosed herein, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowchart and block diagrams in the figures of the present application illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments disclosed herein. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not explicitly recited in the present application. In particular, the features recited in the various embodiments and/or claims of the present application may be combined and/or coupled in various ways, all of which fall within the scope of the present disclosure, without departing from the spirit and teachings of the present application.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can still change or easily conceive of the technical solutions described in the foregoing embodiments or equivalent replacement of some technical features thereof within the technical scope disclosed in the present application; such changes, variations and substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application and are intended to be covered by the appended claims. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of image classification, comprising:
acquiring an image to be classified acquired in a microwave remote sensing mode;
extracting first image features and second image features with different feature categories from the image to be classified;
inputting the first image characteristic and the second image characteristic into a pre-trained classifier respectively;
acquiring a first classification label set output by the classifier according to the first image characteristic and a second classification label set output by the classifier according to the second image characteristic;
carrying out super-pixel block segmentation on the image to be classified;
determining a label overlap ratio of the first set of classification labels and the second set of classification labels within at least one of the super-pixel blocks;
when the coincidence degree of the labels in any one super pixel block is smaller than a preset threshold value, selecting at least one first classification label falling into the super pixel block from the first classification label set;
and when the label coincidence degree in any one super pixel block is larger than or equal to the preset threshold value, selecting at least one second classification label falling into the super pixel block from the second classification label set.
2. The method according to claim 1, wherein between the step of obtaining the image to be classified collected by microwave remote sensing and the step of extracting the first image feature and the second image feature with different feature categories from the image to be classified, the method further comprises:
determining an image boundary of the image to be classified, and performing boundary expansion around the image boundary;
and dividing the image to be classified after the boundary expansion into a plurality of image blocks, wherein partial pixel points between the adjacent image blocks are overlapped.
3. The method according to claim 2, wherein the step of extracting first and second image features with different feature classes from the image to be classified comprises:
respectively extracting the image texture feature and the image gray feature of at least one pixel point contained in the image block, and superposing the image texture feature and the image gray feature vector on the same pixel point to be used as the first image feature of the pixel point;
respectively calculating the local histogram feature of at least one pixel point contained in the image block under the amplitude values of a plurality of different pixel points, and combining the local histogram features to generate a multi-scale local histogram feature as the second image feature of the pixel point.
4. The method according to claim 3, wherein the step of separately extracting the image texture feature and the image gray feature of at least one of the pixel points included in the image block comprises:
filtering at least one image block in the image to be classified through a first filter, and extracting the image texture features of at least one pixel point from the image block, wherein the image texture features comprise the mean value and the variance of the pixel points contained in the image to be classified;
generating a gray level co-occurrence matrix of each image block of the image to be classified, and calculating the image gray level characteristics of the image block according to the gray level co-occurrence matrix, wherein the image gray level characteristics comprise the mean value, entropy, contrast, variance and angular second-order distance of the pixel points contained in the image to be classified.
5. The method of claim 1, wherein the step of determining a degree of label overlap of the first set of classification labels with the second set of classification labels within at least one of the super-pixel blocks comprises:
and calculating a correlation coefficient of the first classification label set and the second classification label set in the super pixel block, and taking the correlation coefficient as the label coincidence degree in the super pixel block.
6. The method of claim 1, wherein said step of selecting at least one first classification tag from said first set of classification tags that falls within said super-pixel block comprises:
and counting the number of all the tag types contained in the first classification tag set in the super pixel block, and taking the tag type with the largest number as the first classification tag of the super pixel block.
7. The method of claim 1, wherein said step of selecting at least one second classification tag from said second set of classification tags that falls within said super-pixel block comprises:
and counting the number of all the tag types in a second classification tag set in the super pixel block, and taking the tag type with the largest number as the second classification tag of the super pixel block.
8. An apparatus for image classification, the apparatus comprising:
the first acquisition module is used for acquiring an image to be classified acquired in a microwave remote sensing mode;
the extraction module is used for extracting a first image feature and a second image feature which have different feature categories from the image to be classified;
the input module is used for respectively inputting the first image characteristics and the second image characteristics into a pre-trained classifier;
the second obtaining module is used for obtaining a first classification label set output by the classifier according to the first image characteristic and a second classification label set output according to the second image characteristic;
the segmentation module is used for carrying out super-pixel block segmentation on the image to be classified;
a first determining module for determining a label overlap ratio of the first and second classification label sets within at least one of the super-pixel blocks;
a first selecting module, configured to select, when the tag coincidence degree in any one of the super pixel blocks is smaller than a preset threshold, at least one first classification tag falling in the super pixel block from the first classification tag set;
and the second selecting module is used for selecting at least one second classification label falling into any one super pixel block from the second classification label set when the label contact ratio in the super pixel block is greater than or equal to the preset threshold value.
9. A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of a method of image classification as claimed in any one of claims 1 to 7.
10. A terminal device comprising a processor for performing the steps of a method of image classification according to any one of claims 1 to 7.
CN201911162361.5A 2019-11-25 2019-11-25 Image classification method and device and storage medium Active CN111079797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911162361.5A CN111079797B (en) 2019-11-25 2019-11-25 Image classification method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911162361.5A CN111079797B (en) 2019-11-25 2019-11-25 Image classification method and device and storage medium

Publications (2)

Publication Number Publication Date
CN111079797A CN111079797A (en) 2020-04-28
CN111079797B true CN111079797B (en) 2022-02-25

Family

ID=70311837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911162361.5A Active CN111079797B (en) 2019-11-25 2019-11-25 Image classification method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111079797B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114089339B (en) * 2022-01-14 2022-04-19 南京天朗防务科技有限公司 Real-time processing and displaying system and method for unmanned aerial vehicle-mounted SAR image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903012A (en) * 2014-04-09 2014-07-02 西安电子科技大学 Polarimetric SAR data classifying method based on orientation object and support vector machine
CN107330457A (en) * 2017-06-23 2017-11-07 电子科技大学 A kind of Classification of Polarimetric SAR Image method based on multi-feature fusion
WO2018045626A1 (en) * 2016-09-07 2018-03-15 深圳大学 Super-pixel level information fusion-based hyperspectral image classification method and system
CN108764330A (en) * 2018-05-25 2018-11-06 西安电子科技大学 SAR image sorting technique based on super-pixel segmentation and convolution deconvolution network
CN109344880A (en) * 2018-09-11 2019-02-15 天津理工大学 SAR image classification method based on multiple features and complex nucleus
CN109635789A (en) * 2019-01-23 2019-04-16 西安电子科技大学 Based on intensity than the High Resolution SAR image classification method that is extracted with spatial structure characteristic

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903012A (en) * 2014-04-09 2014-07-02 西安电子科技大学 Polarimetric SAR data classifying method based on orientation object and support vector machine
WO2018045626A1 (en) * 2016-09-07 2018-03-15 深圳大学 Super-pixel level information fusion-based hyperspectral image classification method and system
CN107330457A (en) * 2017-06-23 2017-11-07 电子科技大学 A kind of Classification of Polarimetric SAR Image method based on multi-feature fusion
CN108764330A (en) * 2018-05-25 2018-11-06 西安电子科技大学 SAR image sorting technique based on super-pixel segmentation and convolution deconvolution network
CN109344880A (en) * 2018-09-11 2019-02-15 天津理工大学 SAR image classification method based on multiple features and complex nucleus
CN109635789A (en) * 2019-01-23 2019-04-16 西安电子科技大学 Based on intensity than the High Resolution SAR image classification method that is extracted with spatial structure characteristic

Also Published As

Publication number Publication date
CN111079797A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
Chaudhuri et al. Automatic building detection from high-resolution satellite images based on morphology and internal gray variance
Dellinger et al. SAR-SIFT: a SIFT-like algorithm for SAR images
Zhuo et al. Cloud classification of ground-based images using texture–structure features
Schwegmann et al. Manifold adaptation for constant false alarm rate ship detection in South African oceans
CN110781756A (en) Urban road extraction method and device based on remote sensing image
US20210004964A1 (en) Image processing device, image processing method, and recording medium having image processing program stored thereon
Xiao et al. Defocus blur detection based on multiscale SVD fusion in gradient domain
CN110502977B (en) Building change classification detection method, system, device and storage medium
Thajeel et al. A Novel Approach for Detection of Copy Move Forgery using Completed Robust Local Binary Pattern.
CN113780110A (en) Method and device for detecting weak and small targets in image sequence in real time
CN113887472A (en) Remote sensing image cloud detection method based on cascade color and texture feature attention
CN110310263B (en) SAR image residential area detection method based on significance analysis and background prior
CN110969199A (en) Image classification method and device and storage medium
Basso et al. Combining morphological filtering, anisotropic diffusion and block-based data replication for automatically detecting and recovering unscanned gaps in remote sensing images
CN111079797B (en) Image classification method and device and storage medium
EP3044734B1 (en) Isotropic feature matching
CN110728311A (en) Image processing method, device and storage medium
CN111179245B (en) Image quality detection method, device, electronic equipment and storage medium
Raikar et al. Automatic building detection from satellite images using internal gray variance and digital surface model
Sasi et al. Shadow detection and removal from real images: state of art
Zehtabian et al. Adaptive restoration of multispectral datasets used for SVM classification
Chen et al. Urban damage estimation using statistical processing of satellite images
CN110796684B (en) Target tracking method and related device
Abdusalomov et al. Robust shadow removal technique for improving image enhancement based on segmentation method
Wang et al. Sonar image detection based on multi-scale multi-column convolution neural networks

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