Bamboo wood strength nondestructive evaluation method and system based on mobile phone image component identification
By using mobile phone image processing and random forest regression models, a rapid and non-destructive assessment of bamboo strength was achieved, solving the problems of low efficiency and insufficient accuracy of traditional methods, and providing an efficient and stable strength prediction and grading scheme.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGHAI COUNTY PLANNING & DESIGN INSTITUTE CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional bamboo strength assessment methods rely on destructive mechanical tests, which are inefficient and costly. Existing image processing methods have difficulty accurately distinguishing between bamboo fiber bundles and bamboo matrix, resulting in a weak correlation between characteristic parameters and actual mechanical properties, making it impossible to achieve rapid and non-destructive strength assessment.
A method based on mobile phone image component recognition is adopted. The fiber bundle region is identified by adaptive threshold binarization and morphological opening operation. Combined with random forest regression model, the tensile strength and modulus are predicted and graded without damage.
It enables rapid and non-destructive bamboo strength assessment, with stable and reliable feature extraction and high prediction accuracy, meeting the needs of engineering applications and lowering the testing threshold.
Smart Images

Figure CN121904480A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of non-destructive testing of materials and computer vision technology, specifically to a non-destructive assessment method and system for bamboo strength based on mobile phone image component recognition. Background Technology
[0002] The tensile strength of bamboo is a key performance indicator for evaluating its properties as a structure or composite material. Traditional methods rely on destructive mechanical testing, which suffers from low efficiency, high cost, and inability to perform non-destructive screening. Although existing research has established the correlation between the microstructure of bamboo (such as fiber bundle density) and its macroscopic mechanical properties, the means used to obtain the microstructure (such as micro-CT scanning) are expensive, complex to operate, and difficult to popularize.
[0003] While general image processing methods exist, directly applying them to bamboo cross-sectional images makes it difficult to accurately distinguish between different components such as bamboo fiber bundles and the bamboo matrix. This results in weak correlation between extracted feature parameters and actual mechanical properties, leading to limited prediction accuracy. Therefore, there is an urgent need for a field solution that can automatically and accurately analyze the components of bamboo cross-sections and, based on this, achieve rapid and non-destructive strength assessment. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a non-destructive assessment method and system for bamboo strength based on mobile phone image component recognition. This method utilizes cross-sectional images of bamboo captured by a mobile phone, automatically identifies fiber bundle regions through an optimized image processing workflow, extracts fiber area fraction (FAF) as features, and achieves rapid, non-destructive prediction and grading of tensile strength and modulus based on a random forest regression model.
[0005] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution: A non-destructive method for assessing the strength of bamboo based on mobile phone image component recognition includes the following steps: S1. Image Acquisition: Capture a digital image of the cross-section of the bamboo strip to be tested using the camera of the mobile terminal; S2. Image Processing and Feature Extraction: The digital image is subjected to contrast enhancement and grayscale processing; the processed image is segmented using an adaptive threshold binarization algorithm, and the high-brightness pixel regions are identified as target objects; morphological opening operations are performed on the binary segmentation results to optimize the contour of the target region; the pixel area ratio of the optimized target region is calculated to obtain the fiber area fraction. S3. Performance Prediction and Grading: The fiber area fraction is input into a pre-trained bamboo mechanical property prediction model, which outputs the predicted tensile strength and predicted tensile modulus of the bamboo strip to be tested. Based on the predicted tensile strength and tensile modulus, the bamboo strip is automatically classified into quality grades according to a preset grading standard. The bamboo mechanical property prediction model is trained based on a random forest regression algorithm. The training data of the model includes multiple sets of training samples. Each set of training samples includes: the fiber area fraction extracted from the cross-sectional image of the bamboo strip sample, and the actual tensile strength and actual tensile modulus measured by standard destructive mechanical tests on the same bamboo strip sample.
[0006] Furthermore, the adaptive threshold binarization algorithm described in step S2 specifically uses the 'imbinarize' function and sets the parameters 'adaptive', 'Sensitivity' to 0.88, and 'ForegroundPolarity' to 'bright'.
[0007] Furthermore, the morphological opening operation described in step S2 is performed on the binary image using a disk-shaped structuring element with a radius of 2 pixels.
[0008] Furthermore, the contrast enhancement described in step S2 is achieved by automatically adjusting the image data range using the imadjust function.
[0009] Further, the fiber area fraction mentioned in step S2 is the ratio of the area of the fiber bundle region to the total area of the bamboo strip cross-section region, wherein the fiber bundle region area is the total pixel area of the black foreground region in the binary image, and the bamboo strip cross-section region is determined by manual delineation or automatic edge detection.
[0010] Furthermore, the bamboo mechanical property prediction model in step S3 adopts the random forest regression algorithm in ensemble learning and is implemented by the TreeBagger function in MATLAB. The model is composed of 100 regression decision trees. During training, each tree uses bootstrap sampling to draw samples from the training set with replacement, and randomly selects some features for optimal splitting at each node. The maximum depth of a single tree is indirectly controlled by the 'MinLeafSize' parameter, which is set to 10, that is, the minimum number of samples contained in the leaf node.
[0011] Furthermore, the grading criteria mentioned in step S3 include: Grade A: Tensile strength ≥80 MPa, tensile modulus ≥12 GPa, suitable for preparing engineering bamboo materials for high load-bearing structures; Grade B: 40 MPa ≤ tensile strength < 80 MPa, 6 GPa ≤ tensile modulus < 12 GPa, suitable for preparing engineering bamboo materials for general structures; Grade C: Tensile strength < 40 MPa, tensile modulus < 6 GPa, suitable for preparing non-load-bearing or decorative engineering bamboo materials.
[0012] The present invention also provides a non-destructive strength assessment system for bamboo based on mobile phone image component recognition for implementing the above method, comprising: The image acquisition module is used to capture digital images of the cross-section of the bamboo strip to be tested using the camera of a mobile terminal; The image processing and analysis module is used to perform contrast enhancement and grayscale processing on the digital image; to segment the processed image using an adaptive threshold binarization algorithm, and to identify high-brightness pixel regions as target objects; to perform morphological opening operations on the binary segmentation results to optimize the contour of the target region; and to calculate the pixel area ratio of the optimized target region to obtain the fiber area fraction. The strength prediction and output module is used to input the fiber area fraction into the built-in bamboo mechanical property prediction model and output the predicted tensile strength and predicted tensile modulus of the bamboo strip to be tested; based on the predicted tensile strength and tensile modulus, the bamboo strip is automatically classified into quality grades according to the grading standards.
[0013] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-described method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition.
[0015] The beneficial effects of this invention are: Simultaneous prediction of two parameters: tensile strength and tensile modulus. This allows for rapid acquisition of two key mechanical parameters in one go, providing a more comprehensive evaluation.
[0016] Intelligent automatic grading: Real-time quality grading based on prediction results greatly improves material sorting efficiency and consistency, meeting the needs of engineering applications.
[0017] High robustness and accuracy: Adaptive threshold segmentation is adopted to overcome the sensitivity of fixed threshold to changes in illumination and material color; combined with morphological opening operation, noise interference is effectively suppressed, so that feature extraction remains stable and reliable under different shooting conditions.
[0018] Ultimate convenience and low cost: Only a smartphone is needed, the process is fully automated, and "taking a picture - getting results - determining the level" can be completed in tens of seconds, which greatly reduces the threshold for testing and makes it easy to deploy in various scenarios such as production lines, warehouses, and the field.
[0019] High technical reproducibility: The disclosed image processing flow (imadjust-adaptive threshold-morphological opening operation) has clear steps and specific parameters, providing a clear and repeatable implementation scheme for those skilled in the art. Attached Figure Description
[0020] Figure 1 This is an overall flowchart of the method of the present invention; Figure 2 This is a visual schematic diagram of the entire process of image processing and component recognition in this invention; Figure 3 This is a scatter plot of the model's predicted values and the actual experimental values in an embodiment of the present invention. Figure 4 This is a heatmap comparing the intensity values predicted by the method of the present invention with the measured values in an embodiment of the present invention. Figure 5 This is a schematic diagram of an electronic device according to the present invention. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of systems and methods consistent with some aspects of the invention as detailed in the appended claims.
[0022] The following detailed description is provided with reference to the accompanying drawings and embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides detailed implementation methods and data; however, the scope of protection of the present invention is not limited thereto.
[0023] This invention provides a non-destructive strength assessment method for bamboo based on mobile phone image component recognition, the overall process of which is as follows: Figure 1 As shown. Figure 1 This demonstrates a complete evaluation process, starting with "mobile phone shooting conditions," acquiring a "cross-sectional image," undergoing "image preprocessing," "core image processing," and "feature extraction," then inputting the extracted features into a "trained prediction model," and finally "displaying the results and classification suggestions." Simultaneously, Figure 1It also includes a closed-loop model training mechanism: samples from a bamboo sample library are subjected to destructive testing using a standard mechanical testing machine to obtain the true tensile strength; combined with the extraction of image features from the sample library, the model is trained and generated using a random forest algorithm, thereby continuously optimizing the prediction model. The method of this invention includes the following steps: 1. Image Acquisition and Preprocessing: The user launches the mobile app and places the bamboo strip cross-section against a uniform and simple background (such as a white background). A photo is taken using the app's built-in camera interface; the system automatically triggers focus and exposure optimization to ensure a clear, blur-free digital image of the bamboo strip cross-section. The acquired RGB image is then transferred to the integrated image processing system (i.e.,...). Figure 2 The original cross-sectional image shown is then passed to the integrated image processing module. The core of the preprocessing is a global contrast stretching operation performed by calling the 'imadjust' function. This function automatically maps image intensity values to a new range, enhancing the contrast between the foreground (bamboo fiber bundles, typically brighter) and the background (bamboo matrix, typically darker). This step significantly improves the robustness of subsequent image segmentation to different lighting conditions and is a key preprocessing adjustment to overcome the challenges of varying shooting environments.
[0024] 2. Adaptive Threshold Segmentation and Component Recognition: The preprocessed image is converted to grayscale, and the core segmentation function `segmentImage` (generated and encapsulated by the MATLAB image segmenter) is called. This function first uses the `imbinarize` function and employs the `adaptive` method for binarization segmentation, generating a segment like... Figure 2 The image shown is a "cross-sectional black and white image" (i.e., a binary image). In this invention, after segmentation with specific parameter settings, the high-density fiber bundle region of bamboo is identified as black (pixel value 0), while the background region, such as the bamboo matrix, is displayed as white (pixel value 1). Unlike existing technologies that use fixed thresholds or the general Otsu method, this method uses an adaptive thresholding method to independently calculate the threshold based on the brightness distribution of the local neighborhood of each pixel in the image (default size is floor(size(I) / 16)*2+1), thereby effectively overcoming the problem of uneven lighting across the entire image caused by shooting angle, shadows, or differences in the color of the bamboo surface. The key parameter settings are as follows: 'Sensitivity': Set to 0.88. This parameter was optimized using a large number of samples (covering different bamboo species and ages) to control the sensitivity of threshold calculation. The higher the value, the more pixels are classified as foreground (fiber bundles). It has been verified that a Sensitivity setting of 0.88 achieves optimal differentiation between fiber bundles and matrix across a wide range of samples, avoiding undersegmentation or oversegmentation.
[0025] 'ForegroundPolarity': Set to 'bright'. This setting specifies that areas of lower brightness in the image are identified as foreground objects (represented as black in a binary image). This is consistent with the physical property that high-density fiber bundles in a bamboo cross-section appear darker under light.
[0026] This step is one of the core improvements of the present invention. Through the above-mentioned specific parameterized adaptive threshold method, stable and accurate initial identification of the bamboo fiber bundle region is achieved.
[0027] 3. Morphological Post-processing: Initial binary segmentation results often contain small, isolated foreground points (salt-and-pepper noise) and burrs at the edges of fiber bundles caused by image noise or texture. To optimize the target region contour, a morphological opening operation is performed on the binary image. This invention uses a disk-shaped structuring element with a radius of 2 pixels (created via strel('disk', 2)) to perform an 'imopen' operation on the binary image. This operation effectively removes isolated noise points with an area smaller than the structuring element (approximately 13 pixels), while smoothing the boundaries of the fiber bundle region, eliminating small protrusions (burrs), and essentially preserving the overall shape and area of the target region. Compared to general denoising methods in existing technologies that may use structuring elements with larger radii or different shapes, the disk-shaped structuring element with a radius of 2 pixels is an optimized choice for the microstructural scale of bamboo fiber bundles (typically represented as continuous regions in images), achieving the best balance between denoising and preserving feature realism, ensuring the accuracy of subsequent feature extraction.
[0028] 4. Feature Extraction: After post-processing, the system calculates the total pixel area of the black foreground region (i.e., the identified fiber bundles) in the binary image. Simultaneously, the entire bamboo strip cross-sectional area (Region of Interest, ROI) is determined manually or through automatic edge detection. The ratio of the fiber bundle area to the total ROI area is calculated to obtain the Fiber Area Fraction (FAF), a key feature parameter characterizing the microstructure of bamboo. The ROI is divided into multiple grids (e.g., 50×50 pixels), and the local FAF within each grid is calculated. For invalid grid values (NaN) caused by local image loss, a fillmissing function combined with a moving average method (e.g., 'movmean', with a window size of 10) is used for filling and smoothing, generating a continuous FAF distribution map. This processing effectively reduces local fluctuation interference, resulting in a more stable and spatially representative feature vector (denoted as feature va_x1, the main feature) and / or its statistics (e.g., mean, gradient, which can be used as auxiliary feature va_x2), providing richer input information for mechanical performance prediction.
[0029] To further improve the spatial representativeness of features and the quality of model input, this invention can also perform gridded statistical and interpolation processing on the FAF to generate, for example... Figure 2 The image shows a simulated fiber distribution cloud map. This cloud map visually displays the continuous distribution of fiber density across the cross-section of bamboo. Simultaneously, based on a bamboo mechanical property prediction model, local fiber density (FAF) can be mapped to local strength, generating data such as... Figure 2 The "Ultimate Tensile Strength Distribution Cloud Map" shown uses MPa as the unit of strength. This map visually reflects the distribution of mechanical properties in different regions of the bamboo cross-section, providing a more detailed reference for material grading and engineering applications.
[0030] In specific calculations, the feature extraction process can generate, for example: Figure 3 and Figure 4 The numerical table shown. Figure 3 The table presents 31 pairs of data comparing the tensile strength values predicted by the model with the actual strength values measured through standard tests, providing a visual verification of the model's prediction accuracy. Figure 4 Two specific feature data representation examples are provided: the first table can represent the local FAF values (range 0-1) of a sample image after gridding, and the second table can represent another feature (local gray-scale statistics). These numerical matrices are the direct inputs for model training and prediction.
[0031] 5. Strength Prediction: The extracted FAF features (va_x1, va_x2) are input into the pre-trained bamboo mechanical property prediction model (random forest regression model) to simultaneously predict the tensile strength of the bamboo strips. σ ) and tensile modulus (E). Model prediction results (such as Figure 3 The "Predicted Values" column will be compared with the actual values for verification. This model employs the Random Forest Regression algorithm in ensemble learning, specifically implemented using the TreeBagger function in MATLAB. The model consists of 100 regression decision trees. During training, each tree uses bootstrap aggregating to draw samples with replacement from the training set, and randomly selects a subset of features for optimal splitting at each node, thereby increasing model diversity and improving generalization ability. The maximum depth of a single tree is indirectly controlled by the 'MinLeafSize' parameter, which is set to 10, representing the minimum number of samples contained in a leaf node. This setting effectively prevents overfitting.
[0032] Data source: The training data comes from laboratory standard destructive mechanical tests and synchronous image acquisition, covering bamboo samples under different treatment conditions (such as untreated and heat-treated).
[0033] Data Preprocessing: 1) Missing Value Handling: Missing values (NaN) generated by experiments or image processing are identified and removed before model training. 2) Outlier Filtering: After standardizing the measured intensity values c, data points deviating from the mean by more than 3 standard deviations are removed to ensure the quality of training data. 3) Feature Standardization: Before inputting extracted features such as FAF into the model, standardization is performed: va_x1_normalized = (va_x1 - mean(va_x1)) / std(va_x1) to accelerate model training convergence.
[0034] Loss function and optimization: Random forest is constructed by minimizing the mean squared error (MSE) of all decision tree predictions. Its optimization process is completed by selecting the best feature split point through a greedy algorithm, without the need to set an additional optimization algorithm.
[0035] Parameter settings: The selection of key hyperparameters (number of trees 100, minimum leaf node size 10) is based on: through grid search and 5-fold cross-validation, achieving optimal model prediction accuracy (R²). 2 A balance needs to be struck between accuracy and computational efficiency. Testing was conducted with 50 to 200 trees; 100 trees achieved stable and relatively high accuracy, and further increasing the number of trees offered limited improvement in accuracy but increased computational costs. Minimum leaf node size was tested from 5 to 20; 10 effectively prevented overfitting while maintaining the model's predictive ability.
[0036] Automatic grading: The system grades according to the predicted tensile strength ( σ Based on the tensile modulus (E) and the following preset joint grading criteria, the quality grade classification is automatically completed: Grade A: Tensile strength ≥80 MPa, tensile modulus ≥12 GPa, suitable for preparing engineering bamboo materials for high load-bearing structures.
[0037] Grade B: 40 MPa ≤ tensile strength < 80 MPa, 6 GPa ≤ tensile modulus < 12 GPa, suitable for preparing engineering bamboo materials for general structures.
[0038] Grade C: Tensile strength < 40 MPa, tensile modulus < 6 GPa, suitable for preparing non-load-bearing or decorative engineering bamboo materials.
[0039] Example: Taking the development of a mobile app that integrates the above algorithm as an example.
[0040] 1. System Construction: The core image processing functions (segmentImage and feature extraction code) are converted into C / C++ code using MATLAB Coder, or the same algorithm logic is reimplemented using the Python OpenCV library, and then packaged into a mobile (Android / iOS) callable SDK for integration into the app. The prediction model (random forest) parameters are exported as files (e.g., .pkl or .mat) and embedded in the app resource files or deployed on a cloud server.
[0041] 2. Image Acquisition: The user launches the app, places the cross-section of the bamboo strip against a simple background, and takes a photo using the app's built-in camera interface. The app automatically triggers focus and exposure to ensure the cross-section is sharp, and the app interface provides a visual guide frame to assist in composition.
[0042] 3. Automatic processing (corresponding to core code logic): a) Preprocessing: Call the contrast enhancement function in the image processing SDK.
[0043] b) Segmentation and post-processing: Call the segmentImage function to perform adaptive thresholding and morphological opening operations with parameters ('Sensitivity', 0.88, 'radius', 2).
[0044] c) Feature Calculation: Automatically or manually calibrate the ROI on the screen, calculate the meshed FAF, perform smoothing, and finally output the feature values.
[0045] 4. Prediction and Display: The APP sends the FAF value to the local or cloud-based prediction model service (the model is trained using the random forest regression algorithm, and the training data comes from laboratory standard tests), instantly receives and displays the predicted tensile strength, modulus and corresponding quality grade (such as "Grade A"), and clearly displays it on the APP interface.
[0046] 5. Performance Verification: To verify the effectiveness of this embodiment, 150 sets of bamboo strip samples with different heat treatment conditions were used. 120 sets were used to train the random forest model, and 30 sets were used for independent testing. The test results show that the coefficient of determination R between the predicted intensity and the actual intensity is [value missing]. 2 The accuracy reached 0.90, with a mean absolute error (MAE) of 0.04 MPa. The correspondence between predicted and actual values can be found in [reference needed]. Figure 3 The comparison data table shows that this level of accuracy fully meets the requirements for rapid screening and grading of bamboo in engineering practice.
[0047] The above embodiments demonstrate that the method provided by the present invention, by combining a complete, specific and optimized image processing workflow (including specific adaptive threshold parameters and morphological operations) with a transparent and robust machine learning prediction model, successfully transforms laboratory-level bamboo performance analysis into a fully automated tool that can complete "photography-processing-prediction-grading" in tens of seconds on-site, demonstrating significant innovation, practicality and repeatability.
[0048] Corresponding to the aforementioned embodiments of the non-destructive strength assessment method for bamboo based on mobile phone image component recognition, the present invention also provides embodiments of a non-destructive strength assessment system for bamboo based on mobile phone image component recognition.
[0049] A non-destructive strength assessment system for bamboo based on mobile phone image component recognition includes: The image acquisition module is used to capture digital images of the cross-section of the bamboo strip to be tested using the camera of a mobile terminal; The image processing and analysis module is used to perform contrast enhancement and grayscale processing on the digital image; to segment the processed image using an adaptive threshold binarization algorithm, and to identify high-brightness pixel regions as target objects; to perform morphological opening operations on the binary segmentation results to optimize the contour of the target region; and to calculate the pixel area ratio of the optimized target region to obtain the fiber area fraction. The strength prediction and output module is used to input the fiber area fraction into the built-in bamboo mechanical property prediction model and output the predicted tensile strength and predicted tensile modulus of the bamboo strip to be tested; based on the predicted tensile strength and tensile modulus, the bamboo strip is automatically classified into quality grades according to the grading standards.
[0050] Corresponding to the aforementioned embodiments of the non-destructive strength assessment method for bamboo based on mobile phone image component recognition, this application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned non-destructive strength assessment method for bamboo based on mobile phone image component recognition. Figure 5 The diagram shown is a hardware structure diagram of any device with data processing capabilities for the non-destructive strength assessment method for bamboo based on mobile phone image component recognition provided in this application embodiment, except... Figure 5 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0051] Corresponding to the aforementioned embodiments of the non-destructive strength assessment method for bamboo based on mobile phone image component recognition, this embodiment of the invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the non-destructive strength assessment method for bamboo based on mobile phone image component recognition in the above embodiments.
[0052] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0053] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0054] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A non-destructive method for assessing the strength of bamboo based on mobile phone image component recognition, characterized in that, Includes the following steps: S1. Image Acquisition: Capture a digital image of the cross-section of the bamboo strip to be tested using the camera of the mobile terminal; S2. Image Processing and Feature Extraction: The digital image is subjected to contrast enhancement and grayscale processing; an adaptive threshold binarization algorithm is used to segment the processed image, and the high-brightness pixel regions are identified as target objects; morphological opening operations are performed on the binary segmentation results to optimize the contour of the target region; Calculate the pixel area ratio of the optimized target region to obtain the fiber area fraction; S3. Performance Prediction and Grading: The fiber area fraction is input into a pre-trained bamboo mechanical property prediction model, which outputs the predicted tensile strength and predicted tensile modulus of the bamboo strip to be tested. Based on the predicted tensile strength and tensile modulus, the bamboo strip is automatically classified into quality grades according to a preset grading standard. The bamboo mechanical property prediction model is trained based on a random forest regression algorithm. The training data of the model includes multiple sets of training samples. Each set of training samples includes: the fiber area fraction extracted from the cross-sectional image of the bamboo strip sample, and the actual tensile strength and actual tensile modulus measured by standard destructive mechanical tests on the same bamboo strip sample.
2. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The adaptive threshold binarization algorithm mentioned in step S2 is specifically the use of the 'imbinarize' function, with the parameters 'adaptive', 'Sensitivity' set to 0.88, and 'ForegroundPolarity' set to 'bright'.
3. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The morphological opening operation described in step S2 involves operating on a binary image using a disk-shaped structuring element with a radius of 2 pixels.
4. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The contrast enhancement mentioned in step S2 is achieved by automatically adjusting the range of image data using the imadjust function.
5. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The fiber area fraction mentioned in step S2 is the ratio of the area of the fiber bundle region to the total area of the bamboo strip cross-section region. The fiber bundle region area is the total pixel area of the black foreground region in the binary image, and the bamboo strip cross-section region is determined by manual delineation or automatic edge detection.
6. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The bamboo mechanical property prediction model described in step S3 adopts the random forest regression algorithm in ensemble learning and is implemented by the TreeBagger function in MATLAB. The model is composed of 100 regression decision trees. During training, each tree uses bootstrap sampling to draw samples from the training set with replacement. At each node split, some features are randomly selected for optimal splitting. The maximum depth of a single tree is indirectly controlled by the 'MinLeafSize' parameter, which is set to 10, that is, the minimum number of samples contained in the leaf node.
7. The method for non-destructive evaluation of bamboo strength based on mobile phone image component recognition according to claim 1, characterized in that, The grading criteria mentioned in step S3 include: Grade A: Tensile strength ≥80 MPa, tensile modulus ≥12 GPa, suitable for preparing engineering bamboo materials for high load-bearing structures; Grade B: 40 MPa ≤ tensile strength < 80 MPa, 6 GPa ≤ tensile modulus < 12 GPa, suitable for preparing engineering bamboo materials for general structures; Grade C: Tensile strength < 40 MPa, tensile modulus < 6 GPa, suitable for preparing non-load-bearing or decorative engineering bamboo materials.
8. A non-destructive strength assessment system for bamboo based on mobile phone image component recognition for implementing the method of any one of claims 1-7, characterized in that, include: The image acquisition module is used to capture digital images of the cross-section of the bamboo strip to be tested using the camera of a mobile terminal; The image processing and analysis module is used to perform contrast enhancement and grayscale processing on the digital image; An adaptive threshold binarization algorithm is used to segment the processed image, identifying high-brightness pixel regions as target objects; morphological opening operations are performed on the binary segmentation results to optimize the contour of the target region. Calculate the pixel area ratio of the optimized target region to obtain the fiber area fraction; The strength prediction and output module is used to input the fiber area fraction into the built-in bamboo mechanical property prediction model and output the predicted tensile strength and predicted tensile modulus of the bamboo strip to be tested; based on the predicted tensile strength and tensile modulus, the bamboo strip is automatically classified into quality grades according to the grading standards.
9. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the non-destructive evaluation method for bamboo strength based on mobile phone image component recognition as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the non-destructive evaluation method for bamboo strength based on mobile phone image component recognition as described in any one of claims 1-7.