Capsicum granule color value visible-fluorescence imaging detection device and method

CN117092039BActive Publication Date: 2026-10-16CHINA AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311055674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2026-10-16
Estimated Expiration
2043-08-21

AI Technical Summary

Technical Problem

目前,辣椒颗粒色价的检测通常采用丙酮-超声波法,需要采用大量有机试剂,且检测时间长,人工成本高

Benefits of technology

[0066] The detection device provided by this invention has the advantages of low cost and non-destructive operation, and the sample to be tested does not require pretreatment, and the analysis process does not consume organic reagents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117092039B_ABST
    Figure CN117092039B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of chili particle color value visible-fluorescence imaging detection device and method, belong to agricultural product nondestructive testing technical field.A kind of chili particle color value visible-fluorescence imaging detection device, including display screen (1), controller (2), rotating sample disc base (4), white LED light source (7), ultraviolet LED light source fixed plate (8), camera (9), camera and light source fixing frame (10), controller power battery (11), light source power battery (12), optical filter gasket (14), optical filter (15), ultraviolet LED light source (16) and sample disc (17);The detection device provided by the present application has the advantages of low cost, nondestructive, and the sample to be measured does not need pretreatment, and the analysis process does not need to consume organic reagent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a visible-fluorescence imaging detection device and method for the color value of chili pepper particles, belonging to the field of non-destructive testing technology for agricultural products. Background Technology

[0002] Chili granules are the main raw material for producing capsicum, which is prepared through processes such as drying, crushing, and granulation of chili pericarps after seed separation. In the trading process, chili granules are priced according to their color value; the higher the color value, the higher the price. Currently, the color value of chili granules is usually detected using the acetone-ultrasonic method, which requires a large amount of organic reagents, is time-consuming, and has high labor costs. Therefore, a non-destructive testing method for the color value of chili granules is a crucial means to promote the development of the processed chili industry.

[0003] Machine vision technology has been widely applied in quality analysis of agricultural products due to its advantages of speed and low cost. Machine vision technology achieves non-destructive testing through optical imaging using different light source combinations, including visible light imaging, fluorescence imaging, and near-infrared imaging. Since the color value of chili pepper particles reflects the extractable pigments within them, and the main pigments in chili peppers are carotenoids with fluorescence response, visible light and ultraviolet light are used as the light sources for the machine vision system. A visible-fluorescence imaging detection device for chili pepper particle color value is built based on visible light and fluorescence imaging, and a method for chili pepper particle image acquisition and processing is established. This provides a non-destructive and efficient color value detection solution for quality control in the pigment chili pepper processing industry. Summary of the Invention

[0004] The purpose of this invention is to provide a visible-fluorescence imaging detection device and method for the color value of chili pepper particles, which can solve the non-destructive testing requirements in the chili pepper particle acceptance process. It has the advantages of low cost and non-destructive testing, and the sample to be tested does not require pretreatment, and the analysis process does not consume organic reagents.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A visible-fluorescence imaging detection device for the color value of chili pepper particles, the detection device includes a display screen 1, a controller 2, a rotating sample tray base 4, a white LED light source 7, an ultraviolet LED light source fixing plate 8, a camera 9, a camera and light source fixing bracket 10, a controller power supply battery 11, a light source power supply battery 12, a filter pad 14, a filter 15, an ultraviolet LED light source 16, and a sample tray 17.

[0007] Display screen 1, controller 2, controller power supply battery 11 and light source power supply battery 12 are fixed on the device housing;

[0008] One side of the inside of the device housing is the image acquisition side; the image acquisition side is equipped with a camera and light source mounting bracket 10; the bottom of the camera and light source mounting bracket 10 is fixed to the bottom of the inside of the device housing;

[0009] The rotating sample tray base 4 is arranged at the bottom of the image acquisition side of the visible-fluorescence imaging detection device for the color value of chili particles; the rotating sample tray base 4 includes a through hole 401 and a groove 403; wherein, the inner upper surface of the rotating sample tray base 4 is provided with a groove 403 for placing the sample tray 17; the outer middle part of the sample tray base 4 is provided with a through hole 401; the sample tray base 4 can rotate circumferentially around the through hole 401 as the axis.

[0010] Above the rotating sample tray base 4 are a white LED light source 7, an ultraviolet LED light source fixing plate 8, a filter pad 14, a filter 15, and an ultraviolet LED light source 16;

[0011] The ultraviolet LED light source fixing plate 8 has multiple light source fixing through holes 801 on its periphery and a central light source through hole in the middle; the inner wall of the central light source through hole has a horizontal light source groove 802, and the ultraviolet LED light source 16 is placed in the light source groove 802.

[0012] The ultraviolet LED light source 16 is a ring light source. The LED beads of the ultraviolet LED light source 16 are arranged on the lower surface of the outer periphery of the ultraviolet LED light source 16 and illuminate vertically downwards. The ultraviolet LED light source 16 has a central through hole in the middle.

[0013] The upper surface of the white LED light source 7 is provided with 4 threaded holes; the threaded holes on the upper surface of each white LED light source 7 and the light source fixing through hole 801 of the corresponding ultraviolet LED light source fixing plate 8 are coaxial; the ultraviolet LED light source fixing plate 8 is fixed to the upper surface of the white LED light source 7 by bolts passing through the threaded holes and the light source fixing through hole 801.

[0014] The white LED light source 7 is a ring light source. The LED beads of the white LED light source 7 are arranged inside the white LED light source 7, facing the groove 403 of the rotating sample plate base 4. The white LED light source 7 has a central through hole in the middle.

[0015] The filter pad 14 includes an outer circumferential portion and a central portion. The outer circumferential portion is located above the ultraviolet LED light source fixing plate 8. The outer circumferential portion is provided with a plurality of filter fixing through holes 1401, and each filter fixing through hole 1401 and its corresponding light source fixing through hole 801 are coaxial. The central portion is provided with a filter central through hole. The inner wall surface of the filter central through hole is provided with a horizontal filter groove 1402, and the filter 15 is placed in the filter groove 1402.

[0016] A camera 9 is positioned above the filter 15; the lens of the camera 9 faces downwards and is directly opposite the filter 15.

[0017] The groove 403 of the rotating sample tray base 4, the central through hole of the white LED light source, the central through hole of the ultraviolet LED light source, the filter 15 and the lens of the camera 9 are positioned from bottom to top and are coaxial, forming a detection optical path;

[0018] Controller 2 is electrically connected to display screen 1, white LED light source 7, camera 9 and ultraviolet LED light source 16;

[0019] Controller 2 is powered by controller power supply battery 11;

[0020] The white LED light source 7 and the ultraviolet LED light source 16 are powered by the light source power supply battery 12.

[0021] A positioning baffle 402 is provided on one side of the rotating sample tray base 4.

[0022] To facilitate background subtraction during image acquisition, sample disk 17 is black.

[0023] The white LED light source 7 has an angle of 20° with the vertical direction.

[0024] The lower surface of the center portion of the filter pad 14 is located below the contact surface between the outer circumference of the filter pad 14 and the ultraviolet LED light source fixing plate 8 in the vertical direction; the lower surface of the center portion of the filter pad 14 is located between the lower and upper surfaces of the ultraviolet LED light source 16; the distance between the lower surface of the center portion of the filter pad 14 and the lower surface of the ultraviolet LED light source 16 is 0.6 mm, and the distance between the lower surface of the center portion of the filter pad 14 and the upper surface of the ultraviolet LED light source 16 is 1.0 mm.

[0025] The vertical distance between the inner surface of the sample tray 17 and the lower surface of the white LED light source 7 is 28 mm to ensure that the white LED light can evenly illuminate the surface of the chili pepper particles; the vertical distance between the inner surface of the sample tray 17 and the lower surface of the ultraviolet LED light source 16 is 47.4 mm.

[0026] The vertical distance between the inner surface of the sample tray 17 and the filter 15 is 49mm, and the vertical distance between the sample tray 17 and the lens of the camera 9 is 52mm.

[0027] A method for detecting the color value of chili particles using a visible-fluorescence imaging detection device as described above, the method comprising the following steps:

[0028] Step S1: Place the sample dish 17 containing chili granules into the groove 403, and rotate the rotating sample dish base 4 into the device.

[0029] Step S2: Turn on controller 2, connect camera 9 to controller 2, and power on camera 9; controller 2 sends a signal to white LED light source 7, so that the output current of white LED light source 7 is the first current intensity and the second current intensity in sequence.

[0030] Step S3: When the output current of the white LED light source 7 is at the first current intensity, the camera 9 is used to acquire a correction image; the correction image is an image acquired when there is obvious overexposure on the surface of the chili pepper particles.

[0031] Step S4: When the output current of the white LED light source 7 is the second current intensity, the visible light image is acquired using the camera 9;

[0032] Step S5: Controller 2 sends a signal to the ultraviolet LED light source 16 to make the output current of the ultraviolet LED light source 16 the third current intensity. At this time, the camera 9 is used to collect fluorescence images.

[0033] Step S6: Use the visible light image to remove the background, that is, set all non-chili pepper particles to 0. The non-chili pepper particles are the background pixels, and the visible light image after removing the background can be obtained.

[0034] Step S7: Since the non-chili pepper particles in the corrected image and the visible light image are the same, the background pixels in the corrected image can be obtained after extracting the background pixels from the visible light image; by setting the background pixels in the corrected image to 0, the corrected image after removing the background can be obtained.

[0035] Step S8: In the corrected image after removing the background, the overexposed areas have obvious color differences from other areas of the chili pepper particles; at this time, the B channel image of the corrected image after removing the background is binarized and then subjected to median filtering to obtain the overexposed areas; the number of overexposed areas in the corrected image after removing the background is the same as the number of chili pepper particles collected.

[0036] In addition, the surface of the chili pepper particles contains cracks. In order to facilitate the identification of the crack length, the minimum bounding rectangle is fitted to the overexposed area. Since the fracture surface of some chili pepper particles is not completely perpendicular to the horizontal plane, 1 / 3 of the length and width of the minimum bounding rectangle fitted to the overexposed area is taken as the approximate planar area of ​​the crack pixels to be removed.

[0037] By utilizing the color and shape features of cracked and non-cracked pixels in the approximate planar region of the cracked pixels to be removed, the approximate planar region of each chili pepper particle in the acquired and corrected image is obtained.

[0038] Step S9: At this time, the non-zero pixel area of ​​the obtained corrected image is an approximate planar area; for each chili pepper particle, an approximate planar area will be obtained; the zero pixels in the approximate planar area of ​​each chili pepper particle are superimposed on the visible light image and fluorescence image of the chili pepper particle to obtain the approximate planar area of ​​the visible light image and the approximate planar area of ​​the fluorescence image of the chili pepper particle.

[0039] Twelve features were extracted from the HSV color space of the approximate planar regions of the visible light image and the fluorescence image of the chili pepper particles, respectively:

[0040] 1. H-channel mean;

[0041] 2. S-channel mean;

[0042] 3. V-channel mean;

[0043] 4. The pixel value of the pixel with the highest frequency on the color histogram of the H channel;

[0044] 5. The pixel value of the pixel with the highest frequency on the color histogram of the S channel;

[0045] 6. The pixel value of the pixel with the highest frequency on the color histogram of the V channel;

[0046] 7. Kurtosis of the color histogram of the H channel;

[0047] 8. Skewness of the color histogram of the H channel;

[0048] 9. Kurtosis of the color histogram of the S channel;

[0049] 10. Skewness of the color histogram of the S channel;

[0050] 11. Kurtosis of the color histogram of the V channel;

[0051] 12. Skewness of the color histogram of the V channel;

[0052] A total of 24 features were extracted;

[0053] For each chili pepper particle in the corrected image, repeat step S9 to obtain 24 features of all chili pepper particles in the tested batch; take the average of all chili pepper particle feature values ​​as the feature value of the chili pepper particles in that batch.

[0054] Step S10: Use partial least squares regression algorithm to establish a color value prediction model for chili pepper particles;

[0055] The specific steps of the PLSR algorithm are as follows: Assuming that the image feature matrix X is an n×24-dimensional independent variable matrix and the color value standard physicochemical value Y is an n×1-dimensional dependent variable matrix, where n is the number of samples to be tested, then the following linear model can be established between Y and X:

[0056] Y=XB+E Formula 1

[0057] In Formula 1, E is the residual matrix; B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and the least squares solution of the regression coefficient matrix B is:

[0058] B = (X) T X) -1 XY Formula 2

[0059] In Formula 2, B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and T is the transpose matrix.

[0060] When establishing the prediction model, n batches of chili granule samples with different color values ​​are selected. Given the known standard physicochemical value Y of the color value of each batch of chili granule samples, the image features of each batch of chili granule samples are extracted using the methods in steps S1 to S9. Based on this, the standard physicochemical value matrix Y and the image feature matrix X of the n batches of chili granule samples with different color values ​​are obtained.

[0061] The relationship between the color value standard physicochemical value matrix Y and the image feature matrix X is obtained using formulas 1 and 2, i.e., the prediction model;

[0062] Step S11: Collect images of any batch of chili pepper granule samples with unknown color values. Substitute the 24 features extracted from the approximate planar region of the visible light image and the approximate planar region of the fluorescence image using the methods in steps S1 to S9 into the prediction model in step S10 to output the predicted color value of the measured batch of chili pepper granules.

[0063] The first current intensity is 9-15mA, the second current intensity is 3-6mA, and the third current intensity is 245-255mA.

[0064] The first current intensity is 9mA, the second current intensity is 3mA, and the third current intensity is 250mA.

[0065] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0066] The detection device provided by this invention has the advantages of low cost and non-destructive operation, and the sample to be tested does not require pretreatment, and the analysis process does not consume organic reagents. Attached Figure Description

[0067] Figure 1a This is a front view of the external structure of the visible-fluorescence imaging detection device for the color value of chili particles of the present invention;

[0068] Figure 1b This is a rear side view of the external structure of the visible-fluorescence imaging detection device for the color value of chili particles of the present invention;

[0069] Figure 2a This is a front view of the internal structure of the visible-fluorescence imaging detection device for the color value of chili particles of the present invention;

[0070] Figure 2b This is a rear side view of the internal structure of the visible-fluorescence imaging detection device for the color value of chili particles of the present invention.

[0071] Figure 3 This is a cross-sectional schematic diagram of the image acquisition side of the visible-fluorescence imaging detection device for the color value of chili particles of the present invention;

[0072] Figure 4a This is a schematic diagram of the rotating sample disk of the present invention;

[0073] Figure 4b This is a schematic diagram of the structure of the ultraviolet LED light source fixing plate of the present invention;

[0074] Figure 4c This is a schematic diagram of the structure of the filter pad of the present invention;

[0075] Figure 5a This is a corrected image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention;

[0076] Figure 5b This is a visible light image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention;

[0077] Figure 5c The image shows a fluorescence image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention.

[0078] Figure 6 This is a flowchart of the chili particle color value detection process of the present invention.

[0079] The reference numerals in the attached figures are:

[0080] 1. Display screen 2. Controller

[0081] 3. Right cover plate; 4. Rotating sample tray base

[0082] 5. Front cover plate 6. Left cover plate

[0083] 7. White LED light source; 8. UV LED light source mounting plate

[0084] 9. Camera 10. Camera and light source mounting bracket

[0085] 11. Controller power supply battery 12. Light source power supply battery

[0086] 13. Bottom support feet 14. Filter gasket

[0087] 15. Color filter 16. Ultraviolet LED light source

[0088] 17. Sample tray 401, through hole

[0089] 402, Positioning baffle; 403, Groove

[0090] 801. Light source fixing through hole; 802. Light source groove

[0091] 1401, Filter fixing through hole; 1402, Filter groove Detailed Implementation

[0092] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0093] like Figure 1a , Figure 1b , Figure 2a , Figure 2b and Figure 3 As shown, the visible-fluorescence imaging detection device for the color value of chili particles of the present invention includes a display screen 1, a controller 2, a right cover plate 3, a rotating sample tray base 4, a front cover plate 5, a left cover plate 6, a white LED light source 7, an ultraviolet LED light source fixing plate 8, a camera 9, a camera and light source fixing bracket 10, a controller power supply battery 11, a light source power supply battery 12, a bottom support 13, a filter pad 14, a filter 15, an ultraviolet LED light source 16, and a sample tray 17.

[0094] The device housing is provided with a front cover plate 5, a left cover plate 6, and a right cover plate 3 on the front, left, and right sides, respectively. The bottom of the device housing is provided with bottom support feet 13.

[0095] Display screen 1, controller 2, controller power supply battery 11, and light source power supply battery 12 are fixed to the device housing. Preferably, controller 2 is located on the left side inside the overall device. Preferably, display screen 1 is a 5-inch display screen.

[0096] One side of the interior of the device housing is the image acquisition side. The image acquisition side is equipped with a camera and light source mounting bracket 10. The bottom of the camera and light source mounting bracket 10 is fixed to the bottom of the interior of the device housing.

[0097] like Figure 3 As shown, the rotating sample disk base 4 is positioned at the bottom of the image acquisition side of the visible-fluorescence imaging detection device for the color value of chili particles. (As indicated...) Figure 4a As shown, the rotating sample tray base 4 includes a through hole 401, a positioning baffle 402, and a groove 403. The groove 403 is located on the inner upper surface of the rotating sample tray base 4 for placing the sample tray 17. The positioning baffle 402 is located at one outer end of the rotating sample tray base 4. The through hole 401 is located in the middle of the outer side of the sample tray base 4, and the through hole 401 is positioned with the device housing by a metal cylindrical pin. The sample tray base 4 can rotate circumferentially around the through hole 401. When placing a sample, the rotating sample tray base 4 is rotated outside the device, and the sample tray 17 is placed into the groove 403; during testing, the rotating sample tray base 4 is rotated inside the device. When the positioning baffle 402 rotates to contact the device housing, the rotating sample tray base 4 is in position and testing can be performed.

[0098] The sample tray 17 and the rotating sample tray base 4 are designed separately so that the sample tray 17 containing chili granules can be easily placed and removed, and is easy to clean.

[0099] Preferably, the sample disk 17 is black to facilitate background subtraction during image acquisition.

[0100] Above the rotating sample tray base 4 are a white LED light source 7, an ultraviolet LED light source fixing plate 8, a filter pad 14, a filter 15, and an ultraviolet LED light source 16.

[0101] like Figure 4b As shown, the ultraviolet LED light source fixing plate 8 has multiple light source fixing through holes 801 on its periphery and a central light source through hole in the middle. The inner wall of the central light source through hole has a horizontal light source groove 802, in which the ultraviolet LED light source 16 is placed.

[0102] The ultraviolet LED light source 16 is a ring light source, with the LED beads arranged on the lower surface of the outer periphery of the ultraviolet LED light source 16, illuminating vertically downwards. The ultraviolet LED light source 16 has a central through hole in its center.

[0103] The upper surface of the white LED light source 7 has four threaded holes. Each threaded hole on the upper surface of the white LED light source 7 is coaxial with the light source fixing through hole 801 of the corresponding ultraviolet LED light source fixing plate 8. The ultraviolet LED light source fixing plate 8 is fixed to the upper surface of the white LED light source 7 by bolts passing through the threaded holes and the light source fixing through holes 801.

[0104] The white LED light source 7 is a ring light source. The LED beads of the white LED light source 7 are arranged on the inner side of the white LED light source 7, facing the groove 403 of the rotating sample plate base 4. The angle between the LED beads of the white LED light source 7 and the vertical direction is 20°. A central through hole for the white LED light source 7 is provided in the middle.

[0105] like Figure 4c As shown, the filter pad 14 includes an outer circumferential portion and a central portion, with the outer circumferential portion located above the ultraviolet LED light source fixing plate 8. The outer circumferential portion has multiple filter fixing through holes 1401, each filter fixing through hole 1401 being coaxial with its corresponding light source fixing through hole 801. The central portion has a filter central through hole. The inner wall surface of the filter central through hole has a horizontal filter groove 1402, in which the filter 15 is placed.

[0106] The lower surface of the center portion of the filter spacer 14 is located vertically below the contact surface between the outer circumference of the filter spacer 14 and the ultraviolet LED light source fixing plate 8. The lower surface of the center portion of the filter spacer 14 is located between the lower and upper surfaces of the ultraviolet LED light source 16, with a distance of 0.6 mm between the lower surface of the filter spacer 14 and the lower surface of the ultraviolet LED light source 16, and a distance of 1.0 mm between the lower surface of the filter spacer 14 and the upper surface of the ultraviolet LED light source 16.

[0107] Preferably, the vertical distance between the inner surface of the sample tray 17 and the lower surface of the white LED light source 7 is 28 mm, to ensure that the white LED light can uniformly illuminate the surface of the chili pepper particles. The vertical distance between the inner surface of the sample tray 17 and the lower surface of the ultraviolet LED light source 16 is 47.4 mm. This distance is limited by the white LED light source 7 and the ultraviolet LED light source 16, and is the minimum vertical distance that can be achieved between the inner surface of the sample tray 17 and the lower surface of the ultraviolet LED light source 16 when the dimensions of both are fixed.

[0108] Preferably, the vertical distance between the inner surface of the sample tray 17 and the filter 15 is 49 mm, and the vertical distance between the sample tray 17 and the lens of the camera 9 is 52 mm.

[0109] A camera 9 is positioned above the filter 15. The lens of the camera 9 faces downwards, directly opposite the filter 15.

[0110] The groove 403 of the rotating sample tray base 4, the central through hole of the white LED light source, the central through hole of the ultraviolet LED light source, the filter 15 and the lens of the camera 9 are positioned correspondingly from bottom to top and are coaxial, forming a detection optical path.

[0111] The controller 2 is electrically connected to the display screen 1, the white LED light source 7, the camera 9, and the ultraviolet LED light source 16.

[0112] Controller 2 is powered by controller power supply battery 11.

[0113] The white LED light source 7 and the ultraviolet LED light source 16 are powered by the light source power supply battery 12.

[0114] Figure 5aThis is a corrected image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention; Figure 5b This is a visible light image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention; Figure 5c This is a fluorescence image acquired by the visible-fluorescence imaging detection device for the color value of chili particles according to the present invention.

[0115] The corrected image is an image acquired under conditions of significant overexposure on the surface of the chili pepper particles. The aim is to extract an approximately planar region, meaning that when the distance between the camera 9 and the chili pepper particle is constant, points farther from the camera 9 along the circumferential direction of the cylinder exhibit greater deformation in the image acquisition. By increasing the current control, as the light intensity of the white LED light source 7 increases, overexposure occurs in the top region of the chili pepper particles.

[0116] like Figure 6 As shown, a method for detecting the color value of chili particles using the above-mentioned visible-fluorescence imaging detection device includes the following steps:

[0117] Step S1: Place the sample tray 17 containing chili granules into the groove 403, and rotate the rotating sample tray base 4 into the device. When the positioning baffle 402 rotates to contact the outer shell of the device, the rotating sample tray base 4 is rotated into place.

[0118] Step S2: Turn on controller 2, connect camera 9 to controller 2, and power on camera 9. Controller 2 sends a signal to white LED light source 7, sequentially setting the output current of white LED light source 7 to a first current intensity and a second current intensity. Preferably, the first current intensity is greater than the second current intensity. Preferably, the first current intensity is 9-15mA, and the second current intensity is 3-6mA. Preferably, the first current intensity is 9mA, and the second current intensity is 3mA.

[0119] Step S3: When the output current of the white LED light source 7 is at the first current intensity, a correction image is acquired using the camera 9. The correction image is an image acquired under conditions where there is obvious overexposure on the surface of the chili pepper particles.

[0120] Step S4: When the output current of the white LED light source 7 is the second current intensity, the visible light image is acquired using the camera 9.

[0121] Step S5: Controller 2 sends a signal to the ultraviolet LED light source 16 so that the output current of the ultraviolet LED light source 16 is the third current intensity. At this time, the camera 9 is used to collect fluorescence images.

[0122] Preferably, the third current intensity is 245-255 mA. Preferably, the third current intensity is 250 mA.

[0123] Step S6: Use the visible light image to remove the background, that is, set all non-chili pepper particles to 0. The non-chili pepper particles are the background pixels, and the visible light image after removing the background can be obtained.

[0124] Step S7: Since the non-chili pepper particles in the corrected image and the visible light image have the same number of pixels, the background pixels in the corrected image can be obtained after extracting the background pixels from the visible light image. Setting the background pixels in the corrected image to 0 yields the corrected image after removing the background.

[0125] Step S8, as follows Figure 5a As shown, in the corrected image after background removal, the overexposed areas have a significant color difference from other areas of the chili pepper particles. At this point, binarizing the B channel of the corrected image after background removal and performing median filtering reveals the overexposed areas. The number of overexposed areas in the corrected image after background removal is the same as the number of chili pepper particles collected.

[0126] In addition, the chili pepper particles have cracks on their surface, which are dark in color and elongated in shape. To facilitate the identification of crack length, a minimum bounding rectangle is fitted to the overexposed area. Since the fracture surface of some chili pepper particles is not completely perpendicular to the horizontal plane, the fracture surface may be included in the above minimum bounding rectangle fitting operation. To avoid this phenomenon, 1 / 3 of the length and width of the minimum bounding rectangle fitted to the overexposed area is taken as an approximate planar region for the crack pixels to be removed.

[0127] By utilizing the color and shape features of cracked and non-cracked pixels in the approximate planar region of the cracked pixels to be removed, an approximate planar region for each chili pepper particle in the acquired corrected image is obtained.

[0128] Color characteristics refer to the difference in color between cracked and non-cracked regions on the L* channel of the L*a*b* color space. L* represents brightness; the cracked region is darker than the non-cracked region. For each pixel in the approximate planar region to be removed from cracked pixels, if L* < 240, it is determined to be a cracked pixel; otherwise, it is a non-cracked pixel. All pixels with L* < 240 constitute the cracked region.

[0129] The shape feature refers to the length of the crack region being greater than or equal to 1 / 2 of the approximate planar region of the crack pixel to be removed, and the area of ​​the crack region being less than 1 / 9 of the approximate planar region of the crack pixel to be removed.

[0130] In summary, by utilizing the color and shape features of cracked and non-cracked pixels in the approximate planar region of the cracked pixels to be removed, cracked pixels can be removed by assigning a value of 0 to the cracked pixels, and pixels in other areas of the chili pepper particle can be assigned a value of 0.

[0131] Step S9: At this point, the non-zero pixel regions of the obtained corrected image are approximate planar regions. For each chili pepper particle, an approximate planar region will be obtained. By superimposing the zero pixels in the approximate planar region of each chili pepper particle onto the visible light image and fluorescence image of that chili pepper particle, the approximate planar regions of the visible light image and fluorescence image of that chili pepper particle can be obtained.

[0132] Twelve features were extracted from the HSV color space of the approximate planar regions of the visible light image and the fluorescence image of the chili pepper particles, respectively:

[0133] 1. H-channel mean;

[0134] 2. S-channel mean;

[0135] 3. V-channel mean;

[0136] 4. The pixel value of the pixel with the highest frequency on the color histogram of the H channel;

[0137] 5. The pixel value of the pixel with the highest frequency on the color histogram of the S channel;

[0138] 6. The pixel value of the pixel with the highest frequency on the color histogram of the V channel;

[0139] 7. Kurtosis of the color histogram of the H channel;

[0140] 8. Skewness of the color histogram of the H channel;

[0141] 9. Kurtosis of the color histogram of the S channel;

[0142] 10. Skewness of the color histogram of the S channel;

[0143] 11. Kurtosis of the color histogram of the V channel;

[0144] 12. Skewness of the color histogram of the V channel.

[0145] A total of 24 features were extracted.

[0146] For each chili pepper particle in the corrected image, repeat step S9 to obtain 24 features of all chili pepper particles in the tested batch. The average of all chili pepper particle feature values ​​is taken as the feature value of the chili pepper particles in that batch.

[0147] Step S10: Use the partial least squares regression (PLSR) algorithm to establish a color price prediction model for chili pepper particles.

[0148] The specific steps of the PLSR algorithm are as follows: Assuming that the image feature matrix X is an n×24-dimensional independent variable matrix and the color value standard physicochemical value Y is an n×1-dimensional dependent variable matrix, where n is the number of samples to be tested, then the following linear model can be established between Y and X:

[0149] Y=XB+E Formula 1

[0150] In Formula 1, E is the residual matrix; B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and the least squares solution of the regression coefficient matrix B is:

[0151] B = (X) T X) -1 XY Formula 2

[0152] In Formula 2, B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and T is the transpose matrix.

[0153] When establishing the prediction model, n batches of chili pepper particle samples with different color values ​​are selected. Given the known standard physicochemical value Y of the color value of each batch of chili pepper particle samples, image features of each batch of chili pepper particle samples are extracted using steps S1 to S9. Based on this, the standard physicochemical value matrix Y and the image feature matrix X of the n batches of chili pepper particle samples with different color values ​​are obtained; preferably, the number of batches n is 30.

[0154] The relationship between the color value standard physicochemical value matrix Y and the image feature matrix X is obtained using formulas 1 and 2, which is the prediction model.

[0155] Step S11: Collect images of any batch of chili pepper granule samples with unknown color values. Substitute the 24 features extracted from the approximate planar region of the visible light image and the approximate planar region of the fluorescence image using the methods in steps S1 to S9 into the prediction model in step S10 to output the predicted color value of the measured batch of chili pepper granules.

[0156] Example

[0157] 1. Collect calibrated images, visible light images, and fluorescence images of any batch of chili granule samples;

[0158] 2. Convert the visible light image from the RGB color space to the L*a*b* color space, and binarize the image of the b* channel to remove the background (set the value to 0);

[0159] 3. Superimpose the pixel regions with a value of 0 from the visible light image onto the corrected image to obtain the corrected image after removing the background;

[0160] 4. Extract the B channel of the corrected image after background removal, and binarize the B channel image by thresholding. Preferably, the threshold is set to 0.5;

[0161] 5. Perform two-dimensional median filtering on the B channel image of the binarized, background-removed, corrected image. Preferably, each output pixel contains the median value of its 9×9 neighborhood surrounding the corresponding pixel in the input image;

[0162] 6. Label the connected components in the binary image obtained in step 5 to obtain i connected regions;

[0163] 7. Fit the minimum bounding rectangle to each of the connected regions obtained in step 6;

[0164] 8. Rotate the overexposed area image to make the rectangle have no tilt angle, and crop 1 / 3 of its length and width as an approximate planar area;

[0165] 9. Extract the L* channel image of the approximate planar region of the pixels to be removed due to cracks. If L* < 240, it is determined to be a crack pixel; otherwise, it is a non-crack pixel.

[0166] 10. Binarize the image obtained in step 9 and label the connected components in the resulting binary image. If the length of a connected region is greater than or equal to 1 / 2 of the approximate planar region of the cracked pixel to be removed and the area of ​​the connected region is less than 1 / 9 of the approximate planar region of the cracked pixel to be removed, then the connected region is identified as a cracked pixel.

[0167] 11. Assign a value of 0 to the crack pixels obtained in step 10. All crack pixel values ​​in the approximate planar region extracted from the corrected image are 0;

[0168] 12. By superimposing the 0 pixels in the approximate planar region of the chili pepper particle in the corrected image onto the visible light image and fluorescence image of the chili pepper particle, the approximate planar region of the visible light image and the approximate planar region of the fluorescence image of the chili pepper particle can be obtained.

[0169] 13. Extract 24 features from each approximate planar region from step 12. For each feature, average the values ​​from each approximate planar region to obtain the feature value for that feature in the batch of chili pepper particles;

[0170] 14. Substitute the 24 feature values ​​obtained in step 13 into the prediction model to obtain the predicted color value of the batch of chili granule samples.

Claims

1. A method for detecting the color value of chili pepper particles using a visible-fluorescence imaging detection device, characterized in that: The detection device includes a display screen (1), a controller (2), a rotating sample tray base (4), a white LED light source (7), an ultraviolet LED light source fixing plate (8), a camera (9), a camera and light source fixing bracket (10), a controller power supply battery (11), a light source power supply battery (12), a filter pad (14), a filter (15), an ultraviolet LED light source (16), and a sample tray (17). The display screen (1), controller (2), controller power supply battery (11) and light source power supply battery (12) are fixed on the device housing; One side of the inside of the device housing is the image acquisition side; the image acquisition side is provided with a camera and light source mounting bracket (10); the bottom of the camera and light source mounting bracket (10) is fixed to the bottom of the inside of the device housing; The rotating sample tray base (4) is arranged at the bottom of the image acquisition side of the visible-fluorescence imaging detection device for the color value of chili particles; the rotating sample tray base (4) includes a through hole (401) and a groove (403); wherein, the inner upper surface of the rotating sample tray base (4) is provided with a groove (403) for placing the sample tray (17); the outer middle part of the sample tray base (4) is provided with a through hole (401); the sample tray base (4) can rotate circumferentially around the through hole (401) as the axis; Above the rotating sample tray base (4) are a white LED light source (7), an ultraviolet LED light source fixing plate (8), a filter pad (14), a filter (15) and an ultraviolet LED light source (16). The outer periphery of the ultraviolet LED light source fixing plate (8) is provided with multiple light source fixing through holes (801), and the center of the light source is provided with a central through hole; the inner wall surface of the central through hole of the light source is provided with a horizontal light source groove (802), and the ultraviolet LED light source (16) is placed in the light source groove (802); The ultraviolet LED light source (16) is a ring light source. The LED beads of the ultraviolet LED light source (16) are arranged on the lower surface of the outer periphery of the ultraviolet LED light source (16) and illuminate vertically downwards. The ultraviolet LED light source (16) has a central through hole in the middle. The upper surface of the white LED light source (7) is provided with 4 threaded holes; the threaded holes on the upper surface of each white LED light source (7) and the light source fixing through hole (801) of the corresponding ultraviolet LED light source fixing plate (8) are coaxial; the ultraviolet LED light source fixing plate (8) is fixed on the upper surface of the white LED light source (7) by bolts passing through the threaded holes and the light source fixing through hole (801). The white LED light source (7) is a ring light source. The LED beads of the white LED light source (7) are arranged inside the white LED light source (7) and face the groove (403) of the rotating sample plate base (4). The white LED light source (7) has a central through hole in the middle. The filter pad (14) includes an outer circumferential portion and a central portion. The outer circumferential portion is located above the ultraviolet LED light source fixing plate (8). The outer circumferential portion is provided with multiple filter fixing through holes (1401), and each filter fixing through hole (1401) and its corresponding light source fixing through hole (801) are coaxial. The central portion is provided with a filter center through hole. The inner wall surface of the filter center through hole is provided with a horizontal filter groove (1402), and the filter (15) is placed in the filter groove (1402). A camera (9) is positioned above the filter (15); the lens of the camera (9) faces downwards and is directly opposite the filter (15). The groove (403) of the rotating sample tray base (4), the central through hole of the white LED light source, the central through hole of the ultraviolet LED light source, the filter (15) and the lens of the camera (9) are positioned from bottom to top and are coaxial, forming a detection optical path; The controller (2) is electrically connected to the display screen (1), the white LED light source (7), the camera (9), and the ultraviolet LED light source (16); The controller (2) is powered by the controller power supply battery (11); The white LED light source (7) and the ultraviolet LED light source (16) are powered by the light source power supply battery (12); The method includes the following steps: Step S1: Place the sample dish (17) containing chili pepper particles into the groove (403), and rotate the rotating sample dish base (4) into the device; Step S2: Turn on the controller (2), connect the camera (9) to the controller (2), and power on the camera (9); the controller (2) sends a signal to the white LED light source (7) to make the output current of the white LED light source (7) the first current intensity and the second current intensity in sequence; Step S3: When the output current of the white LED light source (7) is the first current intensity, a correction image is acquired using a camera (9); the correction image is an image acquired when there is obvious overexposure on the surface of the chili pepper particles. Step S4: When the output current of the white LED light source (7) is the second current intensity, a visible light image is acquired using a camera (9); Step S5: The controller (2) sends a signal to the ultraviolet LED light source (16) so that the output current of the ultraviolet LED light source (16) is the third current intensity. At this time, the camera (9) is used to collect fluorescence images. Step S6: Use the visible light image to remove the background, that is, set all non-chili pepper particles to 0. The non-chili pepper particles are the background pixels, and the visible light image after removing the background can be obtained. Step S7: Since the non-chili pepper particles in the corrected image and the visible light image are the same, the background pixels in the corrected image can be obtained after extracting the background pixels from the visible light image; by setting the background pixels in the corrected image to 0, the corrected image after removing the background can be obtained. Step S8: In the corrected image after removing the background, the overexposed areas have obvious color differences from other areas of the chili pepper particles; at this time, the B channel image of the corrected image after removing the background is binarized and then subjected to median filtering to obtain the overexposed areas; the number of overexposed areas in the corrected image after removing the background is the same as the number of chili pepper particles collected. In addition, the surface of the chili pepper particles contains cracks. In order to facilitate the identification of the crack length, the minimum bounding rectangle is fitted to the overexposed area. Since the fracture surface of some chili pepper particles is not completely perpendicular to the horizontal plane, 1 / 3 of the length and width of the minimum bounding rectangle fitted to the overexposed area is taken as the approximate planar area of ​​the crack pixels to be removed. By utilizing the color and shape features of cracked and non-cracked pixels in the approximate planar region of the cracked pixels to be removed, the approximate planar region of each chili pepper particle in the acquired and corrected image is obtained. Step S9: At this time, the non-zero pixel area of ​​the obtained corrected image is an approximate planar area; for each chili pepper particle, an approximate planar area will be obtained; the zero pixels in the approximate planar area of ​​each chili pepper particle are superimposed on the visible light image and fluorescence image of the chili pepper particle to obtain the approximate planar area of ​​the visible light image and the approximate planar area of ​​the fluorescence image of the chili pepper particle. Twelve features were extracted from the HSV color space of the approximate planar regions of the visible light image and the fluorescence image of the chili pepper particles, respectively:

1. H-channel mean; 2. S-channel mean; 3. V-channel mean; 4. The pixel value of the pixel with the highest frequency on the color histogram of the H channel; 5. The pixel value of the pixel with the highest frequency on the color histogram of the S channel; 6. The pixel value of the pixel with the highest frequency on the color histogram of the V channel; 7. Kurtosis of the color histogram of the H channel; 8. Skewness of the color histogram of the H channel; 9. Kurtosis of the color histogram of the S channel; 10. Skewness of the color histogram of the S channel; 11. Kurtosis of the color histogram of the V channel; 12. Skewness of the color histogram of the V channel; A total of 24 features were extracted; For each chili pepper particle in the corrected image, repeat step S9 to obtain 24 features of all chili pepper particles in the tested batch; take the average of all chili pepper particle feature values ​​as the feature value of the chili pepper particles in that batch. Step S10: Use partial least squares regression algorithm to establish a color value prediction model for chili pepper particles; The specific steps of the PLSR algorithm are as follows: assuming the image feature matrix... X for n × 24 3D independent variable matrix, standard physicochemical value of color valence Y for n A 1×1 dimension dependent variable matrix, where, n If the number of samples to be tested is , then Y and X A linear model can be established between them as follows: Y = XB + E Official 1 In Formula 1, E is the residual matrix; B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and the least squares solution of the regression coefficient matrix B is: B =( X T X ) -1 XY Official 2 In Formula 2, B is the regression coefficient matrix; X is the image feature matrix; Y is the color valence standard physicochemical value matrix; and T is the transpose matrix. When establishing the prediction model, n batches of chili pepper granule samples with different color values ​​were selected; the standard physicochemical values ​​of the color value of each batch of chili pepper granule samples were known. Y Under the premise of this, the image features of each batch of chili granule samples are extracted using the methods in steps S1 to S9; based on this, the color value standard physicochemical value matrix Y and the image feature matrix X of n batches of chili granule samples with different color values ​​are obtained. The color valence standard physicochemical value matrix is ​​obtained using formulas 1 and 2. Y and Image feature matrix X The relationship between them, i.e., the predictive model; Step S11: Collect images of any batch of chili pepper granule samples with unknown color values. Substitute the 24 features extracted from the approximate planar region of the visible light image and the approximate planar region of the fluorescence image using the methods in steps S1 to S9 into the prediction model in step S10 to output the predicted color value of the measured batch of chili pepper granules.

2. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The first current intensity is 9-15 mA, the second current intensity is 3-6 mA, and the third current intensity is 245-255 mA.

3. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The first current intensity is 9 mA, the second current intensity is 3 mA, and the third current intensity is 250 mA.

4. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: A positioning baffle (402) is provided on one side of the rotating sample tray base (4).

5. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: To facilitate background subtraction during image acquisition, the sample plate (17) is black.

6. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The white LED light source (7) has an angle of 20° with the vertical direction.

7. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The lower surface of the center of the filter pad (14) is located below the contact surface between the outer circumference of the filter pad (14) and the ultraviolet LED light source fixing plate (8) in the vertical direction; the lower surface of the center of the filter pad (14) is located between the lower surface and the upper surface of the ultraviolet LED light source (16); the distance between the lower surface of the center of the filter pad (14) and the lower surface of the ultraviolet LED light source (16) is 0.6 mm, and the distance between the lower surface of the center of the filter pad (14) and the upper surface of the ultraviolet LED light source (16) is 1.0 mm.

8. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The vertical distance between the inner surface of the sample plate (17) and the lower surface of the white LED light source (7) is 28 mm to ensure that the white LED light can evenly illuminate the surface of the chili particles; the vertical distance between the inner surface of the sample plate (17) and the lower surface of the ultraviolet LED light source (16) is 47.4 mm.

9. The visible-fluorescence imaging detection method for the color value of chili pepper particles as described in claim 1, characterized in that: The vertical distance between the inner surface of the sample tray (17) and the filter (15) is 49 mm, and the vertical distance between the sample tray (17) and the lens of the camera (9) is 52 mm.

Citation Information

Patent Citations

  • Plant physical condition detection method based on spectral imaging technology, and device for same

    CN103091296A

  • LED (light-emitting diode) induced fluorescence capsicum color value detection system and method of tetragonal symmetrical light source

    CN115524292A