Ox-horn pepper internal quality detection device based on diffuse transmission and regular transmission and detection method thereof

By designing a horn pepper detection device that includes a variety of mechanisms and optical devices, the problem of difficulty in detecting the internal quality of fruits and vegetables with irregular surfaces in the existing technology has been solved, and automated and intelligent detection of the internal quality of horn peppers has been achieved, improving detection efficiency. accuracy and flexibility.

CN118624546APending Publication Date: 2024-09-10ANHUI AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410776823.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively detect the internal quality of fruits and vegetables with irregular surfaces and light weight, such as horn peppers, which affects the quality of market supply.

Method used

An internal quality inspection device for horn pepper based on diffuse transmission and regular transmission is designed, including a sealable box, a light source system, a guide disc structure, a rubber fruit cup, a synchronized screw assembly, a light beam shrinking device and an optical fiber distance adjustment The device realizes the attachment and separation of the rubber fruit cup and the horn pepper surface through a computer-controlled mechanism. It combines multivariate scattering correction, standard normal transformation, Savitzky-Golay filter and support vector machine classification model to collect and analyze spectral data.

Benefits of technology

It realizes automated and intelligent detection of the internal quality of horn peppers, improves the accuracy and reliability of detection, can effectively remove background noise and stray light, and provides two detection methods to improve detection flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118624546A
    Figure CN118624546A
Patent Text Reader

Abstract

The invention discloses an oxhorn pepper internal quality detection device based on diffuse transmission and regular transmission and a detection method thereof.The oxhorn pepper internal quality detection device comprises a box body, a light source system is arranged at the top of the box body, a detection workbench and a guide disc are arranged in the box body, and a rubber fruit cup used for being clamped and attached to a to-be-detected product is clamped and fixed to the middle of the guide disc; an arc-shaped top plate capable of feeding in the radial direction is distributed on the circumference of the rubber fruit cup, a round base plate and a carrying plate are arranged below the guide disc, a light beam shrinking device corresponding to the rubber fruit cup is installed on the carrying plate, and an optical fiber distance adjusting device is arranged below the carrying plate. The device not only can realize light source inclination angle adjustment and automatic adjustment of the distance between the light source and the ox-horn pepper, but also can detect the internal quality of the ox-horn pepper in two modes of regular transmission and diffuse transmission, and can realize intelligence and automation that the inner wall of a rubber fruit cup is attached to the surface of the ox-horn pepper; and transmission light from the ox-horn pepper can be better collected and fed back to the optical fiber probe, so that the internal quality can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of agricultural intelligent equipment, and in particular to a device and a method for detecting the internal quality of horn pepper based on diffuse transmission and regular transmission. Background Art

[0002] The ox-horn pepper is a variety of pepper, named for its mature fruit that resembles an ox horn. It has thick and crisp flesh, rich vitamin C content, and mild or even non-spicy taste. It is used as a vegetable rather than a seasoning and is deeply loved by the general public. Today, the application of spectral detection technology in agricultural products has developed rapidly, improving the quality of fruit and vegetable supply. In the process of spectral acquisition of diffuse transmission and regular transmission, measures to remove stray light have a crucial impact on the collected spectral information.

[0003] For some relatively regular fruits and vegetables, such as apples, pears, and watermelons, their own gravity can be used to compress the elastic rubber ring so that the surface of the fruit fits the outer edge of the elastic rubber ring, thereby separating the optical fiber probe under the elastic rubber ring from the light from outside the fruit, and preventing the light from outside the fruit from directly entering the optical fiber probe, which affects the collection of actual effective spectral information. However, for some fruits and vegetables with irregular surfaces and light weight, such as horn peppers, carambolas, and cucumbers, it is difficult to fit the surface of the fruit with the outer edge of the regular elastic rubber ring, resulting in the inability to use the above collection method to obtain effective spectral information. At the same time, such fruits and vegetables generally have serious internal quality problems, affecting the quality of market supply.

[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects and shortcomings of the prior art, and to provide a device and a method for detecting the internal quality of horn pepper based on diffuse transmission and regular transmission, so as to solve various problems existing in the prior art.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A device for detecting the internal quality of horn pepper based on diffuse transmission and regular transmission, comprising a closable box, a light source system is arranged on the top of the box, the light source system comprises a halogen lamp and an anti-reflection halogen lamp, a detection workbench is arranged in the box, the middle part of the detection workbench is a guide disc structure, a rubber fruit cup for clamping and closely fitting a product to be tested is fixed in the middle part of the guide disc, the circumferential distribution of the rubber fruit cup can be radially fed to press against an arc-shaped top plate on the outer wall of the rubber fruit cup, push rods for radial feeding are respectively arranged on the rear sides of the arc-shaped top plates, the radial feeding action of the push rods is driven by a synchronous screw rod assembly arranged below, the synchronous screw rod assembly is mounted on a circular chassis arranged below the guide disc, a carrier plate is arranged below the circular chassis, a light shrinking device arranged corresponding to the rubber fruit cup is mounted on the carrier plate, and an optical fiber distance adjustment device is arranged below the carrier plate.

[0008] A box door is installed on the front of the box, fans are symmetrically installed on both sides, and the inner wall of the box is sprayed with black matte material.

[0009] The light source system includes a liftable light source lifting plate, four ball shafts are symmetrically installed on the lower surface of the light source lifting plate, a heat sink frame 1 is fixedly installed on the other end of the ball shaft, a halogen lamp is fixedly installed on the other side of the heat sink frame 1, a heat sink frame 2 is fixedly installed at the center of the lower surface of the light source lifting plate, an anti-reflection halogen lamp is fixedly installed on the lower side of the heat sink frame 2, and the lifting of the light source lifting plate is driven by the lifting screw assembly above it.

[0010] The lifting screw assembly includes screw rod 1 and screw rod 2 which are symmetrically arranged for installing the light source lifting plate. Screw rod 1 and screw rod 2 are respectively rotatably fixed to the top of the box body through shaft fixing member 1, and are connected through sprocket wheel 1 and chain 1. The threadless end of screw rod 1 is fixedly connected with transmission gear 2, and transmission gear 2 is meshed with transmission gear 1 at the output end of motor 1 above. Motor 1 is fixedly installed on the fixed installation cover shell on the top of the box body.

[0011] The rubber fruit cup includes a black sponge and a soft rubber ring. A pentagonal through hole is opened in the center of the black sponge. The black sponge is composed of two pieces stacked up and down, and the pentagonal through hole is staggered at an angle. A soft rubber ring is fixedly installed on the outer surface of the black sponge, and a patch pressure sensor is fixedly installed on the outer surface of the soft rubber ring.

[0012] The synchronous screw assembly includes a threaded rod radially installed on a circular chassis, the threaded rod is installed on the circular chassis through an axis fixing part 2, the circular chassis is located directly below the guide disc, a movable push rod is screwed on the threaded rod, the guide disc is provided with a guide groove for radial feed guiding the push rod, the front ends of the threaded rod are respectively provided with bevel gears 2, the bevel gears 2 are transmission meshed with bevel gears 1 arranged in the middle of the circular chassis below, a sprocket 3 is arranged below the bevel gear 1, the sprocket 3 is transmission connected to a sprocket 2 fixedly installed at one end of the rotating shaft of a motor 2 on one side through a chain 2, and the motor 2 is fixedly installed on the detection workbench through a motor fixing frame.

[0013] The optical beam shrinking device comprises a hollow optical beam shrinking device shell, a mounting hole is provided in the middle of the bottom end surface of the optical beam shrinking device shell, a plano-concave lens is installed in the mounting hole, and a quartz lens, an adjustable aperture, and a convex lens are arranged in the optical beam shrinking device shell from top to bottom.

[0014] The optical fiber distance adjustment device includes an electric lead screw arranged below the loading plate, the electric lead screw is fixedly mounted on the closed box through a lead screw fixing frame, a sliding platform that can move up and down is mounted on the electric lead screw, the rotation of the electric lead screw is driven by a motor three below, an optical fiber fixing plate is mounted on the sliding platform, an optical fiber is connected to the optical fiber fixing plate through a flange, and the other end of the optical fiber is connected to a spectrometer.

[0015] The detection method of the internal quality detection device of the ox-horn pepper comprises the following steps:

[0016] S1. Initialize the entire device, select diffuse transmission or regular transmission detection mode to collect the spectrum of the internal quality of the horn pepper, set the corresponding light source mode, when the regular transmission detection mode is adopted, the computer will only control to turn on the anti-reflection halogen lamp; when the diffuse transmission detection mode is adopted, the computer will only control to turn on the halogen lamp. After the light is turned on, the computer controls to turn on the fans symmetrically installed on both sides of the closed box for heat dissipation, and keep the current light source mode preheating for minutes;

[0017] S2. After preheating, manually insert the ox-horn pepper into the rubber fruit cup with the fruit stalk on top, so that the straight fruit body part of the upper end of the ox-horn pepper is as far as possible within the range that the rubber fruit cup can fit; close the box door, and control a series of mechanisms through a computer to control the distance between the light source system and the ox-horn pepper; control a series of mechanisms through a computer to control the push rod to move closer to the center, so that the push rod presses the soft rubber ring, and then applies pressure to the black sponge in the inner layer of the soft rubber ring, so that the black sponge begins to fit with the surface of the ox-horn pepper, and at the same time, the patch pressure sensor installed on the outer surface of the soft rubber ring transmits the pressure information to the computer, and the computer adjusts the travel amount of the push rod in real time through a set program, so as to achieve the flexible fitting of the rubber fruit cup to the ox-horn pepper without squeezing and damaging the ox-horn pepper; control a series of mechanisms through a computer to control the distance between the optical fiber and the light shrinking device; the above actions achieve the best collection effect of the transmitted light from the ox-horn pepper;

[0018] S3. The computer controls the spectrometer to collect a spectrum, and the single spectrum collection work is completed. The internal diseased ox-horn pepper samples and normal ox-horn pepper samples are selected, and the steps are repeated to obtain the spectral data on the internal quality of the ox-horn pepper;

[0019] S4. For the above spectral data, use multivariate scattering correction and standard normal transformation to remove background noise and baseline drift; then use Savitzky-Golay filter for smoothing, set window size, and quadratic polynomial fitting; then use Min-Max normalization method to scale the spectral data to the range of [,]; then use principal component analysis to extract the first principal component and reduce the data dimension;

[0020] S5. The preprocessed spectral data is divided according to the training set: test set =:, wherein the spectral samples of the internal diseased horn pepper and the spectral data of the normal horn pepper in the training set are both bars, and the spectral samples of the internal diseased horn pepper and the spectral data of the normal horn pepper in the test set are both bars;

[0021] S6. Select a support vector machine to model the classification task of the above spectral data, and use a radial basis function as a kernel function;

[0022] S7. Optimize parameters using grid search and fold cross validation;

[0023] S8. Use the test set to evaluate the model performance and calculate the following indicators: accuracy, precision, recall, and F-score. Use the confusion matrix to analyze the classification results and decide whether to make further optimizations or put the model into use in online detection equipment based on its actual classification performance.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] (1) Through the light source system, the forward and reverse rotation of the motor 1 is controlled by a computer. The motor 1 drives the transmission mechanism 1 to drive the screw 1 to rotate, thereby changing the height of the light source lifting plate, thereby adjusting the light source irradiation angle, and then realizing the automation of the distance adjustment between the light source and the beef horn pepper.

[0026] (2) By setting up anti-reflection halogen lamps and halogen lamps, the internal quality of the ox-horn pepper can be detected by regular transmission and diffuse transmission, and two test methods are provided to provide reference for research work.

[0027] (3) Through the setting of the arc top plate and the rubber fruit cup driven by the synchronous screw rod assembly, the push rod can gather the arc top plate toward the center and spread it outward, thereby realizing the compression and compression recovery of the soft rubber ring. The computer can detect the data of the patch pressure sensor on the outside of the soft rubber ring in real time, and finally realize the intelligent and automatic bonding and separation of the inner wall of the rubber fruit cup and the surface of the bell pepper.

[0028] (4) Through the structure of the rubber fruit cup, which is a combination of the black sponge and the soft rubber ring, and the action of the push rod, the outer surface of the tested bell pepper can be well fitted and supported. By setting a black sponge with a pentagonal through hole in the center, the central through hole of the black sponge can better fit the edge of the bell pepper. By setting two layers of black sponge and stacking them in an alternating manner according to the edges and corners of the pentagonal openings, the black sponge can be well fitted to the bell pepper in two dimensions. At the same time, this stacking rule also has a good fitting effect on cylindrical fruits and vegetables.

[0029] (5) A light beam reduction device is provided. A quartz lens is provided inside the device to block dust from above, thereby preventing dust from falling onto the convex lens and affecting the optical effect of the device. An adjustable aperture is provided to control the amount of light entering and play a role in repelling stray light. A convex lens and a plano-concave lens are provided and the focal points of the two are at the same point, thereby collecting and converging the transmitted light from the cow horn pepper, and the light beam is collimated, and then fed back to the optical fiber directly below the light beam reduction device.

[0030] (6) Through the optical fiber distance adjustment device, optical fiber, and spectrometer, the computer controls the forward and reverse rotation of the electric screw motor, thereby controlling the rise and fall of the slide in the electric linear slide, and then controlling the distance between the optical fiber and the light shrinking device, and cooperating with the light shrinking device to achieve the best collection effect of the transmitted light from the cow horn pepper. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural schematic diagram of the present invention;

[0032] Figure 2 is a structural diagram of the light source adjustment device in the present invention;

[0033] Figure 3 It is a partial enlarged view of the synchronous screw assembly in the present invention;

[0034] Figure 4 It is a partial enlarged view of the push rod in the present invention;

[0035] Figure 5 It is a structural diagram of the rubber fruit cup in the present invention;

[0036] Figure 6 It is a top view of the rubber fruit cup in the present invention;

[0037] Figure 7 is a cross-sectional view of the optical beam shrinking device of the present invention;

[0038] Figure 8 It is the mechanical principle diagram of the rubber fruit cup pressure system in the present invention;

[0039] Fig. 9 It is a structural diagram of the connection between the bevel gear 1 and the light beam reduction device in the present invention;

[0040] Fig.10 This is a diagram of the optical fiber distance adjustment device in the present invention.

[0041] Reference numerals:

[0042] 1. Motor 1; 2. Cover; 3. Screw 1; 4. Light source lifting plate; 5. Ball shaft; 6. Heat sink 1; 7. Halogen lamp; 8. Rubber fruit cup; 9. Push rod; 10. Guide disc; 11. Motor fixing frame; 12. Motor 2; 13. Sprocket 2; 14. Chain 2; 15. Power supply; 16. Power supply carrier plate; 17. Spectrometer; 18. Box; 19. Bevel gear 1; 20. Synchronous screw assembly; 21. Fan; 22. Round chassis; 23. Detection workbench; 24. Light beam shrinking device; 25. Carrier plate; 26. Fiber fixing plate; 27. Sliding platform; 28. Flange; 29. ​​Screw fixing frame ; 30. Electric screw; 31. Optical fiber; 32. Motor three; 33. Data cable; 34. Computer; 35. Sprocket three; 36. Transmission gear one; 37. Sprocket one; 38. Shaft fixing part one; 39. Chain one; 40. Black sponge; 41. Soft rubber ring; 42. Quartz lens; 43. Adjustable aperture; 44. Convex lens; 45. Plano-concave lens; 46. Light reduction device housing; 47. Anti-reflection halogen lamp; 48. Bevel gear two; 49. Shaft fixing part two; 50. Threaded rod; 51. Screw two; 52. Transmission gear two; 53. Heat sink two; 54. Arc top plate; 55. Surface mount pressure sensor. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] See attached Figure 1-10 ;

[0045] A device for detecting the internal quality of horn pepper based on diffuse transmission and regular transmission, comprising a closable box 18, a box door is installed on the front of the box 18, fans 21 are symmetrically installed on both sides, the inner wall of the box 18 is sprayed with black matte material, a light source system is arranged on the top of the box 18, the light source system includes a halogen lamp 7 and an anti-reflection halogen lamp 47, a detection workbench 23 is arranged in the box 18, the middle part of the detection workbench 23 is a guide disc 10 structure, the middle part of the guide disc 10 is fixed with a rubber fruit cup 8 for clamping and closely fitting the product to be tested, and the circumferential distribution of the rubber fruit cup 8 can be The radial feed is used to tighten the arc-shaped top plate 54 on the outer wall of the rubber fruit cup 8. The rear side of the arc-shaped top plate 54 is provided with a push rod 9 for radial feed. The radial feed action of the push rod 9 is driven by a synchronous screw assembly 20 arranged below. The synchronous screw assembly 20 is installed on a circular chassis 22 arranged below the guide disc 10. A loading plate 25 is arranged below the circular chassis 22. A light shrinking device 24 corresponding to the rubber fruit cup is installed on the loading plate 25. An optical fiber distance adjustment device is arranged below the loading plate 25. The bottom end of the box body is installed with a power supply 15 through a power supply loading plate 16.

[0046] Further, the light source system includes a light source lifting plate 4 that can be lifted and lowered. Four ball shafts 5 are symmetrically installed on the lower surface of the light source lifting plate 4. A heat sink 1 6 is fixedly installed on the other end of the ball shaft 5. A halogen lamp 7 is fixedly installed on the other side of the heat sink 1 6. A heat sink 2 53 is fixedly installed at the center of the lower surface of the light source lifting plate 4. An anti-reflection halogen lamp 47 is fixedly installed on the lower side of the heat sink 2 53. The lifting and lowering of the light source lifting plate 4 is driven by the lifting screw assembly above it. The lifting screw assembly includes a screw 1 3 and a screw 2 51 that are symmetrically arranged for installing the light source lifting plate. The screw 1 3 and the screw 2 51 are respectively rotatably fixed to the top of the box body through an axis fixing member 1 38, and are connected by a sprocket 1 37 and a chain 1 39. The threadless end of the screw 1 3 is also fixedly connected to a transmission gear 2 52. The transmission gear 2 52 is meshed with the transmission gear 1 36 at the output end of the upper motor 1 for transmission. The motor 1 is fixedly installed on the fixed cover 2 at the top of the box body 18. The motor 1 is fixedly mounted on the housing 2. The forward and reverse rotation of the motor 1 is controlled by a computer. The motor 1 transmits power to the screw rod 1 3 through a transmission gear 1 36 and a transmission gear 2 33. The screw rod 1 3 transmits power to the screw rod 2 32 synchronously through a sprocket 1 37 and a chain 1 39. The screw rod 1 3 and the screw rod 2 32 are threadedly matched with the light source lifting plate 4. The forward and reverse rotation of the motor 1 is controlled by a computer to realize the up and down adjustment of the light source lifting plate 4, thereby realizing automatic adjustment of the distance between the light source and the ox-horn pepper.

[0047] Furthermore, the rubber fruit cup 8 includes a black sponge 40 and a soft rubber ring 41. The black sponge 40 has a pentagonal through hole in the center. The black sponge 40 is stacked in two pieces, and the pentagonal through hole is staggered at an angle. The outer surface of the black sponge 40 is fixedly mounted with a soft rubber ring 41, and the outer surface of the soft rubber ring 41 is fixedly mounted with a patch-type pressure sensor 55. The rubber fruit cup 8 is composed of two black sponges 40 with a pentagonal through hole in the center, which are stacked and fixed at a certain angle, and the optimal angle is 36°. When the rubber fruit cup 8 is under pressure, the soft rubber ring 41 supports the inner black sponge 40, and feeds back the pressure information to the computer in real time through the patch-type pressure sensor 55 on its outer surface. The computer processes the pressure information and controls the forward and reverse rotation of the motor 2 12 according to the pressure information. The motor 2 12 transmits power to the bevel gear 1 19 through the sprocket 2 13, the chain 2 14, and the sprocket 3 35. The bevel gear One 19 transmits power to the synchronous screw assembly 20 by meshing with the front end bevel gear two 48 of the five synchronous screw assemblies 20. The synchronous screw assembly 20 is fixedly installed on the guide disc 10 through the shaft fixing part two 16. The threaded rod 27 at the rear end of the synchronous screw assembly 20 transmits power to the push rod 9 by threaded cooperation with the push rod 9. The push rod 9 will gather or move away from the rubber fruit cup 8 at the center of the guide disc 10 under the action of the power from the motor two 12, thereby realizing the compression and recovery of the rubber fruit cup 8, and then realizing the fitting and separation of the black sponge 40 on the surface of the vertically inserted cow horn pepper.

[0048] Furthermore, the synchronous screw assembly 20 includes a threaded rod 50 radially installed on the circular chassis 22, the threaded rod 50 is installed on the circular chassis 22 through an axis fixing member 49, the circular chassis 22 is located directly below the guide disc 10, a movable push rod 9 is screwed on the threaded rod 50, the guide disc 10 is provided with a guide groove for radial feed guiding the push rod 9, the front ends of the threaded rod 50 are respectively installed with bevel gears 48, the bevel gears 48 are meshed with bevel gears 19 arranged in the middle of the circular chassis 22 below, a sprocket 35 is arranged below the bevel gear 19, the sprocket 35 is connected to the sprocket 13 fixedly installed at one end of the rotating shaft of the motor 2 12 on one side through the chain 14, and the motor 2 12 is fixedly installed on the detection workbench through the motor fixing frame 11.

[0049] Furthermore, the optical beam reduction device includes a hollow optical beam reduction device housing 46, a mounting hole is provided in the middle of the bottom end surface of the optical beam reduction device housing 46, a plano-concave lens 45 is installed in the mounting hole, and a quartz lens 42, an adjustable aperture 43, and a convex lens 44 are sequentially arranged in the optical beam reduction device housing 46 from top to bottom. The optical fiber distance adjustment device includes an electric lead screw 30 arranged below the object carrier 25, the electric lead screw 30 is fixedly mounted on the closed box 18 through a lead screw fixing frame 29, a sliding platform 27 that can move up and down is installed on the electric lead screw 30, the rotation of the electric lead screw is driven by a motor 32 below, an optical fiber fixing plate 26 is installed on the sliding platform 27, an optical fiber 31 is connected to the optical fiber fixing plate 26 through a flange 28, and the other end of the optical fiber 31 is connected to the spectrometer 17.

[0050] The detection method of the internal quality detection device of the above-mentioned ox-horn pepper comprises the following steps:

[0051] S1. Initialize the entire device; select diffuse transmission or regular transmission detection mode to collect the spectrum of the internal quality of the horn pepper, and set the corresponding light source mode; when the regular transmission detection mode is adopted, the computer will only control to turn on the anti-reflection halogen lamp 47 fixedly installed on the lower side of the heat dissipation frame 2 34; when the diffuse transmission detection mode is adopted, the computer will only control to turn on the halogen lamp 7 fixedly installed on the heat dissipation frame 1 6; the computer controls to turn on the fans 21 symmetrically installed on both sides of the closed box 18 for heat dissipation, and keep the current light source mode preheating for 30 minutes;

[0052] S2. According to investigation, most of the cow horn peppers have a relatively regular and straight fruit body 3-4 cm away from the top of the fruit. Manually insert the cow horn pepper into the rubber fruit cup 8 with the fruit stalk on top, so that the regular and straight fruit body part is as far as possible within the range that the rubber fruit cup 8 can fit; close the box door, and control a series of mechanisms through a computer to control the distance between the light source system and the cow horn pepper; control a series of mechanisms through a computer to control the push rod 9 to move closer to the center, and then the push rod 9 presses the soft rubber ring 41, and then applies pressure to the black sponge 40 in the inner layer of the soft rubber ring 41, so that the black sponge 40 begins to fit with the surface of the cow horn pepper, and at the same time, the patch pressure sensor 55 installed on the outer surface of the soft rubber ring 41 transmits the pressure information to the computer, and the computer adjusts the travel amount of the push rod 9 in real time through the set program, so as to achieve the flexible fitting of the rubber fruit cup to the cow horn pepper without squeezing and damaging the cow horn pepper; control a series of mechanisms through a computer to control the distance between the optical fiber and the light shrinking device; the above actions achieve the best collection effect of the transmitted light from the cow horn pepper.

[0053] S3, the computer controls the spectrometer to collect a spectrum, and the single spectrum collection work is completed; select 200 samples of internal diseased ox-horn peppers and 200 samples of normal ox-horn peppers, repeat step 2, and obtain 400 spectral data on the internal quality of ox-horn peppers;

[0054] S4. For the above 400 spectral data, multivariate scatter correction (MSC) and standard normal transformation (SNV) were used to remove background noise and baseline drift; then the Savitzky-Golay filter was used for smoothing, the window size was set to 15, and a quadratic polynomial was fitted; then the Min-Max normalization method was used to scale the spectral data to the range of [0,1]; then the principal component analysis (PCA) was used to extract the first 10 principal components to reduce the data dimension;

[0055] S5. The preprocessed spectral data are divided into a training set: a test set = 8:2, wherein the spectral samples of the internal diseased ox-horn pepper and the spectral data of the normal ox-horn pepper in the training set are 160, and the spectral samples of the internal diseased ox-horn pepper and the spectral data of the normal ox-horn pepper in the test set are 40;

[0056] S6. Select Support Vector Machine (SVM) to model the classification task of the above spectral data, and use Radial Basis Function (RBF) as the kernel function;

[0057] S7. Optimize parameters using Grid Search and 5-fold Cross Validation.

[0058] S8. Use the test set to evaluate the model performance and calculate the following indicators: Accuracy, Precision, Recall, and F1-score; use the Confusion Matrix to analyze the classification results.

[0059] In actual application, when it is necessary to adjust the distance between the light source and the tested cow horn pepper, the forward and reverse rotation of the motor 1 can be controlled by a computer. Since the motor 1 transmits power to the screw rod 1 3 and the screw rod 2 51 through a series of transmission mechanisms, the screw rod 1 3 and the screw rod 2 51 rotate synchronously, the screw rod 1 3 and the screw rod 2 51 are both threadedly matched with the light source lifting plate 4, and the halogen lamp 7 is fixedly installed on the lower surface of the light source lifting plate 4, so that the light source is controlled to approach and move away from the cow horn pepper by the forward and reverse rotation of the motor, thereby realizing the automation of adjusting the distance between the light source and the cow horn pepper through the computer.

[0060] When it is necessary to make the black sponge 40 in the inner layer of the rubber fruit cup 8 fit or separate from the outer surface of the horn pepper, the motor 12 can be controlled by the computer. The positive and negative rotationThe motor 2 12 transmits power to the bevel gear 19 through the sprocket 2 12, the chain 2 14, and the sprocket 3 35. The bevel gear 19 transmits power to the synchronous screw assembly 20 by meshing with the front end bevel gear 2 15 of the five synchronous screw assemblies 20. The threaded rod 27 at the rear end of the synchronous screw assembly 20 transmits power to the push rod 9 through the push rod 9. Therefore, the push rod 9, under the action of the power from the motor 2 12, gathers or moves away from the rubber fruit cup 8 fixedly installed at the center of the guide disk 10, thereby realizing the compression and recovery of the rubber fruit cup 8, and then realizing the fitting and separation of the black sponge 40 on the surface of the vertically inserted cow horn pepper.

[0061] When it is necessary to adjust the distance between the optical fiber probe and the exit of the light contraction device, the forward and reverse rotation of the motor in the electric screw 30 can be controlled by a computer to realize the rise and fall of the slide in the electric screw 30, and the optical fiber 31 is fixedly installed on the optical fiber fixing plate 26 through the flange 28, and the optical fiber fixing plate 26 is fixedly installed on the slide in the electric screw 30, so as to realize the intelligent adjustment of the distance between the optical fiber probe and the exit of the light contraction device through the computer. When it is necessary to switch the spectrum detection mode, it is only necessary to turn on and off the four halogen lamps 7 and the anti-reflection halogen lamp 47 located directly above the rubber fruit cup 8 through the computer to complete the operation. When only the four halogen lamps 7 are powered on, it complies with the diffuse transmission spectrum detection mode; when only the anti-reflection halogen lamp 47 is powered on, it complies with the regular transmission spectrum detection mode.

[0062] Although this specification is described according to implementation modes, not every implementation mode includes only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0063] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of implementation of the present application; that is, all equivalent changes made according to the scope of the claims of the present application are within the protection scope of the claims of the present application.

Claims

1. A device for detecting the internal quality of horn pepper based on diffuse transmission and regular transmission, characterized in that: The invention comprises a closable box (18), the top of which is provided with a light source system, the light source system comprising a halogen lamp (7) and an anti-reflection halogen lamp (47), a detection workbench (23) is provided in the box (18), the middle part of the detection workbench (23) is a guide disc (10) structure, the middle part of the guide disc (10) is clamped and fixed with a rubber fruit cup (8) for clamping and tightly fitting the product to be tested, the circumference of the rubber fruit cup (8) is radially fed with an arc-shaped top plate (10) for clamping the outer wall of the rubber fruit cup (8) 54), the rear side of the arc-shaped top plate (54) is respectively provided with a push rod (9) for radial feeding, the radial feeding action of the push rod (9) is driven by a synchronous screw assembly (20) arranged below, the synchronous screw assembly (20) is installed on a circular chassis (22) arranged below the guide disc (10), a carrier plate (25) is arranged below the circular chassis (22), a light shrinking device (24) arranged corresponding to the rubber fruit cup is installed on the carrier plate (25), and an optical fiber distance adjustment device is arranged below the carrier plate (25).

2. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 1 is characterized in that: A box door is installed on the front of the box body (18), fans (21) are symmetrically installed on both sides, and the inner wall of the box body (18) is sprayed with black matte material.

3. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 1 is characterized in that: The light source system comprises a light source lifting plate (4) which can be raised and lowered. Four ball shafts (5) are symmetrically mounted on the lower surface of the light source lifting plate (4). A heat sink frame 1 (6) is fixedly mounted on the other end of the ball shaft (5). A halogen lamp (7) is fixedly mounted on the other side of the heat sink frame 1 (6). A heat sink frame 2 (53) is fixedly mounted at the center of the lower surface of the light source lifting plate (4). An anti-reflection halogen lamp (47) is fixedly mounted on the lower side of the heat sink frame 2 (53). The lifting and lowering of the light source lifting plate (4) is driven by a lifting screw assembly above the light source lifting plate (4).

4. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 3 is characterized in that: The lifting screw rod assembly includes a screw rod 1 (3) and a screw rod 2 (51) symmetrically arranged for installing a light source lifting plate. The screw rod 1 (3) and the screw rod 2 (51) are respectively rotatably fixed to the top of the box body through an axis fixing member 1 (38), and are connected by a sprocket wheel 1 (37) and a chain 1 (39). The threadless end of the screw rod 1 (3) is also fixedly connected to a transmission gear 2 (52). The transmission gear 2 (52) meshes with the transmission gear 1 (36) at the output end of the upper motor 1 (1). The motor 1 (1) is fixedly installed on a fixed mounting cover (2) at the top of the box body (18).

5. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 2 is characterized in that: The rubber fruit cup (8) comprises a black sponge (40) and a soft rubber ring (41); a quasi-pentagonal through hole is opened in the center of the black sponge (40); two pieces of the black sponge (40) are stacked up and down, and the quasi-pentagonal through hole is arranged at an angle staggered; a soft rubber ring (41) is fixedly mounted on the outer surface of the black sponge (40); and a patch-type pressure sensor (55) is fixedly mounted on the outer surface of the soft rubber ring (41).

6. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 1 is characterized in that: The synchronous screw assembly (20) includes a threaded rod (50) radially mounted on a circular chassis (22), the threaded rod (50) being mounted on the circular chassis (22) via a second shaft fixing member (49), the circular chassis (22) being located directly below a guide disc (10), a movable push rod (9) being screwed onto the threaded rod (50), the guide disc (10) being provided with a guide groove for radially feeding the push rod (9), and a front end portion of the threaded rod (50) A bevel gear 2 (48) is respectively installed, the bevel gear 2 (48) is in transmission meshing engagement with a bevel gear 1 (19) arranged in the middle of the circular chassis (22) below, a sprocket 3 (35) is arranged below the bevel gear 1 (19), the sprocket 3 (35) is transmission connected to a sprocket 2 (13) fixedly installed at one end of the rotating shaft of a motor 2 (12) on one side through a chain 2 (14), and the motor 2 (12) is fixedly installed on the detection workbench through a motor fixing frame (11).

7. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 1 is characterized in that: The light-contracting device comprises a hollow light-contracting device housing (46), a mounting hole is provided in the middle of the bottom end surface of the light-contracting device housing (46), a plano-concave lens (45) is installed in the mounting hole, and a quartz lens (42), an adjustable aperture (43), and a convex lens (44) are arranged in sequence from top to bottom in the light-contracting device housing (46).

8. The internal quality detection device of horn pepper based on diffuse transmission and regular transmission according to claim 1 is characterized in that: The optical fiber distance adjustment device comprises an electric screw (30) arranged below the loading plate (25), the electric screw (30) being fixedly mounted on the closed box (18) via a screw fixing frame (29), a sliding platform (27) movable up and down being mounted on the electric screw (30), the rotation of the electric screw being driven by a motor three (32) below, an optical fiber fixing plate (26) being mounted on the sliding platform (27), an optical fiber fixing plate (26) being connected to an optical fiber (31) via a flange (28), and the other end of the optical fiber (31) being connected to a spectrometer (17).

9. A method for detecting the internal quality of horn pepper based on the device for detecting the internal quality of horn pepper according to any one of claims 1 to 8, characterized in that: The following steps are involved: S1, initialize the entire device, select diffuse transmission or regular transmission detection mode to collect the spectrum of the internal quality of the horn pepper, set the corresponding light source mode, when the regular transmission detection mode is adopted, the computer will only control to turn on the anti-reflection halogen lamp (47); when the diffuse transmission detection mode is adopted, the computer will only control to turn on the halogen lamp (7), after the light is turned on, the computer controls to turn on the fans (21) symmetrically installed on both sides of the closed box (18) for heat dissipation, and keep the current light source mode preheating for 30 minutes; S2, after preheating, manually insert the ox-horn pepper into the rubber fruit cup (8) with the fruit stalk on top, so that the straight fruit body part at the upper end of the ox-horn pepper is as far as possible within the range that the rubber fruit cup (8) can fit; close the box door, and control a series of mechanisms through a computer to control the distance between the light source system and the ox-horn pepper; control a series of mechanisms through a computer to control the push rod (9) to move toward the center, so that the push rod (9) presses the soft rubber ring (41), and then applies pressure to the black sponge (40) in the inner layer of the soft rubber ring (41), so that the black sponge (40) begins to fit with the surface of the ox-horn pepper, and at the same time, the patch pressure sensor (55) installed on the outer surface of the soft rubber ring (41) transmits pressure information to the computer, and the computer adjusts the travel amount of the push rod (9) in real time through a set program, so as to achieve flexible fitting of the rubber fruit cup to the ox-horn pepper without squeezing and damaging the ox-horn pepper; control a series of mechanisms through a computer to control the distance between the optical fiber and the light shrinking device; and achieve the best collection effect of the transmitted light from the ox-horn pepper through the above actions; S3. The computer controls the spectrometer to collect a spectrum, and the single spectrum collection work is completed. 200 samples of internal diseased ox-horn peppers and 200 samples of normal ox-horn peppers are selected, and step 2 is repeated to obtain 400 spectral data on the internal quality of ox-horn peppers; S4. For the above 400 spectral data, multivariate scattering correction and standard normal transformation were used to remove background noise and baseline drift; then, Savitzky-Golay filter was used for smoothing, window size was set, and quadratic polynomial fitting was performed; then, Min-Max normalization method was used to scale the spectral data to the range of [0,1]; then, principal component analysis was used to extract the first 10 principal components to reduce the data dimension; S5. The preprocessed spectral data are divided into a training set: a test set = 8:2, wherein the spectral samples of the diseased ox-horn pepper and the spectral data of the normal ox-horn pepper in the training set are 160, and the spectral samples of the diseased ox-horn pepper and the spectral data of the normal ox-horn pepper in the test set are 40; S6. Select a support vector machine to model the classification task of the above spectral data, and use a radial basis function as a kernel function; S7. Optimize parameters using grid search and 5-fold cross validation; S8. Use the test set to evaluate the model performance and calculate the following indicators: accuracy, precision, recall, and F1 score. Use the confusion matrix to analyze the classification results, and decide whether to further optimize or put it into use in online detection equipment based on the actual classification performance of the model.