Multi-view three-dimensional reconstruction driven on-line measurement method for body size of cattle

By utilizing a sliding window factor map and constraints such as ground and guardrails in a multi-camera system in a livestock farm, robust body size measurement was achieved under conditions of discontinuous visibility and variable structure. This solved the problem of inconsistent measurement coordinates in the long-term operation of the multi-camera system, and improved the accuracy and reliability of the measurement.

CN121685612BActive Publication Date: 2026-04-21YUNNAN ACAD OF GRASSLAND ANIMAL SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YUNNAN ACAD OF GRASSLAND ANIMAL SCI
Filing Date
2026-02-10
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In the passageway environment of livestock farms, the external parameters and overall scale of multi-camera systems drift slowly and continuously during long-term operation, making it difficult for the three-dimensional data from different cameras and at different times to maintain a consistent measurement coordinate, thus affecting the accuracy of body size measurement.

Method used

By jointly solving the extrinsic rotation matrix, extrinsic translation vector, and global scale in a sliding window factor graph, and outputting the uncertainty matrix, combined with constraints such as the ground reference plane, piecewise elevation function, and guardrail baseline, hierarchical self-recovery and weighted splicing are performed to generate robust volumetric results, which are suitable for scenarios with discontinuous visibility and variable structures.

Benefits of technology

Maintaining measurement consistency and outputting auditable body size results without interrupting cattle passage reduces systematic errors and fluctuations at the centimeter level, thereby improving the accuracy and reliability of measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685612B_ABST
    Figure CN121685612B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-view 3D reconstruction-driven online measurement method for cattle body size, relating to the field of livestock 3D measurement technology. It extracts the ground reference plane, segmented elevation function, guardrail baseline, segmented guardrail spacing, periodic pitch, and hoof contact events, and generates a calibration opportunity score by combining a pixel-level quality weight map. In a sliding window factor map, the extrinsic parameter rotation matrix, extrinsic parameter translation vector, and global scale are jointly solved under the aforementioned prior constraints, and an uncertainty matrix is ​​output. A graded self-recovery is implemented based on the comprehensive health score, employing double-buffered atomic replacement for secure writing. Weighted stitching and robust profile measurement are performed under a unified metric coordinate system, propagating the uncertainty forward to the body size layer and supporting multiple passage convergences for individuals. It is applicable to scenarios with discontinuous channel visibility and variable structures, maintaining measurement consistency and outputting auditable results without interrupting release conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of livestock three-dimensional measurement technology, specifically to a method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction. Background Technology

[0002] Livestock farm production channels typically consist of entrances and exits, adjustable-width guardrails, slatted or rubber-paved floors, overhead and side lighting, sprinklers, and ventilation systems. Cattle pass through in a continuous procession, and managers aim to obtain body size parameters such as height, length, chest circumference, and hip width online without interrupting operations.

[0003] Current online measurement methods typically employ multiple cameras or depth sensors for simultaneous data acquisition, followed by 3D reconstruction and point cloud stitching. Profiles or key points are then extracted from the reconstructed model to calculate body size. These systems generally rely on a one-time calibration during installation, assuming that camera external parameters and site dimensions remain constant during operation. However, the passageway is subjected to livestock collisions, ground vibrations, and temperature changes over extended periods, causing slow attitude drift in the supports and cameras. During peak periods, to increase throughput, the width of guardrails is often temporarily adjusted or barriers are removed or installed, altering relative geometric relationships. Slotted ground surfaces are easily covered by manure or have their local height altered by rubber mats or accumulated water, making the ground no longer approximately flat. Cattle bodies obstruct the view, significantly reducing visibility of the ground and guardrails, and limiting the overlap of the camera's field of view. Time-of-flight depth measurements are susceptible to distance deviations and holes due to reflective hair, strong backlighting, moisture, and dust.

[0004] These factors combine during daily operation, causing 3D data from different cameras and at different times to fall into inconsistent measurement coordinate systems. This results in small but continuous shifts in overall scale and camera attitude, which accumulate over time. Because it is difficult to place targets or perform line-of-sight calibration during peak periods, traditional calibration strategies based on fixed targets or the assumption of a complete ground surface are difficult to maintain in the long term in a confined space environment. Furthermore, registration relying solely on adjacent viewpoints is susceptible to instability due to non-rigid deformation caused by animal movement, viewpoint occlusion, and depth noise. This makes it difficult to suppress scale and attitude drift across devices and across days, ultimately leading to systematic errors and fluctuations in body size at the centimeter level. This, in turn, triggers a chain reaction of consequences such as repeated testing, distorted threshold settings, and biases in feeding and breeding decisions.

[0005] Therefore, the current technical problem is that in passage environments with discontinuous visibility, variable geometric relationships, non-ideal ground, and continuous animal movement, the external parameters and overall scale of multi-camera systems drift slowly and continuously during long-term operation, making it difficult to maintain uniform metric coordinate consistency for 3D data from different cameras and at different times. Summary of the Invention

[0006] (a) Technical problems to be solved

[0007] To address the shortcomings of existing technologies, this invention provides a multi-view 3D reconstruction-driven online bovine body size measurement method. This method involves jointly solving the extrinsic rotation matrix, extrinsic translation vector, and global scale using the aforementioned priors as constraints in a sliding window factor graph, and outputting an uncertainty matrix. It implements graded self-recovery based on comprehensive health and the aforementioned score, employing double-buffered atomic replacement for secure writing. Weighted splicing and robust profile measurement are performed under a unified metric coordinate system, propagating the uncertainty forward to the body size layer and supporting multiple cross-count convergences for individuals. This method is suitable for scenarios with discontinuous channel visibility and variable structures, maintaining metric consistency and outputting auditable results without interrupting passage. It solves the technical problems described in the background art.

[0008] (II) Technical Solution

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

[0010] A multi-view 3D reconstruction-driven online measurement method for cattle body size includes acquiring depth and images from multiple cameras, extracting ground reference plane and segmented elevation functions, guardrail reference line and segmented guardrail spacing, periodic pitch and hoof contact events, generating a pixel-level quality weight map, and calculating calibration opportunity scores for triggering.

[0011] Within the sliding window, constrained by the ground reference plane, piecewise elevation function, piecewise guardrail spacing, periodic pitch and hoof contact event, the rotation matrix, translation vector and global scale of each camera's extrinsic parameters are jointly solved, and the uncertainty matrix and residuals are output.

[0012] Based on the comprehensive health status composed of the uncertainty matrix and residuals, a graded self-recovery is implemented by combining the calibration opportunity score; when the preset is met, the external parameters, global scale and piecewise elevation function are replaced with double-buffered atoms; otherwise, the writing is frozen and candidate parameters are recorded.

[0013] Under a unified metric coordinate system, multi-view weighted stitching is performed based on pixel-level quality weight map and uncertainty matrix to generate point cloud; robust profile measurement is performed at key locations to obtain volume scale results, and the uncertainty matrix is ​​forwarded to the volume scale layer for gating and annotation.

[0014] Furthermore, segmented elevation curves and segmented guardrail spacing are established along the traffic direction: guardrail posts or connectors are used as segment boundaries, and robust statistical values ​​of nearby point clouds are taken within the segment to form elevations. The lateral distance between the guardrail baselines on both sides of the segment centerline forms the spacing, and the segment width is defined by a fixed step size or structural component spacing. The segment value time series is saved, and outlier points are removed when the segment value is sampled using outlier suppression rules.

[0015] Furthermore, the periodic pitch is extracted in the slotted ground or column region through directional filtering and one-dimensional spectrum; the hoof contact event is generated by the joint determination of the vertical displacement change of the near-zone point and the distance to the ground reference plane.

[0016] The pixel-level quality weight map is obtained by mapping reflection intensity, phase position confidence, and incident angle, and is used as a strong scale constraint, a temporal anchor point, and a source of pixel confidence when generating calibration opportunity scores.

[0017] Furthermore, the calibration opportunity score is aggregated from five factors: ground visibility, guardrail consistency, period confidence, depth quality, and hoof contact event density, according to configured weights. When the score reaches a preset threshold, subsequent steps are triggered; otherwise, only priors and observations are cached, and external participants are not updated at the global scale. Ground visibility is based on the proportion of available pixels in the near zone, guardrail consistency is based on the segment spacing deviation, and period confidence is based on the proportion of dominant frequency energy and directional consistency.

[0018] Furthermore, the view registration uses point-to-area distance residuals, and the factor map introduces pixel-level weights and factor-level weights for each residual. The factor-level weights are obtained by mapping ground visibility, periodic confidence and event density.

[0019] The constraint set includes at least the ground and segment elevations, guardrails and segment spacings, periodic pitches and hoof contact events, and is uniformly linearized and written back within a sliding window, so that the external parameters, global scale and segment elevations are jointly updated, generating an uncertainty matrix for subsequent steps.

[0020] Furthermore, the overall health score is obtained by weighted superposition of ground normal angle difference, segmented guardrail spacing residual, period and scale consistency residual, registration residual and segmented elevation drift.

[0021] The system distinguishes between occasional and persistent out-of-bounds events by counting consecutive out-of-bounds events, triggering either Level 1 fine-tuning, Level 2 re-evaluation, or Level 3 mutual verification respectively. Level 1 fine-tuning extends the sliding window and increases iterations, Level 2 re-evaluation freezes the write and reconstructs the prior, and Level 3 mutual verification introduces a target verification scale for a short period of time.

[0022] Furthermore, safe injection includes: performing first-order smoothing on candidate extrinsic parameters, global scale, and segmented elevation at the minimum state vector layer; and replacing runtime parameters in one go using a double-buffered approach.

[0023] Before writing, calculate the uniform cost difference and combine it with the calibration opportunity score to determine whether to write; when the cost does not decrease or the score is insufficient, keep the old parameters and record the reason for the rollback; when there is a long-term consistency contradiction between structural evidence, pause the injection and switch to mutual verification; after the verification is completed, restore the target-free closed loop.

[0024] Furthermore, weighted stitching uses pixel-level quality weights and observation covariance to determine the weights of observations from each perspective, and merges them into a unified point set; robust profile measurement generates candidate profile sets at locations such as the intercostal space, lumbar region, and hip point, suppresses outlier residuals with saturation loss, selects the optimal profile, and calculates body size parameters.

[0025] The starting position and normal of the candidate profile are determined by prior key points and local directions. The geometric parameters within the profile are solved by iterative weighting and the profile residuals are output for gating reference.

[0026] Furthermore, uncertainty forward propagation includes: based on the sensitivity of the volume scale to the coordinates of the fusion point and the minimum state vector of step two, combining the point-level covariance and parameter uncertainty to form the volume scale confidence interval and gating quantity;

[0027] When the gate is below the threshold, a supplementary sampling or delay is triggered, and the volumetric results enter the manual review queue; the point-level covariance is synthesized by the viewpoint observation covariance and pixel-level quality weight in the weighted stitching stage, and the parameter uncertainty is obtained by selecting sub-blocks from the uncertainty matrix in step two.

[0028] Furthermore, the temporal convergence is based on identity consistency. Multiple body size results of the same identity are extracted from a set time window. The results are weighted and fused using validity scores and gating values. When the latest result conflicts with the historical interval, confirmation is delayed. All participation times, weights, and gating statuses are written to the audit log for traceability. Identity is output by re-identification and multi-target tracking. Conflict resolution is executed in order of weight and interval overlap, and the resolved samples are marked as low-confidence sources for subsequent screening.

[0029] (III) Beneficial Effects

[0030] This invention provides a method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction, which has the following beneficial effects:

[0031] Based on the ground reference plane, segmented elevation function, guardrail baseline, segmented guardrail spacing, periodic pitch, hoof contact event, and pixel-level quality weight map, a calibration opportunity score is constructed. This score accurately determines whether to proceed with processing when visibility is discontinuous or structural changes occur, avoiding erroneous triggering due to insufficient evidence and ensuring that subsequent actions are carried out based on reliable priors.

[0032] The priors are loaded into the online joint calibration of the sliding window factor graph, and the extrinsic parameter rotation matrix, extrinsic parameter translation vector, global scale and segmented elevation function are jointly solved; the periodic pitch and segmented guardrail spacing form scale and lateral structural constraints, and the hoof-touch event provides time-series anchor points, so that the multi-view data maintains the same metric coordinates during operation.

[0033] The overall health is determined by the uncertainty matrix and residuals, and is linked with the calibration opportunity score to implement graded self-recovery. The timing and scope of writing are controlled by double-buffered atomic replacement and rollback mechanisms, and structural evidence conflicts are handled by mutual verification. This makes the update process of external participants at the global scale controllable and traceable, and prevents the spread of erroneous repairs within the system.

[0034] Under a unified metric coordinate system, pixel-level quality weight maps and observation covariance are weighted and stitched together to obtain a geometrically continuous fused point cloud. Candidate profiles are generated at locations such as the intercostal space, lumbar region, and hip point, and robust profile measurements are performed. At the same time, the uncertainty matrix is ​​forwarded to the volume scale layer to form confidence intervals and validity scores for acceptance and screening decisions. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the process of the online measurement method for bovine body size driven by multi-view three-dimensional reconstruction according to the present invention. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] Please see Figure 1 This invention provides a method for online measurement of bovine body size driven by multi-view 3D reconstruction, including:

[0038] Step 1: In the channel, joint calibration is triggered only when the observation conditions are ripe. Before triggering, the metric priors and quality weights are prepared, and the threshold is determined by the calibration opportunity score, so as to avoid noise-driven miscalibration.

[0039] Factors contributing to this include: uneven terrain, segmented widening of guardrails, regular textures in the slit ground or column arrays, cattle occlusion, and fluctuations in depth imaging quality. Calibration performed when geometric evidence is scarce or observational quality is low can easily solidify instantaneous biases into long-term drift; however, if calibration is triggered during periods of geometric exposure and reliable quality, robust and auditable metric consistency can be achieved. Therefore, it is necessary to first complete geometry-metric extraction and observation-quality estimation, and then use a calibration opportunity score to determine whether to proceed with joint calibration.

[0040] The ground surface of the passageway serves both a load-bearing and reference function. It requires a stable overall normal and intercept to define world coordinates, as well as a segmented elevation curve along the direction of passage to describe local undulations. Only by simultaneously describing both overall directional stability and local elevation fluctuations can measurement consistency be maintained even when cattle obstruct the view and manure accumulates.

[0041] Within the candidate set comprised of near-zone areas, ground reference parameters are obtained using a weighted absolute deviation with pixel-level quality weights. The specific cost is...

[0042] In the formula: weighted cost function : Scalar, measures the weighted accumulation of ground fitting residuals, used as the basis for determining the ground reference normal and intercept; pixel index : Ordered pairs of integers representing image coordinates, within the effective imaging area; candidate set : A set consisting of pixel positions obtained from the initial screening of the nearby area;

[0043] Pixel-level quality weights : real numbers, intervals The coordinates are obtained by a monotonic mapping or table lookup of the reflection intensity, phase position information, and incident angle, and are used to suppress poor-quality observations; point cloud coordinates : A three-dimensional vector, representing the coordinates of a point in space obtained through depth projection; ground reference normal vector. : A three-dimensional unit vector representing the normal direction of the ground reference plane; intercept : A real number representing the translation of the ground reference plane in world coordinates;

[0044] Logarithmic probability mapping is used to combine reflection intensity, phase position information, and incident angle:

[0045] In the formula: For the Sigmoid function; compressed to ; Pixel-level quality weights, range It participates in registration and energy weighting; Reflection intensity (linearly normalized), range ; For phase position confidence (either native to the device or mapped from phase residuals), the range is... ; The angle between the incident light ray and the surface normal, ranging from... ; These are configurable coefficients, with a limited range of real numbers, and can be used for offline calibration files or limited on-site calibration.

[0046] Furthermore, using the direction of travel as the independent variable, the near-zone is projected onto the channel axis, divided into fixed-length segments, and the representative ground height value of each segment is calculated to form segment elevation curves. Spline interpolation is used within segments to maintain continuity, while height jumps are allowed between segments to truly reflect the elevation changes caused by scraper marks and accumulation.

[0047] Pixel-level quality weights significantly reduce the impact of low-confidence regions on the ground baseline, thereby obtaining stable normals and intercepts. Segmented elevation curves separate local undulations from the overall normal, making the overall normal stable and local undulations explicit, providing direct quantitative basis for subsequent segmented constraints and health assessments.

[0048] Furthermore, while guardrails provide strong lateral constraints, segmented width adjustments can result in different nominal spacings across different sections. Using only the global parallel assumption would misjudge segmented width adjustments as abnormal. It is necessary to simultaneously express parallelism and constant segmented spacing, while mitigating short-term occlusion or external interference at the cost of saturation.

[0049] In the captured lateral point cloud, the projection density is accumulated along the guardrail direction to robustly estimate the three-dimensional principal directions and passing points of the left and right guardrail baselines, forming the guardrail baselines. Furthermore, the lateral distance between the two guardrail baselines is calculated in segments, and a saturated consistency cost is used to suppress local anomalies.

[0050] Consistency cost in the formula : Scalar, measuring the consistency between the measured spacing of each segment and the nominal spacing; the smaller the value, the more consistent the spacing. Segment number : Positive integer, range to The same segmentation is used as the segmented elevation curve; the measured spacing... : Real number, the first Lateral distance measurement of left and right guardrails; nominal spacing : Real number, the first The set interval of the segments can be derived from the device settings or field records; balance coefficient Positive number, controlling the saturation velocity with large deviations, determined based on the guardrail material and installation rigidity;

[0051] In use, the parallel but segmented widening structure is expressed through the segmented spacing. The saturation cost weakens the influence of local occlusion and foreign objects while retaining the sensitivity to systematic widening, providing a stable input to subsequent segmented constraints and calibration opportunity scoring.

[0052] As an example, in the milk collection station's return flow channel, after the staff activates the data acquisition system, depth cameras on the top and sides simultaneously capture the flow. The system forms a candidate set in the near-surface area, and scraper marks and localized accumulations can be seen in the visual images. The ground reference plane and segmented elevation curves are calculated and displayed on the interface, with height transitions occurring near the entrance gate.

[0053] Subsequently, the baseline lines for the left and right guardrails are marked, and the interface indicates that the guardrail spacing in the third segment is consistent with the set level. The fourth segment displays the new spacing value due to a temporary widening. At this point, the system only generates and saves the aforementioned geometric and metric priors, without writing any external parameters, awaiting the triggering and adjudication of the next step.

[0054] The striped ground and column array contain stable periodic information. Especially when the ground visibility is insufficient, the periodic texture often appears before the complete plane and can be used as an independent reference for scale and direction. However, if the stripe direction deviates from the channel axis, the confidence level should be reduced to prevent interference from speckles and tilt.

[0055] Specifically, directional filtering is performed along the channel axis to extract a one-dimensional intensity sequence and calculate the spectrum; the confidence level of the periodic grid is formed by combining the proportion of the dominant frequency energy and the directional consistency.

[0056] In the formula: periodic grid confidence level : real numbers, intervals , indicating the credibility of periodic evidence; spectral energy : A non-negative real-valued function, whose frequency is represented by the square of the discrete Fourier transform amplitude. Energy;

[0057] clock speed Real numbers, within the analysis frequency band The frequency at which the maximum value is obtained; frequency set : Set, representing the discrete set of frequencies involved in the analysis; directional deviation : Real number, representing the angle between the fringe direction and the channel axis; attenuation coefficient Positive number, controls the confidence decay rate when directions are inconsistent;

[0058] In the channel axis (denoted as) Intra-intensity sequence Sampling interval Length window First, perform anisotropic smoothing along the axial direction (for the transverse direction). Using Gaussian kernels (Suppress interference), then calculate the discrete Fourier transform and obtain the spectral energy:

[0059] ; main frequency Take The largest corresponding Pitch .

[0060] When used, periodic evidence can still provide a stable scale reference when the ground is obscured; when the fringe direction deviates, the confidence level decays exponentially, avoiding misjudging speckles or tilted structures as valid references, thus implementing the mechanism of being usable when there is texture and de-weighted when the direction is incorrect.

[0061] Furthermore, the triggering decision must reflect both overall good conditions and sensitivity to obvious shortcomings, avoiding the averaging out of local weaknesses. Therefore, a weighted power average is used to express the overall level, a weighted geometric average is used to highlight shortcomings, and a convex combination is used to form a calibration opportunity score.

[0062] Among these methods, the power mean is used to reflect the overall level; the geometric mean is used to reflect weaknesses; and a convex combination is used to form a calibration opportunity score.

[0063] In the formula: Calibration Opportunity Scoring Machine : real numbers, intervals Used to trigger a ruling; number of samples : A positive integer, equal to the number of factors participating in the aggregation;

[0064] Factor scores : real numbers, intervals These correspond to ground visibility, guardrail consistency, periodic grid confidence, depth quality, and hoof contact event density, respectively; power exponent. : Real number, with a value greater than The degree of emphasis on controlling the overall level The larger the value, the more it leans towards higher-scoring factors; weighting coefficient : Non-negative real numbers that satisfy Factor weights used for geometric mean; convex combination coefficients : real numbers, intervals Control the proportion of the two averages;

[0065] The vertical velocity of the near-surface point and its distance from the ground are used as the joint criterion:

[0066] In the formula: For a moment Ground contact indicator (binary); Function: Event factor observation; The velocity is in the vertical direction, and the unit is . Consistent; Estimation of the height of near-zone points; The time interval between adjacent frames; The distance from the point to the ground reference plane (including segmented elevation compensation); These are the thresholds for speed and distance.

[0067] Among them, when any key factor is low, the geometric mean term significantly lowers the score, and the weakness is clearly exposed; when all factors are balanced, the power mean term increases the overall score and avoids being overly conservative; convex combination allows the scoring to be refined according to the characteristics of the channel, forming a clear threshold and triggering it stably.

[0068] Step 2: Within the sliding window, minimize the unified objective while simultaneously correcting the extrinsic rotation matrix. extrinsic translation vector Global scale Piecewise elevation function And based on the prior and quality weights of step one By weighting various residuals, geometric evidence, periodic evidence, and gait events are mutually corroborated in the same solution, thereby anchoring subsequent fusion and body size measurement stably on the same metric coordinate.

[0069] The visibility of the passageway scene fluctuates over time, and the contributions of the ground, guardrails, periodic grids, and hoof contact events are not simultaneously prominent. If processed step by step when a single piece of evidence prevails, it is easy to introduce stage-specific biases that can accumulate later.

[0070] The observations from multiple moments within the time window are uniformly loaded into a factor map. Using the prior data output from step one—the ground reference plane, segmented elevation curves, guardrail baselines, segmented guardrail spacing, periodic pitch, and hoof contact event set—factors are formed for ground-segment, guardrail-segment, periodic-scale, contact-ground, and view overlap registration, respectively. Then, pixel-level quality weighting is applied. The residuals are weighted by the reliability of the source, forming a minimization problem with a single objective.

[0071] The process begins with initial scaling and closed-loop calibration, followed by multiple linearizations within a window to obtain the increments, and then the increments are written back to the extrinsic rotation matrix using Lie algebra. extrinsic translation vector With global scale Simultaneously refine the segmented elevation function The segmented values ​​are recorded, and the residuals of each factor are continuously recorded during the process for health assessment and grading self-recovery in step three.

[0072] Therefore, scale and external parameters are constrained and updated in the same target, avoiding the mutual interference caused by first aligning the scale and then separately correcting the external parameters; after weighting, each source of evidence is clearly distinguished by its degree of credibility, and the continuity of the measurement coordinates can still be maintained during the visibility switching period.

[0073] Introduce a unified state vector within the window. extrinsic rotation matrix containing all cameras Translation vector with extrinsic parameters Global scale Piecewise elevation function The piecewise values ​​are obtained. To prevent normalization errors from occurring during rotation updates, a small perturbation method using Lie algebras is employed for write-back. To ensure that the updates of scale and piecewise elevation remain numerically stable after the solution is obtained, a first-order incremental superposition method is used to align with the piecewise boundaries.

[0074] After each round of linearization, the solved rotation perturbation vector is mapped to a matrix exponent and multiplied on the left by the current rotation. The translation and scaling are directly accumulated as vector increments, while corrections are made according to the piecewise index. Segmented values:

[0075] In the formula: rotational perturbation vector : A three-dimensional real vector, with a small range, describing the first... The tiny rotation of the camera; matrix index The matrix exponent of a parasymmetric matrix, within a special orthogonal group, is used to guarantee the updated new... Still an orthogonal matrix; translation increment : A three-dimensional real vector used to correct the first The panning of the camera;

[0076] Scale increment Small real numbers used to correct the global scale. Antisymmetric operator. : An operator that maps a three-dimensional vector to an antisymmetric matrix, used to construct power series of matrix exponents;

[0077] ; Matrix, satisfying ;Each component The integers are real numbers with no units; the matrix is ​​updated after rotation. : Matrix, belongs to Extrinsic rotation matrix : A matrix representing the directional transformation from the camera coordinate system to the world coordinate system; a rotation perturbation vector. : Vector, unit radians, representing a small spinor in the world frame; typically, the magnitude of each solution is small (recommended to be less than approximately...). radians); extrinsic translation vector : Vectors, independently incremented renew, (Provided to ensure the coordinate relationships are complete).

[0078] And can be expanded using Rodriguez:

[0079] Unit Array : Identity matrix; spinor : Vector, can take Or any axial angle vector. Spinor modulus Non-negative real numbers are defined as follows: Unit: radians. Sine and cosine terms: for real numbers... Calculate point by point (see Small Angle Stability Implementation).

[0080] Therefore, writing back rotations using Lie algebras avoids normalization errors and gimbal problems; translation and scaling, using incremental superposition, ensure unit consistency and solution traceability; piecewise values ​​are aligned with predetermined piecewise boundaries during writing back, making... Consistent with the segmentation definition in Step One, the credibility of each evidence source fluctuates over time within the window: ground visibility ratio. Periodic main peak intensity Hoof contact event density Scene quality score All of these are given in step one.

[0081] Furthermore, to ensure that strong evidence dominates in the current window and weak evidence takes a backseat, an exponential normalization method is used to map reliability into factor weights, which are then used for residual weighting of the joint objective:

[0082] In the formula: factor weights A non-negative real number, ranging from 0 to 1, whose summation over all factors is 1, used to allocate the influence of each factor; reliability. Real number, visible scale from the ground Periodic main peak intensity Hoof contact event density Scene quality score The score obtained by projecting onto the corresponding factor is used to express the confidence level of that factor in the current window; temperature coefficient : A non-negative real number used to control the sharpness of the weight distribution. The bigger the winner, the more they take all.

[0083] When periodic evidence is strong and ground evidence is weak, the weight of the periodic-scale factor automatically increases while the weight of the ground factor decreases. When hoof-contact events are frequent, the weight of the contact-ground factor increases, which helps to stabilize pitch and scale during occlusion. This reliability-driven weight allocation allows the main constraints of the joint objective to switch smoothly with the evidence situation within the window without human intervention.

[0084] As an example, during the post-grazing return period, the operator does not need to stop the line. The system loads the recent image and depth data into the window queue, and a calibration status bar appears at the top of the interface. The ground reference plane is covered by a semi-transparent plane under the lower edge of the point cloud, and the segmented elevation curves are superimposed as broken lines at the channel axis; the left and right guardrail reference lines are two solid lines running through the window; the periodic pitch of the ground area in the slit is displayed in the sidebar; hoof touch events in the near zone are marked with small dots. Subsequently, the update arrows for extrinsic parameter rotation and translation flash briefly, indicating that one round of incremental write-back has been completed, and the stitching seam of the point cloud at the junction of the left and right cameras is noticeably tightened; then, the next step of energy construction and scale closure is performed.

[0085] Furthermore, at the global scale This directly determines the proportional relationship between the reconstruction results and physical quantities. When observations with definite physical lengths, such as periodic pitch and segmented guardrail spacing, can be performed first at the global scale. Perform closed-loop correction, and then incorporate joint energy to refine the external participation segment elevation.

[0086] Specifically, a closed-form correction using weighted ratios is employed to ensure that the scale converges uniformly to the physical length:

[0087] In the formula: new scale : Real number, used for closed-form correction results of the scale; weight : A non-negative real number, determined by the intensity of the periodic main peak. Visibility ratio with ground The common mapping is used to measure the reliability of observations at each physical length; physical length : Positive real number, derived from the registered periodic pitch and segmented guardrail spacing; Reconstruction length : Positive real number, from the current , The distance between three-dimensional point pairs is calculated.

[0088] This ratio correction is numerically stable, simple to implement, and aligns the physical length and reconstructed length in a weighted sense; when periodic evidence or guardrail evidence is more reliable, the corresponding... The larger scale allows the scale to initially converge with credible evidence, providing a good starting point for subsequent joint refinement.

[0089] After scale closure, a joint energy consisting of multiple factors is constructed, and the ground-piece residual, guardrail-piece residual, period-scale residual, contact-ground residual, and view overlap registration residual are weighted. and pixel-level weights Weighting is performed to form linearized normal equations, and the increments are solved.

[0090] Furthermore, the inverse of the Hessian approximation matrix is ​​used to give an approximation of the parameter uncertainty:

[0091] In the formula, the uncertainty matrix is... : Symmetric positive definite matrix, used for approximate representation , , Uncertainty in solving piecewise values; Jacobian matrix : A matrix consisting of the partial derivatives of the residuals of each factor with respect to the state variables, used for linearization mapping; weighting matrix : Diagonal block matrix, composed of factor weights With pixel-level weights Together they form a unified system for managing multi-source weighted averages; regularization coefficients Non-negative real numbers, used to suppress ill-conditioned matrices and ensure matrix invertibility; identity matrix. : The identity matrix that matches the dimension of the state variables.

[0092] When used, the joint energy embodies the synergy of multiple evidences in a single matrix equation, and the pixel-level and factor-level two-layer weighting makes the driving force of strong evidence on updates more obvious; the approximate calculation of the uncertainty matrix provides upstream basis for the health threshold in step three and the uncertainty forward propagation in step four, forming an interpretable and traceable quantitative chain.

[0093] Step 3: Use a unified health and threshold system to determine whether external participation scales should be written, use hierarchical self-recovery to limit cross-boundary diffusion, use double-buffered atomic replacement to ensure the atomicity of the write, and use opportunity throttling and mutual verification to maintain measurement consistency.

[0094] The passageway floor will be covered, the guardrails will be widened occasionally, and the depth quality will fluctuate with light and moisture. If data is written when evidence is scarce, instantaneous biases will be solidified; if action is taken only when evidence is sufficient and anomalies are limited to the window level, the system can proceed smoothly.

[0095] First, analyze the six types of residuals and uncertainty matrices from step two. The scores are then combined into a comprehensive health score, followed by a combination of consecutive out-of-bounds counts and chance assessment. The system triggers a slight adjustment, a significant revaluation, or a mutual verification; then it performs first-order smoothing on the candidate parameters, checks the uniform cost difference and deformation amplitude, and only performs double-buffered atomic replacement if the conditions are met; otherwise, it postpones or rolls back.

[0096] To make deviations from different sources and with different dimensions comparable, a benchmark is needed that is neither swayed by extreme values ​​nor fails to preserve trends. Therefore, the six types of individual residuals are uniformly mapped to a robust domain, and combined using engineering weights to form a comprehensive health score, which is then used to assess the overall risk of the current window.

[0097] The residual set and threshold are derived from the outputs of steps two and one, where a log-robust gain is used to construct the overall health score.

[0098] In the formula: overall health level : A non-negative real number used to measure the overall health level of the current window; a set of indicator indexes. : A finite set containing an index of six categories of indicators; weights : Non-negative real numbers that satisfy This is used to reflect the importance of each indicator;

[0099] Single residual : Non-negative real numbers, corresponding in turn to ground normal angle difference, guardrail spacing residual, period-scale consistency residual, view overlap registration residual, hoof contact constraint error, and segmented elevation drift amplitude; soft threshold Positive real numbers, which are the segmented thresholds set for each indicator and used for normalization.

[0100] In use, large deviations in a single term are smoothed out by the logarithmic gain, preventing any single abnormality from determining everything; this is achieved through weighting. With soft threshold The engineering setup allows for comparison of six sources on the same number line; overall health... With uncertainty matrix They can be referenced to form a consistent handling strategy for strong uncertainty terms with weak constraints.

[0101] However, a single value is insufficient; a decision must be made between taking action now and taking another look. To this end, a continuous out-of-bounds count is introduced to distinguish between occasional jitter and persistent offset; furthermore, the calibration opportunity score given in step one is applied. The inclusion threshold has been adjusted to make it easier to trigger during favorable time periods and more cautious during unfavorable time periods. The process is as follows:

[0102] When overall health and The action is not triggered at times; when At that time, accumulate consecutive out-of-bounds counts for out-of-bounds items. ,achieve Enter a minor fine-tuning phase (extend the sliding window, add one more solution);

[0103] If overall health and Entering a significant recalculation phase (freezing writes, rebuilding the ground, guardrails, and periodic grids before recalculation); if Long duration above If there is a contradiction between the period-scale and the guardrail spacing-ground projection, a mutual verification process will be initiated.

[0104] threshold With counting threshold Scoring by calibration opportunity Perform linear contraction: calibrate chance score When the time is high, the requirements can be appropriately relaxed, and the calibration opportunity score can be adjusted accordingly. Slightly tighten restrictions when the threshold is low. During use, minor issues are resolved within the window, persistent issues are explicitly escalated, and contradictory issues are transferred to interactive verification; the threshold varies accordingly. In-phase changes reduce the possibility of making unintentional changes during bad periods; state transitions have definite triggering conditions, making them easy to replay in the log.

[0105] As an example: When allowing passage at night, the entrance light strip is not lit, resulting in a decrease in depth quality. The health curve on the monitoring interface slowly rises, indicating an overall health level. Exceeding the soft threshold Continuous out-of-bounds count Add one. After three windows, Reaching the counting threshold The status bar showed a slight adjustment; the system lengthened the sliding window and performed an additional calculation, while the external parameter writing remained frozen. A few seconds later, the overall health status... The system reverted to the lower threshold, and the state was reset. The following morning, the entrance / exit was temporarily widened, causing both the guardrail spacing residual and the period-scale consistency residual to increase, and the calibration opportunity score... Above the threshold Soon to reach the counting threshold The system switched to obvious reassessment and suggested in the sidebar that a crossbeam be suspended for a short time for mutual verification. The duty officer hung a crossbeam with markings on the bend and waited for the next step of decision.

[0106] If candidate parameters are written directly, even reasonable minor modifications may leave hard edges at point cloud stitching points. Therefore, candidate parameters are first projected onto the minimum state vector, and then first-order smoothing is performed; a deformation constraint is added to the rotation vector and scale change at narrow and curved segments; after smoothing, a double-buffered one-time replacement is used to ensure that either all parameters are written or none are written.

[0107] Specifically, exponential first-order smoothing is performed on the minimum state vector:

[0108] In the formula: minimum state vector : Real vector, concatenated in a fixed order with rotation vector, translation vector, scale, and segmented elevation values; smoothing coefficient : Real number, taking values ​​in ; Controlling the trade-off between old and new; old parameters : Real vector; Minimal representation of the current running state; Candidate parameters : Real vector; Candidate results output in step two and verified; Smoothed parameters : Real vector; the value to be written as an atomic substitution;

[0109] When in use, high-frequency disturbances are suppressed, and the seams are more coherent; double buffering avoids the appearance of a mixed state of half new and half old; deformation constraints limit large step changes in narrow sections, reducing the risk of jumps caused by local structures.

[0110] Furthermore, the write operation should not only be evaluated based on its quality, but also on whether the cost has decreased. By incorporating the uniform cost and deformation amplitude into the same formula, a braking effect on the write operation is applied; additionally, an opportunity score is integrated to prevent write operations during periods of poor performance. Specifically, the combined amount of cost difference and deformation amplitude is calculated, and decisions are made based on this.

[0111] In the formula, the cost difference is... : Real number; used as a backoff criterion; old state : A set of states; containing the old ones , , and Candidate state : A set of states; containing candidates , , and Trade-off coefficient : Non-negative real numbers; used to control the intensity of deformation penalty; unified cost function The function is a real-valued function; defined according to the factor-weighted residual sum of squares in step two; it involves incorporating all credible evidence within the window into a target to be minimized: the ground reference plane and segmented elevation, segmented guardrail spacing, periodic pitch, hoof contact events, overlapping view registration residuals, and time smoothing are all treated as residual terms; pixel-level quality weights control the influence of each pixel, factor-level weights allocate the weight of each constraint based on calibration opportunity scores, and robust loss is used to suppress outliers. During the solution process, the external parameter rotation matrix, external parameter translation vector, global scale, and segmented elevation function are jointly updated, and the uncertainty matrix is ​​also provided.

[0112] Among them, when the cost difference And calibration opportunity score Double-buffered atomic substitution is performed at the specified time; when or Maintain the old state and record the reason for delay / rollback.

[0113] If, over a prolonged period, a significant discrepancy emerges between the periodic pitch-scale and the scale derived from the guardrail segment spacing-ground projection, cross-verification is triggered: the scale derived independently from the two structural pieces of evidence is compared with the current scale. If the deviation exceeds the tolerance, a crossbeam of known height is temporarily suspended to complete a one-time verification. After verification, the crossbeam is removed, and the system continues its targetless closed-loop operation. Therefore, writing is only performed when the cost decreases and the opportunity meets the criteria, clearly constraining the necessity and timeliness of writing; deformation penalties limit large-step changes; opportunity throttling and cross-verification provide a safety valve that prioritizes quality over quantity.

[0114] Step 4: Using the measurement coordinates and uncertainties output from Steps 2 and 3 as upstream inputs, complete multi-view weighted stitching and robust profile measurement in a unified coordinate system, and then process the uncertainty matrix. The preamble consists of body size confidence intervals and validity scores. Finally, under the premise of consistent identity, multiple full-length results of the same cow are aggregated over time to obtain stable and traceable individual-level body sizes.

[0115] The illumination and occlusion within the channel often vary; sometimes the top view is clear while the side view is noisy, and sometimes the opposite is true. If pixel-level quality and calibration uncertainty are not considered together, the stitched point cloud will tear at the boundary, and if the wrong profile is selected, the error will be forcibly etched into the scale; if the uncertainty is not forwarded, the business side will not see any evidence of whether it can be accepted.

[0116] will , , , Unified to a multi-viewpoint set in world coordinates, according to Weighted concatenation with the observation covariance yields a high-confidence fused point cloud; multiple candidate profiles are generated at key locations, and robust potential functions are used to suppress outliers, obtaining stable sections and geometric quantities; subsequently, the uncertainty matrix is... The observation covariance is propagated to the volumetric level via Jacobi to form a 95% confidence interval and validity score, which triggers downgrading, supplementary sampling, or delay. Finally, based on identity consistency, the volumetric sequence of the historical window is called for time-series convergence to form an individual-level curve.

[0117] Each visible surface point in the channel is often seen by multiple cameras at different angles. These observations are not entirely consistent when pushed back to world coordinates: there is drift caused by depth noise, as well as systematic bias caused by the angle of incidence.

[0118] To synthesize these scattered fragments into a single reliable point, information-level fusion is required after geometric alignment, and the fusion weights should be influenced by both the pixel-level quality weight map and the overall fusion process. The combined influence of the covariance of observations from various perspectives. Specifically, multi-view observations of the same spatial location are fused using the criterion of minimum information loss, and the coordinate vector of the fusion point is solved. :

[0119] In the formula: the coordinate vector of the fusion point. : A three-dimensional vector representing the merged world coordinates; the observation point coordinate vector. : Three-dimensional vector, the first Observations from various perspectives in world coordinates; observation covariance matrix : Symmetric positive definite matrix, derived from the depth imaging noise model and the incident angle model; weighting coefficients Non-negative real numbers, weighting coefficients With pixel-level quality weighting map It is positively correlated with the probability of viewpoint self-occlusion and negatively correlated with the probability of viewpoint self-occlusion, and normalized according to viewpoint coverage.

[0120] Thus, a high-quality, low-uncertainty perspective gains greater influence, and the point of convergence is drawn towards credible observation; the fragmentation at the boundary is suppressed, and subsequent cross-sectional cuts are geometrically more coherent. In equivalent implementation, the weighting coefficients can be... The composition can be changed to a multiplicative combination of coverage, confidence, and incident angle, or a partially anisotropic observation covariance matrix can be introduced. This is to emphasize the precision of the normal direction.

[0121] As an example: During the early morning departure period, the interface displays a stitching preview. The top-view camera covers the spine, while the side-view camera captures the thorax and abdomen. The same point is visible from both perspectives, and two tiny arrows appear on the screen pointing from their respective observation points to the fusion point; the darker arrow comes from the more reflective side-view pixels. After a few frames, the spine curve becomes continuous at the stitching seam, and the thorax and abdomen contour becomes smoother. Subsequently, the operator clicks on the profile, and the system lights up several candidate profile lines near the hip point, awaiting the next step of truncation and fitting.

[0122] Furthermore, there may be multiple reasonable profiles for the same location: slightly above, slightly below, or slightly ahead or behind. To avoid pinning sporadic noise to the true value of the profile, it is necessary to first generate multiple candidate profiles, and then select the one that best explains the data from the candidate set using robust energy minimization, and suppress outlier residuals within the profile.

[0123] In the fused point cloud, an ordered set of candidate profiles is generated using location-guided methods (such as initial estimation of hip and shoulder points). For each candidate profile, a robust profile energy is defined, and the profile parameter vector with the minimum energy is solved. :

[0124] In the formula: Robust profile energy : Non-negative real numbers, the smaller the better; profile parameter vector : Real vector, the geometric position and normal of the encoded profile; residual distance : Non-negative real number, the first The orthogonal distance from each profile point to the profile; robust potential function : A real function that approximates quadratic for small residuals and gradually saturates for large residuals, thus suppressing the influence of outliers.

[0125] Furthermore, a class of alternative robust potential functions (Geman–McClure potential) is given:

[0126] Where: threshold parameter : Positive real number, controlling the switching position from quadratic to saturation; residual : A real number representing the signed distance from a single point to the profile.

[0127] In application, the multi-candidate strategy externalizes the uncertainty of which profile to select, while the robust potential function ensures that abnormal hair reflections and local occlusion points no longer influence the profile solution. The resulting profile-geometric quantities (chest circumference, abdominal circumference, height, and body length) remain stable under occlusion and noise conditions. It can be replaced with the Tukey or Cauchy potential function, with the sign and parameter meaning remaining consistent.

[0128] Furthermore, the scale is not read directly, but rather obtained by mapping the geometric functions of the profile. There are two sources of uncertainty in this mapping chain: one originates from the covariance of the point cloud observations themselves (derived from the covariance after multi-view fusion). The point-level covariance obtained by aggregation is denoted as point Another type of parameter uncertainty comes from calibration and scaling. The two types of uncertainty should be uniformly propagated at the volume scale level and transformed into 95% confidence intervals and validity scores for gating give / no and first / later acceptance.

[0129] Among them, for any body size measurement (e.g., chest circumference, abdominal circumference, height, and body length), write out the sensitivity vectors for points and parameters along the geometric chain, and use first-order linear propagation to obtain the upper bound of the body size variance. :

[0130] In the formula: upper bound of the variance of body size. : Non-negative real numbers, used to construct 95% confidence intervals and participate in validity scoring; point-level sensitivity vector points : Row vector, which is the partial derivative of the volumetric size with respect to the coordinates of the fusion point;

[0131] Point-level covariance : Symmetric positive definite matrix, derived from the fusion process; parameter-sensitive vector : Row vector, which is the minimum state vector of the volumetric size pair (by...) Partial derivatives (concatenated); uncertainty matrix The symmetric positive definite matrix is ​​derived from the joint solution in step two and the back-write chain in step three.

[0132] ; For gating quantity, range Function: To participate in deciding whether to give or not to give, and whether to decide first or last; Body size For the standard uncertainty of the body size (take the body size as the standard uncertainty), ); The scaling parameter (the median of the historical distribution or an engineering setting).

[0133] In application, the reliability range of the scale is determined by information from both ends—good observations but unstable calibration, or stable calibration but weak observations, will both be reflected in the upper bound of the scale variance. Above; gating threshold combined with overall health score With gate quantity The historical trajectory forms the adaptive data acquisition line for this shift / channel. This can be achieved through the parameter sensitivity vector. The structure separates rotation and scale sensitivity, which is convenient for addressing the main causes of positioning errors.

[0134] Furthermore, the same cow is often observed multiple times within one to two weeks; when a single observation gives a wider confidence band due to occlusion, combining multiple credible observations often yields a narrower band and a more stable median.

[0135] However, the aggregation must follow a clear logic: only on the premise that the identity is consistent; only on the premise that the validity score meets the standard; and only on the premise that the more credible person has more weight.

[0136] Therefore, using identity trajectory (re-identification tags and timestamps) as an index, recent data is extracted. Body size sequence for the same identity within a day; for each body size measurement The system constructs weights based on the validity score and gating status, and performs conditional time-series aggregation. When the latest confidence band conflicts with the historical band, a delayed confirmation is triggered instead of immediately straightening the curve. For reconciliation and traceability, all aggregation time points, weights, and gating statuses are written to the audit log.

[0137] Therefore, the volumetric sequence is no longer jagged, but gradual; occasional bad observations are weighted by historical data; when the scene deteriorates over a long period, the convergence mechanism does not deceive itself, but chooses to postpone straightening and retain the confidence band. Furthermore, the time window... The weighting can be set according to the pen rhythm (e.g., 7 days or 14 days), and the weighting can be a multiplicative or convex combination of effectiveness score, chance score and health score.

[0138] As an example, the passage was crowded in the afternoon, and a yellow-spotted cow passed through. The system displayed the chest circumference in the right-hand information bar: interval [lower limit, upper limit], validity: acceptable, explained as low calibration uncertainty and moderate point-level covariance. The same cow passed through again within three days. A pop-up appeared at the bottom of the screen indicating a matched historical identity. The historical curve was displayed in a lighter color, and the confidence band of the new point partially overlapped with the historical band. The system chose to delay confirmation until the third passage. After the third passage, the body measurements from the three instances were converged into a narrower band, forming an individual growth curve on the report page.

[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0143] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction, characterized in that: include, Acquire depth and images from multiple cameras, extract ground reference plane and segmented elevation functions, guardrail baseline and segmented guardrail spacing, periodic pitch and hoof contact events, generate pixel-level quality weight map, and calculate calibration opportunity score for triggering; Within the sliding window, constrained by the ground reference plane, piecewise elevation function, piecewise guardrail spacing, periodic pitch and hoof contact event, the rotation matrix, translation vector and global scale of each camera's extrinsic parameters are jointly solved, and the uncertainty matrix and residuals are output. Based on the comprehensive health status composed of the uncertainty matrix and residuals, a graded self-recovery is implemented by combining the calibration opportunity score; when the preset is met, the external parameters, global scale and piecewise elevation function are replaced with double-buffered atoms; otherwise, the writing is frozen and candidate parameters are recorded. Under a unified metric coordinate system, multi-view weighted stitching is performed based on pixel-level quality weight map and uncertainty matrix to generate point cloud; Robust profile measurements are performed at key locations to obtain volumetric results. The uncertainty matrix is ​​then forwarded to the volumetric layer for gating and annotation. In the captured lateral point cloud, the projection density is accumulated along the guardrail direction to robustly estimate the three-dimensional principal directions and passing points of the left and right guardrail baselines, forming guardrail baselines; and the lateral distance between the two guardrail baselines is calculated in segments, and saturated consistency cost is used to suppress local anomalies. First, complete the geometric-metric extraction and observation-quality estimation, and then use the calibration chance score to decide whether to enter the joint calibration. Within the candidate set comprised of near-zone areas, ground reference parameters are obtained using a weighted absolute deviation with pixel-level quality weights. The specific cost is as follows: In the formula: weighted cost function : Scalar, measures the weighted accumulation of ground fitting residuals, used as the basis for determining the ground reference normal and intercept; pixel index : Ordered pairs of integers representing image coordinates, within the effective imaging area; candidate set : A set consisting of pixel positions obtained from the initial screening of the nearby area; Pixel-level quality weights : Real number, interval The coordinates are obtained by a monotonic mapping or table lookup of the reflection intensity, phase position information, and incident angle, and are used to suppress poor-quality observations; point cloud coordinates : A three-dimensional vector, representing the coordinates of a point in space obtained through depth projection; ground reference normal vector. : A three-dimensional unit vector representing the normal direction of the ground reference plane; intercept : A real number representing the translation of the ground reference plane in world coordinates; Logarithmic probability mapping is used to combine reflection intensity, phase position information, and incident angle: In the formula: For the Sigmoid function; compressed to ; Pixel-level quality weights, range It participates in registration and energy weighting; The reflection intensity, after linear normalization, range ; For phase position confidence, the device natively or mapped from phase residuals, the range is... ; The angle between the incident light ray and the surface normal, ranging from... ; These are configurable coefficients, with a limited range of real numbers, and can be used for offline calibration files or limited on-site calibration.

2. The method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction according to claim 1, characterized in that: Establish segmented elevation curves and segmented guardrail spacing along the traffic direction: use guardrail posts or connectors as segment boundaries, take robust statistical values ​​of nearby point clouds within the segment to form elevations, the lateral distance between the guardrail baselines on both sides of the segment centerline forms the spacing, and define the segment width with a fixed step size or structural component spacing, save the segment value time series, and use outlier suppression rules to remove outliers when sampling segment values.

3. The online measurement method for bovine body size driven by multi-view three-dimensional reconstruction according to claim 2, characterized in that: Periodic pitch is extracted in the slotted ground or column area through directional filtering and one-dimensional spectrum; hoof contact events are generated by joint determination of the vertical displacement change of near-zone point and distance to ground reference plane; The pixel-level quality weight map is obtained by mapping reflection intensity, phase position confidence, and incident angle, and is used as a strong scale constraint, a temporal anchor point, and a source of pixel confidence when generating calibration opportunity scores.

4. The method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction according to claim 3, characterized in that: The calibration opportunity score is aggregated from five factors: ground visibility, guardrail consistency, period confidence, depth quality, and hoof contact event density, according to the configured weights. When the score reaches a preset threshold, subsequent steps are triggered; otherwise, only priors and observations are cached, and external participants are not updated at the global scale. Ground visibility is based on the proportion of available pixels in the near zone, guardrail consistency is based on the segment spacing deviation, and period confidence is based on the proportion of dominant frequency energy and directional consistency.

5. The online measurement method for bovine body size driven by multi-view three-dimensional reconstruction according to claim 4, characterized in that: The field registration uses the point-to-area distance residual. The factor map introduces pixel-level weights and factor-level weights to each residual. The factor-level weights are obtained by mapping ground visibility, period confidence and event density. The constraint set includes at least the ground and segment elevations, guardrails and segment spacing, periodic pitch and hoof contact events, and is uniformly linearized and written back within a sliding window, so that the external parameters, global scale and segment elevations are jointly updated, generating an uncertainty matrix for subsequent steps.

6. The online measurement method for bovine body size driven by multi-view three-dimensional reconstruction according to claim 5, characterized in that: The overall health score is obtained by weighted superposition of ground normal angle difference, segmented guardrail spacing residual, period and scale consistency residual, registration residual and segmented elevation drift; The system distinguishes between occasional and persistent out-of-bounds events by counting consecutive out-of-bounds events, triggering either Level 1 fine-tuning, Level 2 re-evaluation, or Level 3 mutual verification, respectively. Level 1 fine-tuning extends the sliding window and increases iterations, Level 2 re-evaluation freezes the write and reconstructs the prior, and Level 3 mutual verification introduces a target verification scale for a short period of time.

7. The method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction according to claim 1, characterized in that: Safe injection includes: performing first-order smoothing on candidate extrinsic parameters, global scale, and segmented elevation at the minimum state vector layer; and replacing runtime parameters in one go using a double-buffered approach. Before writing, calculate the uniform cost difference and combine it with the calibration opportunity score to determine whether to write; when the cost does not decrease or the score is insufficient, keep the old parameters and record the reason for the rollback; when there is a long-term consistency contradiction between structural evidence, pause the injection and switch to mutual verification; after the verification is completed, restore the target-free closed loop.

8. The method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction according to claim 7, characterized in that: Weighted stitching uses pixel-level quality weights and observation covariance to determine the weights of observations from each perspective, and merges them into a unified point set; robust profile measurement generates candidate profile sets at the intercostal, lumbar, and hip points, suppresses outlier residuals with saturation loss, selects the optimal profile, and calculates body size parameters. The starting position and normal of the candidate profile are determined by prior key points and local directions. The geometric parameters within the profile are solved by iterative weighting and the profile residuals are output for gating reference.

9. The method for online measurement of bovine body size driven by multi-view three-dimensional reconstruction according to claim 8, characterized in that: Uncertainty forward propagation includes: based on the sensitivity of the scale to the coordinates of the fusion point and the minimum state vector of step two, combining the point-level covariance and parameter uncertainty to form the scale confidence interval and gating quantity; When the gate is below the threshold, a supplementary sampling or delay is triggered, and the volumetric results enter the manual review queue; the point-level covariance is synthesized by the viewpoint observation covariance and pixel-level quality weight in the weighted stitching stage, and the parameter uncertainty is obtained by selecting sub-blocks from the uncertainty matrix in step two.

10. The online measurement method for bovine body size driven by multi-view three-dimensional reconstruction according to claim 9, characterized in that: The temporal convergence is based on the premise of identity consistency. It extracts multiple body size results of the same identity from the most recent set time window, and performs weighted fusion with validity score and gating quantity as weights. When the latest result conflicts with the historical interval, the confirmation is delayed. All participation times, weights, and gating statuses are written into the audit log for traceability. Identity is determined by re-identification and multi-target tracking outputs. Conflict resolution is performed in order of weight and interval overlap, and the resolved samples are marked as low-confidence sources for subsequent screening.

Citation Information

Patent Citations

  • Multi-dimensional information sensing cow body size parameter measurement method and system

    CN116071517A

  • Three-dimensional space data correction method for virtual reality

    CN121213839A