Visual inspection method for quality of construction waste recycled aggregate

By constructing standardized image sequences and calculating differential excitations, combined with directional correlation threshold binding and leaf node index matching, the problem of unstable brightness difference characterization in the visual inspection of recycled aggregates was solved, and stable classification of particulate impurities, particle size and morphology and reliable output of batch quality grades were achieved.

CN122434844APending Publication Date: 2026-07-21GUANGDONG YUEPING ENVIRONMENTAL PROTECTION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG YUEPING ENVIRONMENTAL PROTECTION TECHNOLOGY CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing visual inspection technologies for recycled aggregates are unable to stably characterize the local brightness differences inside and at the boundaries of particles under conditions such as dust, particle obstruction, surface reflection, and uneven illumination. This leads to broken segmentation boundaries, loss of local details, or sensitivity to noise, affecting the consistency of the discrimination of impurities, particle size, and morphology. Furthermore, the lack of an adaptive threshold binding mechanism results in path drift and fluctuations in batch aggregation results.

Method used

By constructing standardized image sequences, extracting particle regions, calculating differential excitation, binding directional correlation thresholds, generating binary paths, and matching leaf node indices, the system achieves classification of particle impurities, particle size, and morphology categories, as well as output of batch quality grades.

Benefits of technology

It improves the usability of particle-level detection and the stability of batch statistics, reduces interference from dust, reflection and uneven illumination, enhances the ability to distinguish impurities, particle size and morphology-related texture differences, and strengthens the stability of classification probability output and batch quality grade aggregation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434844A_ABST
    Figure CN122434844A_ABST
Patent Text Reader

Abstract

The application discloses a method for visual detection of the quality of recycled aggregate of construction waste, which comprises the following steps: obtaining image frames of the recycled aggregate in the conveying process and performing gray scale correction and normalization to form a standardized image sequence; performing boundary detection and region segmentation on the standardized image sequence, extracting aggregate particle regions with closed boundaries and generating a particle image set; calculating relative brightness differential excitation on the particle image according to pixel gray scale and neighborhood reference gray scale, combining direction information to generate a differential excitation map; performing statistics on the distribution of the differential excitation values and establishing a threshold mapping according to quantile; constructing a binary test path based on the differential excitation map and the threshold mapping and outputting an index; obtaining the classification probability of the particles in the impurity, particle size and morphology dimensions according to the index, and aggregating the batch particle probability to output the corresponding recycled aggregate quality grade result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision intelligent recognition technology, and in particular to a visual inspection method for the quality of recycled aggregates from construction waste. Background Technology

[0002] With the advancement of the resource utilization of construction solid waste, the large-scale application of recycled aggregates in recycled concrete, road base and municipal engineering continues to grow. Production lines typically deploy cameras and light sources at conveyor belt stations to collect aggregate images, and complete image standardization, particle segmentation, feature extraction and quality grading output on the edge computing or server side to support online evaluation of impurity composition, particle size distribution and morphology and batch quality determination.

[0003] Existing visual inspection technologies for recycled aggregates still have significant limitations under conditions such as dust, particle occlusion, surface reflection, and uneven illumination. On the one hand, schemes relying on global thresholds, fixed contrast features, or single-directional gradients struggle to stably characterize local brightness differences within particles and at boundaries, easily leading to broken segmentation boundaries, loss of local details, or sensitivity to noise, thus affecting the consistency of subsequent impurity, particle size, and morphology discrimination. On the other hand, classification path construction methods using fixed thresholds or fixed node comparison rules lack adaptive threshold binding mechanisms for different directions and positive / negative differences. Furthermore, when reference points within the mask are missing, invalid bits or path drift are easily generated, resulting in unstable leaf node indexes, posterior probability matching deviations, and fluctuations in batch aggregation results, making it difficult to form a reusable quality level output rule chain.

[0004] Therefore, how to provide a visual inspection method for the quality of recycled aggregates from construction waste is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a visual inspection method for the quality of recycled aggregates from construction waste. This method achieves classification and batch quality grade output for particle impurities, particle size, and morphology categories through standardized image sequence construction, particle region extraction, differential excitation calculation, directional correlation threshold binding, binary path generation, and leaf node index matching.

[0006] The visual inspection method for the quality of recycled aggregate from construction waste according to an embodiment of the present invention includes the following steps: Image frames of recycled aggregate from construction waste during the transportation process are acquired, and grayscale normalization is performed on the image frames to obtain a standardized image sequence. Boundary detection and region segmentation are performed on the standardized image sequence to extract aggregate particle regions with closed boundaries and construct a particle image set; Based on Weber's law, the relative brightness difference excitation value is calculated for the gray level of each pixel and its neighborhood reference gray level in the particle image set, and a difference excitation map is generated by combining the direction angle parameter. The distribution of excitation values ​​in the differential excitation diagram is statistically analyzed, and an excitation threshold mapping table corresponding one-to-one with the differential excitation values ​​is generated based on the quantiles. Based on the differential excitation map and the excitation threshold mapping table, a binary test path for a random fern structure is constructed on each particle image, and a leaf node index is generated. By matching the corresponding posterior probabilities with the leaf node index, the classification probability distribution of each particle image in terms of impurity composition, particle size distribution and morphology category can be obtained. The classification probability distributions of all particle images are aggregated to generate the quality grade result of recycled aggregate corresponding to the batch of images.

[0007] Optionally, generating a normalized image sequence includes: At the conveyor belt inspection station, the camera, lens, and light source are installed and positioned, the synchronization relationship between the camera trigger signal and the conveyor belt running signal is established, and the exposure, gain, and white balance are locked as a fixed set of parameters. Dark field reference frames and flat field reference frames were acquired. The dark field reference frames were acquired under shading conditions, while the flat field reference frames were acquired under the same imaging conditions using a uniform reflective reference surface. Image frames are continuously acquired and transported. Dark field removal and flat field correction are performed on each image frame. Dark field removal and flat field correction use dark field reference frames to eliminate fixed pattern noise and flat field reference frames to compensate for spatial illuminance unevenness, thus obtaining corrected image frames. The corrected image frame is converted to grayscale to obtain a grayscale image frame, and the grayscale image frame is cropped based on the pre-calibrated field of view boundary to obtain an effective grayscale frame. Calculate the grayscale histogram for the effective grayscale frame, determine the lower and upper bounds of the grayscale dynamic range, and perform lower bound truncation on the grayscale of pixels below the lower bound and upper bound truncation on the grayscale of pixels above the upper bound to obtain the truncated grayscale frame. Perform linear normalization mapping on the truncated grayscale frame to map the grayscale dynamic range of the truncated grayscale frame to the normalized grayscale range, and obtain the normalized grayscale frame. Normalized grayscale frames are written to the sequence buffer in the order of acquisition, and a frame number and timestamp are written for each frame to output a normalized image sequence.

[0008] Optionally, constructing the particle image set includes: For each effective grayscale frame in the standardized image sequence, a gradient magnitude map and a gradient direction map are generated, and the candidate edge pixels after non-maximum suppression in the gradient magnitude map are used as the set of boundary seed points. Edge linking is performed on the set of boundary seed points to form a set of boundary chain segments. The closure distance between the first and last pixels of each boundary chain segment is calculated and the chain segment direction is consistent. Boundary chain segments that do not meet the closure judgment conditions are filtered out to obtain a set of candidate closed boundaries. Perform scanline filling on each closed boundary in the candidate set of closed boundaries to generate the corresponding closed region mask, and perform hole filling on the closed region mask to obtain the closed region pixel set; Based on the closed region mask, the mask structure corresponding to each closed region is defined as a particle mask, and the connected component labeling operation is performed on the particle mask to generate a set of particle regions, and the particle mask corresponding to each particle region is recorded. Based on the bounding rectangle corresponding to each particle region, an image patch of the particle region is extracted from the effective grayscale frame as a particle sub-image, and a particle mask is used to constrain the particle sub-image to generate a single particle image. Perform a boundary integrity check on each single particle image. The boundary integrity check includes boundary closure determination and particle mask connectivity determination. Delete single particle images and corresponding particle masks that fail the check. Write the approved single-particle images and corresponding particle masks into the particle index table, and associate the single-particle images and particle mask data with the particle index table to output a set of particle images.

[0009] Optionally, generating the differential activation map includes: Read individual particle images and their corresponding particle masks sequentially from the particle image set, establish a set of pixel coordinates inside the mask, and mark pixels outside the mask as invalid pixels; Calculate the horizontal gradient g of pixels within the mask on a single-particle image. x With vertical gradient g y And according to (P)=atan2(g y ,g x Generate orientation angle parameters for each pixel P; Establish a set of directions and angles Map the orientation angle parameter (P) of each pixel to an orientation index k(P), where the orientation index k(P) satisfies The angle difference between the k-th (P) direction angle and (P) is the smallest. For each pixel P within the mask and its orientation index k(P), along Construct a forward discrete sampling sequence from the k(P)th direction angle. And construct a reverse discrete sampling sequence along the opposite direction angle. Both discrete sampling sequences are generated starting from pixel P with progressively increasing coordinate offsets; In the forward discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask, and the first sampling point located within the mask is determined as the positive reference point q. + (P), and read the forward reference grayscale I. + (p)=I(q + (p)); In the reverse discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask. The first sampling point located within the mask is determined as the reverse reference point q. - (P), and read the reverse reference grayscale I. - (p)=I(q - (p)); Constructing a neighborhood reference grayscale I using forward and reverse reference grayscale values ref (p), neighborhood reference grayscale according to Determined, and with I + (p)-I - (p) Construct directional difference I(p) = I + (p)-I - (p); Based on Weber's law, the relative luminance difference excitation value is calculated for pixel P, and the relative luminance difference excitation value is defined as... ; And a polarity label b(P) is generated from I(p), and the polarity label satisfies the following conditions: b(P)=1 when I(p) < 0 and b(P)=0 when I(p) < 0. The excitation value E(P), orientation index K(P), and polarity mark b(P) of pixel p are written into the excitation storage structure indexed by pixel coordinates to form a differential excitation record consisting of excitation amplitude, orientation index, and polarity mark. The differential excitation record generation process is repeated for all pixels within the mask. All differential excitation records are arranged according to pixel coordinates to generate differential excitation maps for single-particle images. The differential excitation maps of each single-particle image are written into the differential excitation buffer according to the particle index, and the differential excitation map is output.

[0010] Optionally, generating the excitation threshold mapping table includes: Read the differential excitation map of each single particle image sequentially from the differential excitation map, extract the excitation amplitude, orientation index and polarity mark of all pixels, ignore pixels outside the mask and invalid values, and generate an excitation record list. The list of excitation records is divided according to the direction index. Excitation records with the same direction index are grouped into a directional excitation subset to construct a complete set of directional excitation groups. In each directional excitation subset, the excitation values ​​are divided into a positive excitation set and a negative excitation set according to the polarity label; For each positive and negative stimulus set, the stimulus values ​​are sorted to obtain an ordered stimulus sequence arranged from smallest to largest. Based on a preset set of quantile proportions, the position index of each quantile in the sequence is located in order. Extract the excitation value from the ordered excitation sequence in each direction according to the positioning result, use the excitation value as the quantile excitation threshold in that direction, and record the quadruple of direction index, polarity category, quantile number and excitation value; All quadruples are organized according to direction index and polarity to form an excitation threshold table under the three-dimensional index of direction polarity quantile number, and stored in a structured data table structure. For each subsequent differential excitation record, a mapping path is constructed. Based on the direction index, polarity label and excitation value of the record, the quantile interval of the excitation value is located in the excitation threshold table, and its corresponding segment number is recorded to form an excitation threshold mapping table.

[0011] Optionally, the steps for generating leaf node indexes include: Read the differential excitation record corresponding to the single particle image from the differential excitation map set. The differential excitation record contains at least pixel coordinates, excitation value E(P), orientation index K(P) and polarity label b(P). Read the quantile threshold sequence indexed by orientation index and polarity category from the excitation threshold mapping table. A random fern node template table is established, which consists of node numbers and node parameters. The node parameters include the center pixel selection rule, direction index selection rule, quantile number selection rule, reference point generation rule, and bit writing position. The node template table is generated by a pseudo-random sequence driven by a fixed seed. The fixed seed is fixed during system deployment, and the node template table remains unchanged during runtime. A list of optional center pixels is established for the pixels within the mask of a single particle image, and a center pixel P is selected for each node according to the node number order in the node template table. The selection of center pixels is completed by indexing the values ​​in the list of optional center pixels, where the index is given by the node template table. For each node, the direction index k is determined according to the direction index selection rules given in the node template table, and two discrete sampling sequences in opposite directions are constructed on the single particle image using the direction index k, which are used to determine the forward reference point and the reverse reference point respectively. The effectiveness within the mask is detected point by point from the center pixel outwards in the forward discrete sampling sequence, and the first sampling point located within the mask is determined as the forward reference point q. + The reverse reference point q is determined in the same way on the reverse discrete sampling sequence. - If no sampling point is found within the mask in a certain direction, backtrack and search again according to the sampling sequence until a sampling point within the mask is found or the node is marked as an invalid node. For valid nodes, q is read from the differential excitation record respectively. + With q - The incentive value E(q) + ), E(q) - ) and polarity marker b(q) + b(q) - ), and execute the first build process improvement: with (q + ,q - As the symmetric reference pixel pair for this node, construct the node comparison quantity D. The node comparison quantity is determined by the absolute value of the difference between the excitation values ​​of the two reference pixels, denoted as D = |E(q)|. + )-E(q - )|; Based on the quantile number selection rules given in the node template table, the threshold boundary is determined in the excitation threshold mapping table using the direction index k and the polarity category. The polarity category is determined by b(q). + ) and b(q) - The consistency determination is obtained, where the consistency polarity is taken when consistent and the polarity specified by the node template table is taken when inconsistent; the threshold boundary is taken as the upper bound of the interval formed by the threshold of the corresponding quantile number and the threshold of its adjacent quantile numbers; The node comparison value D is compared with the threshold boundary to generate the node bit. When D is greater than the threshold boundary, bit 1 is output, otherwise bit 0 is output. When a node is marked as an invalid node, bit 0 is output and the invalid mark is recorded. The second construction process improvement is performed on the node bits obtained from all nodes: a path bit string is generated by grouping nodes by direction index and polarity category and writing them by fixed permutation. First, the nodes are grouped by direction index, and then each direction group is divided into subgroups by polarity category. Then, a fixed permutation table is applied to the node number sequence in each subgroup to obtain the writing order, and the node bits are written into the path bit string according to this writing order. The fixed permutation table is fixed during system deployment and the same fixed permutation table is used for all single-particle images. The path bit string is interpreted as a binary integer in the order it is written and the leaf node index L is output, where the first bit of the path bit string is the most significant bit and the last bit is the least significant bit; the leaf node index L and the invalidation flag are written to the leaf node index record and written to the leaf node index buffer according to the granular index, and the leaf node index set is output.

[0012] Optionally, the generated classification probability distribution includes: Read the leaf node index L corresponding to each particle image one by one from the leaf node index cache, and read the invalid node mask bound to the index to construct the leaf node index list and particle index mapping table. In the predefined set of classification targets in the system, three categories of judgment targets are set: impurity composition, particle size distribution and morphology category; for each target category, the corresponding posterior probability parameter table is loaded. The posterior probability parameter table uses the leaf node index L as the key and the frequency vector of each category of the corresponding target as the value. For each leaf node index L corresponding to a particle image, the corresponding frequency vector C is obtained by querying the three posterior probability parameter tables. i , where i1,2,3 correspond to three targets: impurity composition, particle size distribution, and morphology category, respectively; For each frequency vector C i Calculate the sum of its components S i When S i When the frequency is greater than 0, normalization is performed as follows: For each category frequency C in the frequency vector... i Calculate the posterior probability P of this category. i,j =c i,j / S i The results are used to construct the category probability distribution vector P of target i. i ; When the sum of the frequency vectors S i When =0, check if the number of valid bits in the invalid node mask corresponding to the particle image is less than a preset threshold. If so, then change the corresponding category probability distribution vector P. i Initialize as a vector of all zeros and mark it as invalid; The probability distribution vectors P1, P2, and P3 of the three types of targets are combined into a set of classification results according to the impurity composition, particle size distribution, and morphology category. The current particle index, leaf node index, and invalid flag are then added and written into the particle probability output table. The particle probability output table is sorted by particle index and written to the classification result cache. The output is a structured record set containing the classification probability distribution of each particle image under the three target classes.

[0013] Optionally, the generated recycled aggregate quality grade results include: Read the classification probability distribution records of all particle images in the target batch from the classification result cache area, and sort them in ascending order by particle index to build a list of particle probability records; Traverse the list of particle probability records, and sum the probability vectors of impurity composition, particle size distribution, and morphology category in each record according to their components to obtain three sets of sum vectors, which correspond to the three judgment dimensions of impurity, particle size, and morphology, respectively. Record the number N of particle images involved in the accumulation, and divide each sum vector by N according to its components to obtain the average probability vector of batch impurity composition, the average probability vector of particle size distribution, and the average probability vector of morphology category, respectively. The three average probability vectors are used as inputs in sequence, and the dot product operation is performed with the corresponding linear weight vectors respectively to obtain three normalized index values, which are denoted as batch impurity index value, particle size index value and morphology index value respectively. Construct a batch quality index ternary set (Q1, Q2, Q3), where Q1, Q2, and Q3 represent the index values ​​of impurities, particle size, and morphology, respectively. Call the quality level rule table, traverse the rules in the preset priority order of the level. Each rule contains three numerical ranges, which correspond to the value range of the indicators in the three dimensions respectively. Compare Q1, Q2, and Q3 sequentially with the three intervals of the current grade rule. If all three fall within the interval boundaries, then the grade number is taken as the quality grade of the current batch. Output the batch number of the image and the corresponding quality grade number, write them into the batch quality grade result table, and complete the process of generating the quality grade of recycled aggregate.

[0014] The beneficial effects of this invention are: This invention performs grayscale correction and normalization on aggregate images collected during the conveying process, and detects and segments particle boundaries to form a set of particle images. This reduces the interference of dust, reflection and uneven illumination on particle extraction, ensuring consistency of subsequent detection inputs and improving the usability of particle-level detection and the stability of batch statistics.

[0015] This invention calculates relative brightness difference excitation based on pixel grayscale and neighborhood reference grayscale on particle images, and generates a difference excitation map by combining directional information. This enables fine-grained characterization of particle boundaries and internal structures, reduces detail loss and noise misjudgment caused by relying solely on global thresholds or single gradient features, and improves the ability to distinguish impurities, particle size and morphology-related texture differences.

[0016] This invention statistically analyzes the distribution of differential excitation values ​​and establishes a threshold mapping based on quantiles. It constructs binary test paths and leaf node indexes by combining positive and negative differences with threshold binding rules related to direction. When reference points are missing, it employs mask constraints and alternative sampling mechanisms to enhance the consistency of path generation and the reliability of index matching. This improves the stability of classification probability output and batch quality level aggregation results, and reduces result drift and fluctuation caused by operating condition fluctuations. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the visual inspection method for the quality of recycled aggregates from construction waste proposed in this invention. Figure 2This invention provides a flowchart for random fern binary testing and path index generation. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0019] refer to Figure 1 - Figure 2 A visual inspection method for the quality of recycled aggregates from construction waste includes the following steps: Image frames of recycled aggregate from construction waste during the transportation process are acquired, and grayscale normalization is performed on the image frames to obtain a standardized image sequence. Boundary detection and region segmentation are performed on the standardized image sequence to extract aggregate particle regions with closed boundaries and construct a particle image set; Based on Weber's law, the relative brightness difference excitation value is calculated for the gray level of each pixel and its neighborhood reference gray level in the particle image set, and a difference excitation map is generated by combining the direction angle parameter. The distribution of excitation values ​​in the differential excitation diagram is statistically analyzed, and an excitation threshold mapping table corresponding one-to-one with the differential excitation values ​​is generated based on the quantiles. Based on the differential excitation map and the excitation threshold mapping table, a binary test path for a random fern structure is constructed on each particle image, and a leaf node index is generated. By matching the corresponding posterior probabilities with the leaf node index, the classification probability distribution of each particle image in terms of impurity composition, particle size distribution and morphology category can be obtained. The classification probability distributions of all particle images are aggregated to generate the quality grade result of recycled aggregate corresponding to the batch of images.

[0020] In this embodiment, generating a standardized image sequence includes: At the conveyor belt inspection station, the camera, lens, and light source are installed and positioned, the synchronization relationship between the camera trigger signal and the conveyor belt running signal is established, and the exposure, gain, and white balance are locked as a fixed set of parameters. Dark field reference frames and flat field reference frames were acquired. The dark field reference frames were acquired under shading conditions, while the flat field reference frames were acquired under the same imaging conditions using a uniform reflective reference surface. Image frames are continuously acquired and transported. Dark field removal and flat field correction are performed on each image frame. Dark field removal and flat field correction use dark field reference frames to eliminate fixed pattern noise and flat field reference frames to compensate for spatial illuminance unevenness, thus obtaining corrected image frames. The corrected image frame is converted to grayscale to obtain a grayscale image frame, and the grayscale image frame is cropped based on the pre-calibrated field of view boundary to obtain an effective grayscale frame. Calculate the grayscale histogram for the effective grayscale frame, determine the lower and upper bounds of the grayscale dynamic range, and perform lower bound truncation on the grayscale of pixels below the lower bound and upper bound truncation on the grayscale of pixels above the upper bound to obtain the truncated grayscale frame. Perform linear normalization mapping on the truncated grayscale frame to map the grayscale dynamic range of the truncated grayscale frame to the normalized grayscale range, and obtain the normalized grayscale frame. Normalized grayscale frames are written to the sequence buffer in the order of acquisition, and a frame number and timestamp are written for each frame to output a normalized image sequence.

[0021] In this embodiment, constructing the particle image set includes: For each effective grayscale frame in the standardized image sequence, a gradient magnitude map and a gradient direction map are generated, and the candidate edge pixels after non-maximum suppression in the gradient magnitude map are used as the set of boundary seed points. Edge linking is performed on the set of boundary seed points to form a set of boundary chain segments. The closure distance between the first and last pixels of each boundary chain segment is calculated and the chain segment direction is consistent. Boundary chain segments that do not meet the closure judgment conditions are filtered out to obtain a set of candidate closed boundaries. Perform scanline filling on each closed boundary in the candidate set of closed boundaries to generate the corresponding region mask, and perform hole filling on the region mask to obtain the closed region mask; Perform connected component labeling on the closed region mask to obtain the region pixel set, and calculate the bounding rectangle, area and perimeter based on the region pixel set. Delete regions with an area smaller than a preset area threshold to obtain the granular region set. For each particle region in the particle region set, a particle sub-image is extracted from the effective grayscale frame using the bounding rectangle as the clipping window, and the particle sub-image is masked with a closed region mask to generate a single particle image. Perform boundary integrity verification on single-particle images. The boundary integrity verification includes boundary closure determination and mask connectivity determination. Delete single-particle images that fail the verification. The approved single-particle images are written into the particle index table according to the frame number and region number, and the single-particle image data are associated with the particle index table to output a set of particle images.

[0022] In this embodiment, generating the differential excitation map includes: Read individual particle images and their corresponding particle masks sequentially from the particle image set, establish a set of pixel coordinates inside the mask, and mark pixels outside the mask as invalid pixels; Calculate the horizontal gradient g of pixels within the mask on a single-particle image. x With vertical gradient g y And according to (P)=atan2(g y ,g xGenerate orientation angle parameters for each pixel P; Establish a set of directions and angles Map the orientation angle parameter (P) of each pixel to an orientation index k(P), where the orientation index k(P) satisfies The angle difference between the k-th (P) direction angle and (P) is the smallest. For each pixel P within the mask and its orientation index k(P), along Construct a forward discrete sampling sequence from the k(P)th direction angle. And construct a reverse discrete sampling sequence along the opposite direction angle. Both discrete sampling sequences are generated starting from pixel P with progressively increasing coordinate offsets; In the forward discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask, and the first sampling point located within the mask is determined as the positive reference point q. + (P), and read the forward reference grayscale I. + (p)=I(q + (p)); In the reverse discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask. The first sampling point located within the mask is determined as the reverse reference point q. - (P), and read the reverse reference grayscale I. - (p)=I(q - (p)); Constructing a neighborhood reference grayscale I using forward and reverse reference grayscale values ref (p), neighborhood reference grayscale according to Determined, and with I + (p)-I - (p) Construct directional difference I(p) = I + (p)-I - (p); Based on Weber's law, the relative luminance difference excitation value is calculated for pixel P, and the relative luminance difference excitation value is defined as... ; And a polarity label b(P) is generated from I(p), and the polarity label satisfies the following conditions: b(P)=1 when I(p) < 0 and b(P)=0 when I(p) < 0. The excitation value E(P), orientation index K(P), and polarity mark b(P) of pixel p are written into the excitation storage structure indexed by pixel coordinates to form a differential excitation record consisting of excitation amplitude, orientation index, and polarity mark. The differential excitation record generation process is repeated for all pixels within the mask. All differential excitation records are arranged according to pixel coordinates to generate differential excitation maps for single-particle images. The differential excitation maps of each single-particle image are written into the differential excitation buffer according to the particle index, and the differential excitation map is output.

[0023] In this embodiment, the relative brightness difference excitation formula originates from Weber's law in psychophysics, its original form being S / S=k. The perceptibility of the stimulus difference depends on the ratio of the difference S to the background stimulus intensity S. This application considers the image pixel grayscale as the visual stimulus intensity, and the grayscale difference I(p) obtained by sampling in the symmetrical direction is I(p)=I + (p)-I - (p) corresponds to stimulus differences, with the mean grayscale value... This corresponds to the background stimulus, and a relative brightness difference excitation value is constructed accordingly. The derivation of this formula retains the core structure of Weber's Law, which measures perceptual differences through ratios, and replaces visual stimuli with image grayscale, making it applicable to the quantitative expression of local brightness structures. Both sides of the formula are grayscale ratios, without units, and have consistent dimensions; I(p) and I... ref (p) Both belong to the gray dimension, and their ratio is a dimensionless quantity, which meets the requirements of psychophysical consistency and engineering computability required by Weber's Law.

[0024] In this embodiment, generating the excitation threshold mapping table includes: Read the differential excitation map of each single particle image sequentially from the differential excitation map, extract the excitation amplitude, orientation index and polarity mark of all pixels, ignore pixels outside the mask and invalid values, and generate an excitation record list. The list of excitation records is divided according to the direction index. Excitation records with the same direction index are grouped into a directional excitation subset to construct a complete set of directional excitation groups. In each directional excitation subset, the excitation values ​​are divided into a positive excitation set and a negative excitation set according to the polarity label, which are used for independent analysis of the positive and negative excitation intervals in the subsequent process. For each positive and negative stimulus set, the stimulus values ​​are sorted to obtain an ordered stimulus sequence arranged from smallest to largest. Based on a preset set of quantile proportions, the position index of each quantile in the sequence is located in order. Extract the excitation value from the ordered excitation sequence in each direction according to the positioning result, use the excitation value as the quantile excitation threshold in that direction, and record the quadruple of direction index, polarity category, quantile number and excitation value; All quadruples are organized according to direction index and polarity to form an excitation threshold table under the three-dimensional index of direction polarity quantile number, and stored in a structured data table structure. For each subsequent differential excitation record, a mapping path is constructed. Based on the direction index, polarity mark and excitation value of the record, the quantile interval of the excitation value is located in the excitation threshold table, and its corresponding segment number is recorded to form a mapping index from differential excitation to threshold interval. The incentive threshold table and mapping index structure are written into the cache for the random fern construction module to call, thus completing the binding of incentive values ​​and threshold determination rules.

[0025] In this embodiment, the step of generating the leaf node index includes: Read the differential excitation record corresponding to the single particle image from the differential excitation map set. The differential excitation record contains at least pixel coordinates, excitation value E(P), orientation index K(P) and polarity label b(P). Read the quantile threshold sequence indexed by orientation index and polarity category from the excitation threshold mapping table. A random fern node template table is established, which consists of node number and node parameters. The node parameters include the center pixel selection rule, direction index selection rule, quantile number selection rule, reference point generation rule, and bit writing position. Center pixel selection rule: A pixel index list is created in the scan order within the mask pixels, and the pixel corresponding to the specified position index in the node template is the center pixel; Direction index selection rule: Based on the direction angle set... The direction angle is a multiple of 8, and the index is selected directly from the template. Quantile number selection rule: Set a fixed integer value to indicate which quantile threshold to select in each direction-polarity combination; Reference point generation rule: Starting from the center pixel, construct forward and reverse sampling paths with a unit pixel offset step according to the direction vector direction, and use the first pixel inside the mask as the reference point; Bit write position: The integer position specified by the template controls the order of bits in the final path bit string.

[0026] The node template table is generated by a pseudo-random sequence driven by a fixed seed. The fixed seed is fixed during system deployment, and the node template table remains unchanged during runtime. A list of optional center pixels is established for the pixels within the mask of a single particle image, and a center pixel P is selected for each node according to the node number order in the node template table. The selection of center pixels is completed by indexing the values ​​in the list of optional center pixels, where the index is given by the node template table. For each node, the direction index k is determined according to the direction index selection rules given in the node template table, and two discrete sampling sequences in opposite directions are constructed on the single particle image using the direction index k, which are used to determine the forward reference point and the reverse reference point respectively. The effectiveness within the mask is detected point by point from the center pixel outwards in the forward discrete sampling sequence, and the first sampling point located within the mask is determined as the forward reference point q. + The reverse reference point q is determined in the same way on the reverse discrete sampling sequence. - If no sampling point is found within the mask in a certain direction, backtrack and search again according to the sampling sequence until a sampling point within the mask is found or the node is marked as an invalid node. For valid nodes, q is read from the differential excitation record respectively. + With q - The incentive value E(q) + ), E(q) - ) and polarity marker b(q) + b(q) - ), and execute the first build process: with (q + ,q - As the symmetric reference pixel pair for this node, construct the node comparison quantity D. The node comparison quantity is determined by the absolute value of the difference between the excitation values ​​of the two reference pixels, denoted as D = |E(q)|. + )-E(q - )|; Based on the quantile number selection rules given in the node template table, the threshold boundary is determined in the excitation threshold mapping table using the direction index k and the polarity category. The polarity category is determined by b(q). + ) and b(q) - The consistency determination is obtained, where the consistency polarity is taken when consistent and the polarity specified by the node template table is taken when inconsistent; the threshold boundary is taken as the upper bound of the interval formed by the threshold of the corresponding quantile number and the threshold of its adjacent quantile numbers; The node comparison value D is compared with the threshold boundary to generate the node bit. When D is greater than the threshold boundary, bit 1 is output, otherwise bit 0 is output. When a node is marked as an invalid node, bit 0 is output and the invalid mark is recorded. The second construction process is performed on all node bits obtained from all nodes: a path bit string is generated by grouping nodes by direction index and polarity category and writing them according to the path encoding rules of fixed permutation. First, the nodes are grouped by direction index, and then each direction group is divided into subgroups by polarity category. Then, a fixed permutation table is applied to the node number sequence in each subgroup to obtain the writing order, and the node bits are written into the path bit string according to the writing order. The fixed permutation table is fixed during system deployment and the same fixed permutation table is used for all single-particle images. The path bit string is interpreted as a binary integer in the order it is written and the leaf node index L is output, where the first bit of the path bit string is the most significant bit and the last bit is the least significant bit; the leaf node index L and the invalidation flag are written to the leaf node index record and written to the leaf node index buffer according to the granular index, and the leaf node index set is output.

[0027] In this embodiment, generating the classification probability distribution includes: Read the leaf node index L corresponding to each particle image one by one from the leaf node index cache, and read the invalid node mask bound to the index to construct the leaf node index list and particle index mapping table. In the predefined set of classification targets in the system, three categories of judgment targets are set: impurity composition, particle size distribution and morphology category; for each target category, the corresponding posterior probability parameter table is loaded. The posterior probability parameter table uses the leaf node index L as the key and the frequency vector of each category of the corresponding target as the value. For each leaf node index L corresponding to a particle image, the corresponding frequency vector C is obtained by querying the three posterior probability parameter tables. i , where i1,2,3 correspond to three targets: impurity composition, particle size distribution, and morphology category, respectively; For each frequency vector C i Calculate the sum of its components S i When S i When the frequency is greater than 0, normalization is performed as follows: For each category frequency C in the frequency vector... i Calculate the posterior probability P of this category. i,j =c i,j / S i The results are used to construct the category probability distribution vector P of target i. i ; When the sum of the frequency vectors S i When =0, check if the number of valid bits in the invalid node mask corresponding to the particle image is less than a preset threshold. If so, then change the corresponding category probability distribution vector P. i Initialize as a vector of all zeros and mark it as invalid; The probability distribution vectors P1, P2, and P3 of the three types of targets are combined into a set of classification results according to the impurity composition, particle size distribution, and morphology category. The current particle index, leaf node index, and invalid flag are then added and written into the particle probability output table. The particle probability output table is sorted by particle index and written to the classification result cache. The output is a structured record set containing the classification probability distribution of each particle image under the three target classes.

[0028] In this embodiment, the generated recycled aggregate quality grade results include: Read the classification probability distribution records of all particle images in the target batch from the classification result cache area, and sort them in ascending order by particle index to build a list of particle probability records; Traverse the list of particle probability records, and sum the probability vectors of impurity composition, particle size distribution, and morphology category in each record according to their components to obtain three sets of sum vectors, which correspond to the three judgment dimensions of impurity, particle size, and morphology, respectively. Record the number N of particle images involved in the accumulation, and divide each sum vector by (N) according to its components to obtain the average probability vector of batch impurity composition, the average probability vector of particle size distribution and the average probability vector of morphology category respectively. The three average probability vectors are used as inputs in sequence, and the dot product operation is performed with the corresponding linear weight vectors respectively to obtain three normalized index values, which are denoted as batch impurity index value, particle size index value and morphology index value respectively. Construct a batch quality index ternary set (Q1, Q2, Q3), where Q1, Q2, and Q3 represent the index values ​​of impurities, particle size, and morphology, respectively. Call the quality level rule table, traverse the rules in the preset priority order of the level. Each rule contains three numerical ranges, which correspond to the value range of the indicators in the three dimensions respectively. Compare Q1, Q2, and Q3 sequentially with the three intervals of the current grade rule. If all three fall within the interval boundaries, then the grade number is taken as the quality grade of the current batch. Output the batch number of the image and the corresponding quality grade number, write them into the batch quality grade result table, and complete the process of generating the quality grade of recycled aggregate.

[0029] Example: To verify the feasibility and stability of this invention in a real recycled aggregate production line, it was applied to the online quality inspection station of a continuous production line for recycled aggregate from construction waste. This production line primarily processes a mixture of demolished concrete blocks, mortar blocks, and a small amount of brick slag. After passing through a jaw crusher and impact crusher, the aggregate enters a multi-stage screening and air-classification section for impurity removal. Then, a conveyor belt transports recycled aggregates of different particle sizes to the finished product bin. Common challenges in this type of scenario include the complex surface texture of the materials and the significant differences in particle morphology. Particles on the conveyor belt frequently obstruct, jump, and tumble. Dust concentration fluctuates with the crushing load. Lighting is affected by aging lamps and dust accumulation, leading to uneven illumination. In the wet state, the particle surface exhibits localized high-brightness reflections. Traditional methods typically rely on manual sampling or coarse-grained identification using global thresholds and simple edge operators. This is prone to boundary breaks, segmentation holes, false particles, and misjudgments of impurities under dust, shadow, and reflective conditions. Furthermore, this leads to inconsistent quality grade outputs for the same batch in different shifts and under different lighting conditions. Quality inspectors need to repeatedly verify the results, making it difficult to achieve stable online grading and closed-loop management.

[0030] In this embodiment, an industrial camera, lens, and coaxial / strip lighting combination light source are installed at the conveyor belt detection station. The camera trigger signal is synchronized with the conveyor belt operation signal, ensuring a stable correspondence between each image and the material's passing position. To reduce the impact of fixed-mode noise and uneven spatial illumination on visual judgment, the system acquires dark-field reference frames under shading conditions and flat-field reference frames on a uniformly reflective reference surface under the same imaging conditions. During operation, dark-field removal and flat-field correction are performed on the conveyor process image frames. After correction, the images are further grayscaled and cropped into effective grayscale frames according to pre-calibrated field-of-view boundaries. Then, a grayscale histogram is calculated, and the upper and lower bounds of the grayscale dynamic range are determined. Pixels below the lower bound and above the upper bound are truncated. The truncated grayscale dynamic range is then linearly mapped to a normalized grayscale range, forming a standardized image sequence. This compresses the grayscale scale differences of the same material under different lighting intensities and dust backgrounds to a controllable range, providing a consistent input basis for subsequent threshold mapping and stable classification paths.

[0031] In the particle extraction stage, the system generates gradient magnitude and gradient direction maps for each effective grayscale frame in the standardized image sequence. Candidate edge pixels after non-maximum suppression are used as boundary seed points for edge linking, forming a set of boundary segments. To avoid introducing numerous non-closed edges due to dust noise and background texture, the system calculates the closure distance between the first and last pixels and the consistency of the segment direction for each boundary segment, filtering out segments that do not meet the closure criteria to obtain a candidate set of closed boundaries. Closed boundaries are filled with scan lines to generate a region mask and then hole-filled. Connectivity component labeling is performed, and small regions are deleted based on area thresholds to obtain a set of particle regions. For each particle region, the system crops a particle sub-image from the effective grayscale frame using a bounding rectangle. Simultaneously, a closed region mask is used to constrain the particle sub-image, and boundary closure and mask connectivity checks are performed. Samples that fail the check are discarded, while samples that pass the check are written into the particle index table with frame number and region number, and the particle image set is output. Through this closed-boundary screening + mask verification process, this embodiment effectively solves the problem of unstable segmentation caused by pseudo-particles and broken boundaries in traditional schemes under dust, reflection and occlusion conditions, making the quality of particle samples entering the classification stage more controllable.

[0032] In the feature construction and discrimination stage, this invention does not directly judge based on absolute grayscale or a single gradient threshold. Instead, it calculates the horizontal and vertical gradients on pixels within the mask of a single particle image and generates direction angle parameters, then maps the direction angles to direction indices. Based on each pixel and its direction index, the system constructs discrete sampling sequences along that direction and its opposite direction, searching for sampling points within the mask from near to far. The first sampling point within the mask is used as the positive and negative reference points, and its corresponding grayscale is read to construct a neighborhood baseline grayscale and form a direction difference. The relative brightness difference excitation value is calculated based on Weber's law, and a polarity label is generated from the positive and negative of the direction difference. The excitation value, direction index, and polarity label are written together into the excitation storage structure to form a set of difference excitation maps. The key to this processing is converting the absolute grayscale, which is significantly affected by illumination and dust, into a relative difference related to the neighborhood baseline, thereby improving the discernibility of particle boundaries and internal structural details under uneven illumination, local shadows, and local bright reflections.

[0033] In the threshold construction stage, the system statistically analyzes the distribution of excitation values ​​in the differential excitation map. First, it divides the map into directional excitation subsets based on direction indices. Then, based on polarity labels, each directional subset is further divided into positive and negative excitation sets. Each set is sorted, and quantile points are located according to a preset quantile ratio, extracting and forming an excitation threshold table under a three-dimensional index of direction and polarity quantile numbers. Simultaneously, the system locates the quantile interval for each differential excitation record and forms a mapping index, enabling subsequent binary judgments to use matching threshold boundaries based on direction and polarity. In this embodiment, this mechanism addresses the practical problem that traditional fixed thresholds are prone to mismatch under different texture directions and different positive and negative differential distributions, leading to threshold drift and instability in judgments.

[0034] In the random fern classification stage, the system establishes a random fern node template table. This template table is generated by a pseudo-random sequence driven by a fixed seed and is fixed during deployment, remaining unchanged throughout runtime. For single-particle images, a list of selectable center pixels is created within the mask. Center pixels are selected for each node according to the node template table order, and a direction index is determined. Forward and reverse reference points are determined on discrete sampling sequences in opposite directions. When no sampling point is found within the mask in a certain direction, the system backtracks and searches again until a point is found or the node is marked as invalid, avoiding path drift caused by unusable reference points due to occlusion or missing boundaries. For valid nodes, the system reads the excitation value and polarity label of the reference pixel and constructs a node comparison quantity. Then, according to the quantile number selection rules given in the template table, the system determines the threshold boundary in the excitation threshold table and generates node bits. All node bits are grouped by direction index and polarity category, and the encoding rules for fixed permutations form a path bit string, which is then interpreted as a leaf node index. In this embodiment, this process addresses the practical problem that traditional random test paths suffer from unstable indexes under complex conditions, and the dispersion of similar sample paths leads to posterior probability matching deviations, causing batch-level fluctuations.

[0035] In the output phase, the system uses leaf node indices to query frequency vectors in the three posterior probability parameter tables for impurity composition, particle size distribution, and morphology category, and normalizes them into probability distributions. When the sum of the frequency vectors is zero and the number of valid nodes is insufficient, the result for that particle is marked as invalid and initialized to an all-zero vector to avoid contamination of batch statistics by extremely invalid samples. Subsequently, the three probability distributions of all particles in the same batch are summed and averaged to obtain the batch's average probability vectors for impurity composition, particle size distribution, and morphology category. These are then multiplied by the linear weight vectors to obtain three normalized index values, constructing quality index triplets. The quality grade results are then matched according to the quality grade rule table to output stable online and batch-level grading.

[0036] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A visual inspection method for the quality of recycled aggregates from construction waste, characterized in that, Includes the following steps: Image frames of recycled aggregate from construction waste during the transportation process are acquired, and grayscale normalization is performed on the image frames to obtain a standardized image sequence. Boundary detection and region segmentation are performed on the standardized image sequence to extract aggregate particle regions with closed boundaries and construct a particle image set; Based on Weber's law, the relative brightness difference excitation value is calculated for the gray level of each pixel and its neighborhood reference gray level in the particle image set, and a difference excitation map is generated by combining the direction angle parameter. The distribution of excitation values ​​in the differential excitation diagram is statistically analyzed, and an excitation threshold mapping table corresponding one-to-one with the differential excitation values ​​is generated based on the quantiles. Based on the differential excitation map and the excitation threshold mapping table, a binary test path for a random fern structure is constructed on each particle image, and a leaf node index is generated. By matching the corresponding posterior probabilities with the leaf node index, the classification probability distribution of each particle image in terms of impurity composition, particle size distribution and morphology category can be obtained. The classification probability distributions of all particle images are aggregated to generate the quality grade result of recycled aggregate corresponding to the batch of images.

2. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, Generating a normalized image sequence includes: At the conveyor belt inspection station, the camera, lens, and light source are installed and positioned, the synchronization relationship between the camera trigger signal and the conveyor belt running signal is established, and the exposure, gain, and white balance are locked as a fixed set of parameters. Dark field reference frames and flat field reference frames were acquired. The dark field reference frames were acquired under shading conditions, while the flat field reference frames were acquired under the same imaging conditions using a uniform reflective reference surface. Image frames are continuously acquired and transported. Dark field removal and flat field correction are performed on each image frame. Dark field removal and flat field correction use dark field reference frames to eliminate fixed pattern noise and flat field reference frames to compensate for spatial illuminance unevenness, thus obtaining corrected image frames. The corrected image frame is converted to grayscale to obtain a grayscale image frame, and the grayscale image frame is cropped based on the pre-calibrated field of view boundary to obtain an effective grayscale frame. Calculate the grayscale histogram for the effective grayscale frame, determine the lower and upper bounds of the grayscale dynamic range, and perform lower bound truncation on the grayscale of pixels below the lower bound and upper bound truncation on the grayscale of pixels above the upper bound to obtain the truncated grayscale frame. Perform linear normalization mapping on the truncated grayscale frame to map the grayscale dynamic range of the truncated grayscale frame to the normalized grayscale range, and obtain the normalized grayscale frame. Normalized grayscale frames are written to the sequence buffer in the order of acquisition, and a frame number and timestamp are written for each frame to output a normalized image sequence.

3. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, Constructing a collection of particle images includes: For each effective grayscale frame in the standardized image sequence, a gradient magnitude map and a gradient direction map are generated, and the candidate edge pixels after non-maximum suppression in the gradient magnitude map are used as the set of boundary seed points. Edge linking is performed on the set of boundary seed points to form a set of boundary chain segments. The closure distance between the first and last pixels of each boundary chain segment is calculated and the chain segment direction is consistent. Boundary chain segments that do not meet the closure judgment conditions are filtered out to obtain a set of candidate closed boundaries. Perform scanline filling on each closed boundary in the candidate set of closed boundaries to generate the corresponding closed region mask, and perform hole filling on the closed region mask to obtain the closed region pixel set; Based on the closed region mask, the mask structure corresponding to each closed region is defined as a particle mask, and the connected component labeling operation is performed on the particle mask to generate a set of particle regions, and the particle mask corresponding to each particle region is recorded. Based on the bounding rectangle corresponding to each particle region, an image patch of the particle region is extracted from the effective grayscale frame as a particle sub-image, and a particle mask is used to constrain the particle sub-image to generate a single particle image. Perform a boundary integrity check on each single particle image. The boundary integrity check includes boundary closure determination and particle mask connectivity determination. Delete single particle images and corresponding particle masks that fail the check. Write the approved single-particle images and corresponding particle masks into the particle index table, and associate the single-particle images and particle mask data with the particle index table to output a set of particle images.

4. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, Generating the differential activation map includes: Read individual particle images and their corresponding particle masks sequentially from the particle image set, establish a set of pixel coordinates inside the mask, and mark pixels outside the mask as invalid pixels; Calculate the horizontal gradient g of the pixels within the mask on a single-particle image. x With vertical gradient g y And according to (P)=atan2(g y ,g x Generate orientation angle parameters for each pixel P; Establish a set of directions and angles Map the orientation angle parameter (P) of each pixel to an orientation index k(P), where the orientation index k(P) satisfies The angle difference between the k-th (P) direction angle and (P) is the smallest. For each pixel P within the mask and its orientation index k(P), along Construct a forward discrete sampling sequence from the k(P)th direction angle. And construct a reverse discrete sampling sequence along the opposite direction angle. Both discrete sampling sequences are generated starting from pixel P with progressively increasing coordinate offsets; In the forward discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask, and the first sampling point located within the mask is determined as the positive reference point q. + (P), and read the forward reference grayscale I. + (p)=I(q + (p)); In the reverse discrete sampling sequence The sampling points are checked sequentially from near to far to see if they are located within the mask. The first sampling point located within the mask is determined as the reverse reference point q. - (P), and read the reverse reference grayscale I. - (p)=I(q - (p)); Construct a neighborhood reference grayscale I using the forward reference grayscale and the reverse reference grayscale. ref (p), neighborhood reference grayscale according to Determined, and with I + (p)-I - (p) Construct directional difference I(p) = I + (p)-I - (p); Based on Weber's law, the relative luminance difference excitation value is calculated for pixel P, and the relative luminance difference excitation value is defined as... ; And a polarity label b(P) is generated from I(p), and the polarity label satisfies the following conditions: b(P)=1 when I(p) < 0 and b(P)=0 when I(p) < 0. The excitation value E(P), orientation index K(P), and polarity mark b(P) of pixel p are written into the excitation storage structure indexed by pixel coordinates to form a differential excitation record consisting of excitation amplitude, orientation index, and polarity mark. The differential excitation record generation process is repeated for all pixels within the mask. All differential excitation records are arranged according to pixel coordinates to generate differential excitation maps for single-particle images. The differential excitation maps of each single-particle image are written into the differential excitation buffer according to the particle index, and the differential excitation map is output.

5. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, The generation of the excitation threshold mapping table includes: Read the differential excitation map of each single particle image sequentially from the differential excitation map, extract the excitation amplitude, orientation index and polarity mark of all pixels, ignore pixels outside the mask and invalid values, and generate an excitation record list. The list of excitation records is divided according to the direction index. Excitation records with the same direction index are grouped into a directional excitation subset to construct a complete set of directional excitation groups. In each directional excitation subset, the excitation values ​​are divided into a positive excitation set and a negative excitation set according to the polarity label; For each positive and negative stimulus set, the stimulus values ​​are sorted to obtain an ordered stimulus sequence arranged from smallest to largest. Based on a preset set of quantile proportions, the position index of each quantile in the sequence is located in order. Extract the excitation value from the ordered excitation sequence in each direction according to the positioning result, use the excitation value as the quantile excitation threshold in that direction, and record the quadruple of direction index, polarity category, quantile number and excitation value; All quadruples are organized according to direction index and polarity to form an excitation threshold table under the three-dimensional index of direction polarity quantile number, and stored in a structured data table structure. For each subsequent differential excitation record, a mapping path is constructed. Based on the direction index, polarity label and excitation value of the record, the quantile interval of the excitation value is located in the excitation threshold table, and its corresponding segment number is recorded to form an excitation threshold mapping table.

6. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, The steps for generating leaf node indexes include: Read the differential excitation record corresponding to the single particle image from the differential excitation map set. The differential excitation record contains at least pixel coordinates, excitation value E(P), orientation index K(P) and polarity label b(P). Read the quantile threshold sequence indexed by orientation index and polarity category from the excitation threshold mapping table. A random fern node template table is established, which consists of node numbers and node parameters. The node parameters include the center pixel selection rule, direction index selection rule, quantile number selection rule, reference point generation rule, and bit writing position. The node template table is generated by a pseudo-random sequence driven by a fixed seed. The fixed seed is fixed during system deployment, and the node template table remains unchanged during runtime. A list of optional center pixels is established for the pixels within the mask of a single particle image, and a center pixel P is selected for each node according to the node number order in the node template table. The selection of center pixels is completed by indexing the values ​​in the list of optional center pixels, where the index is given by the node template table. For each node, the direction index k is determined according to the direction index selection rules given in the node template table, and two discrete sampling sequences in opposite directions are constructed on the single particle image using the direction index k, which are used to determine the forward reference point and the reverse reference point respectively. The effectiveness within the mask is detected point by point from the center pixel outwards in the forward discrete sampling sequence, and the first sampling point located within the mask is determined as the forward reference point q. + The reverse reference point q is determined in the same way on the reverse discrete sampling sequence. - ; If no sampling point is found within the mask in a certain direction, backtrack and search again according to the sampling sequence until a sampling point is found within the mask or the node is marked as an invalid node. For valid nodes, q is read from the differential excitation record respectively. + With q - The incentive value E(q) + ), E(q) - ) and polarity marker b(q) + b(q) - ), and execute the first build process: with (q + ,q - As the symmetric reference pixel pair for this node, construct the node comparison quantity D. The node comparison quantity is determined by the absolute value of the difference between the excitation values ​​of the two reference pixels, denoted as D = |E(q)|. + )-E(q - )|; Based on the quantile number selection rules given in the node template table, the threshold boundary is determined in the excitation threshold mapping table using the direction index K and the polarity category. The polarity category is determined by b(q). + ) and b(q) - The consistency determination is obtained, where the consistency polarity is taken when consistent and the polarity specified by the node template table is taken when inconsistent; the threshold boundary is taken as the upper bound of the interval formed by the threshold of the corresponding quantile number and the threshold of its adjacent quantile numbers; The node comparison value D is compared with the threshold boundary to generate the node bit. When D is greater than the threshold boundary, bit 1 is output, otherwise bit 0 is output. When a node is marked as an invalid node, bit 0 is output and the invalid mark is recorded. The second construction process is performed on all node bits obtained from all nodes: a path bit string is generated by grouping nodes by direction index and polarity category and writing them according to the path encoding rules of fixed permutation. First, the nodes are grouped by direction index, and then each direction group is divided into subgroups by polarity category. Then, a fixed permutation table is applied to the node number sequence in each subgroup to obtain the writing order, and the node bits are written into the path bit string according to the writing order. The fixed permutation table is fixed during system deployment and the same fixed permutation table is used for all single-particle images. The path bit string is interpreted as a binary integer in the order it is written and the leaf node index is output, where the first bit of the path bit string is the most significant bit and the last bit is the least significant bit. Write the leaf node index L and the invalid flag into the leaf node index record, and write them into the leaf node index cache according to the granular index, and output the leaf node index set.

7. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, The generated classification probability distribution includes: Read the leaf node index L corresponding to each particle image one by one from the leaf node index cache, and read the invalid node mask bound to the index to construct the leaf node index list and particle index mapping table. In the predefined set of classification targets in the system, three categories of judgment targets are set: impurity composition, particle size distribution and morphology category; for each target category, the corresponding posterior probability parameter table is loaded. The posterior probability parameter table uses the leaf node index L as the key and the frequency vector of each category of the corresponding target as the value. For each leaf node index L corresponding to a particle image, the corresponding frequency vector C is obtained by querying the three posterior probability parameter tables. i , where i1,2,3 correspond to three targets: impurity composition, particle size distribution, and morphology category, respectively; For each frequency vector C i Calculate the sum of its components S i When S i When the frequency is greater than 0, normalization is performed as follows: For each category frequency C in the frequency vector... i Calculate the posterior probability P of this category. i,j =c i,j / S i The results are used to construct the category probability distribution vector P of target i. i ; When the sum of the frequency vectors S i When =0, check if the number of valid bits in the invalid node mask corresponding to the particle image is less than a preset threshold. If so, then change the corresponding category probability distribution vector P. i Initialize as a vector of all zeros and mark it as invalid; The probability distribution vectors P1, P2, and P3 of the three types of targets are combined into a set of classification results according to the impurity composition, particle size distribution, and morphology category. The current particle index, leaf node index, and invalid flag are then added and written into the particle probability output table. The particle probability output table is sorted by particle index and written to the classification result cache. The output is a structured record set containing the classification probability distribution of each particle image under the three target classes.

8. The visual inspection method for the quality of recycled aggregates from construction waste according to claim 1, characterized in that, The generated recycled aggregate quality grade results include: Read the classification probability distribution records of all particle images in the target batch from the classification result cache area, and sort them in ascending order by particle index to build a list of particle probability records; Traverse the list of particle probability records, and sum the probability vectors of impurity composition, particle size distribution, and morphology category in each record according to their components to obtain three sets of sum vectors, which correspond to the three judgment dimensions of impurity, particle size, and morphology, respectively. Record the number N of particle images involved in the accumulation, and divide each sum vector by N according to its components to obtain the average probability vector of batch impurity composition, the average probability vector of particle size distribution, and the average probability vector of morphology category, respectively. The three average probability vectors are used as inputs in sequence, and the dot product operation is performed with the corresponding linear weight vectors respectively to obtain three normalized index values, which are denoted as batch impurity index value, particle size index value and morphology index value respectively. Construct a batch quality index ternary set (Q1, Q2, Q3), where Q1, Q2, and Q3 represent the index values ​​of impurities, particle size, and morphology, respectively. Call the quality level rule table, traverse the rules in the preset priority order of the level. Each rule contains three numerical ranges, which correspond to the value range of the indicators in the three dimensions respectively. Compare Q1, Q2, and Q3 sequentially with the three intervals of the current grade rule. If all three fall within the interval boundaries, then the grade number is taken as the quality grade of the current batch. Output the batch number of the image and the corresponding quality grade number, write them into the batch quality grade result table, and complete the process of generating the quality grade of recycled aggregate.