A walnut kernel damage assessment method and device based on X-rays

By constructing a dual-index model using X-ray imaging and deep learning technology, the problem of non-destructive, multi-dimensional quantitative assessment of kernel damage during walnut shelling was solved, achieving visualization and objective quantification of kernel damage and avoiding secondary mechanical damage.

CN120953202BActive Publication Date: 2026-03-27KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve non-destructive, multi-dimensional, and quantitative assessment of kernel damage during walnut shelling. Traditional methods suffer from problems such as secondary mechanical damage, limited evaluation indicators, and strong subjectivity.

Method used

High-precision three-dimensional internal structure images of walnut kernels were obtained using X-ray imaging technology. Combined with a deep learning instance segmentation model, kernel structural blocks were identified. A dual-index model of main structural integrity coefficient and relative fragmentation was constructed. Principal component analysis was used to assign weights to form a multi-dimensional damage assessment system.

Benefits of technology

It enables non-destructive, visualized, and multi-dimensional quantitative assessment of walnut kernel damage, avoids secondary mechanical damage, provides a scientific weighting mechanism and data source, and forms an integrated non-destructive testing and quantitative assessment solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953202B_ABST
    Figure CN120953202B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of agricultural product processing and nondestructive testing technology, and proposes a walnut kernel damage evaluation method and device based on X-ray. The method comprises: collecting the X-ray image of the walnut sample and preprocessing; inputting the image into a deep learning instance segmentation model to obtain the segmentation mask of all walnut kernel structure blocks in the image; determining the structural feature parameters of the walnut kernel according to the segmentation mask of all walnut kernel structure blocks in the image; constructing a linear weighted structure damage model according to the structural feature parameters; determining the first weighting coefficient and the second weighting coefficient according to the structural feature parameters; and inputting the first weighting coefficient and the second weighting coefficient into the linear weighted structure damage model to determine the final damage degree of the walnut sample. The present application uses X-ray imaging technology to perform non-contact internal imaging on the kernel structure after the walnut shell is broken, avoiding the secondary damage problem caused by mechanical force or destructive treatment in the traditional method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of agricultural product processing and non-destructive testing, in particular to a walnut kernel damage evaluation method and device based on X-ray. BACKGROUND

[0002] Walnut, as a kind of nutrient-rich nuts, not only occupies an important position in the food industry, but also is widely favored because of its unique health function. The structural integrity of kernel not only determines the appearance quality and commodity value of walnut, but also directly affects its subsequent processing and utilization. In the actual production process, walnut needs to be broken by mechanical method to obtain the internal kernel, but the traditional breaking method often causes structural damage such as cracking and fragmentation of kernel due to improper control of external force, which seriously reduces the product quality and economic benefit.

[0003] The current detection methods of kernel damage mainly include classification statistics based on kernel size and quantity, finite element and discrete element coupling simulation method, and quantitative analysis of kernel surface scratches by image processing. Although these methods have evaluation ability to some extent, they generally have problems such as the need to apply contact stress, the easy to cause additional structural damage, the single evaluation index, the difficulty to fully reflect the internal damage, and the strong subjectivity and unstable results. SUMMARY

[0004] The purpose of the present application is to solve at least one of the above technical defects.

[0005] To this end, one object of the present application is to provide a walnut kernel damage evaluation method and device based on X-ray, to solve the problems mentioned in the background art and overcome the deficiencies in the prior art.

[0006] In order to achieve the above-mentioned purpose, on the one hand, the present application provides a walnut kernel damage evaluation method based on X-ray, comprising:

[0007] Collecting X-ray images of walnut samples and preprocessing;

[0008] Inputting the preprocessed images into a deep learning instance segmentation model to obtain segmentation masks of all walnut kernel structure blocks in the images;

[0009] Determining the structural feature parameters of walnut kernel according to the segmentation masks of all walnut kernel structure blocks in the images, the structural feature parameters including the main structure integrity coefficient and the relative fragmentation degree;

[0010] Constructing a linear weighted structure damage model according to the main structure integrity coefficient and the relative fragmentation degree;

[0011] Determining the first weighting coefficient and the second weighting coefficient according to the main structure integrity coefficient and the relative fragmentation degree;

[0012] The first weighting coefficient and the second weighting coefficient are brought into the linearly weighted structural damage model to determine the final damage degree of the walnut sample.

[0013] Preferably, the X-ray image of the walnut sample comprises X-ray images of the walnut sample from two opposite viewing angles.

[0014] Preferably, the main structural integrity coefficient is as follows:

[0015]

[0016] wherein R main is the main structural integrity coefficient, A max is the maximum structural area of the X-ray image of the walnut sample, A total is the total sum of the areas of all regions of the X-ray image of the walnut sample.

[0017] Preferably, the relative fragmentation degree is as follows:

[0018]

[0019] wherein S is the relative fragmentation degree, N is the number of structural blocks obtained by segmenting the X-ray image of the walnut sample, and N0 is the standard number of structural blocks of a complete walnut kernel, i.e. N0 = 1.

[0020] Preferably, the linearly weighted structural damage model is as follows:

[0021] D = a (1 - R main ) + bS

[0022] wherein D is the damage degree of the X-ray image of the walnut sample, a is the first weighting coefficient, b is the second weighting coefficient, R main is the main structural integrity coefficient, and S is the relative fragmentation degree.

[0023] Preferably, determining the first weighting coefficient and the second weighting coefficient according to the main structural integrity coefficient and the relative fragmentation degree comprises:

[0024] standardizing the inverse vector 1 - R main of the main structural integrity coefficient and the relative fragmentation degree S using principal component analysis, extracting the feature vector corresponding to the first principal component, and determining the first weighting coefficient and the second weighting coefficient according to the absolute value thereof.

[0025] Preferably, determining the final damage degree of the walnut sample comprises: calculating the damage degrees of the X-ray images of the walnut sample from two opposite viewing angles respectively, and taking the arithmetic mean of the damage degrees of the X-ray images from the two opposite viewing angles as the final damage degree of the walnut sample.

[0026] In another aspect, the present application provides a walnut kernel damage evaluation device based on X-ray, comprising a rack and a control system, wherein the upper end of the rack is provided with an extrusion and monitoring mechanism, the lateral side of the rack is provided with an X-ray imaging mechanism, and the lower end of the rack is provided with a sample fixing and rotating mechanism, and the control system is electrically connected with the extrusion and monitoring mechanism, the X-ray imaging mechanism and the sample fixing and rotating mechanism.

[0027] Preferably, the extrusion and monitoring mechanism comprises a stepping cylinder and a displacement sensor, the stepping cylinder is connected with the displacement sensor, one end of the stepping cylinder is connected with the upper end of the rack, and the output end of the stepping cylinder is connected with an extrusion plate through a force sensor.

[0028] Preferably, the sample fixing and rotating mechanism comprises a stepping motor and an external-tooth rotary support turntable, the output end of the stepping motor is connected with a gear, the gear is engaged with the external-tooth rotary support turntable, and the external-tooth rotary support turntable is provided with a flexible limiting structure.

[0029] Compared with the prior art, the present application has the following advantages and beneficial effects:

[0030] The present application obtains high-precision three-dimensional internal structure images of walnut kernels through X-ray imaging technology, and provides a non-destructive and quantitative structure parameter basis for a double-index model. Based on this imaging data, the main structure integrity coefficient and the relative fragmentation degree in the double-index model are accurately calculated, and the imaging data features are objectively weighted by the principal component analysis method to form a multi-dimensional damage evaluation system. The X-ray imaging not only avoids mechanical secondary damage, but also is the data source for scientific weighting and multi-dimensional evaluation of the double-index model. The two cooperate to form an integrated solution for non-destructive testing and quantitative evaluation, and realize the visual analysis and objective quantization of kernel damage.

[0031] The kernel damage evaluation method and device provided by the present application have a complete operation process, covering key links such as loading deformation control, image acquisition and processing, structure identification, feature extraction and damage degree output. The structures of the device are synchronously scheduled and data integrated through the control system, providing reliable support for subsequent data analysis, and the overall device has good application potential. BRIEF DESCRIPTION OF DRAWINGS

[0032] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:

[0033] Figure 1 A kernel damage evaluation method flowchart of the present application;

[0034] Figure 2A schematic diagram of a kernel damage evaluation method according to an embodiment of the present application is shown in FIG. 1.

[0035] Figure 3 A schematic diagram of the overall structure of a kernel damage evaluation device according to an embodiment of the present application is shown in FIG. 2.

[0036] Figure 4 A schematic diagram of an extrusion and monitoring mechanism according to an embodiment of the present application is shown in FIG. 3.

[0037] Figure 5 A schematic diagram of a sample fixing and rotating mechanism according to an embodiment of the present application is shown in FIG. 4.

[0038] Figure 6 A schematic diagram of an electronic device according to an embodiment of the present application is shown in FIG. 5.

[0039] In FIG. 5, 1 is a rack, 2 is an extrusion and monitoring mechanism, 201 is a force sensor, 202 is a stepping cylinder, 203 is a displacement sensor, 204 is an extrusion plate, 3 is a sample fixing and rotating mechanism, 301 is a stepping motor, 302 is a gear, 303 is a flexible limiting mechanism, 304 is an external tooth rotary support turntable, 4 is an X-ray imaging mechanism, 401 is an X-ray emitter, 402 is a flat panel detector, and 5 is a control system. DETAILED DESCRIPTION

[0040] Embodiments of the present application are described in detail below with reference to the accompanying drawings, in which like or similar elements or elements having the same or similar functions are denoted by like reference numerals throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as limiting the present application.

[0041] The present application proposes a kernel damage evaluation method and device based on X-ray for cracked walnut, which belongs to the field of agricultural product processing and non-destructive testing technology, and is suitable for non-contact and quantitative analysis of the damage degree of walnut kernel in the cracking process. The method obtains high-resolution X-ray images of walnut samples under controlled cracking deformation conditions by constructing a test platform, and realizes automatic identification of kernel structure regions by combining a deep learning instance segmentation model. Based on the image segmentation results, morphological features such as structure block area and number are extracted, two indexes of main structure integrity coefficient and relative fragmentation degree are constructed, and principal component analysis method is introduced to determine the weight of each index, forming a weighted comprehensive structure damage model, and realizing objective quantitative evaluation of kernel damage degree.

[0042] As shown in FIG. 1, the present embodiment provides a kernel damage evaluation method based on X-ray for cracked walnut, which comprises the following steps: Figure 1 Step S1: Collecting X-ray images of walnut samples and performing pretreatment;

[0043]

[0044] ​Step S2: input the pre-processed image into a deep learning instance segmentation model to obtain a segmentation mask of all walnut kernel structure blocks in the image;

[0045] Step S3: determine the structural characteristic parameters of the walnut kernel according to the segmentation mask of all walnut kernel structure blocks in the image, the structural characteristic parameters including a main structure integrity coefficient and a relative fragmentation degree;

[0046] Step S4: construct a linearly weighted structure damage model according to the main structure integrity coefficient and the relative fragmentation degree;

[0047] Step S5: determine a first weighting coefficient and a second weighting coefficient according to the main structure integrity coefficient and the relative fragmentation degree;

[0048] Step S6: input the first weighting coefficient and the second weighting coefficient into the linearly weighted structure damage model to determine the final damage degree of the walnut sample.

[0049] As an implementation form, in step S1, the X-ray image of the walnut sample is collected by fixing the walnut in a sample fixing and rotating mechanism with a flexible limiting structure, applying a preset extrusion deformation amount to the walnut sample by using an extrusion and monitoring mechanism, and collecting the X-ray image of the walnut sample by an X-ray imaging mechanism.

[0050] The present application avoids the secondary damage problem caused by mechanical force or destructive treatment in the traditional method by using X-ray imaging technology to non-contact internally image the kernel structure after the walnut shell is broken.

[0051] In one embodiment, the walnut is fixed in the extrusion and monitoring mechanism with a flexible limiting structure of the damage evaluation device. The extrusion and monitoring mechanism is used to apply a preset extrusion deformation amount to the walnut. The force response and displacement data are synchronously collected by the force sensor and the displacement sensor during the loading process.

[0052] In one embodiment, the X-ray imaging device is used to collect the X-ray images of the walnut sample at two opposite viewing angles: front view and rear view.

[0053] In another embodiment, the X-ray imaging device is used to collect the X-ray images of the walnut sample at two opposite viewing angles: left view and right view.

[0054] As an implementation form, in step S1, the pre-processing of the X-ray image of the walnut sample includes adjusting the window level and window width of the X-ray image, cropping the image size to retain the complete walnut region and remove the redundant background, and converting the image to PNG format.

[0055] In one embodiment, as shown in Figure 2As shown, the acquired image is in DICOM original format, the window level and window width of the acquired image are adjusted, the window level is 120, the window width is 200, and the contrast of the kernel structure is enhanced; then the image size is cropped to retain the complete walnut region and remove the redundant background, and the image format is uniformly converted to PNG to meet the input requirements of the subsequent image segmentation model.

[0056] In one embodiment, step S2, inputting the preprocessed image into the deep learning instance segmentation model to obtain the segmentation mask of all walnut kernel structure blocks in the image includes: inputting the preprocessed X-ray image into the deep learning instance segmentation model, which is a YOLOv8-seg instance segmentation model. The model is trained based on the labeled walnut kernel X-ray image dataset before use, which covers various structural damage conditions such as complete, slight fragmentation, moderate damage and high fragmentation, to enhance the model's ability to recognize different damage types of kernel boundaries. The model outputs the segmentation mask of all kernel structure blocks in each walnut image.

[0057] The present application uses a deep learning instance segmentation model to automatically identify and extract kernel images. The model training data covers multiple damage patterns, has good generalization ability and boundary recognition accuracy, and replaces manual experience judgment with deep learning assisted image analysis, significantly reducing human error.

[0058] Under external mechanical load, the continuity and integrity of the walnut internal structure are damaged, showing typical morphological changes such as a significant increase in the number of structure blocks and a significant reduction in the main area. In one embodiment, step S3, the structural feature parameters of the walnut kernel are determined according to the segmentation mask of all walnut kernel structure blocks in the image. In this step, based on the segmentation mask image, the structural feature parameters of the kernel are extracted, including:

[0059] Main structure integrity coefficient:

[0060]

[0061] Wherein, R main is the main structure integrity coefficient, A max is the maximum structure area of the walnut sample X-ray image, A total is the total area of all regions of the walnut sample X-ray image.

[0062] Relative fragmentation degree:

[0063]

[0064] Wherein, S is the relative fragmentation degree, N is the number of structure blocks obtained by segmenting the walnut sample X-ray image, and N0 is the standard structure block number of the complete walnut kernel, i.e. N0 = 1.

[0065] In one embodiment, step S4, a linear weighted structure damage model is constructed according to the main structure integrity coefficient and the relative fragmentation degree, and the calculation formula is:

[0066] D = a (1 - R main ) + bS

[0067] Wherein, D is the X-ray image damage degree of the walnut sample, a is the first weighting coefficient, b is the second weighting coefficient, R main is the main structure integrity coefficient, and S is the relative fragmentation degree.

[0068] As an embodiment, in step S5, determining the first weighting coefficient and the second weighting coefficient according to the main structure integrity coefficient and the relative fragmentation degree comprises:

[0069] The inverse vector 1-R main of the main structure integrity coefficient and the relative fragmentation degree S are standardized, the feature vector corresponding to the first principal component is extracted, and the first weighting coefficient and the second weighting coefficient are determined according to the absolute value.

[0070] In one embodiment, in order to avoid the problems of redundancy amplification and main variable weakening caused by empirical weighting or equal weighting, the inverse vector 1-R main of the main structure integrity coefficient and the relative fragmentation degree S are standardized, the feature vector corresponding to the first principal component is extracted, and the weighting coefficients of each index, i.e. the first weighting coefficient and the second weighting coefficient, are determined according to the absolute value. Specifically as follows:

[0071] x main 1 = 1 - R

[0072]

[0073] Wherein, x n1 , x n2 respectively represent the value of the first feature (i.e. x main 1 = 1 - R ) and the second feature (i.e. x 2 = S) of the nth sample image.

[0074] The columns of features are standardized:

[0075]

[0076] Wherein, m j , s j are the sample mean and standard deviation of the jth feature, respectively.

[0077] The standardized sample matrix X' is:

[0078]

[0079] Calculate the covariance matrix:

[0080]

[0081] Eigenvalue decomposition is performed on the covariance matrix T to obtain a set of orthogonal unit eigenvectors v1, v2 and corresponding eigenvalues λ1, λ2, which satisfy:

[0082] Tv i =λ i v i , i = 1, 2; λ1≥ λ2;

[0083] According to the eigenvalue decomposition result, the eigenvector v1 corresponding to the largest eigenvalue λ1 of the covariance matrix T represents the direction with the largest variation of the normalized structure variable in the sample. The eigenvector corresponding to the largest eigenvalue λ1 is obtained as: where

[0084] Calculate the weighting coefficients α and β:

[0085]

[0086] The present application constructs a double-index structure damage model, evaluates the kernel damage degree by combining the main structure integrity coefficient and the relative fragmentation degree, and introduces the principal component analysis method to determine the weight, which overcomes the problems of single evaluation dimension and subjective weighting in the previous evaluation methods.

[0087] The present application obtains high-precision three-dimensional internal structure images of walnut kernels through X-ray imaging technology, providing a non-destructive and quantitative structure parameter basis for the double-index model. Based on this imaging data, the main structure integrity coefficient and the relative fragmentation degree in the double-index model can be accurately calculated, and the principal component analysis method is used to objectively weight the features of the imaging data to form a multi-dimensional damage evaluation system. X-ray imaging not only avoids mechanical secondary damage, but also provides data for scientific weighting and multi-dimensional evaluation of the double-index model. The two work together to form an integrated solution for non-destructive testing and quantitative evaluation, achieving visual analysis and objective quantitative optimization of kernel damage.

[0088] As an implementation, in step S6, determining the final damage degree of the walnut sample includes: calculating the damage degree of the X-ray image of the walnut sample at two relative viewing angles respectively, and taking the arithmetic mean of the damage degrees of the X-ray images at the two relative viewing angles as the final damage degree of the walnut sample.

[0089] In one embodiment, the damage degrees Dfront and D back , take its arithmetic mean as the final damage degree of the walnut sample:

[0090]

[0091] As Figure 3 shown, the present embodiment provides a walnut kernel damage evaluation device based on X-ray, which is suitable for performing the walnut kernel damage evaluation method based on X-ray described above, comprising: a rack 1 and a control system 5, the upper end of the rack 1 is provided with a squeezing and monitoring mechanism 2, the side of the rack 1 is provided with an X-ray imaging mechanism 305, the lower end of the rack 1 is provided with a sample fixing and rotating mechanism 3, the control system 5 is electrically connected with the squeezing and monitoring mechanism 2, the X-ray imaging mechanism 305 and the sample fixing and rotating mechanism 3.

[0092] Further, as Figure 4 shown, the squeezing and monitoring mechanism 2 comprises a stepping cylinder 202 and a displacement sensor 203, the stepping cylinder 202 is connected with the displacement sensor 203, one end of the stepping cylinder 202 is connected with the upper end of the rack 1, and the output end of the stepping cylinder 202 is connected with a squeezing plate 204 through a force sensor 201.

[0093] The rack 1 is used for supporting the whole evaluation device, the squeezing and monitoring mechanism is fixed on the middle part of the upper end of the rack 1, and comprises a force sensor 201, a stepping cylinder 202 and a displacement sensor 203, wherein the stepping cylinder 202 is used for applying axial squeezing to the walnut sample at a set speed; the force sensor 201 and the displacement sensor 203 are respectively used for monitoring the squeezing force and the deformation displacement of the sample in the loading process.

[0094] Further, as Figure 5 shown, the sample fixing and rotating mechanism 3 comprises a stepping motor 301 and an external tooth rotary support turntable 304, the output end of the stepping motor 301 is connected with a gear 302, the gear 302 is engaged with the external tooth rotary support turntable 304, and the external tooth rotary support turntable 304 is provided with a flexible limiting structure.

[0095] The sample fixing and rotating mechanism is arranged at the middle position of the bottom of the rack 1, and comprises a stepping motor 301, a gear 302, a flexible limiting mechanism 303 and an external tooth rotary support turntable 304; wherein the stepping motor 301 is connected with the external tooth rotary support turntable 304 through the gear 302, so as to realize accurate rotation control of the sample; the flexible limiting mechanism 303 is arranged above the turntable, is provided with a through hole slot matched with the shape of the walnut, and is used for providing flexible constraint to the sample without affecting X-ray transmission, preventing the walnut shell from falling off and accumulating in the squeezing process, and avoiding that the fragments shield or interfere with the imaging area.

[0096] As an implementation, the flexible limiting structure is made of EPE foam, and the through holes of the EPE foam are slightly larger than the size of the walnut. The EPE foam has good flexibility and low rigidity, and can effectively avoid additional mechanical interference on the walnut. The density of the EPE foam is much lower than that of the walnut, and the absorption of X-rays is very weak. In the actual imaging process, the walnut internal structure is not obviously blocked or artifacted, and the imaging quality is not affected.

[0097] As shown in Figure 3 , the X-ray imaging mechanism 305 includes an X-ray emitter 401 and a flat panel detector 402, which are respectively arranged at both ends of the rack 1 and are oppositely arranged, and are used to collect the internal structure image of the walnut sample. The X-ray emitter 401 is used to emit a ray signal that can penetrate the walnut shell and kernel. The flat panel detector 402 receives the ray after penetrating the sample and generates a high-resolution image, realizing non-contact imaging of the kernel structure.

[0098] The control system 5 is used for unified coordination and operation control of each part, including setting loading parameters, controlling the rotation angle, synchronously triggering X-ray collection, and simultaneously receiving feedback data from the force sensor 201 and the displacement sensor 203, realizing automatic control and data synchronization management of the whole kernel damage evaluation process.

[0099] The specific implementation process of the kernel damage evaluation device is as follows:

[0100] The walnut sample to be measured is first placed and fixed in the flexible limiting mechanism 303 on the outer tooth rotary support turntable 304. The flexible limiting mechanism 303 provides flexible constraint, and adopts a through hole slot structure to avoid image blurring or imaging interference caused by sample shell falling and accumulating during extrusion. The fixing mode of the walnut sample to be measured is that the suture line faces the imaging direction.

[0101] After the control system 5 is started, the step cylinder 202 applies an axial extrusion force to the walnut sample at a set speed, applies a single extrusion deformation along the axis perpendicular to the suture line surface, and simulates the stress deformation process under the actual shell breaking condition. During the loading process, the force sensor 201 collects the pressure signal of the walnut in real time, and the displacement sensor 203 synchronously collects and records the loading displacement. The sampling data of the two sensors are synchronously collected and uploaded by the control system 5, and a complete stress response record is formed.

[0102] After the set extrusion amount is completed, the X-ray imaging mechanism 305 is synchronously triggered under the unified scheduling of the control system 5. The X-ray emitter 401 emits a ray signal, which is received by the flat panel detector 402 after penetrating the walnut shell and kernel structure and generates a high-resolution image. The obtained image is the internal structure cross-sectional view of the kernel.

[0103] The control system 5 drives the stepper motor 301 to control the outer-tooth rotating support turntable 304 to rotate the walnut sample by 180 degrees accurately, and then X-ray image acquisition is performed again. The process can realize imaging of the kernel from two typical perspectives of front and back or left and right. After the X-ray image of the walnut sample is acquired, the kernel damage evaluation method of the application is executed to quantitatively evaluate the walnut kernel.

[0104] It can be understood that after the X-ray image of the walnut sample is acquired by the kernel damage evaluation device, the kernel damage evaluation method of the application can be executed by the control system of the device to quantitatively evaluate the walnut kernel, or the kernel damage evaluation method of the application can be executed by other computers or electronic devices to quantitatively evaluate the walnut kernel.

[0105] The kernel damage evaluation method and device provided by the application have a complete operation process, covering key links such as loading deformation control, image acquisition and processing, structure identification, feature extraction and damage degree output. The structures of the device are synchronously scheduled and data integrated through the control system, providing reliable support for subsequent data analysis, and the overall device has good application potential.

[0106] To solve the above technical problems, the embodiment of the application further provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to realize the steps of the kernel damage evaluation method under the broken shell of a walnut based on X-ray as described above.

[0107] As shown in Figure 6 The computer / electronic device comprises a memory, a processor and a network interface which are connected to each other through a system bus and communicate with each other. It should be pointed out that only the computer device with components of memory, processor, network interface and operating system is shown in the figure, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer / electronic device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessor, application specific integrated circuit (ASIC), field programmable gate array (FPGA), digital signal processor (DSP), embedded device, etc.

[0108] The computer / electronic device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer / electronic device can interact with a user through a keyboard, a mouse, a remote controller, a touchpad, a voice control device, and the like.

[0109] The memory can be one or more, and at least includes one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, and the like), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Of course, the memory can include both the internal storage unit and the external storage device of the computer device. In this embodiment, the memory is generally used to store an operating system and various application software installed in the computer device, such as program codes of a walnut kernel damage evaluation method based on X-ray, and the like. In addition, the memory can also be used to temporarily store various data that have been output or will be output.

[0110] The processor can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run program codes or process data stored in the memory, such as program codes of a walnut kernel damage evaluation method based on X-ray.

[0111] The network interface can include a wireless network interface and / or a wired network interface, and is generally used to establish a communication connection between the computer device and other electronic devices.

[0112] The present application also provides another embodiment, i.e., to provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a walnut kernel damage evaluation method based on X-ray as described above.

[0113] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples.

[0114] It is not difficult for those skilled in the art to understand that the present application includes any combination of the parts shown in the summary and detailed description of the application and the drawings, and the schemes formed by these combinations are not described one by one due to the length of the specification and for the sake of brevity of the specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0115] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments without departing from the principles and spirit of the present application within the scope of the present application. The scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A method for assessing kernel damage in walnuts during shell cracking based on X-rays, characterized in that, include: X-ray images of walnut samples were acquired and preprocessed. The preprocessed image is input into a deep learning instance segmentation model to obtain a segmentation mask for all walnut kernel structural blocks in the image; The structural feature parameters of the walnut kernels are determined based on the segmentation mask of all walnut kernel structural blocks in the image. The structural feature parameters include the principal structural integrity coefficient and the relative fragmentation degree. A linearly weighted structural damage model is constructed based on the main structural integrity coefficient and the relative fragmentation degree. The first weighting coefficient and the second weighting coefficient are determined based on the main structural integrity coefficient and the relative fragmentation. The first weighting coefficient and the second weighting coefficient are substituted into the linearly weighted structural damage model to determine the final damage degree of the walnut sample; The main structure integrity coefficient is as follows: in, Main structural integrity coefficient The area of ​​the largest structural region in the X-ray image of the walnut sample. The sum of the areas of all regions in the X-ray image of the walnut sample; The relative fragmentation is as follows: in, Relative fragmentation The number of structural blocks obtained by segmenting the X-ray image of a walnut sample. The standard number of structural pieces for a whole walnut kernel, i.e. Determining the first weighting coefficient and the second weighting coefficient based on the main structural integrity coefficient and the relative fragmentation includes: Principal component analysis was used to analyze the inverse vector of the principal structural integrity coefficient. The relative fragmentation S is standardized to extract the feature vector corresponding to the first principal component, and normalized according to its absolute value to determine the first weighting coefficient and the second weighting coefficient.

2. The method for assessing kernel damage in walnuts during shell cracking based on X-rays as described in claim 1, characterized in that, The X-ray images of the walnut sample include X-ray images of the walnut sample from two opposing viewpoints.

3. The method for assessing kernel damage in walnuts during shell cracking based on X-rays as described in claim 1, characterized in that, The linearly weighted structural damage model is as follows: in, The damage level of the walnut sample in the X-ray image. The first weighting coefficient, This is the second weighting coefficient. Main structural integrity coefficient This refers to the relative fragmentation.

4. The method for assessing kernel damage in walnuts during shell cracking based on X-rays as described in claim 2, characterized in that, Determining the final damage degree of a walnut sample involves: calculating the damage degree of X-ray images of the walnut sample from two relative perspectives, and taking the arithmetic mean of the damage degree of the X-ray images from the two relative perspectives as the final damage degree of the walnut sample.

Citation Information

Patent Citations

  • Automated food freshness detection using feature deep learning

    AU2020100953A4

  • Embedded corn ear damage detection method based on deep learning

    CN119399564A