CN115222745A - Zheng panel material detection method based on optical information - Google Patents

Zheng panel material detection method based on optical information Download PDF

Info

Publication number
CN115222745A
CN115222745A CN202211147398.2A CN202211147398A CN115222745A CN 115222745 A CN115222745 A CN 115222745A CN 202211147398 A CN202211147398 A CN 202211147398A CN 115222745 A CN115222745 A CN 115222745A
Authority
CN
China
Prior art keywords
texture
line
center
panel
tree
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
CN202211147398.2A
Other languages
Chinese (zh)
Other versions
CN115222745B (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.)
Nantong Future Culture Technology Co ltd
Original Assignee
Nantong Future Culture 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 Nantong Future Culture Technology Co ltd filed Critical Nantong Future Culture Technology Co ltd
Priority to CN202211147398.2A priority Critical patent/CN115222745B/en
Publication of CN115222745A publication Critical patent/CN115222745A/en
Application granted granted Critical
Publication of CN115222745B publication Critical patent/CN115222745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Abstract

The invention relates to a method for detecting a koto panel material based on optical information, and belongs to the technical field of material testing and analysis. The method mainly comprises the steps of carrying out grade detection and identification on a Chinese zither panel, and obtaining each texture line pair on an edge image according to a tree center central line; obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between each two texture line pairs; obtaining the straightness of the texture line corresponding to the Chinese zither panel to be detected according to the difference between each texture line and the center line of the tree center; obtaining the corresponding purity of the Chinese zither panel to be detected according to the gray value of the pixel point on the gray image; obtaining the grade of the Chinese zither panel to be detected according to the softness degree, the area ratio of the tree center, the smoothness of the texture lines and the purity; compared with a manual detection mode, the detection method for the grade of the Chinese zither panel has the advantages of high detection efficiency and reliability and high detection precision.

Description

Guzheng panel material detection method based on optical information
Technical Field
The invention relates to the technical field of material testing and analysis, in particular to a method for detecting a Guzheng panel material based on optical information.
Background
Along with the gradual increase of the pursuit of people for art, more and more people are attracted by the traditional culture of China, and many people begin to like the traditional musical instrument Zheng; the zither arouses vibrations through stirring the string, later vibrations realize playing through the bridge of a musical instrument transmission to the panel on, so the goodness of panel is very important to the zither, and what the panel of zither chooseed for use is the paulownia wood material, and paulownia wood is favorable to the transmission of vibrations.
The existing detection method for the panel material of the koto is generally based on a manual mode, the level or the quality of the koto panel is generally judged by depending on the experience of a pianist, the detection method is greatly influenced by human subjectivity, the panel level judgment time is long, and therefore the detection reliability of the panel material of the koto based on manual work is low.
Disclosure of Invention
The invention provides a detection method of a Chinese zither panel material based on optical information, which is used for solving the problem that the traditional method cannot reliably detect the Chinese zither panel, and adopts the following technical scheme:
one embodiment of the invention provides a method for detecting a koto panel material based on optical information, which comprises the following steps:
acquiring the softness degree of the texture of the Chinese zither panel to be detected;
acquiring a surface gray image of a Chinese zither panel to be detected; performing edge detection on the gray level image by using an edge detection algorithm to obtain an edge image corresponding to the gray level image;
obtaining a center line of a tree on the edge image according to the end point coordinates of the adjacent texture lines on the edge image; obtaining each texture line pair on the edge image according to the center line of the tree center; obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between each two texture line pairs;
obtaining the smoothness of the texture lines corresponding to the Chinese zither panel to be detected according to the difference between the texture lines and the center line of the tree center;
obtaining corresponding purity of the Zheng panel to be detected according to the gray value of the pixel point on the gray image;
and obtaining the grade of the Chinese zither panel to be detected according to the soft texture degree, the tree core area ratio, the texture line straightness and the purity.
Has the advantages that: obtaining a center line of a tree on an edge image according to the end point coordinates of adjacent texture lines on the edge image; obtaining each texture line pair on the edge image according to the center line of the tree center; obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between each two texture line pairs; then obtaining the straightness of the texture line corresponding to the Chinese zither panel to be detected according to the difference between each texture line and the center line of the tree center; then, according to the gray value of the pixel points on the degree image, obtaining the corresponding purity of the Chinese zither panel to be detected; finally, obtaining the grade of the Chinese zither panel to be detected according to the softness degree, the tree center area ratio, the grain line straightness and the purity; the invention mainly carries out grade detection and identification on the Chinese zither panel, and compared with a manual detection mode, the Chinese zither panel grade detection method has the advantages of higher detection efficiency and reliability and higher detection precision.
Preferably, the method for obtaining the center line of the tree on the edge image according to the end point coordinates of the adjacent texture lines on the edge image includes:
constructing to obtain a coordinate system by taking the width of the edge image as an abscissa axis, taking the length of the edge image as an ordinate axis and taking the lower left corner of the edge image as an origin;
acquiring two end points of each texture line on the edge image, selecting a point with a smaller longitudinal coordinate value in the two end points, and marking as a target end point;
calculating the absolute value of the difference between the target end point horizontal coordinates of two adjacent stripe reason lines, and recording the absolute value of the difference between the target end point horizontal coordinates of the two adjacent stripe reason lines as the distance between the two adjacent stripe reason lines;
acquiring a minimum abscissa value and a maximum abscissa value corresponding to the edge image;
for any two adjacent strips on the edge image:
marking the two adjacent stripe texture lines as a first texture line and a second texture line respectively;
obtaining the tree center texture line significance of the two adjacent stripe lines according to the target end point horizontal coordinate value of the first texture line, the target end point horizontal coordinate value of the second texture line, the distance between the two adjacent stripe lines, the minimum horizontal coordinate value and the maximum horizontal coordinate value;
marking two adjacent stripe lines corresponding to the maximum significance of the tree center texture lines as tree center texture lines;
acquiring the horizontal coordinate values of the target end points of the two arbour texture lines, and calculating the mean horizontal coordinate value of the horizontal coordinate values of the target end points of the two arbour texture lines;
and drawing a straight line which passes through the mean value abscissa value and is perpendicular to the coordinate system abscissa axis, and marking the straight line as the center line of the tree center on the edge image.
Preferably, the tree-center texture line saliency of the two adjacent stripe texture lines is calculated according to the following formula:
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 632488DEST_PATH_IMAGE002
the significance of the core texture line of the two adjacent stripe reason lines,
Figure 346367DEST_PATH_IMAGE003
is the minimum abscissa value corresponding to the edge image,
Figure 860524DEST_PATH_IMAGE004
is the maximum abscissa value corresponding to the edge image,
Figure 927838DEST_PATH_IMAGE005
is the target endpoint abscissa value of the first texture line,
Figure 476631DEST_PATH_IMAGE006
is the target endpoint abscissa value of the second texture line,
Figure 830252DEST_PATH_IMAGE007
the distance between the two adjacent strips is taken as a reason line.
Preferably, the method for obtaining each texture line pair on the edge image according to the center line of the tree center includes:
acquiring each texture line on the left side of the center line of the tree center and each texture line on the right side of the center line of the tree center;
for each texture line to the left of the center-of-tree centerline:
obtaining target end point horizontal coordinate values of all the left texture lines, marking all the left texture lines according to the descending order of the target end point horizontal coordinate values, marking the serial number of the texture line corresponding to the maximum target end point horizontal coordinate value on the left side as 1, and repeating the steps to obtain the serial number corresponding to all the left texture lines;
for each texture line to the right of the center centerline of the tree:
obtaining a target end point horizontal coordinate value of each texture line on the right side, marking each texture line on the right side according to the sequence of the target end point horizontal coordinate values from small to large, marking the serial number of the texture line corresponding to the minimum target end point horizontal coordinate value on the right side as 1, and repeating the steps to obtain the serial number corresponding to each texture line on the right side;
two texture lines of the same sequence number are denoted as a texture line pair.
Preferably, the method for obtaining the area ratio of the center of the tree corresponding to the koto panel to be detected according to the area of the connected domain between the texture line pairs comprises the following steps:
calculating to obtain the area of a connected domain formed by each texture line pair;
judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark serial number of 1 to the connected domain area corresponding to the texture line pair with the mark serial number of 2 is larger than a preset threshold value or not, if so, judging that the connected domain area corresponding to the texture line pair with the mark serial number of 1 is the area of the tree center area; if not, judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark serial number 2 to the connected domain area corresponding to the texture line pair with the mark serial number 3 is larger than a preset threshold value or not, and if so, judging that the connected domain area corresponding to the texture line pair with the mark serial number 2 is the area of the tree center area; analogizing in sequence to obtain the area of the tree center area of the Chinese zither panel to be detected;
recording the proportion of the area of the tree center region of the Chinese zither panel to be detected in the total area of the Chinese zither panel to be detected as the area proportion of the tree center region corresponding to the Chinese zither panel to be detected.
Preferably, the method for obtaining the straightness of the texture line corresponding to the zither panel to be detected according to the difference between each texture line and the center line of the tree center comprises the following steps:
for any texture line on the edge image:
sequencing the points on the texture line according to the sequence of the longitudinal coordinate values from small to large to obtain an abscissa value sequence corresponding to the texture line;
acquiring an abscissa value corresponding to the center line of the tree center;
calculating the absolute value of the difference between each element in the abscissa value sequence corresponding to the grain line and the abscissa value corresponding to the center line of the tree center to obtain a difference index corresponding to each element in the abscissa value sequence; constructing and obtaining a difference index sequence corresponding to the texture line according to the difference index;
calculating the sample entropy of the difference index sequence to obtain the sample entropy of the difference index sequence, and recording the sample entropy of the difference index sequence as the straightness of the texture line;
according to the straightness corresponding to each texture line, constructing and obtaining a straightness sequence corresponding to the edge image; and calculating the sample entropy of the straightness sequence, and recording the sample entropy of the straightness sequence as the straightness of the texture line corresponding to the Chinese zither panel to be detected.
Preferably, the method for obtaining the corresponding purity of the to-be-detected zither panel according to the gray value of the pixel point on the gray image comprises the following steps:
counting the gray value of the pixel point on the gray image to construct a gray histogram;
obtaining the number of pixel points corresponding to each gray value on the gray image according to the gray histogram;
obtaining a Gaussian curve equation of the gray level histogram; the horizontal axis of the gray level histogram is a gray level value, and the vertical axis of the gray level histogram is the number of pixel points;
obtaining the peak position and the corresponding gray value on the Gaussian curve, and recording as a target gray value;
making a straight line perpendicular to the transverse axis at the position of the wave crest, and recording the straight line as a first central line;
taking the first central line as a center, and respectively extending two straight lines parallel to the longitudinal axis from the position of the first central line to the left side and the right side of the first central line; stopping extending when the area enclosed by the two straight lines, the Gaussian curve and the transverse axis is equal to a preset area, and recording the abscissa values corresponding to the two straight lines at the moment to obtain the abscissa value range corresponding to the two straight lines at the moment;
obtaining each pixel point corresponding to each gray value out of the value range of the abscissa, and marking as a first pixel point;
calculating the absolute value of the difference between the gray value corresponding to each first pixel point and the target gray value to obtain the difference degree corresponding to each first pixel point;
grading the difference degree corresponding to each first pixel point to obtain the number of the first pixel points corresponding to each difference grade;
and obtaining the corresponding purity of the koto panel to be detected according to the number of the first pixel points corresponding to the difference grades and the difference grades.
Preferably, the corresponding purity of the zither panel to be detected is calculated according to the following formula:
Figure 769389DEST_PATH_IMAGE008
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE009
for the corresponding purity of the panel of the koto to be detected,
Figure 499447DEST_PATH_IMAGE010
for the number of the levels of the difference,
Figure 574851DEST_PATH_IMAGE011
the number of the first pixel points corresponding to the ith difference level.
Preferably, the method for obtaining the grade of the zither panel to be detected according to the soft texture degree, the tree center area ratio, the grain line straightness and the purity comprises the following steps:
and inputting the softness degree, the tree core area ratio, the texture line straightness and the purity into a trained classification network to obtain the grade of the Chinese zither panel to be detected.
Drawings
To more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the following description will be made
While the drawings necessary for the embodiment or prior art description are briefly described, it should be apparent that the drawings in the following description are merely examples of the invention and that other drawings may be derived from those drawings by those of ordinary skill in the art without inventive step.
Fig. 1 is a flowchart of a method for detecting a koto panel material based on optical information according to the present invention;
fig. 2 is a schematic diagram of a koto panel of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying 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, rather than all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present invention belong to the protection scope of the embodiments of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment provides a detection method of a koto panel material based on optical information, which is described in detail as follows:
as shown in fig. 1, the method for detecting a koto panel material based on optical information includes the following steps:
and S001, acquiring the softness of the texture of the Chinese zither panel to be detected.
Because the panel of the Chinese zither is one of the important factors for determining the tone quality of the Chinese zither, the panel of the Chinese zither is generally divided into three levels according to the texture and the texture of the panel; the first-level panel is obtained by concentrating the materials between the radius and the tree center, and the part with the tree center slightly, namely the area of the tree center near the middle part, occupies a smaller proportion, the texture is smooth and straight, the space is reasonable, and the texture is loose; the material of the secondary panel is that the area of the tree center at the middle part accounts for a certain proportion, the texture is basically straight, but the space width is staggered, namely the space is more regular, and the texture is loose; the material of the three-level panel is a part with a tree center, the area of the tree center accounts for a large proportion, the texture is not smooth and straight, the difference of the width and the width of the space is obvious, and the rigidity of the material is more than that of the material and is not enough; the purity of the koto panels with different grades also differs, the color on the panel with better grade is purer, and the variegated color is less, so the possibility of other abnormalities such as scar knots appearing on the panel is less; therefore, the texture, the tree center area ratio, the texture smoothness and the panel purity of the Chinese zither panel to be detected are used as the basis for evaluating the grade of the Chinese zither panel to be detected; compared with a manual detection mode, the detection method for the Chinese zither panel grade is high in detection efficiency and detection precision.
The concrete process of obtaining the texture softness degree of the Chinese zither panel to be detected is as follows:
the texture softness degree of the Chinese zither panel to be detected is reflected by the density of the Chinese zither panel, when the density of the Chinese zither panel to be detected is lower, the texture of the Chinese zither panel to be detected is soft, and when the density of the Chinese zither panel to be detected is higher, the texture rigidity of the Chinese zither panel to be detected is higher; therefore, the embodiment utilizes the CT technology to detect the density of the Chinese zither panel to be detected, and further obtains the softness degree of the Chinese zither panel to be detected; the CT technique is a well-known technique, and thus the present embodiment will not be described in detail. The process of obtaining the softness degree of the Chinese zither panel to be detected by utilizing the CT technology comprises the following steps: treat to detect the zither panel and carry out the scanning of X ray, through the processing of computer, obtain the CT image of treating the zither panel, later obtain the Density histogram of treating the zither panel through CT Density module, later carry out Gaussian curve fitting to the Density histogram, carry out the calculation of covariance to the image after the fitting, finally show the soft degree of texture of treating the zither panel through covariance. And taking the obtained texture softness degree of the Chinese zither panel to be detected as a basis for subsequently judging and analyzing the grade of the Chinese zither panel to be detected.
S002, acquiring a surface gray image of the Zheng panel to be detected; and carrying out edge detection on the gray level image by using an edge detection algorithm to obtain an edge image corresponding to the gray level image.
Because the embodiment needs to analyze and obtain the texture smoothness and the tree center area ratio of the to-be-detected Chinese zither panel based on the surface image of the to-be-detected Chinese zither panel, the embodiment places the to-be-detected Chinese zither panel on the storage platform, and uses the camera to collect the surface image of the to-be-detected Chinese zither panel, the two longer sides of the general Chinese zither panel are parallel to each other, and the length of the image obtained when the camera collects the image is parallel to the length of the to-be-detected Chinese zither panel; therefore, the image of the surface of the Chinese zither panel to be detected can be obtained by the camera.
Because the image that probably receives external environment factor or camera hardware when carrying out image acquisition makes the image that obtains have the noise, and subsequent processing result can be influenced to the noise, so will treat to detect zither panel surface image and carry out filtering processing, this embodiment adopts gaussian filtering processing, later to treat after gaussian filtering processing to detect zither panel surface image and carry out grey scale processing, obtain and treat to detect zither panel surface grey scale image. Then, edge detection is carried out on the gray level image of the surface of the Chinese zither panel to be detected by utilizing a canny edge detection algorithm, so as to obtain an edge image corresponding to the gray level image; the edge image and the gray level image are the basis for obtaining the grain straightness and the tree center area ratio through subsequent analysis. The canny edge detection algorithm is a well-known technique, and therefore, this embodiment will not be described.
S003, obtaining a center of tree center central line on the edge image according to the end point coordinates of the adjacent texture lines on the edge image; obtaining each texture line pair on the edge image according to the center line of the tree center; and obtaining the area ratio of the tree center corresponding to the Chinese zither panel to be detected according to the area of the connected domain between the texture line pairs.
In the embodiment, the center line of the tree center on the edge image is obtained by analyzing the coordinates of the end points of each texture line on the edge image; then analyzing the center line of the tree center to obtain each texture line pair on the edge image; then, according to the area of a communication domain between each two texture line pairs, obtaining the area ratio of a tree center corresponding to the Chinese zither panel to be detected; and taking the obtained tree center area ratio of the to-be-detected Chinese zither panel as a basis for subsequently judging and analyzing the grade of the to-be-detected Chinese zither panel.
(a) The specific process of obtaining the center line of the tree center on the edge image according to the end point coordinates of the adjacent texture lines on the edge image is as follows:
because the zither panel is generally obtained by cutting the wood grains radially, the grains on the zither panel are close to straight grains, as shown in fig. 2; mountain water lines may exist on a Chinese zither panel, and the mountain water lines influence the subsequent analysis of the area ratio of the tree center, so that texture lines corresponding to the mountain water lines on the edge image are removed, and each texture line on the edge image after removal is obtained; the longer side of the koto panel to be detected is the length of the image, so that a coordinate system is constructed by taking the width of the edge image as an abscissa axis, the length of the edge image as an ordinate axis and the lower left corner of the edge image as an origin; then obtaining two end points of each texture line on the edge image, selecting a point with a smaller longitudinal coordinate value in the two end points, and marking as a target end point; then calculating the absolute value of the difference between the abscissa of the target end points of two adjacent strip-structured lines, and recording the absolute value of the difference between the abscissa of the target end points of the two adjacent strip-structured lines as the distance between the two adjacent strip-structured lines; and then acquiring a minimum abscissa value and a maximum abscissa value corresponding to the edge image.
For any two adjacent strips on the edge image: marking the two adjacent stripe lines as a first stripe line and a second stripe line respectively; obtaining the tree center texture line significance of the two adjacent stripe texture lines according to the target endpoint horizontal coordinate value of the first texture line, the target endpoint horizontal coordinate value of the second texture line, the distance between the two adjacent stripe texture lines, and the minimum horizontal coordinate value and the maximum horizontal coordinate value corresponding to the edge image; calculating the significance of the tree core texture lines of the two adjacent stripe reason lines according to the following formula:
Figure 302635DEST_PATH_IMAGE012
wherein, the first and the second end of the pipe are connected with each other,
Figure 853702DEST_PATH_IMAGE002
the significance of the tree center texture line of the two adjacent stripe reason lines,
Figure 325135DEST_PATH_IMAGE003
is the minimum abscissa value corresponding to the edge image,
Figure 255045DEST_PATH_IMAGE004
is the maximum abscissa value corresponding to the edge image,
Figure 481627DEST_PATH_IMAGE005
is the horizontal coordinate value of the target endpoint of the first texture line,
Figure 457673DEST_PATH_IMAGE006
is the target endpoint abscissa value of the second texture line,
Figure 404901DEST_PATH_IMAGE007
arranging the distance between the lines of the two adjacent stripes;
Figure 579530DEST_PATH_IMAGE002
the larger the value of (A) indicates that the two adjacent fringe lines are closer to the center region of the tree.
Therefore, the tree center texture line saliency of two adjacent stripe texture lines on the edge image can be obtained through the process; marking two adjacent stripe lines corresponding to the maximum significance of the tree center texture lines as tree center texture lines; acquiring the horizontal coordinate values of the target end points of the two tree center texture lines, and calculating the mean horizontal coordinate value of the horizontal coordinate values of the target end points of the two tree center texture lines; making a straight line perpendicular to the abscissa axis of the coordinate system after crossing the mean abscissa value, and marking the straight line as the center line of the tree center on the edge image; the tree center central line is also the tree center central line of the Chinese zither panel to be detected; the tree center central line is the position, closest to the tree center, on the Chinese zither panel to be detected.
(b) Obtaining each texture line pair on the edge image according to the center line of the tree center; the specific process of obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between each two texture line pairs is as follows:
due to the cutting mode of the Chinese zither panel, a plurality of texture line pairs exist on the Chinese zither panel, and two stripe reason lines of the texture line pairs are the same annual ring line on the tree; marking each texture line on the edge image according to the center line of the tree center to obtain each texture line on the left side of the center line of the tree center and each texture line on the right side of the center line of the tree center; for each texture line to the left of the center-of-tree centerline: and acquiring the target endpoint horizontal coordinate values of all the left texture lines, then marking all the left texture lines according to the descending order of the target endpoint horizontal coordinate values, namely marking the serial number of the texture line corresponding to the maximum target endpoint horizontal coordinate value on the left side as 1, and repeating the steps to obtain the serial numbers corresponding to all the left texture lines. For each texture line to the right of the center-of-tree centerline: and acquiring the target endpoint horizontal coordinate values of the texture lines on the right side, then marking the texture lines on the right side according to the sequence of the target endpoint horizontal coordinate values from small to large, namely marking the serial number of the texture line corresponding to the minimum target endpoint horizontal coordinate value on the right side as 1, and repeating the steps to obtain the serial numbers corresponding to the texture lines on the right side.
Therefore, the sequence number corresponding to each texture line on the edge image can be obtained through the process, and two texture lines with the same sequence number are marked as a texture line pair; therefore, each texture line pair on the edge image can be obtained, the area of a connected domain formed by each texture line pair is obtained through calculation, and the area of the connected domain formed by the texture line pair closer to the center line of the tree is more likely to be the area of the center area of the tree of the Chinese zither panel to be detected; in general, the area of a connected domain formed by texture line pairs closer to the center line of the tree center is larger; therefore, firstly, judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark serial number of 1 to the connected domain area corresponding to the texture line pair with the mark serial number of 2 is larger than a preset threshold value or not, if so, judging that the connected domain area corresponding to the texture line pair with the mark serial number of 1 is the area of the tree center area; if not, judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark number of 2 to the connected domain area corresponding to the texture line pair with the mark number of 3 is larger than a preset threshold value or not, and if so, judging that the connected domain area corresponding to the texture line pair with the mark number of 2 is the area of the tree center area; by analogy, the area of the tree center area of the Chinese zither panel to be detected can be obtained; the preset threshold value needs to be set according to actual conditions; and then recording the proportion of the area of the tree center region of the Chinese zither panel to be detected to the total area of the Chinese zither panel to be detected as the area proportion of the tree center region corresponding to the Chinese zither panel to be detected.
And step S004, obtaining the straightness of the texture lines corresponding to the Zheng panel to be detected according to the difference between each texture line and the center line of the tree center.
In the embodiment, the center line of the tree center obtained in the step S003 is taken as a reference to obtain the straightness of the texture line corresponding to the Chinese zither panel to be detected; the method specifically comprises the following steps:
for any texture line on the edge image: sequencing the points on the texture line according to the sequence of the longitudinal coordinate values from small to large to obtain an abscissa value sequence corresponding to the texture line; acquiring an abscissa value corresponding to the center line of the tree center; calculating the absolute value of the difference between each element in the abscissa value sequence corresponding to the texture line and the abscissa value corresponding to the center line of the tree center to obtain a difference index corresponding to each element in the abscissa value sequence; constructing and obtaining a difference index sequence corresponding to the texture line according to the difference index corresponding to each element in the abscissa value sequence; calculating the sample entropy of the difference index sequence to obtain the sample entropy of the difference sequence, and recording the sample entropy of the difference sequence as the straightness of the texture line; the sample entropy can measure the complexity of the sequence, and the larger the sample entropy of the sequence is, the more complex the sample sequence is, which indicates that the straightness of the current texture line is lower; the smaller the sample entropy, the simpler the sequence, the higher the similarity, and the higher the straightness of the texture line, so the sample entropy can be used to measure the straightness of the texture line.
Therefore, the straightness corresponding to each texture line on the edge image can be obtained through the process, and a straightness sequence corresponding to the edge image is constructed and obtained; and then calculating the sample entropy of the straightness sequence, and recording the sample entropy of the straightness sequence as the straightness of the texture line corresponding to the Chinese zither panel to be detected.
And S005, obtaining the corresponding purity of the Guzheng panel to be detected according to the gray value of the pixel points on the gray image.
Under the general condition, the high-grade Guzheng panel has less mottle, the whole color is transparent, and the gray value of each pixel point and the average gray value of the whole panel have smaller difference; the two-level and three-level panels have more variegated colors, the gray value of part of pixel points has larger difference with the gray value of the whole panel, more scar knots can appear, the scar knots have obvious difference compared with the surrounding area, and the color is darker; therefore, according to the gray value of the pixel point on the gray image, the corresponding purity of the to-be-detected Chinese zither panel is obtained, and the purity can reflect whether the color on the to-be-detected Chinese zither panel is pure or not; the specific process is as follows:
counting the gray value of pixel points on a gray image on the surface of a koto panel to be detected to construct a gray histogram, wherein the horizontal axis of the gray histogram is the gray value, the value range is 0 to 255, and the vertical axis is the number of the pixel points; obtaining the number of pixel points corresponding to each gray value on the gray image on the surface of the Chinese zither panel to be detected according to the gray histogram; and the gray level statistical histogram is approximately presented as Gaussian distribution, a Gaussian curve equation of the gray level histogram is obtained through curve fitting, the peak position can be obtained through a mathematical derivation method, and the gray level value corresponding to the peak position is obtained
Figure 649117DEST_PATH_IMAGE013
And recording as a target gray value; the area enclosed by the Gaussian curve and the horizontal axis can be obtained through integral calculation and is recorded as
Figure 50143DEST_PATH_IMAGE014
(ii) a Making a straight line perpendicular to the transverse axis at the position of the wave crest, and recording as a first central line; and centered on the first central lineThe center, two straight lines parallel to the longitudinal axis extend from the first center line position to the left and right sides of the first center line respectively, when the area enclosed by the two straight lines, the Gaussian curve and the horizontal axis is
Figure 863378DEST_PATH_IMAGE015
Stopping extending, and recording the abscissa values corresponding to the two straight lines at the moment to obtain the abscissa value range corresponding to the two straight lines at the moment, wherein the gray value in the abscissa value range is the main gray value on the Chinese zither panel to be detected; this embodiment is as follows
Figure 158093DEST_PATH_IMAGE016
The value range of (a) is 0.7.
Then obtaining all gray values which are not in the abscissa value range and all pixel points corresponding to all gray values which are not in the abscissa value range, and recording the gray values as first pixel points; then calculating the absolute value of the difference between the gray value corresponding to each first pixel point and the target gray value to obtain the difference degree corresponding to each first pixel point; grading the difference degrees corresponding to the first pixel points, and recording the difference degrees in the preset difference degree ranges as the same difference degree; setting the number of the difference levels to be 10; therefore, the number of the first pixel points corresponding to each difference grade can be obtained; obtaining the corresponding purity of the Zheng panel to be detected according to the number of the first pixel points corresponding to each difference grade and each difference grade; calculating the corresponding purity of the Zheng panel to be detected according to the following formula:
Figure 664161DEST_PATH_IMAGE017
wherein, the first and the second end of the pipe are connected with each other,
Figure 21324DEST_PATH_IMAGE009
for the corresponding purity of the panel of the koto to be detected,
Figure 700567DEST_PATH_IMAGE010
is a differenceThe number of the different grades is different from the original grade,
Figure 787471DEST_PATH_IMAGE011
the number of first pixel points corresponding to the ith difference level is obtained;
Figure 133615DEST_PATH_IMAGE009
the smaller the value of (A) is, the higher the purity of the Chinese zither panel to be detected is, the less the mottled color is; otherwise, more mottle is indicated.
And S006, obtaining the grade of the Zheng panel to be detected according to the soft texture degree, the area ratio of the tree center, the smoothness of the texture lines and the purity.
In this embodiment, the obtained softness degree, the area ratio of the tree centers, the smoothness of the grain lines and the purity of the Chinese zither panel to be detected are input into a trained classification network, so as to obtain the grade of the Chinese zither panel to be detected; the classification network is a fully-connected neural network, and the loss function of the classification network is a cross entropy loss function; the specific network structure and training process of the classification network are well known technologies, and therefore, the present embodiment will not be described in detail.
Has the beneficial effects that: in the embodiment, the center line of the tree center on the edge image is obtained according to the end point coordinates of the adjacent texture lines on the edge image; obtaining each texture line pair on the edge image according to the center line of the tree center; obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between each two texture line pairs; then obtaining the straightness of the texture line corresponding to the Chinese zither panel to be detected according to the difference between each texture line and the center line of the tree center; then, according to the gray value of the pixel points on the degree image, obtaining the corresponding purity of the Chinese zither panel to be detected; finally, obtaining the grade of the Chinese zither panel to be detected according to the softness degree, the tree center area ratio, the grain line straightness and the purity; the embodiment mainly carries out grade detection and identification on the Chinese zither panel, and compared with a manual detection mode, the Chinese zither panel grade detection method has the advantages of higher detection efficiency and reliability and higher detection precision.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (9)

1. A detection method for a koto panel material based on optical information is characterized by comprising the following steps:
acquiring the softness degree of the texture of the Chinese zither panel to be detected;
acquiring a surface gray image of a Chinese zither panel to be detected; carrying out edge detection on the gray level image by using an edge detection algorithm to obtain an edge image corresponding to the gray level image;
obtaining a center line of a tree on the edge image according to the end point coordinates of the adjacent texture lines on the edge image; obtaining each texture line pair on the edge image according to the center line of the tree center; obtaining the area ratio of the center of the tree corresponding to the Chinese zither panel to be detected according to the area of the connected domain between the texture line pairs;
obtaining the smoothness of the texture lines corresponding to the Chinese zither panel to be detected according to the difference between the texture lines and the center line of the tree center;
obtaining the corresponding purity of the Chinese zither panel to be detected according to the gray value of the pixel point on the gray image;
and obtaining the grade of the Chinese zither panel to be detected according to the softness degree, the tree core area ratio, the grain line straightness and the purity.
2. The method for detecting koto panel material based on optical information as claimed in claim 1, wherein the method for obtaining the center line of the tree on the edge image according to the coordinates of the end points of the adjacent texture lines on the edge image comprises:
constructing a coordinate system by taking the width of the edge image as an abscissa axis, the length of the edge image as an ordinate axis and the lower left corner of the edge image as an origin;
acquiring two end points of each texture line on the edge image, selecting a point with a smaller longitudinal coordinate value in the two end points, and marking as a target end point;
calculating the absolute value of the difference between the target end point horizontal coordinates of two adjacent stripe reason lines, and recording the absolute value of the difference between the target end point horizontal coordinates of the two adjacent stripe reason lines as the distance between the two adjacent stripe reason lines;
acquiring a minimum abscissa value and a maximum abscissa value corresponding to the edge image;
for any two adjacent strips on the edge image:
marking the two adjacent stripe lines as a first stripe line and a second stripe line respectively;
obtaining the tree center texture line significance of the two adjacent stripe lines according to the target end point horizontal coordinate value of the first texture line, the target end point horizontal coordinate value of the second texture line, the distance between the two adjacent stripe lines, the minimum horizontal coordinate value and the maximum horizontal coordinate value;
recording two adjacent stripe texture lines corresponding to the maximum significance of the tree center texture lines as the tree center texture lines;
acquiring the horizontal coordinate values of the target end points of the two arbour texture lines, and calculating the mean horizontal coordinate value of the horizontal coordinate values of the target end points of the two arbour texture lines;
and drawing a straight line which passes through the mean value abscissa value and is perpendicular to the coordinate system abscissa axis, and marking the straight line as the center line of the tree center on the edge image.
3. The method according to claim 2, wherein the tree center grain line saliency of the two adjacent grain lines is calculated according to the following formula:
Figure 597485DEST_PATH_IMAGE002
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE003
the significance of the core texture line of the two adjacent stripe reason lines,
Figure 921150DEST_PATH_IMAGE004
is the minimum abscissa value corresponding to the edge image,
Figure DEST_PATH_IMAGE005
is the maximum abscissa value corresponding to the edge image,
Figure 904149DEST_PATH_IMAGE006
is the target endpoint abscissa value of the first texture line,
Figure DEST_PATH_IMAGE007
is the horizontal coordinate value of the target endpoint of the second texture line,
Figure 830517DEST_PATH_IMAGE008
the distance between the two adjacent strips is taken as a reason line.
4. The method for detecting koto panel material based on optical information according to claim 2, wherein the method for obtaining each texture line pair on the edge image according to the center line of the tree comprises:
acquiring each texture line on the left side of the center line of the tree center and each texture line on the right side of the center line of the tree center;
for each texture line to the left of the center-of-tree centerline:
obtaining target end point horizontal coordinate values of all the left texture lines, marking all the left texture lines according to the descending order of the target end point horizontal coordinate values, marking the serial number of the texture line corresponding to the maximum target end point horizontal coordinate value on the left side as 1, and repeating the steps to obtain the serial number corresponding to all the left texture lines;
for each texture line to the right of the center-of-tree centerline:
obtaining a target end point horizontal coordinate value of each texture line on the right side, marking each texture line on the right side according to the sequence of the target end point horizontal coordinate values from small to large, marking the serial number of the texture line corresponding to the minimum target end point horizontal coordinate value on the right side as 1, and repeating the steps to obtain the serial number corresponding to each texture line on the right side;
two texture lines of the same sequence number are denoted as a texture line pair.
5. The method for detecting koto panel materials based on optical information according to claim 4, wherein the method for obtaining the area of the center of the tree corresponding to the koto panel to be detected according to the area of the connected domain between the pairs of the texture lines comprises:
calculating to obtain the area of a connected domain formed by each texture line pair;
judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark serial number of 1 to the connected domain area corresponding to the texture line pair with the mark serial number of 2 is larger than a preset threshold value or not, if so, judging that the connected domain area corresponding to the texture line pair with the mark serial number of 1 is the area of the tree center area; if not, judging whether the ratio of the connected domain area corresponding to the texture line pair with the mark serial number 2 to the connected domain area corresponding to the texture line pair with the mark serial number 3 is larger than a preset threshold value or not, and if so, judging that the connected domain area corresponding to the texture line pair with the mark serial number 2 is the area of the tree center area; analogizing in sequence to obtain the area of the tree center area of the Chinese zither panel to be detected;
recording the proportion of the area of the tree center region of the Chinese zither panel to be detected in the total area of the Chinese zither panel to be detected as the area proportion of the tree center region corresponding to the Chinese zither panel to be detected.
6. The method for detecting koto panel materials based on optical information according to claim 2, wherein the method for obtaining the straightness of the texture lines corresponding to the koto panel to be detected according to the differences between the texture lines and the center line of the tree center comprises:
for any texture line on the edge image:
sequencing the points on the texture line according to the sequence of the longitudinal coordinate values from small to large to obtain an abscissa value sequence corresponding to the texture line;
acquiring an abscissa value corresponding to the center line of the tree center;
calculating the absolute value of the difference between each element in the abscissa value sequence corresponding to the grain line and the abscissa value corresponding to the center line of the tree center to obtain a difference index corresponding to each element in the abscissa value sequence; constructing and obtaining a difference index sequence corresponding to the texture line according to the difference index;
calculating the sample entropy of the difference index sequence to obtain the sample entropy of the difference index sequence, and recording the sample entropy of the difference index sequence as the straightness of the texture line;
according to the straightness corresponding to each texture line, constructing and obtaining a straightness sequence corresponding to the edge image; and calculating the sample entropy of the straightness sequence, and recording the sample entropy of the straightness sequence as the straightness of the texture line corresponding to the Chinese zither panel to be detected.
7. The method for detecting koto panel materials based on optical information according to claim 1, wherein the method for obtaining the corresponding purity of the koto panel to be detected according to the gray-scale values of the pixels on the gray-scale image comprises:
counting the gray value of the pixel points on the gray image to construct a gray histogram;
obtaining the number of pixel points corresponding to each gray value on the gray image according to the gray histogram;
obtaining a Gaussian curve equation of the gray level histogram; the horizontal axis of the gray histogram is gray value, and the vertical axis is the number of pixel points;
obtaining the peak position and the corresponding gray value on the Gaussian curve, and recording as a target gray value;
making a straight line perpendicular to the transverse axis at the position of the wave crest, and recording the straight line as a first central line;
taking the first central line as a center, and respectively extending two straight lines parallel to the longitudinal axis from the position of the first central line to the left side and the right side of the first central line; stopping extending when the area enclosed by the two straight lines, the Gaussian curve and the transverse axis is equal to a preset area, and recording the abscissa values corresponding to the two straight lines at the moment to obtain the abscissa value range corresponding to the two straight lines at the moment;
obtaining pixel points corresponding to gray values which are not in the value range of the abscissa, and recording the pixel points as first pixel points;
calculating the absolute value of the difference between the gray value corresponding to each first pixel point and the target gray value to obtain the difference degree corresponding to each first pixel point;
grading the difference degree corresponding to each first pixel point to obtain the number of the first pixel points corresponding to each difference grade;
and obtaining the corresponding purity of the koto panel to be detected according to the number of the first pixel points corresponding to the difference grades and the difference grades.
8. The method for detecting koto panel materials based on optical information as claimed in claim 7, wherein the corresponding purity of the koto panel to be detected is calculated according to the following formula:
Figure 379310DEST_PATH_IMAGE010
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE011
for the corresponding purity of the panel of the koto to be detected,
Figure 405035DEST_PATH_IMAGE012
for the number of the levels of the difference,
Figure DEST_PATH_IMAGE013
the number of the first pixel points corresponding to the ith difference level.
9. The method for detecting koto panel materials based on optical information according to claim 1, wherein the method for obtaining the grade of the koto panel to be detected according to the softness degree, the center area ratio, the grain line straightness, and the purity comprises:
and inputting the softness degree, the tree core area ratio, the texture line straightness and the purity into a trained classification network to obtain the grade of the Chinese zither panel to be detected.
CN202211147398.2A 2022-09-21 2022-09-21 Guzheng panel material detection method based on optical information Active CN115222745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211147398.2A CN115222745B (en) 2022-09-21 2022-09-21 Guzheng panel material detection method based on optical information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211147398.2A CN115222745B (en) 2022-09-21 2022-09-21 Guzheng panel material detection method based on optical information

Publications (2)

Publication Number Publication Date
CN115222745A true CN115222745A (en) 2022-10-21
CN115222745B CN115222745B (en) 2022-12-13

Family

ID=83617269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211147398.2A Active CN115222745B (en) 2022-09-21 2022-09-21 Guzheng panel material detection method based on optical information

Country Status (1)

Country Link
CN (1) CN115222745B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109253985A (en) * 2018-11-28 2019-01-22 东北林业大学 The method of near infrared light spectrum discrimination Chinese zither panel grading of timber neural network based
WO2021164280A1 (en) * 2020-02-20 2021-08-26 腾讯科技(深圳)有限公司 Three-dimensional edge detection method and apparatus, storage medium and computer device
CN113610831A (en) * 2021-08-19 2021-11-05 江西应用技术职业学院 Wood defect detection method based on computer image technology and transfer learning
CN114897773A (en) * 2022-03-31 2022-08-12 海门王巢家具制造有限公司 Distorted wood detection method and system based on image processing
CN115046956A (en) * 2022-08-17 2022-09-13 扬州金韵乐器御工坊有限公司 Zheng panel material detection method based on optical information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109253985A (en) * 2018-11-28 2019-01-22 东北林业大学 The method of near infrared light spectrum discrimination Chinese zither panel grading of timber neural network based
WO2021164280A1 (en) * 2020-02-20 2021-08-26 腾讯科技(深圳)有限公司 Three-dimensional edge detection method and apparatus, storage medium and computer device
CN113610831A (en) * 2021-08-19 2021-11-05 江西应用技术职业学院 Wood defect detection method based on computer image technology and transfer learning
CN114897773A (en) * 2022-03-31 2022-08-12 海门王巢家具制造有限公司 Distorted wood detection method and system based on image processing
CN115046956A (en) * 2022-08-17 2022-09-13 扬州金韵乐器御工坊有限公司 Zheng panel material detection method based on optical information

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
董荻: "乐器共鸣面板用木材的特性与声学品质评价", 《木材科学与技术》 *
高文韬: "基于纹理图像的琵琶面板选取方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN115222745B (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN113989279B (en) Plastic film quality detection method based on artificial intelligence and image processing
CN114862862B (en) Pump body cold shut defect identification method and system based on image processing
CN110097034B (en) Intelligent face health degree identification and evaluation method
Chen et al. A self organizing map optimization based image recognition and processing model for bridge crack inspection
CN115294113B (en) Quality detection method for wood veneer
CN106557764B (en) A kind of water level recognition methods based on binary-coded character water gauge and image procossing
CN114549522A (en) Textile quality detection method based on target detection
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN115100221A (en) Glass defect segmentation method
CN109064553B (en) Solid wood board section morphology inversion method based on near infrared spectrum analysis
CN115861290B (en) Skin-feel wood door surface defect detection method
CN115063400B (en) Musical instrument production defect detection method using visual means
CN116385450B (en) PS sheet wear resistance detection method based on image processing
CN114723704A (en) Textile quality evaluation method based on image processing
CN116309599B (en) Water quality visual monitoring method based on sewage pretreatment
CN110287975A (en) Flotation dosing abnormity detection method based on NSST morphological characteristics and depth KELM
CN113838054A (en) Mechanical part surface damage detection method based on artificial intelligence
CN115100200A (en) Optical fiber defect detection method and system based on optical means
CN111351860A (en) Wood internal defect detection method based on Faster R-CNN
CN115290053A (en) Method for quickly detecting construction abnormity of high-rise building
CN115375690A (en) Tongue picture putrefaction classification and identification method
CN116721391A (en) Method for detecting separation effect of raw oil based on computer vision
CN117689655B (en) Metal button surface defect detection method based on computer vision
CN115222745B (en) Guzheng panel material detection method based on optical information
CN114897825A (en) Solid wood floor sorting method and system based on computer vision

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