CN111141823A - Hami melon maturity rapid detection method based on sound signals of smart phone - Google Patents

Hami melon maturity rapid detection method based on sound signals of smart phone Download PDF

Info

Publication number
CN111141823A
CN111141823A CN202010033330.6A CN202010033330A CN111141823A CN 111141823 A CN111141823 A CN 111141823A CN 202010033330 A CN202010033330 A CN 202010033330A CN 111141823 A CN111141823 A CN 111141823A
Authority
CN
China
Prior art keywords
maturity
hami
sound signal
signal
melons
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.)
Pending
Application number
CN202010033330.6A
Other languages
Chinese (zh)
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.)
Shihezi University
Original Assignee
Shihezi University
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 Shihezi University filed Critical Shihezi University
Priority to CN202010033330.6A priority Critical patent/CN111141823A/en
Publication of CN111141823A publication Critical patent/CN111141823A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N29/00Investigating or analysing materials by the use of ultrasonic, sonic or infrasonic waves; Visualisation of the interior of objects by transmitting ultrasonic or sonic waves through the object
    • G01N29/04Analysing solids
    • G01N29/045Analysing solids by imparting shocks to the workpiece and detecting the vibrations or the acoustic waves caused by the shocks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N29/00Investigating or analysing materials by the use of ultrasonic, sonic or infrasonic waves; Visualisation of the interior of objects by transmitting ultrasonic or sonic waves through the object
    • G01N29/44Processing the detected response signal, e.g. electronic circuits specially adapted therefor
    • G01N29/449Statistical methods not provided for in G01N29/4409, e.g. averaging, smoothing and interpolation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N29/00Investigating or analysing materials by the use of ultrasonic, sonic or infrasonic waves; Visualisation of the interior of objects by transmitting ultrasonic or sonic waves through the object
    • G01N29/44Processing the detected response signal, e.g. electronic circuits specially adapted therefor
    • G01N29/46Processing the detected response signal, e.g. electronic circuits specially adapted therefor by spectral analysis, e.g. Fourier analysis or wavelet analysis
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2291/00Indexing codes associated with group G01N29/00
    • G01N2291/02Indexing codes associated with the analysed material
    • G01N2291/023Solids

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Immunology (AREA)
  • Biochemistry (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Analytical Chemistry (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Acoustics & Sound (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Investigating Or Analyzing Materials By The Use Of Ultrasonic Waves (AREA)

Abstract

The invention discloses a rapid detection method for the maturity of Hami melons based on sound signals of a smart phone, which is characterized in that collected beating sound signals of unknown maturity of Hami melons are preprocessed and analyzed, a correction model is established and detection and analysis are carried out through a mobile phone program which is compiled based on an embedded Android Studio 2.2 (Google Inc.) development platform, and rapid nondestructive detection of the maturity of Hami melons is really realized. By utilizing the technical scheme provided by the invention, a user only needs to click the APP which is successfully installed on the smart phone in the actual detection process, and beats the APP at the other side of the equator part of the Hami melon for 3 times, so that the user can know whether the Hami melon is unripe or mature, the sugar degree of the mature Hami melon is detected, and the method has the characteristics of convenience, high efficiency and accuracy.

Description

Hami melon maturity rapid detection method based on sound signals of smart phone
Technical Field
The invention relates to the technical field of mobile phone software development and agricultural product quality nondestructive testing, in particular to a Hami melon maturity rapid detection method based on an intelligent mobile phone acoustic signal.
Background
Hami melon is a special product of traditional famous quality in Xinjiang, and has higher reputation and popularity in domestic and foreign markets. At present, the scale production and supply pattern of early, middle and late maturity of Hami melons is gradually formed by decentralized cultivation. According to the statistics yearbook of Xinjiang in 2018, the planting area of Hami melon is 2.655 ten thousand hm from 2000 to 20172Increased to 6.820 ten thousand hm2The yield is increased from 51.22 to 246.42 thousands, the Hami melon reaches 100 thousands of tons every year, and is sold in more than 50 countries and regions such as Europe, southeast Asia, Western and Central Asia, and Hongkong and Autai, which earn 4523 thousands of dollars for export of China and become an important income source of Xinjiang important economic crops and farmers.
The famous brand effect of the Hami melons enables the planting and production of the Hami melons in part of provinces and cities in China to begin, the planting areas of provinces such as inner Mongolia, Hebei, Hainan and Shandong are increased at a surprising speed, the provinces are planted in greenhouse modes, the Hami melons are planted in the provinces, the brands of the Hami melons are marked to appear on the market earlier, the transportation lines are short, the cost is low, the original Hami melon markets in Xinjiang are severely impacted, the Xinjiang melon farmers are also led to rush to the market for selling time, the Hami melons are picked when the five melons and the six melons are ripe, and some melon farmers also use ripening accelerating agents such as ethephon, and the raw melons flow into the market. In addition, due to different gardening measures and different photo-thermal water and soil, even if the maturity of Hami melons in the same producing area or even the same garden is inconsistent, the Hami melons are picked and sold on the market indiscriminately, so that the market is full of over-ripe melons and under-ripe melons.
The traditional Hami melon maturity detection method mostly depends on abundant experience of melon farmers or complicated detection means, and most detection methods cause unstable and unreliable detection precision due to human fatigue or subjectivity. For consumers, the ability and experience of distinguishing the maturity of the Hami melons are almost completely unavailable, the consumers are worried about not being ripe and sweet and not sweet when buying the Hami melons, and once eating raw melons or over-ripe melons, the consumers can have great negative understanding on the sale and reputation of the Hami melons. Therefore, melon farmers and consumers urgently need a portable, easy-to-operate, quick and cheap nondestructive detection device, and the maturity of the hami melons can be accurately judged, so that the device has important significance for maintaining the reputation of the good quality of the hami melons and improving the commodity rate and market competitiveness of the Xinjiang hami melons.
After decades of development, the nondestructive testing technology makes certain progress in the field of watermelon/melon maturity detection, and some portable testers capable of detecting the maturity of melons and fruits appear. Sugiyama et al (1998) developed a portable firmness tester to measure firmness of melons based on acoustic properties. The microphone of the tester is not horizontally arranged, so that the error of sound wave velocity for collecting the muskmelon is large, and the hardness detection precision of the muskmelon is influenced. Seiki, Japan, developed an SA-1 type hardness tester that can test melon texture to determine the optimum harvest time for each melon. The portable detector of acoustic method has gained better detection effect in melon garden low noise environment, can satisfy melon grower's demand, nevertheless to melon buyer, uses in market high noise environment, and its detection precision can receive very big influence. Ito et al (2002) developed a sound vibration portable hardness tester based on the sound vibration signal detection principle, and can judge the maturity and the harvest time of the netted melon by detecting the hardness. Kuroki et al (2006) also designs a portable device for judging the maturity of melons by adopting a piezoelectric sensor, on the basis of the research, AVA company (Applied video acoustics, Japan) develops a watermelon internal quality detection device, Zhang et al (2018) considers that the excitation force angle and the position of the piezoelectric sensor have great influence on a measurement result, and although the detection instrument obtains high detection precision under laboratory conditions, fruits are difficult to ensure free vibration during actual testing. Although the melon and fruit maturity detector is portable, if the melon is purchased and carried specially, the melon and fruit maturity detector still does not conform to the use habit of consumers. In recent years, with the rapid development of mobile internet, a smart phone becomes one of essential devices in modern life of people, and a built-in camera, a built-in microphone and the like enable mobile sensing to have application and development potential, so that the research progress of the smart phone on fruit and vegetable quality detection should be worth paying attention to, and a more feasible idea is provided for realizing the portable rapid detection of the maturity of the cantaloupe.
In recent years, foreign researchers have developed and developed mobile phone applications APP for detecting WaterMelon maturity by using acoustic signals, such as MelonMeter, iWaterMelon, WaterMelon Prober, etc., but the researchers have pointed out that these applications are not sensitive to the acoustic signal of beating WaterMelon and have low accuracy and unreliable detection results. Considering that the user usually picks melon and fruit by beating, if the mobile phone acoustic signal processing analysis can be enhanced to obtain the characteristic quantity related to the maturity of the hami melon, the accuracy of detecting the maturity of the hami melon by the mobile phone is expected to be improved.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a rapid detection method for the maturity of the Hami melon based on an acoustic signal of a smart phone, which is used for preprocessing and analyzing collected beating acoustic signals of unknown maturity of the Hami melon, establishing a correction model and carrying out detection and analysis by a mobile phone program written under an embedded Android Studio 2.2 (Google Inc.) development platform, so as to realize rapid nondestructive detection of the maturity of the Hami melon.
The technical scheme adopted by the invention is as follows: a Hami melon maturity rapid detection method based on smart phone acoustic signals is characterized by comprising the following steps: the method comprises 3 subprograms of sound signal recording, sound signal analysis and processing and Hami melon maturity judgment, and comprises the following specific steps.
Recording sound signals, converting sound signals generated by beating Hami melons into voltage signals through a microphone on a smart phone, amplifying the voltage signals through an amplifying circuit arranged in a mobile phone system, then sampling, quantizing and encoding the amplified signals through the mobile phone system, finally converting the sound signals into data streams, then calling a Recorder function, initializing audio recording parameters, defining the environmental Noise length NoiseTime =176400, inputting an environmental Noise Noise data stream, calling a Preprocessing function, calculating an environmental Noise root mean square value NR, inputting an adjusted Noise sensitivity parameter Times, calculating a beating sound Signal Threshold Threshold = NR × Times, initializing the beating sound Signal Times i = 0, inputting a sound Signal data stream, calling a Preprocessing function, calculating a sound Signal and a root mean square value array SR [ ], and storing the beating sound Signal data streams for 3 Times to a mobile phone memory.
The sound signal analysis and processing is completed by a Featureextraction function, a DataManager function is called first, the stored data stream of the beating sound signals for 3 times is read, a Filter function is called to Filter the beating sound signals, time domain characteristic quantities E, SSTE1, SSTE2, SSTE3, SSTE4 and ZCR of the beating sound signals for 3 times are calculated, the average value of the time domain characteristic quantities of the beating sound signals for 3 times is calculated, a Fourier function is called to perform Fourier transformation, and frequency domain characteristic quantities w are calculatedcAnd calculating the average value of the frequency domain characteristic quantities of the beating sound signals for 3 times, and outputting the average value of each characteristic quantity of the beating sound signals for 3 times.
Judging the maturity of the Hami melon, calling a function SVM _ train ({ "train ingdata.txt," model.txt "}, '-s 0-t 2') in an LIBSVM 3.2 toolkit, wherein the function defines that the SVM types are one-to-many through different parameters of a classifier respectively, the kernel function type is a Gaussian radial basis, when the train ingdata.txt is training set data consisting of 3 characteristic quantity frame energies E of mature and immature Hami melons, a 1 st sub-band short-time energy ratio SSTE1 and a spectrum centroid wc, the data file is used as an input variable of the function, and the output model.txt is a mature classifier and is named as RipeClassiier.txt again; when the training set data is composed of trailing data.txt, 3 characteristic quantity zero-crossing rates ZCR of ripe and over-ripe Hami melons, short-time energy ratios SSTE2 of sub-bands 2 and 3 and SSTE3, the data file serves as an input variable of a function, and the output model.txt is a ripe classifier and is renamed to PripeClassifier.txt. The main functions of the subprogram are completed by an SscDetection function and a SelectMelon function, and the detection of the sugar degree of Hami melon and the judgment of the maturity are respectively completed. The SelectMelon function uses an SVM ripeness classifier RipeClassifier and a proper ripeness classifier PripeClassifier to distinguish different ripeness degrees of the Hami melon; and the SscDetection function adopts a proper-ripeness Hami melon sugar degree detection model, and substitutes the characteristic quantities wc, E, SSTE1, SSTE2 and SSTE4 to calculate the sugar degree value. The LIBSVM toolkit is imported into Android Studio 2.2, and then the trained models, RipeClassifer. txt and PrpeClassifer. txt, are called directly using the functions in the toolkit.
The invention provides a rapid Hami melon maturity detection method based on an intelligent mobile phone sound signal by utilizing the Hami melon maturity detection application software system program, which comprises the following steps.
The method comprises the following steps: according to the gardening and fruit grower planting experience, firstly, selecting and collecting immature, proper-maturing and over-maturing Hami melon samples with 3 maturity degrees for later use.
Step two: the smart phone with the Android Wave application program is used for recording sound signals, the environmental noise is 80 dB (equivalent to the sound volume of urban noise) during recording, a user generally uses the habit of beating the equator to purchase Hami melons, 8 position points uniformly distributed near the equator of the Hami melons are beaten for 3 times by hands respectively, the mobile phone records the signals on one side corresponding to the beating points during beating, the sound signals are in a WAV format, and the sampling rate is set to be 44.1 kHz.
Step three: preprocessing the recorded original sound signal, extracting a single beating sound signal containing Hami melon maturity characteristic quantity, filtering by using a filter to further remove noise in the sound signal, then carrying out amplitude normalization processing on the filtered time domain signal, and finally carrying out frequency domain transformation on the time domain signal to obtain a frequency domain signal.
Step four: after the acoustic signal preprocessing is carried out, 11 characteristic quantities are extracted, wherein the zero crossing rate, the average amplitude difference function, the short-time energy ratio of the 1 st, 2 nd, 3 th and 4 th sub-bands, the frame energy are extracted from a time domain signal, and the frequency spectrum centroid, the bandwidth and the resonant frequency are extracted from a frequency domain signal.
Step five: and D, carrying out difference significance analysis on the Hami melon sound signal characteristic quantities with different maturity calculated and extracted in the step four, and respectively determining sound signal time-frequency domain characteristic quantities which are significantly related to the immature maturity, the proper maturity and the over-mature 3 maturity. Training and performance evaluation are carried out by adopting a Support Vector Machine (SVM) classifier, so that feature quantities which can be used for identifying and classifying different maturity degrees of the Hami melons are found, and a mature classifier capable of distinguishing the mature melon from the immature melon and a proper mature classifier capable of distinguishing the proper mature melon from the over mature melon are determined.
Step six: and step five, after the problems of maturity and over-maturity of the Hami melons are solved, continuously taking the Hami melons from which the over-maturity and the under-maturity are removed as research objects, analyzing the correlation between the characteristic quantity extracted from the four sound signals and the sugar degree of the Hami melons, and constructing a sugar degree detection model by adopting a multiple regression analysis method to realize the judgment of the sugar degree of the Hami melons.
Step seven: the mobile phone android application program consisting of the acoustic signal recording subprogram, the acoustic signal analysis and processing subprogram, the Hami melon maturity judging subprogram and the user interaction subprogram is installed in the smart phone, and the mobile phone android application is used for realizing the rapid detection of the Hami melon maturity.
Compared with the prior art, the invention has the beneficial effects that:
although mobile phone applications APP for detecting watermelon maturity by using acoustic signals have been developed abroad, researchers indicate that the applications are insensitive to acoustic signals for beating watermelon, have low accuracy and unreliable detection results. At present, the judgment of the maturity of the Hami melon still depends on abundant experience of melon farmers or complicated detection means, and most detection methods cause unstable and unreliable detection precision due to human fatigue or subjectivity. Therefore, both melon farmers and consumers urgently need a portable, easy-to-operate, quick and cheap nondestructive detection device to realize accurate judgment of the maturity of the Hami melons. The invention provides a rapid detection method for the maturity of Hami melons based on sound signals of a smart phone, which is characterized in that collected beating sound signals of unknown maturity of Hami melons are preprocessed and analyzed, a correction model is established and detection and analysis are carried out through a mobile phone program which is compiled based on an embedded Android Studio 2.2 (Google Inc.) development platform, and rapid nondestructive detection of the maturity of Hami melons is really realized. By utilizing the technical scheme provided by the invention, a user only needs to click the APP which is successfully installed on the smart phone in the actual detection process, and beats the APP at the other side of the equator part of the Hami melon for 3 times, so that the user can know whether the Hami melon is unripe or mature, and the sugar degree detection of the mature Hami melon is realized.
Drawings
Fig. 1 is a flowchart of a smart phone-based rapid detection method for the maturity of Hami melons.
Fig. 2 is a schematic diagram of an original sound signal recorded by a mobile phone when a hami melon is tapped.
Fig. 3 is a flow chart of the acoustic signal preprocessing operation.
Fig. 4 is a schematic diagram of a denoised acoustic signal.
FIG. 5 is a graph of single tap time/frequency domain acoustic signals after amplitude normalization.
Fig. 6 is a schematic diagram of the sampling position of the hami melon sugar degree detection.
FIG. 7 is a graph showing the results of the calibration set and the verification set of the Hami melon brix detection model.
Fig. 8 is a schematic diagram of the overall scheme of application software system development.
Fig. 9 is a flowchart of a signal recording subroutine.
Fig. 10 is a flowchart of the FeatureExtraction function.
Fig. 11 is a flowchart of the maturity determination subroutine.
FIG. 12 is the result of the application software judging the maturity of Hami melon;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Example (b): the invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, the invention provides a nondestructive testing method for the maturity of hami melon based on a smart phone, and the specific operation mode is as follows: during the use, open and listen and recognize melon smart mobile phone app, be close to the test position with the cell-phone microphone, click "detect maturity" option on software interface, pat 3 times at the melon equator portion with the hand, acoustic signal transmission to android end, application software system program accomplishes acoustic signal analysis and processing and the judgement of melon maturity rapidly, can show the testing result on the smart mobile phone screen after 5s, easy operation is convenient, detection efficiency is high, it is effectual to distinguish. The specific development steps are as follows.
And (3) preprocessing the sound signals, wherein the original sound signals recorded by the mobile phone when the Hami melon is beaten are shown in figure 2, and then preprocessing the sound signals according to figure 3. Firstly, the 1 st, 2 nd and 3 rd beating sound signals in the recorded original sound signals need to be extracted so as to analyze the beating sound signals at a later period, and at the moment, the starting point of each beating sound signal needs to be judged, namely, the end point detection is completed on each beating sound signal. The RMS value is calculated to separate the noise signal from the beat sound signal by the formula
Figure 747034DEST_PATH_IMAGE001
In the formula (I), wherein,nrepresenting the number of sampling points of the acoustic signal;s i representing acoustic signalsiAnd (4) sampling points. For analysis, the RMS multiples of the different segments of ambient noise are set to a threshold, which is marked as 0 when the RMS value of the acoustic signal is below the threshold and 1 when above the threshold. For the Hami melon tapping sound signal of the present study, the signal mark changes from 0 to 1 as the starting point of the single tapping sound signal, and changes from 1 to 0 as the ending point of the single tapping sound signal. There is one beating sound signal between adjacent starting and ending points. The 5 times of the RMS value of the environmental noise is used as a dynamic threshold value to perform endpoint detection, and after the endpoint detection is completed, 3 beating sound signals as shown in fig. 4 can be obtained. The acoustic signal is then filtered using a second order low-pass butterworth filter with a cut-off frequency set at 22.05 kHz. After the sound signals are filtered, because the Hami melon is beated with different force each time and the sound signal amplitude of the time domain is not consistent in each beating, the sound signals are subjected to normalized amplitude processing, and the signals are normalized to [ -1, 1]The normalized formula is:
Figure 645720DEST_PATH_IMAGE002
in the formula, X and Y are the acoustic signal amplitude before and after normalization respectivelyNo dimension; xmax, Xmin are the maximum and minimum amplitude of the acoustic signal, respectively, and are dimensionless. And converting the normalized beating time domain sound signal into a frequency domain signal through fast Fourier transform by a self-spectrum analysis method to obtain a periodic harmonic component of which each frequency in the frequency spectrum corresponds to the sound response signal. The time domain signal is self-spectrum analyzed by adopting a Fast Fourier Transform (FFT) with a certain length, and the formula is as follows:
Figure 348664DEST_PATH_IMAGE003
in the formula, ω =2 π F, F (ω) represents a frequency domain ordinary function sequence, F (t) represents a time domain data sequence, and the number of FFT points should be as small as possible in order to increase the calculation speed and reduce the power consumption when the smart phone is used, but the number of FFT points should be larger than 2048 because the length of part of the beat sound signal is larger than 2048. In addition, the number of FFT points should be 2n, and the portion with insufficient length can be complemented by 0, so the number of FFT points is 4096 points (2048 × 2), and the frequency domain signal obtained by FFT is shown in fig. 5.
Extracting the significant characteristic quantity of the acoustic signal difference, extracting 11 characteristic quantities after preprocessing the acoustic signal, extracting zero crossing rate, average amplitude difference function, short-time energy, 1 st, 2 nd, 3 th and 4 th sub-band short-time energy ratio and frame energy from a time domain signal, extracting a frequency spectrum centroid, bandwidth and resonant frequency from a frequency domain signal, and not separately listing a specific calculation formula. As the samples of the unripe melon, the ripe melon and the over-ripe melon are respectively 37, 137 and 24, and the samples of the unripe melon, the ripe melon and the over-ripe melon with the maturity of 3 types are not equal, Kolmogorov-Smirnov (K-S) test needs to be carried out on the characteristic quantity of each acoustic signal to test whether the characteristic quantity conforms to normal distribution. As shown in table 1, for immature melons and mature melons, there is no significant difference in the average amplitude difference function AMDF, the 3 rd sub-band short-time energy ratio SSTE3 and the bandwidth BW in the feature quantity, and the function cannot be used for distinguishing the immature melons and the mature melons; the 8 sound signal characteristic quantities have significant differences and can be used for distinguishing immature melons and mature melons, namely short-time energy STE, frame energy E, short-time energy ratios of 1 st, 2 nd and 4 th sub-bands, zero crossing rate ZCR, frequency spectrum centroid wc and resonance frequency f. For ripe melons and over-ripe melons, the short-time energy STE, the frame energy E, the frequency spectrum centroid wc and the resonance frequency f have no significant difference and cannot be used for distinguishing the ripe melons and the over-ripe melons; the 7 sound signal characteristic quantities have significant differences and can be used for distinguishing ripe melons and over-ripe melons, namely an average amplitude difference function AMDF, short-time energy ratios of sub-bands 1, 2, 3 and 4, a zero crossing rate ZCR and a bandwidth BW.
TABLE 1 significance analysis result of difference of Hami melon acoustic signal characteristic quantities with different maturity
Figure 92629DEST_PATH_IMAGE004
Note: the difference between capital letters in the same row indicates that the difference is very significant (P<0.01), the difference of lower case letters indicates significant difference (P<0.05)。
Based on the construction of the SVM Hami melon maturity classifier, through comparison, E, SSTE1 and wc 3 characteristic quantities form characteristic vectors, the classification performance of the maturity classifier trained by using a radial basic nucleus maturity classifier is optimal, the characteristic quantities SSTE3, ZCR and SSTE2 form the characteristic vectors, and the classifier is optimally suitable for judging the maturity and the over-maturity of the Hami melon when using the radial basic nucleus to train the classifier.
And (3) constructing a Hami melon sugar degree prediction model, taking the middle inner-edge pulp at the equator, putting the middle inner-edge pulp into a garlic press, pressing 2-3 drops of juice each time, dropping the juice into a refractometer to be flush with the plane, finally measuring and recording the number, repeatedly measuring for 3 times, and taking the average value as the Hami melon sugar degree value. Then, the correlation analysis of the characteristic quantity of the Hami melon sound signal and the sugar degree is carried out, and the total error and the closeness degree between the sugar degree and the characteristic quantity are respectively measured by the covariance and the correlation coefficient, and the calculation formula is shown as follows. The covariance is a positive value, which indicates that the brix is positively correlated with the characteristic quantity, otherwise, the sugar is negatively correlated; the covariance was 0, indicating that the brix is independent of the characteristic amount. The value range of the correlation coefficient is between 1 and-1, wherein 1 represents that the sugar degree is completely linearly related to the characteristic quantity, 1 represents that the sugar degree is completely negatively related to the characteristic quantity, and 0 represents that the sugar degree is not related to the characteristic quantity. The results of the correlation analysis are shown in Table 2.
Figure RE-GDA0002436186110000072
Figure RE-GDA0002436186110000073
In the formula, XiAnd
Figure RE-GDA0002436186110000074
respectively an observed value and an average value of the sugar degree; y isiAnd
Figure RE-GDA0002436186110000075
respectively, the observed value and the mean value of the single characteristic quantity.
TABLE 2 analysis of correlation between the sugar degree of Hami melon and the characteristic quantity of acoustic signal
Figure 210944DEST_PATH_IMAGE010
Note: indicates that there was a significant difference at a level of 0.01: (P<0.01)。
Dividing the test samples into 2 groups of a correction set and a verification set according to a ratio of 3:1, and selecting 103 samples in the correction set to construct a Hami melon sugar degree detection model; and selecting 34 samples of the verification set to verify the constructed Hami melon sugar degree detection model. The results of stepwise multiple regression analysis and detection of the sugar content of Hami melons by using characteristic quantities are shown in FIG. 7, and the detection model is as follows:
SSC=12.635+7.138×10-3 E-8.160×10-4 w c-3.732SSTE4-4.839SSTE2-4.369SSTE1
the number of independent variables of the detection model equation is 5, a 95% confidence level is set, the degree of freedom is 97, and the process is carried outFResults of the test and the pair interceptγ 0And regression coefficientγ 1,γ 2,γ 3,γ 4Is/are as followstThe test results are shown in table 3. In the table eachtThe detection is higher than the critical valuet 0.05,97=1.984, indicating that both the fitting parameters and the equation are authentic. Detecting model correlation coefficientsr cHigher than0.9, the model detection accuracy is higher, and the standard error of the model is higherRMSECSmaller, less discrete degree, stable and reliable detection performance.
Figure 879692DEST_PATH_IMAGE011
Correlation coefficients for a validation set of detection modelsr vIs 0.846, relative correction set correlation coefficientr cThe temperature of the molten steel is reduced to a certain extent,RMSEVis 0.453, relative calibration setRMSECTherefore, the two-sample variance analysis is carried out on the sugar degree detection values and the measured values of the 34 samples using the verification set, the stability of the Hami melon sugar degree detection model is verified, and the significance level is reachedα=0.05,dfWhen the number of the bits is not less than 32,F=1.213 is less thanFThe test was carried out at a cut-off value of 1.822,P=0.297 is more than 0.05, which proves that no significant difference exists between the detection value and the measured value of the sugar degree detection model, and the model can be used for detecting the sugar degree of Hami melons.
Android application software is developed by using Android Studio 2.2 (Google Inc.), and the overall system scheme of the Android application software is shown in fig. 8, and the Android application software mainly comprises 3 sub-programs of sound signal recording, sound signal analysis and processing and Hami melon maturity judgment. The sound signal recording subprogram realizes that the microphone on the smart phone records and stores sound signals for beating the Hami melon; the sound signal analysis and processing subprogram realizes the calculation of the sound signal characteristic quantity; the Hami melon maturity judging subprogram inputs the sound signal characteristic quantity into the maturity classifier and the sugar degree detection model, and the user interaction subprogram displays an application program main interface, a signal recording interface and a result interface.
The sound signal generated by beating the Hami melon is converted into a voltage signal through a microphone on the smart phone, an amplifying circuit arranged in a mobile phone system amplifies the voltage signal, then the mobile phone system samples, quantizes and encodes the amplified signal, finally the sound signal is converted into a data stream, and then the sound signal recording is completed through a subprogram flow shown in fig. 9. Initializing the audio recording parameters to complete the parameter setting in table 3; the ambient noise length is defined to be 176400 sample points, representing a 4 s duration.
TABLE 3 setup parameters required for recording of acoustic signals
Figure 496618DEST_PATH_IMAGE012
The acoustic signal analysis and processing subroutine is completed by a FeatureExtraction function, the flow of which is shown in fig. 10, and the background operation is completed.
The Hami melon maturity judging subprogram calls a function SVM _ train ({ "train ingdata. txt," model.txt "}, '-s 0-t 2') in an LIBSVM 3.2 toolkit, the function respectively defines SVM types as one-to-many through different parameters of a classifier, a kernel function type is a Gaussian radial basis, and when the train ingdata. txt is 3 characteristic quantity frame energies of mature and immature Hami melonsESub-band 1 short time energy ratio SSTE1 and spectral centroidw cWhen forming training set data, the data file is used as an input variable of a function, and the output model.txt is a mature classifier and is renamed as RipeClassiier.txt; when the training set data is composed of trailing data.txt, 3 characteristic quantity zero-crossing rates ZCR of ripe and over-ripe Hami melons, short-time energy ratios SSTE2 of sub-bands 2 and 3 and SSTE3, the data file serves as an input variable of a function, and the output model.txt is a ripe classifier and is renamed to PripeClassifier.txt. The main functions of the subprogram are completed by an SscDetection function and a SelectMelon function, the detection of the sugar degree of Hami melon and the judgment of the maturity are respectively completed, and the working flow of the subprogram is shown in FIG. 11.
As shown in fig. 12, the user interaction subroutine mainly completes the response of detecting the maturity click, the display of the sound recording, the review of the history of the detection result, and the adjustment of the noise sensitivity. The method comprises the steps that a dragging strip SeekBar of a noise sensitivity adjustment interface finishes control of noise sensitivity values Times, the position of a sliding block in the dragging strip changes, the Times value obtained by a signal recording subprogram changes accordingly, the Times default value is 5, the maximum value is 10, and the minimum value is 0.
In order to test the detection effect of the development software of the Hami melon maturity rapid detection application program, the maturity of 25 ripe melons, 15 unripe melons and 15 ripe melons are judged by using the application software, as shown in FIG. 12, the accuracy rates of the unripe melons, the ripe melons and the ripe melons are 93.3%, 96.0% and 80.0%, and the overall judgment accuracy rate is 90.9%. Zeng et al (2013) judge the watermelon maturity by using a mobile phone App developed based on a linear kernel function SVM classifier, wherein the judging accuracy is 89.9%; compared with the prior art, the research classifier adopts a better radial basis kernel function, and the accuracy of judging the maturity is improved. In addition, the application software is used for detecting the sugar degree of 28 ripe melons, the relative error is-9.84% -9.90%, and a good detection result is obtained.
It is noted that the disclosed embodiments are intended to aid in further understanding of the invention, but those skilled in the art will appreciate that: various substitutions and modifications are possible without departing from the spirit and scope of the invention and appended claims. Therefore, the invention should not be limited to the embodiments disclosed, but the scope of the invention is defined by the appended claims.

Claims (5)

1. A Hami melon maturity rapid detection method based on smart phone acoustic signals is characterized by comprising the following steps: the specific operation steps are as follows:
the method comprises the following steps: according to the gardening and fruit grower planting experience, firstly, selecting and collecting immature, proper-maturing and over-maturing Hami melon samples with 3 maturity degrees for later use;
step two: recording an acoustic signal by using a smart phone provided with an Android Wave application program, wherein the environmental noise is 80 dB (equivalent to the sound volume of urban noise) during recording, a user generally uses the habit of beating the equator to purchase Hami melons, 8 position points uniformly distributed near the equator of the Hami melons are respectively beaten by hands for 3 times, the mobile phone records the signal at one side corresponding to a beating point during beating, the acoustic signal is in a WAV format, and the sampling rate is set to be 44.1 kHz;
step three: preprocessing the recorded original sound signal, extracting a single beating sound signal containing Hami melon maturity characteristic quantity, filtering by using a filter to further remove noise in the sound signal, then carrying out amplitude normalization processing on the filtered time domain signal, and finally carrying out frequency domain transformation on the time domain signal to obtain a frequency domain signal;
step four: after sound signal preprocessing is carried out, 11 characteristic quantities are extracted, wherein a zero crossing rate, an average amplitude difference function, short-time energy, a 1 st, 2 nd, 3 th and 4 th sub-band short-time energy ratio and frame energy are extracted from a time domain signal, and a frequency spectrum centroid, a bandwidth and a resonant frequency are extracted from a frequency domain signal;
step five: carrying out difference significance analysis on the Hami melon sound signal characteristic quantities with different maturity calculated and extracted in the fourth step, and respectively determining sound signal time-frequency domain characteristic quantities which are significantly related to the immature maturity, the proper maturity and the over-mature maturity of 3 types;
step six: training and evaluating performance by adopting a Support Vector Machine (SVM) classifier, finding out characteristic quantities which can be used for identifying and classifying different maturity degrees of the Hami melons, and determining a mature classifier capable of distinguishing the maturity and the immature maturity of the Hami melons and a proper mature classifier capable of distinguishing the proper maturity and the over mature;
step seven: sixthly, after the problem that the Hami melons are mature and over-mature is solved, the Hami melons from which the over-mature and the under-mature are removed are taken as research objects, the correlation between the characteristic quantity extracted from the four sound signals in the step and the sugar degree of the Hami melons is analyzed, a multi-regression analysis method is adopted to construct a sugar degree detection model, and the sugar degree of the Hami melons is judged;
step eight: the mobile phone android application program consisting of the acoustic signal recording subprogram, the acoustic signal analysis and processing subprogram, the Hami melon maturity judging subprogram and the user interaction subprogram is installed in the smart phone, and the mobile phone android application is used for realizing the rapid detection of the Hami melon maturity.
2. The method for rapidly detecting the maturity of the Hami melon based on the sound signal of the smart phone according to claim 1, wherein the method comprises the following steps: in the third step, the single beating sound signal is extracted by adopting a root mean square value RMS method, RMS multiples of different environmental noise sections are set as threshold values, when the RMS value of the sound signal is lower than the threshold value, the sound signal is marked as 0, and when the RMS value is higher than the threshold value, the sound signal is marked as 1; for the Hami melon tapping sound signal of the present study, the signal mark changes from 0 to 1 as the starting point of the single tapping sound signal, changes from 1 to 0 as the ending point of the single tapping sound signal, and there is one tapping sound signal between the adjacent starting point and ending point.
3. The method for rapidly detecting the maturity of the Hami melon based on the sound signal of the smart phone according to claim 1, wherein the method comprises the following steps: and in the third step, the frequency domain transform Fast Fourier Transform (FFT) of the time domain signal performs self-spectrum analysis on the time domain signal, and the number of FFT points is selected to be 4096 points (2048 multiplied by 2).
4. The method for rapidly detecting the maturity of the Hami melon based on the sound signal of the smart phone according to claim 1, wherein the method comprises the following steps: and fifthly, adopting a radial basis kernel function as the kernel function of the SVM classifier.
5. The method for rapidly detecting the maturity of the Hami melon based on the sound signal of the smart phone according to claim 1, wherein the method comprises the following steps: the development of the application software based on the Android Hami melon maturity detection in the seventh step mainly comprises 3 subprograms of sound signal recording, sound signal analysis and processing and Hami melon maturity judgment, wherein the sound signal recording subprogram realizes that a microphone on the smart phone records and stores sound signals for beating Hami melons; the sound signal analysis and processing subprogram realizes the calculation of the sound signal characteristic quantity; the Hami melon maturity judging subprogram inputs the sound signal characteristic quantity into the maturity classifier and the sugar degree detection model, and the user interaction subprogram displays an application program main interface, a signal recording interface and a result interface.
CN202010033330.6A 2020-01-13 2020-01-13 Hami melon maturity rapid detection method based on sound signals of smart phone Pending CN111141823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010033330.6A CN111141823A (en) 2020-01-13 2020-01-13 Hami melon maturity rapid detection method based on sound signals of smart phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010033330.6A CN111141823A (en) 2020-01-13 2020-01-13 Hami melon maturity rapid detection method based on sound signals of smart phone

Publications (1)

Publication Number Publication Date
CN111141823A true CN111141823A (en) 2020-05-12

Family

ID=70524759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010033330.6A Pending CN111141823A (en) 2020-01-13 2020-01-13 Hami melon maturity rapid detection method based on sound signals of smart phone

Country Status (1)

Country Link
CN (1) CN111141823A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529152A (en) * 2020-12-03 2021-03-19 开放智能机器(上海)有限公司 System and method for detecting watermelon maturity based on artificial intelligence
WO2023029311A1 (en) * 2021-08-31 2023-03-09 合肥美的电冰箱有限公司 Fruit maturity detection method and apparatus, device, and storage medium
CN116858943A (en) * 2023-02-03 2023-10-10 台州五标机械股份有限公司 Hollow shaft intelligent preparation method and system for new energy automobile
CN117969670A (en) * 2024-04-02 2024-05-03 湖南大学 Watermelon maturity rapid nondestructive detection method and system based on acoustic characteristics

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107589175A (en) * 2016-07-09 2018-01-16 石河子大学 A kind of "Hami" melon maturity acoustics the cannot-harm-detection device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107589175A (en) * 2016-07-09 2018-01-16 石河子大学 A kind of "Hami" melon maturity acoustics the cannot-harm-detection device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吕吉光 等: "基于智能手机声信号哈密瓜成熟度快速检测" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529152A (en) * 2020-12-03 2021-03-19 开放智能机器(上海)有限公司 System and method for detecting watermelon maturity based on artificial intelligence
WO2023029311A1 (en) * 2021-08-31 2023-03-09 合肥美的电冰箱有限公司 Fruit maturity detection method and apparatus, device, and storage medium
CN116858943A (en) * 2023-02-03 2023-10-10 台州五标机械股份有限公司 Hollow shaft intelligent preparation method and system for new energy automobile
CN117969670A (en) * 2024-04-02 2024-05-03 湖南大学 Watermelon maturity rapid nondestructive detection method and system based on acoustic characteristics

Similar Documents

Publication Publication Date Title
CN111141823A (en) Hami melon maturity rapid detection method based on sound signals of smart phone
Caladcad et al. Determining Philippine coconut maturity level using machine learning algorithms based on acoustic signal
Taniwaki et al. Postharvest quality evaluation of “Fuyu” and “Taishuu” persimmons using a nondestructive vibrational method and an acoustic vibration technique
CN109034046A (en) Foreign matter automatic identifying method in a kind of electric energy meter based on Acoustic detection
CN109142534B (en) Method for evaluating sweet potato quality based on vibration sound signal
CN103713051B (en) A kind of modeling method of spherical fruit texture forecast model
Khoshnam et al. Acoustic testing for melon fruit ripeness evaluation during different stages of ripening
CN110779875B (en) Method for detecting moisture content of winter wheat ear based on hyperspectral technology
CN111855608A (en) Near-infrared nondestructive detection method for apple acidity based on fusion characteristic wavelength selection algorithm
CN115839763A (en) Transformer vibration noise monitoring system
Zhang et al. Nondestructive evaluation of Chinese cabbage quality using mechanical vibration response
CN104749249B (en) A kind of method of the detection physical purity of seed based on ultrasonic technology
Galindo et al. Ripeness Classification of Cacao Using Cepstral-Based Statistical Features and Support Vector Machine
CN101021435A (en) Multi-channel noise and libration testing method and tester
LU502544B1 (en) Rapid detection method of jiashi muskmelon maturity based on sound signals of smart phones
CN111694053A (en) First arrival picking method and device
CN109946246A (en) A kind of detection method and device of apple soluble solid
谷脇満 et al. Development of method for quantifying food texture using blanched bunching onions
CN113311070A (en) Bergamot pear pulp brittleness detection method based on force and sound synchronous acquisition
CN111272875A (en) Apple brittleness nondestructive testing method based on vibration sound signals
CN115097085B (en) Apple fruit brittleness grading method
Diezema Iglesias et al. Acoustic impulse response for detecting hollow heart in seedless watermelon
Pintor et al. Development of an android-based maturity detector mobile application for watermelons [Citrullus Lanatus (Thunb.) matsum. & Nakai] using acoustic impulse response
CN112924410B (en) Terahertz spectrum rapid identification method for germinated sunflower seeds
TWI432726B (en) Intelligent fruit taste judging device and a handheld device containing the device

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200512

WD01 Invention patent application deemed withdrawn after publication