CN114972346A - Stone identification method based on computer vision - Google Patents

Stone identification method based on computer vision Download PDF

Info

Publication number
CN114972346A
CN114972346A CN202210902703.8A CN202210902703A CN114972346A CN 114972346 A CN114972346 A CN 114972346A CN 202210902703 A CN202210902703 A CN 202210902703A CN 114972346 A CN114972346 A CN 114972346A
Authority
CN
China
Prior art keywords
image
stone
value
hsi
sliding window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210902703.8A
Other languages
Chinese (zh)
Other versions
CN114972346B (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.)
Shandong Tongdasheng Stone Co ltd
Original Assignee
Shandong Tongdasheng Stone 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 Shandong Tongdasheng Stone Co ltd filed Critical Shandong Tongdasheng Stone Co ltd
Priority to CN202210902703.8A priority Critical patent/CN114972346B/en
Publication of CN114972346A publication Critical patent/CN114972346A/en
Application granted granted Critical
Publication of CN114972346B publication Critical patent/CN114972346B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30132Masonry; Concrete

Abstract

The invention relates to the field of computer vision, in particular to a stone identification method based on computer vision, which comprises the following steps: acquiring an HSI image of a stone to be detected, extracting an I channel image in the HSI image, and acquiring a brightness characteristic value of the I channel image; obtaining the contrast of the HSI image, and obtaining the change degree of the HSI image affected by the brightness by using the contrast of the HSI image; setting a sliding window for the HSI image, obtaining a single characteristic value of each pixel point in the sliding window by using the pixel value mean value, the pixel value variance and the pixel value of the pixel point in the sliding window, obtaining the overall characteristic value of the HSI image according to the single characteristic value of each pixel point in the sliding window, further obtaining the overall evaluation value of the stone to be detected, and identifying the category of the stone to be detected by using the overall evaluation value of the stone to be detected and the overall evaluation value of each template stone. The invention improves the accuracy of stone identification.

Description

Stone identification method based on computer vision
Technical Field
The invention relates to the field of computer vision, in particular to a stone identification method based on computer vision.
Background
The stone is a high-grade product of building decoration materials, natural stones are mainly divided into granite, slate, sandstone, limestone, volcanic rock and the like, along with the development of building design, the stone has already become one of important raw materials for building, decoration, road and bridge construction, different industries have different requirements on the types of the stone, the traditional method simply identifies the stone according to the brightness of the stone, but only identifies the stone by using the brightness characteristic, so that the identification result is inaccurate; the stone type identification is carried out through the CNN neural network, but the CNN neural network identification of the stone type requires a large amount of data sets for labeling, and errors are easy to occur, so that the CNN neural network identification result is inaccurate. Therefore, the invention provides a stone identification method based on computer vision, which improves the accuracy of stone identification.
Disclosure of Invention
The invention provides a stone identification method based on computer vision, which aims to solve the problem of inaccurate stone identification in the prior art.
The invention relates to a stone recognition method based on computer vision, which adopts the following technical scheme:
s1, acquiring an HSI image of the stone to be detected, extracting an I channel image in the HSI image, acquiring a gray level mean value of the I channel image and a modulus of each pixel point gradient in the I channel image, and acquiring a brightness characteristic value of the I channel image by using the gray level mean value and the modulus of each pixel point gradient in the I channel image;
s2, obtaining the contrast of the HSI image, and obtaining the change degree of the HSI image affected by the brightness by using the brightness characteristic value of the I channel image and the contrast of the HSI image;
s3, setting a sliding window, traversing in the HSI image by using the set sliding window, calculating a single characteristic value of each pixel point in the sliding window by using the pixel value of each pixel point in each sliding window, the pixel value mean value and the pixel value variance of the pixel point in the sliding window, and calculating the integral characteristic value of the sliding window by using the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points;
s4, calculating the overall characteristic value of the sliding window according to the brightness characteristic value of the I channel image, the brightness influence change degree of the HSI image, the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points to obtain the overall evaluation value of the stone to be detected, and matching the overall evaluation value of the stone to be detected with the overall evaluation value of each template stone to finish the classification of the stone to be detected.
Further, the modulus of the gradient of each pixel point is determined according to the following method:
acquiring the gradient amplitude and the gradient direction of each pixel point in the I channel image;
and obtaining a gradient vector of each pixel point by using the gradient amplitude and the gradient direction of each pixel point, and obtaining a mode of the gradient of each pixel point in the I-channel image by using the gradient vector of each pixel point.
Further, the expression of the luminance characteristic value of the I-channel image is:
Figure 212246DEST_PATH_IMAGE002
in the formula:
Figure DEST_PATH_IMAGE003
representing the luminance characteristic value of the I-channel image,
Figure 722862DEST_PATH_IMAGE004
represents the mean value of the gray levels of the I-channel image,
Figure DEST_PATH_IMAGE005
the number of pixel points in the I-channel image is represented,
Figure 863118DEST_PATH_IMAGE006
representing the second in an I-channel image
Figure DEST_PATH_IMAGE007
The modulus of the gradient of the individual pixels,
Figure 382962DEST_PATH_IMAGE007
representing the second in an I-channel image
Figure 151329DEST_PATH_IMAGE007
And (5) each pixel point.
Further, the method for acquiring the HSI image contrast is as follows:
acquiring the relative entropy of the I channel image and the HSI image and the contrast of the I channel image;
and obtaining the contrast of the HSI image by using the ratio of the relative entropy of the I channel image and the HSI image to the contrast of the I channel image.
Further, the specific expression of the degree of change of the HSI image affected by the brightness is:
Figure DEST_PATH_IMAGE009
in the formula:
Figure 832846DEST_PATH_IMAGE010
indicating the degree of change in the HSI image affected by brightness,
Figure 522715DEST_PATH_IMAGE003
representing the luminance characteristic value of the I-channel image,
Figure DEST_PATH_IMAGE011
representing the contrast of the HSI image.
Further, the expression of the single feature value of each pixel point is as follows:
Figure DEST_PATH_IMAGE013
in the formula:
Figure 518353DEST_PATH_IMAGE014
representing points in an HSI image
Figure DEST_PATH_IMAGE015
Is determined by the characteristic of the signal of the sensor,
Figure 813330DEST_PATH_IMAGE016
indicating the length of the HSI picture,
Figure DEST_PATH_IMAGE017
which represents the width of the image,
Figure 665749DEST_PATH_IMAGE018
representing pixel values of pixels within a sliding windowThe average value of the average value is calculated,
Figure DEST_PATH_IMAGE019
representing the variance of pixel values of pixels within the sliding window,
Figure 57895DEST_PATH_IMAGE020
representing points in an HSI image
Figure 981858DEST_PATH_IMAGE015
The pixel value of (2).
Further, the specific expression of the overall characteristic value of the HSI image is as follows:
Figure 442926DEST_PATH_IMAGE022
in the formula:
Figure DEST_PATH_IMAGE023
represents the overall feature value of the HSI image,
Figure 764449DEST_PATH_IMAGE024
is shown as
Figure DEST_PATH_IMAGE025
The overall characteristic value of each sliding window,
Figure 130708DEST_PATH_IMAGE025
denotes the first
Figure 94247DEST_PATH_IMAGE025
A sliding window is arranged on the top of the sliding window,
Figure 940980DEST_PATH_IMAGE026
the number of the sliding windows is shown,
Figure DEST_PATH_IMAGE027
represents the maximum of the overall characteristic values of all the sliding windows,
Figure 400780DEST_PATH_IMAGE028
to indicate all slipsThe minimum value among the global characteristic values of the window.
Further, the specific expression of the overall evaluation value of the stone to be detected is as follows:
Figure 818117DEST_PATH_IMAGE030
in the formula:
Figure DEST_PATH_IMAGE031
showing the overall evaluation value of the stone to be detected, C showing the contrast of the I-channel image,
Figure 755986DEST_PATH_IMAGE032
representing the influence value of the brightness and the contrast in the stone image to be detected,
Figure DEST_PATH_IMAGE033
a normalized numerical value representing the overall feature value of the HIS image.
Further, the method for identifying the category of the stone to be detected comprises the following steps:
obtaining the overall evaluation value of each template stone by utilizing the steps S1-S4 in the specification;
when the overall evaluation value of the stone to be detected
Figure 880063DEST_PATH_IMAGE034
Overall evaluation value of form stone
Figure 589393DEST_PATH_IMAGE031
Satisfy the requirement of
Figure DEST_PATH_IMAGE035
And meanwhile, the stone to be detected and the template stone belong to the same stone.
The invention has the beneficial effects that: the collected stone image to be detected is converted into the HIS image of the stone to be detected, the overall evaluation value of the stone is obtained by utilizing the brightness characteristic value of the I channel in the HSI image, the change degree of the HIS image influenced by the brightness and the overall characteristic value of the HIS image, and the overall evaluation value identifies the stone from three dimensions of brightness, contrast and overall information of the stone surface, so that the accuracy of stone identification is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a stone recognition method based on computer vision according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the stone recognition method based on computer vision of the invention, as shown in fig. 1, comprises:
s1, obtaining an HSI image of the stone to be detected, extracting an I channel image in the HSI image, obtaining a gray average value of the I channel image and a modulus of each pixel point gradient in the I channel image, and obtaining a brightness characteristic value of the I channel image by using the gray average value and the modulus of each pixel point gradient in the I channel image.
The method comprises the steps of collecting an image of the surface of a stone to be detected, wherein in the process of collecting the image, the surface of the stone can be reflected by light, so that the illumination is uniform when the image is collected. In order to make the illumination uniform, the illumination direction of the light is set to be overlook illumination, and a plurality of light sources are needed, so that uniform light is formed and is irradiated on the surface of the stone to obtain the stone image to be detected. And the flawless stone images of all models produced and processed by factories are required to be collected to be used as template stone images, the characteristic parameters of all the stone images to be detected and the template stone images are calculated, and the categories of the stones to be detected are identified according to the parameters.
The captured RGB image is converted into an HSI image because in an HSI image, H is called hue to define the wavelength of the color, S is called saturation to define the shade of the color, and I is used to define the brightness. The HSI image can represent the color information characteristic of one image, so the invention calculates according to the HIS image and respectively obtains the overall evaluation values of the stone image to be detected and the template stone image.
The method comprises the steps of extracting an I channel image in a stone material HSI image, obtaining the mean value of all pixel point gray values in the I channel image, taking the mean value of all pixel point gray values in the I channel image as the gray mean value of the I channel image, obtaining the gradient amplitude and the gradient direction of each pixel point in the I channel image, obtaining the gradient vector of each pixel point by using the gradient amplitude and the gradient direction of each pixel point in the I channel image, obtaining the mode of each pixel point gradient in the I channel image by using the gradient vector of each pixel point, obtaining the brightness characteristic value of the I channel image by using the gray mean value and the mode of each pixel point gradient in the I channel image, and adopting the following specific expressions:
Figure 664665DEST_PATH_IMAGE036
in the formula:
Figure 235586DEST_PATH_IMAGE003
representing the luminance characteristic value of the I-channel image,
Figure 525753DEST_PATH_IMAGE004
represents the mean value of the gray levels of the I-channel image,
Figure 655252DEST_PATH_IMAGE005
the number of pixel points in the I-channel image is represented,
Figure 296449DEST_PATH_IMAGE006
representing the second in an I-channel image
Figure 405481DEST_PATH_IMAGE007
The modulus of the gradient of the individual pixels,
Figure 815734DEST_PATH_IMAGE007
representing the second in an I-channel image
Figure 116134DEST_PATH_IMAGE007
And (5) each pixel point.
Thus, the brightness characteristic value of the I-channel image is obtained.
And S2, acquiring the contrast of the HSI image, and obtaining the change degree of the HSI image influenced by the brightness by using the brightness characteristic value of the I channel image and the contrast of the HSI image.
Entropy of an image is a statistical form of features that reveal how much information is averaged out in the image. The greater the amount of information contained in an image, the greater the entropy of the image and the greater the contrast of the image. Because the image has different distortions in multiple channels, the contrast characteristic of a single channel is calculated, and the distortion of the image changes, so the relative entropy of the image is used for measuring the distortion degree of the single-channel image and the multi-channel image.
The method comprises the following specific steps of obtaining the relative entropy of an I channel image and an HSI image: respectively acquiring the number of pixel points in an I channel image and an HSI image; acquiring the number of pixel points corresponding to each same pixel value in the I channel image and the HSI image; calculating the ratio of the number of pixel points corresponding to each same pixel value in the I channel image and the HSI image to the total number of the pixel points in the I channel image; calculating the ratio of the number of pixel points corresponding to each same pixel value in the I channel image and the HSI image to the total number of pixel points in the HSI image; obtaining the relative entropy of the I channel image and the HSI image by utilizing the ratio of the number of the pixel points corresponding to each same pixel value in the I channel image and the HSI image to the number of the pixel points in the I channel image and the ratio of the number of the pixel points corresponding to each same pixel value in the I channel image and the HSI image to the number of the pixel points in the HSI image, wherein the specific expression of the relative entropy of the I channel image and the HSI image is as follows:
Figure 713469DEST_PATH_IMAGE038
in the formula:
Figure DEST_PATH_IMAGE039
representing the relative entropy of the I channel image and the HSI image,
Figure 16405DEST_PATH_IMAGE040
the ratio of the number of the pixel points corresponding to each same pixel value in the I channel image and the HSI image to the number of the pixel points in the I channel image is represented,
Figure DEST_PATH_IMAGE041
the ratio of the number of the pixel points corresponding to each same pixel value in the I channel image and the HSI image to the number of the pixel points in the HSI image is represented,
Figure 692282DEST_PATH_IMAGE042
indicating that the same pixel value in the I-channel image and the HSI image is
Figure 914316DEST_PATH_IMAGE042
The number of the pixels in time is,
Figure DEST_PATH_IMAGE043
indicating the number of identical pixel values in the same I channel image and HSI image.
Wherein when
Figure 451476DEST_PATH_IMAGE040
And
Figure 167891DEST_PATH_IMAGE041
the higher the degree of similarity is, the higher,
Figure 287157DEST_PATH_IMAGE039
the smaller the value, the smaller the relative entropy, indicating that the less the I-channel image contrast distortion, the higher the perceived quality of the image. Otherwise, the I channel image is comparedThe greater the degree distortion, the lower the image perceived quality. The relative entropy is used as a contrast characteristic to measure the distortion of the image.
Obtaining contrast of I-channel images
Figure 663780DEST_PATH_IMAGE044
Using the relative entropy of the I-channel image and the HSI image
Figure 501286DEST_PATH_IMAGE039
Contrast of I-channel image
Figure 490233DEST_PATH_IMAGE044
Ratio of
Figure DEST_PATH_IMAGE045
Obtaining contrast of HSI image
Figure 916535DEST_PATH_IMAGE011
. Contrast ratio according to HSI image
Figure 214792DEST_PATH_IMAGE011
And obtaining the variation degree of the HSI image influenced by the brightness according to the brightness characteristic value of the I channel image
Figure 290327DEST_PATH_IMAGE010
The specific expression is as follows:
Figure 597811DEST_PATH_IMAGE009
in the formula:
Figure 409779DEST_PATH_IMAGE010
indicating the degree of change in the HSI image affected by brightness,
Figure 144516DEST_PATH_IMAGE003
representing the luminance characteristic value of the I-channel image,
Figure 441768DEST_PATH_IMAGE011
representing the contrast of the HSI image.
Wherein, the contrast ratio normalization value of the HSI image is subtracted by the whole brightness normalization value of the brightness channel to represent the change coefficient of the contrast ratio, and the characteristic quantity is used for evaluating the change degree of the HSI image influenced by the brightness.
Thus, the degree of change of the HSI image affected by the brightness is obtained.
S3, setting a sliding window, traversing in the HSI image by using the set sliding window, calculating a single characteristic value of each pixel point in the sliding window by using the pixel value of each pixel point in each sliding window, the pixel value mean value and the pixel value variance of the pixel point in the sliding window, and calculating the overall characteristic value of the sliding window by using the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points.
And calculating the overall characteristic value of the HSI image according to the pixel values of the pixel points in the HSI image, wherein the characteristic is used for evaluating the HSI image quality. Because the texture distribution on the surface of the stone image is irregular, and the stone image is matched according to all parameters of the image in the process of identifying and matching the stone image, the overall characteristic value of the HSI image is calculated to judge whether the overall characteristic value of the stone image to be detected is consistent with that of the template image.
The method comprises the following steps of obtaining a single characteristic value of each pixel point in a sliding window: setting 3
Figure 552943DEST_PATH_IMAGE046
Window of 3 size, will 3
Figure 484996DEST_PATH_IMAGE046
A window of size 3 traverses the HSI image as a sliding window. The method comprises the steps of obtaining pixel values of pixel points in a sliding window, calculating the mean value and variance of the pixel values of the pixel points in the sliding window, and obtaining a single characteristic value of each pixel point in the sliding window by using the pixel value of each pixel point in the sliding window, the mean value and variance of the pixel values of the pixel points in the sliding window, wherein the specific expression is as follows:
Figure 390635DEST_PATH_IMAGE013
in the formula:
Figure 175183DEST_PATH_IMAGE014
representing points in an HSI image
Figure 824470DEST_PATH_IMAGE015
Is determined by the characteristic of the signal of the sensor,
Figure 876608DEST_PATH_IMAGE016
indicating the length of the HSI picture,
Figure 953149DEST_PATH_IMAGE017
the width of the representation image is shown,
Figure 224992DEST_PATH_IMAGE018
represents the mean value of pixel values of pixel points in the sliding window,
Figure 412391DEST_PATH_IMAGE019
representing the variance of pixel values of pixels within the sliding window,
Figure 584615DEST_PATH_IMAGE020
representing points in an HSI image
Figure 832057DEST_PATH_IMAGE015
The pixel value of (2).
In order to describe the relevance between adjacent image points in an HSI image, the relevance between a central pixel point and a neighborhood pixel point in a sliding window is obtained by utilizing a single characteristic value of each pixel point in the HSI image, the relevance between the central pixel point and the neighborhood pixel point in the sliding window is obtained by multiplying the central pixel point in the sliding window with the neighborhood pixel point respectively, the relevance between the central pixel point and each neighborhood pixel point in the sliding window is weighted and averaged to obtain the weighted average value of each sliding window, and the weighted average value of the sliding window is used as the integral characteristic value of each sliding window
Figure DEST_PATH_IMAGE047
When the relevance of the central pixel point and each neighborhood pixel point is weighted, the occupied weight is the same, and the weighted average value of the sliding window is used as the integral characteristic value of each sliding window.
Obtaining the integral characteristic value of the HSI image by utilizing the integral characteristic value of the sliding window, wherein the specific expression is as follows:
Figure 528880DEST_PATH_IMAGE022
in the formula:
Figure 769237DEST_PATH_IMAGE023
represents the overall feature value of the HSI image,
Figure 546700DEST_PATH_IMAGE024
is shown as
Figure 727495DEST_PATH_IMAGE025
The overall characteristic value of each sliding window,
Figure 223198DEST_PATH_IMAGE025
is shown as
Figure 267246DEST_PATH_IMAGE025
A sliding window is arranged on the top of the sliding window,
Figure 899216DEST_PATH_IMAGE026
the number of the sliding windows is shown,
Figure 458767DEST_PATH_IMAGE027
represents the maximum of the overall characteristic values of all the sliding windows,
Figure 425454DEST_PATH_IMAGE028
represents the minimum of the overall characteristic values of all sliding windows.
Thus, the overall characteristic value of the HIS image is obtained.
S4, calculating the overall characteristic value of the sliding window according to the brightness characteristic value of the I channel image, the brightness influence change degree of the HSI image, the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points to obtain the overall evaluation value of the stone to be detected, and matching the overall evaluation value of the stone to be detected with the overall evaluation value of each template stone to finish the classification of the stone to be detected.
Obtaining an overall evaluation value of the stone to be detected according to the brightness characteristic value of the I channel image, the change degree of the HSI image affected by the brightness and the overall characteristic value of the HSI image, wherein the specific expression is as follows:
Figure 758347DEST_PATH_IMAGE030
in the formula:
Figure 995555DEST_PATH_IMAGE031
showing the overall evaluation value of the stone to be detected,
Figure 21280DEST_PATH_IMAGE032
representing the influence value of the brightness and the contrast in the stone image to be detected,
Figure 475264DEST_PATH_IMAGE033
a normalized numerical value representing the overall feature value of the HIS image.
The integral evaluation value formula of the stone to be detected represents the integral evaluation value of the stone to be detected according to the brightness characteristic value of an I channel image in an HIS image of the stone to be detected, the influence degree of the brightness characteristic value on the contrast of the HIS image, namely the influence degree of the brightness of the HIS image and the normalized numerical value of the integral characteristic value of the HIS image. Therefore, the overall characteristics of the stone image can be reflected according to the brightness characteristic value of the I channel image in the HIS image of the stone to be detected, the influence degree value of the contrast of the HIS image, namely the influence degree of the HIS image on the brightness and the overall characteristic value of the HIS image.
Using exponential functions
Figure 611847DEST_PATH_IMAGE032
For amplifying the I-channel luminance characteristic value
Figure 703562DEST_PATH_IMAGE003
I channel contrast ratio
Figure 900189DEST_PATH_IMAGE044
HIS image influenced by brightness
Figure 841469DEST_PATH_IMAGE010
Figure 516164DEST_PATH_IMAGE033
A normalized numerical value representing the overall characteristic value of the HIS image,
Figure 462385DEST_PATH_IMAGE048
when the stone characteristics to be detected are not obvious, the overall evaluation value of the stone image to be detected is amplified, so that the identification is more accurate.
Thus, the overall evaluation value of the stone to be detected is obtained
Figure 829913DEST_PATH_IMAGE031
Using the overall evaluation value of the stone to be detected
Figure 992909DEST_PATH_IMAGE031
The overall evaluation value of each template stone material
Figure 736875DEST_PATH_IMAGE034
Comparing, and when the overall evaluation value of the stone to be detected
Figure 803182DEST_PATH_IMAGE031
Overall evaluation value of form stone
Figure 76031DEST_PATH_IMAGE034
Satisfy the requirement of
Figure DEST_PATH_IMAGE049
Then, the stone to be detected and the template stone belong to the same stone; overall evaluation value of each template stone
Figure 929587DEST_PATH_IMAGE034
The obtaining mode is the same as the obtaining method of the overall evaluation value of the stone to be detected, and the invention is not described in detail.
The invention has the beneficial effects that: the collected stone image to be detected is converted into the HIS image of the stone to be detected, the overall evaluation value of the stone is obtained by utilizing the brightness characteristic value of the I channel in the HSI image, the change degree of the HIS image influenced by the brightness and the overall characteristic value of the HIS image, and the overall evaluation value identifies the stone from three dimensions of brightness, contrast and overall information of the stone surface, so that the accuracy of stone identification is improved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A stone recognition method based on computer vision is characterized by comprising the following steps:
s1, acquiring an HSI image of the stone to be detected, extracting an I channel image in the HSI image, acquiring a gray level mean value of the I channel image and a modulus of each pixel point gradient in the I channel image, and acquiring a brightness characteristic value of the I channel image by using the gray level mean value and the modulus of each pixel point gradient in the I channel image;
s2, obtaining the contrast of the HSI image, and obtaining the change degree of the HSI image affected by the brightness by using the brightness characteristic value of the I channel image and the contrast of the HSI image;
s3, setting a sliding window, traversing in the HSI image by using the set sliding window, calculating a single characteristic value of each pixel point in the sliding window by using the pixel value of each pixel point in each sliding window, the pixel value mean value and the pixel value variance of the pixel point in the sliding window, and calculating the integral characteristic value of the sliding window by using the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points;
s4, calculating the integral characteristic value of the sliding window according to the brightness characteristic value of the I channel image, the change degree of the HSI image influenced by the brightness, the single characteristic value of the central pixel point in each sliding window and the single characteristic values of other pixel points to obtain the integral evaluation value of the stone to be detected, and matching the integral evaluation value of the stone to be detected with the integral evaluation value of each template stone to finish the classification of the stone to be detected.
2. A method as claimed in claim 1, wherein the mode of each pixel gradient is determined as follows:
acquiring the gradient amplitude and the gradient direction of each pixel point in the I channel image;
and obtaining a gradient vector of each pixel point by using the gradient amplitude and the gradient direction of each pixel point, and obtaining a mode of the gradient of each pixel point in the I-channel image by using the gradient vector of each pixel point.
3. The computer vision-based stone recognition method as claimed in claim 1, wherein the expression of the luminance characteristic value of the I-channel image is:
Figure DEST_PATH_IMAGE002
in the formula:
Figure DEST_PATH_IMAGE004
representing the luminance characteristic value of the I-channel image,
Figure DEST_PATH_IMAGE006
represents the mean value of the gray levels of the I-channel image,
Figure DEST_PATH_IMAGE008
the number of pixel points in the I-channel image is represented,
Figure DEST_PATH_IMAGE010
representing the second in an I-channel image
Figure DEST_PATH_IMAGE012
The modulus of the gradient of the individual pixels,
Figure 2605DEST_PATH_IMAGE012
representing the second in an I-channel image
Figure 745433DEST_PATH_IMAGE012
And (5) each pixel point.
4. A method for stone recognition based on computer vision as claimed in claim 1, wherein said method for obtaining HSI image contrast is:
acquiring the relative entropy of the I channel image and the HSI image and the contrast of the I channel image;
and obtaining the contrast of the HSI image by using the ratio of the relative entropy of the I channel image and the HSI image to the contrast of the I channel image.
5. A stone recognition method based on computer vision as claimed in claim 1, wherein the specific expression of the degree of change of the HSI image affected by brightness is:
Figure DEST_PATH_IMAGE014
in the formula:
Figure DEST_PATH_IMAGE016
indicating the degree of change in the HSI image affected by brightness,
Figure 815151DEST_PATH_IMAGE004
representing the luminance characteristic value of the I-channel image,
Figure DEST_PATH_IMAGE018
representing the contrast of the HSI image.
6. A method as claimed in claim 1, wherein the expression of the single eigenvalue of each pixel point is:
Figure DEST_PATH_IMAGE020
in the formula:
Figure DEST_PATH_IMAGE022
representing points in an HSI image
Figure DEST_PATH_IMAGE024
Is determined by the characteristic value of the single feature,
Figure DEST_PATH_IMAGE026
indicating the length of the HSI picture,
Figure DEST_PATH_IMAGE028
which represents the width of the image,
Figure DEST_PATH_IMAGE030
represents the mean value of pixel values of pixel points in the sliding window,
Figure DEST_PATH_IMAGE032
representing the variance of pixel values of pixels within the sliding window,
Figure DEST_PATH_IMAGE034
representing points in an HSI image
Figure 981164DEST_PATH_IMAGE024
The pixel value of (2).
7. A stone recognition method based on computer vision as claimed in claim 1, wherein the specific expression of the overall feature value of the HSI image is:
Figure DEST_PATH_IMAGE036
in the formula:
Figure DEST_PATH_IMAGE038
represents the overall feature value of the HSI image,
Figure DEST_PATH_IMAGE040
is shown as
Figure DEST_PATH_IMAGE042
The overall characteristic value of each sliding window,
Figure 71611DEST_PATH_IMAGE042
is shown as
Figure 301735DEST_PATH_IMAGE042
A sliding window is arranged on the top of the sliding window,
Figure DEST_PATH_IMAGE044
the number of the sliding windows is shown,
Figure DEST_PATH_IMAGE046
represents the maximum of the overall characteristic values of all the sliding windows,
Figure DEST_PATH_IMAGE048
represents the minimum of the overall characteristic values of all sliding windows.
8. The computer vision-based stone recognition method as claimed in claim 1, wherein the specific expression of the overall evaluation value of the stone to be detected is:
Figure DEST_PATH_IMAGE050
in the formula:
Figure DEST_PATH_IMAGE052
showing the overall evaluation value of the stone to be detected, C showing the contrast of the I-channel image,
Figure DEST_PATH_IMAGE054
representing the influence value of the brightness and the contrast in the stone image to be detected,
Figure DEST_PATH_IMAGE056
a normalized numerical value representing the overall feature value of the HIS image.
9. A stone recognition method based on computer vision as claimed in claim 1, characterized in that said method of recognizing the category of stone to be detected is:
obtaining the overall evaluation value of each template stone according to the steps S1-S4;
when the overall evaluation value of the stone to be detected
Figure DEST_PATH_IMAGE058
Evaluation value of the whole of the stone material and the template
Figure 879871DEST_PATH_IMAGE052
Satisfy the requirement of
Figure DEST_PATH_IMAGE060
And meanwhile, the stone to be detected and the template stone belong to the same stone.
CN202210902703.8A 2022-07-29 2022-07-29 Stone identification method based on computer vision Active CN114972346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210902703.8A CN114972346B (en) 2022-07-29 2022-07-29 Stone identification method based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210902703.8A CN114972346B (en) 2022-07-29 2022-07-29 Stone identification method based on computer vision

Publications (2)

Publication Number Publication Date
CN114972346A true CN114972346A (en) 2022-08-30
CN114972346B CN114972346B (en) 2022-11-04

Family

ID=82968965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210902703.8A Active CN114972346B (en) 2022-07-29 2022-07-29 Stone identification method based on computer vision

Country Status (1)

Country Link
CN (1) CN114972346B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164737A (en) * 2005-12-16 2007-06-28 Mitsubishi Heavy Ind Ltd Color-identifying method
US20150227816A1 (en) * 2014-02-10 2015-08-13 Huawei Technologies Co., Ltd. Method and apparatus for detecting salient region of image
WO2017177717A1 (en) * 2016-04-14 2017-10-19 广州视源电子科技股份有限公司 Element positioning method and system based on color and gradient
CN109961415A (en) * 2019-03-26 2019-07-02 常州工学院 A kind of adaptive gain underwater picture Enhancement Method based on HSI space optics imaging model
CN110807817A (en) * 2019-10-29 2020-02-18 长春融成智能设备制造股份有限公司 Machine vision method for target color recognition adapting to illumination change
CN111626967A (en) * 2019-02-28 2020-09-04 富华科精密工业(深圳)有限公司 Image enhancement method, image enhancement device, computer device and readable storage medium
CN111861937A (en) * 2020-07-29 2020-10-30 西安建筑科技大学 MSR (minimum shift register) improvement-based image enhancement method and system
CN113989275A (en) * 2021-12-10 2022-01-28 沭阳县源美装饰材料有限公司 Initial weight optimization-based wood board type identification method and device of neural network
CN114170208A (en) * 2021-12-14 2022-03-11 武汉福旺家包装有限公司 Paper product defect detection method based on artificial intelligence
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164737A (en) * 2005-12-16 2007-06-28 Mitsubishi Heavy Ind Ltd Color-identifying method
US20150227816A1 (en) * 2014-02-10 2015-08-13 Huawei Technologies Co., Ltd. Method and apparatus for detecting salient region of image
WO2017177717A1 (en) * 2016-04-14 2017-10-19 广州视源电子科技股份有限公司 Element positioning method and system based on color and gradient
CN111626967A (en) * 2019-02-28 2020-09-04 富华科精密工业(深圳)有限公司 Image enhancement method, image enhancement device, computer device and readable storage medium
CN109961415A (en) * 2019-03-26 2019-07-02 常州工学院 A kind of adaptive gain underwater picture Enhancement Method based on HSI space optics imaging model
CN110807817A (en) * 2019-10-29 2020-02-18 长春融成智能设备制造股份有限公司 Machine vision method for target color recognition adapting to illumination change
CN111861937A (en) * 2020-07-29 2020-10-30 西安建筑科技大学 MSR (minimum shift register) improvement-based image enhancement method and system
CN113989275A (en) * 2021-12-10 2022-01-28 沭阳县源美装饰材料有限公司 Initial weight optimization-based wood board type identification method and device of neural network
CN114170208A (en) * 2021-12-14 2022-03-11 武汉福旺家包装有限公司 Paper product defect detection method based on artificial intelligence
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ANYONG QIN, ET AL: "Edge-Smoothing-Based Distribution Preserving Hyperspherical Embedding for Hyperspectral Image Classification", 《IEEE JOURNAL OF SELECTED TOPICS IN APPLIED EARTH OBSERVATIONS AND REMOTE SENSING》 *
侯之旭等: "一种彩色图像分割的障碍物识别方法", 《重庆理工大学学报(自然科学)》 *
王晓等: "基于多特征融合的彩色图像声呐目标检测", 《计算机科学》 *
陈先桥等: "一种考虑分类的石材图像相似性比对算法", 《武汉理工大学学报》 *

Also Published As

Publication number Publication date
CN114972346B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN109269951B (en) Image-based flotation tailing ash content, concentration and coarse particle content detection method
CN110097034B (en) Intelligent face health degree identification and evaluation method
CN100550037C (en) Utilize and improve Hausdorff apart from the method for extracting the identification human ear characteristic
CN111968080B (en) Method for detecting quality of inside and outside of Feicheng peaches based on hyperspectral and deep learning
CN103518224B (en) Method for analysing microbial growth
CN113554629A (en) Strip steel red rust defect detection method based on artificial intelligence
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN110781889B (en) Deep learning-based nondestructive testing method for total sugar content in blueberry fruits
CN109284718B (en) Inspection robot-oriented variable-view-angle multi-instrument simultaneous identification method
CN112215790A (en) KI67 index analysis method based on deep learning
CN111652883B (en) Glass surface defect detection method based on deep learning
CN110782440B (en) Crop seed character measuring method
CN107610119B (en) The accurate detection method of steel strip surface defect decomposed based on histogram
CN116468724B (en) Method for testing content of calcium carbonate based on optical sensing technology
CN115994907B (en) Intelligent processing system and method for comprehensive information of food detection mechanism
CN111160451A (en) Flexible material detection method and storage medium thereof
CN116580021A (en) Environment-friendly concrete carbon reduction product production and quality detection method
CN113724339B (en) Color space feature-based color separation method for tiles with few samples
JP2020169994A (en) Method for optically detecting biomarkers
CN109816629B (en) Method and device for separating moss based on k-means clustering
CN114972346B (en) Stone identification method based on computer vision
JP2840347B2 (en) Board mounting inspection equipment
CN116246174A (en) Sweet potato variety identification method based on image processing
CN116109577A (en) Printing label defect detection system and method
CN111563536B (en) Bamboo strip color self-adaptive classification method based on machine learning

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