Pipeline defect video detection method, device and equipment based on hall rocker
Patent Information
- Application Number
- CN202610742338.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-09-29
AI Technical Summary
[0005]本发明实施例提供了一种基于霍尔摇杆的管道缺陷视频检测方法、装置及设备,以解决管道检测的业内判读中控制线性度差的问题
[0016]本发明实施例中,通过获取霍尔摇杆采集得到的操作员施加的物理位移信号,并对物理位移信号进行归一化得到模拟位移信号,通过分段指数速度映射函数将模拟位移信号映射为目标视频播放倍率,建立了人手运动和视频播放速度之间的对数级感知映射,在低速段,实现对细微裂缝或初期腐蚀的准确定位,在高速阶段,避免“过冲”现象发生;根据目标视频播放倍率与预设阈值的关系对管道检测视频进行解码,降低硬件成本。
Smart Images

Figure CN122845852A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image or video understanding technology, and in particular to a method, apparatus and equipment for video detection of pipeline defects based on Hall effect rocker. Background Technology
[0002] With the deepening of urbanization, the scale of underground drainage pipe networks is growing exponentially. The health of these networks directly affects urban flood control safety, the effectiveness of groundwater environment management, and the prevention of geological disasters such as road collapses. To accurately grasp the structural defects (such as ruptures, deformations, corrosion, misalignments, and disconnections) and functional defects (such as deposits, scaling, root intrusion, and obstructions) within pipelines, closed-circuit television (CCTV)-based pipeline inspection technology has become an internationally recognized mainstream inspection method. Pipeline inspection operations consist of two core stages: field data collection and data interpretation. Data interpretation requires professionals to analyze massive amounts of inspection video frame by frame, identifying defect types and quantifying their severity. For example, for deposit (CJ) defects, precise quantification is required based on the proportion of deposit thickness to pipe diameter (e.g., 20%-30% is classified as Level 1, 30%-40% as Level 2); for rupture (PL) defects, strict differentiation is needed between different severity levels such as cracks, ruptures, and collapses.
[0003] In existing technologies, pipeline CCTV interpretation systems mainly adopt linear control modes based on mouse drag or keyboard shortcuts and discrete fixed-speed fast forward (2×, 4×, 8×). Defect identification relies on manual visual inspection, positioning relies solely on physical cable counters, audio at high magnification is processed by resampling, and playback positioning relies on manually dragging the progress bar.
[0004] However, since the mouse displacement or button duration is linearly proportional to the video playback speed, and the linear control model does not conform to the nonlinear attention law of visual search, at low speeds, tiny inputs can easily cause sudden speed changes, making it difficult to accurately locate minute cracks or early corrosion. At high speeds, the operating stroke quickly exceeds the fine control range of the human hand, resulting in frequent overshoots. Operators need to repeatedly backtrack to confirm, which seriously reduces the efficiency of interpretation. Summary of the Invention
[0005] This invention provides a method, apparatus, and equipment for video detection of pipeline defects based on Hall effect rocker, in order to solve the problem of poor control linearity in the industry interpretation of pipeline inspection.
[0006] In a first aspect, embodiments of the present invention provide a video detection method for pipeline defects based on a Hall effect rocker, comprising: The physical displacement signal applied by the operator is acquired by the Hall effect sensor and normalized to obtain a simulated displacement signal. The simulated displacement signal is mapped to the target video playback magnification using a piecewise exponential velocity mapping function; The pipeline inspection video is decoded based on the relationship between the target video playback magnification and a preset threshold. The decoded pipeline inspection video frames are rendered and output to the display terminal at the target video playback magnification for defect identification. The piecewise exponential velocity mapping function characterizes the mapping relationship between the target video playback magnification and the power function of the simulated displacement signal through a nonlinear curvature coefficient.
[0007] In one possible implementation, mapping the analog displacement signal to a target video playback magnification using a piecewise exponential velocity mapping function includes: When the simulated displacement signal enters the dead zone from the non-zero zone, a timer of preset duration is started, and the target video playback magnification is set to zero. Outside the timer's timing window, when the analog displacement signal is positive, the target video playback magnification is obtained through the piecewise exponential velocity mapping function; Outside the timer's timing window, when the simulated displacement signal is negative and when the simulated displacement signal is greater than the reverse threshold, the target video playback magnification is obtained through the piecewise exponential velocity mapping function.
[0008] In one possible implementation, the expression for the piecewise exponential velocity mapping function is: ; in, The target video playback magnification. The simulated displacement signal, The nonlinear curvature coefficient is... This is the maximum magnification factor. As initial compensation, Dead zone threshold, For symbolic functions, Let be the Herveside step function.
[0009] In one possible implementation, decoding the pipeline detection video based on the relationship between the target video playback ratio and a preset threshold includes: When the target video playback ratio is less than or equal to the preset threshold, the pipeline detection video is decoded using full-frame decoding mode; When the target video playback ratio is greater than the preset threshold, the pipeline detection video is decoded using a sparse keyframe decoding mode.
[0010] In one possible implementation, decoding the pipeline detection video using a sparse keyframe decoding mode includes: Scan the pipeline detection video, extract the byte offsets and corresponding timestamps of all key frames, and construct an image group cache index table; Calculate the timestamp of the next target moment based on the target video playback ratio, and locate the keyframe closest to the timestamp in the image group cache index table using a binary search method. Jump to the physical byte position of the nearest keyframe and decode it, discarding non-keyframes; Based on the acceleration direction of the Hall effect sensor, subsequent keyframes are pre-read into the circular buffer.
[0011] In one possible implementation, based on the acceleration direction of the Hall effect sensor, subsequent keyframes are pre-read into a circular buffer, including: The acceleration of the Hall rocker is calculated based on the rate of change of the physical displacement signal acquired by the Hall rocker. When the acceleration is positive, the next first preset value of the key frames of the pipeline inspection video are read and stored in the circular buffer; When the acceleration is negative, read the second preset value of key frames from the pipeline detection video and store them in the circular buffer.
[0012] In one possible implementation, rendering and outputting the decoded pipeline detection video frame to the display terminal at the target video playback magnification for defect identification includes: The decoded pipeline detection video frames are time-aligned and rendered according to the target video playback magnification to obtain the display video; Video frames of the displayed video are asynchronously captured at a sampling rate lower than the playback frame rate as feature maps, which are then input into an improved YOLOv8 network for defect detection, and the defect identification results are output.
[0013] In one possible implementation, the improved YOLOv8 network includes: An input layer is used to receive the feature map; The backbone network embeds a convolutional attention module after each C2f module; the convolutional attention module includes a channel attention submodule and a spatial attention submodule in sequence. The channel attention submodule weights the channel dimension of the feature map, and the spatial attention submodule weights the spatial dimension of the feature map to obtain the weighted features. The neck network employs a fusion structure of feature pyramid and path aggregation network to fuse the weighted features and obtain fused features. The detection head adopts a decoupled head structure, which separates the classification branch and regression branch of the fused features to optimize the positioning accuracy of the defect category and the detection box respectively. The output layer outputs the detection box, its corresponding confidence score, and the defect category label.
[0014] Secondly, embodiments of the present invention provide a pipeline defect video detection device based on a Hall effect rocker, comprising: The acquisition module is used to acquire the physical displacement signal applied by the operator obtained by the Hall joystick, and normalize the physical displacement signal to obtain the analog displacement signal; The target video playback magnification mapping module is used to map the analog displacement signal to the target video playback magnification through a piecewise exponential velocity mapping function. The video decoding module is used to decode the pipeline detection video according to the relationship between the target video playback magnification and a preset threshold. The defect identification module is used to render and output the decoded pipeline inspection video frame to the display terminal according to the target video playback magnification for defect identification; The piecewise exponential velocity mapping function characterizes the mapping relationship between the target video playback magnification and the power function of the simulated displacement signal through a nonlinear curvature coefficient.
[0015] Thirdly, embodiments of the present invention provide a pipeline defect video detection device based on a Hall effect rocker, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation of the first aspect.
[0016] In this embodiment of the invention, the physical displacement signal applied by the operator is acquired by a Hall effect joystick, and the physical displacement signal is normalized to obtain a simulated displacement signal. The simulated displacement signal is then mapped to the target video playback magnification using a piecewise exponential velocity mapping function, establishing a logarithmic perception mapping between hand movement and video playback speed. At low speeds, this enables accurate location of minute cracks or initial corrosion, while at high speeds, it avoids overshoot. The pipeline inspection video is decoded based on the relationship between the target video playback magnification and a preset threshold, reducing hardware costs. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the implementation of the video detection method for pipeline defects based on a Hall effect rocker provided in this embodiment of the invention. Figure 2This is a characteristic curve diagram of the piecewise exponential velocity mapping function provided in an embodiment of the present invention; Figure 3 This is a flowchart of the decoding process for pipeline inspection video based on the relationship between the target video playback magnification and a preset threshold, provided by an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of the pipeline defect video detection device based on Hall effect rocker provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a pipeline defect video detection device based on a Hall effect rocker provided in an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0019] like Figure 1 As shown, the video detection method for pipeline defects based on Hall effect rocker provided in this embodiment of the invention includes: Step 101: Obtain the physical displacement signal applied by the operator from the Hall effect sensor, and normalize the physical displacement signal to obtain the simulated displacement signal.
[0020] In one embodiment, the analog displacement signal sampled and normalized by the high-precision analog-to-digital converter (ADC) is: A positive value represents fast forward, and a negative value represents fast rewind.
[0021] This step involves acquiring and normalizing the physical displacement signal applied by the operator using a Hall effect joystick, making the control of the target video playback rate more ergonomic.
[0022] Step 102: Map the analog displacement signal to the target video playback magnification using a piecewise exponential velocity mapping function.
[0023] In one embodiment, step 102 specifically includes: When the simulated displacement signal enters the dead zone from the non-zero zone, a timer of preset duration is started, and the target video playback magnification is set to zero.
[0024] Outside the timer's timing window, when the analog displacement signal is positive, the target video playback magnification is obtained through the piecewise exponential velocity mapping function.
[0025] Outside the timer's timing window, when the analog displacement signal is negative and when the analog displacement signal is greater than the reverse threshold, the target video playback magnification is obtained through the piecewise exponential velocity mapping function.
[0026] like Figure 2 As shown, the expression for the piecewise exponential velocity mapping function is: ; in, The target video playback ratio, To simulate displacement signals, For nonlinear curvature coefficients, This is the maximum magnification factor. As initial compensation, Dead zone threshold, For symbolic functions, Let be the Herveside step function.
[0027] In this embodiment, the dead zone threshold Set it to 0.05. When input... When this occurs, the function outputs 0 to prevent screen drift caused by Hall effect joystick slack. Nonlinear curvature coefficient. For example, when the target video playback ratio is nonlinearly controlled according to the piecewise exponential velocity mapping function, the output value increases extremely slowly when |u| < 0.5. For instance, as shown in Table 1, when the push rod stroke reaches 50% (u = 0.5), if γ = 2.8, the output speed is only... This means that the first 50% of the Hall effect sensor's physical travel is allocated to the commonly used fine-tuning range of 0-4.6x, greatly expanding the resolution of low-speed control and conforming to Weber's law regarding the perceptual characteristics of stimulus intensity. Maximum magnification factor Set to 32, corresponding to the highest playback speed. Starting compensation. Set to 1.0 to ensure that once the slider leaves the dead zone, the video starts at the standard 1.0x speed, avoiding the "freezing" illusion caused by extremely low speeds (such as 0.1x). The preset duration of the timer is set to 200ms, and the reverse threshold is set to 3δ. That is, after releasing the slider and entering the dead zone, a 200ms timer is started to shield the slight reverse jitter with an amplitude <3δ, eliminating the problem of the screen bouncing back one frame.
[0028] Table 1. Comparison of speed response between linear control and nonlinear control at different strokes.
[0029] This step maps the normalized physical displacement signal to the target video playback magnification using a preset exponential piecewise exponential velocity mapping function. This function has a very small derivative in the low displacement range (0-50% travel), providing fine-grained velocity adjustment resolution from 0x to 4x; in the high displacement range (50%-100% travel), the derivative increases sharply, quickly reaching a peak velocity of 32x. Simultaneously, by setting a preset timer duration and a reverse threshold, the precise transmission of the operational intent is ensured.
[0030] Step 103: Decode the pipeline detection video based on the relationship between the target video playback magnification and the preset threshold.
[0031] In one embodiment, step 103 specifically includes: When the target video playback ratio is less than or equal to a preset threshold, the full-frame decoding mode is used to decode the pipeline detection video.
[0032] When the target video playback ratio is greater than a preset threshold, the sparse keyframe decoding mode is used to decode the pipeline detection video.
[0033] like Figure 3 As shown, in this embodiment, when the target video playback ratio is less than or equal to a preset threshold, the pipeline detection video is decoded using a full-frame decoding mode, specifically: When the target video playback speed hour, A preset threshold, typically set to 4x, is used to decode the pipeline detection video in full-frame decoding mode. At this point, an improved Waveform Similarity Overlap-Add (WSOLA) algorithm is introduced to perform time-stretching processing on the audio stream. This maintains the fundamental frequency of the audio while changing the playback magnification of the target video, thus preserving the spectral characteristics of the water flow sound and aiding in the identification of hidden leaks or abnormal sounds.
[0034] In this embodiment, the WSOLA audio time stretching processing method includes: Framing: The audio stream is cut into analysis frames of fixed length (20~40ms), with 50% overlap between adjacent frames.
[0035] Similar segment search: For each analysis frame, within the target time axis search window (± half frame length), the segment with the highest waveform correlation is found by using the normalized cross-correlation (NCC) function.
[0036] Overlap-Add (OLA): Similar segments are found and overlapped with adjacent frames using a windowing method to eliminate waveform abrupt changes at splicing boundaries.
[0037] Output compression: By adjusting the synthesis hop size, the waveform length is compressed in the time domain while keeping the original frequency components unchanged (the pitch is not raised).
[0038] For example, when the playback speed is 2x, WSOLA compresses the audio content per second to 0.5 seconds for playback, but low-frequency features (100Hz~2kHz) such as water flow and dripping sound retain their original tone, and can still effectively identify hidden abnormal noises.
[0039] In this embodiment, when the target video playback ratio is greater than a preset threshold, a sparse keyframe decoding mode is used to decode the pipeline detection video, specifically including: The video is scanned through the pipeline, and the byte offsets and corresponding timestamps of all keyframes are extracted to build an image group cache index table.
[0040] Calculate the timestamp of the next target moment based on the target video playback ratio, and locate the keyframe with the nearest timestamp in the image group cache index table using a binary search method.
[0041] Jump to the physical byte position of the nearest keyframe and decode it, discarding non-keyframes.
[0042] Based on the acceleration direction of the Hall effect sensor, subsequent keyframes are pre-read into the circular buffer.
[0043] For example, when the target video playback magnification At that time, a sparse keyframe decoding mode was used to decode the pipeline inspection video.
[0044] Advanced Video Coding (H.264) / High Efficiency Video Coding (H.265) video streams employ a block-based hybrid coding framework, the core of which is the Group of Pictures (GOP) structure. A GOP typically begins with an I-frame (keyframe), followed by several P-frames and B-frames. Intra-coded picture (I-frame): It uses intra-frame compression, is decoded independently, and contains complete image information.
[0045] Forward prediction frame (P-frame): Motion estimation and compensation are performed with reference to the previous frame, and only residual data is stored.
[0046] Bi-predictive picture (B-frame): Refers to the preceding and following frames, has the highest compression rate, but is the most dependent on decoding.
[0047] The sparse keyframe decoding mode utilizes a pre-built GOP cache index table to directly locate Instantaneous Decoding Refresh (IDR) frames or non-IDR I-frames in the video stream, dynamically discarding all P-frames and B-frames. Through a prefetch strategy using a circular buffer, it achieves smooth rendering of only decoded keyframes at 32x speed, reducing the decoder's computational load to 1 / N of that in full decoding mode (where N is the GOP length, typically 25-60), thus completely breaking through the "performance wall".
[0048] For example, the sparse keyframe decoding mode specifically includes: Pre-built indexing mechanism: When the pipeline detects the initial loading of a video file, a low-priority background thread is started to quickly traverse the video stream encapsulation layer by calling open-source multimedia processing tools. This process does not perform pixel-level decoding, but instead extracts keyframe metadata from all Network Abstraction Layer (NAL) units and builds a GOP cache index table that resides in memory.
[0049] The structured data in the GOP cache index table includes: Byte offset: Used for precise file pointer jumps.
[0050] Presentation Time Stamp (PTS): Used to align with the current progress bar and timeline.
[0051] Keyframe Flag: Indicates whether it is an IDR I-frame or a non-IDR I-frame. For 1GB high-definition video, the generated index table only occupies a few hundred KB of memory, and the construction time is controlled within 5 seconds, which greatly optimizes the random access speed of the file.
[0052] Dynamic frame skipping location based on binary search: During high-speed playback, the rendering engine determines the frame skipping location based on the current time frame. and target video playback ratio Calculate the expected time of the next rendered frame: ; in, The expected time for the next rendered frame. For the current moment, Target video playback ratio The time interval between the next two rendered frames.
[0053] Using binary search in the GOP cache index table, With computational complexity, quickly retrieve the timestamp closest to I-frame index.
[0054] After location, the engine directly calls `avio_seek` to jump to the physical byte offset of the target I-frame. At this point, the decoder context is explicitly configured to AV_DISCARD_NONKEY mode. This mode forces the decoder to discard non-keyframe packets and only perform NAL unit parsing and rendering on the extracted I-frame. Because I-frames have the self-contained nature of intra-frame compression, the system does not need to process any reference frames, thereby reducing the CPU instruction cycle for single-frame decoding by more than 20 times.
[0055] Circular buffer prefetch: To address potential bottlenecks in disk I / O at high speeds (especially in mechanical hard drive environments where head seek latency limits search efficiency), a circular buffer containing 60 keyframe bits is set up.
[0056] The circular buffer prefetch algorithm employs a prediction mechanism based on acceleration tendency: The acceleration of the Hall effect rocker is calculated based on the rate of change of the physical displacement signal collected by the Hall effect rocker. When the Hall joystick displacement is detected to be continuously increasing (i.e., acceleration a>0), the prefetch thread will read the next 50 I-frames of data in advance along the current direction and put them into the circular buffer. When a continuous decrease in Hall stick displacement is detected (i.e., acceleration a < 0), retain the 10 I-frames prior to the current position to support fast rollback.
[0057] This step adaptively switches between full-frame decoding and sparse keyframe decoding by setting a threshold. It retains audio diagnostic information at low speeds and reduces the decoding load at high speeds, achieving smooth playback and lag-free operation at 32x speed on ordinary industrial control computers. The circular buffer prefetch algorithm solves the read response latency of physical storage media, ensuring the continuity of screen rendering at 32x speed and effectively eliminating screen freezing at high speeds.
[0058] Step 104: Render the decoded pipeline detection video frame to the display terminal according to the target video playback magnification for defect identification.
[0059] In one embodiment, step 104 includes: The decoded pipeline detection video frames are time-aligned and rendered according to the target video playback ratio to obtain the display video.
[0060] Video frames of the displayed video are asynchronously captured at a sampling rate lower than the playback frame rate and used as feature maps. These feature maps are then input into the improved target detection algorithm v8 (You Only Look Once v8, YOLOv8) network for defect detection, and the defect identification results are output.
[0061] The improved YOLOv8 network includes: The input layer is used to receive feature maps.
[0062] The backbone network embeds a convolutional attention module after each C2f module. The convolutional attention module includes a channel attention submodule and a spatial attention submodule. The channel attention submodule weights the channel dimension of the feature map, and the spatial attention submodule weights the spatial dimension of the feature map to obtain the weighted features.
[0063] The Neck network employs a fusion structure of feature pyramid and path aggregation network to fuse weighted features and obtain fused features.
[0064] The detection head adopts a decoupled head structure, which separates the classification branch and regression branch of the fused features to optimize the positioning accuracy of the defect category and the detection box respectively.
[0065] The output layer outputs the detection boxes and their corresponding confidence scores and defect category labels.
[0066] In this embodiment, the system embeds a lightweight YOLOv8-Nano deep learning model, which is specifically designed for transfer learning of CCTV pipeline images.
[0067] Model optimization: YOLOv8 introduces the C2f module (Cross Stage Partial Bottleneck with 2convolutions) and a decoupling head. To address the uneven lighting and water mist interference inside the pipe, this system introduces a Convolutional Block Attention Module (CBAM) in the Backbone network to enhance feature extraction capabilities for small targets (such as minute cracks CK) and low-contrast targets (such as tree roots SG on the damp pipe wall).
[0068] The input is video frames for display, with the resolution uniformly scaled to 640×640 pixels (YOLOv8 standard input size), and the color space is Blue-Green-Red (BGR) three-channel.
[0069] The system samples the currently playing video at a low frame rate of 5fps and then feeds it into an improved YOLOv8 network to reduce computational resource consumption.
[0070] Model output: Each frame outputs several detection boxes, each box containing: location coordinates (x, y, w, h), category label (corresponding to CJJ 181 defect code), and confidence score (threshold set to 0.75).
[0071] In one embodiment, step 104 further includes: Human-machine collaborative workflow: During video playback, the AI backend samples and infers the image at a low frame rate of 5fps. When a defect with a confidence level >0.75 (such as "tree roots") is detected, an icon flashes in the upper right corner of the screen, and the corresponding CJJ 181 code "SG" is automatically preloaded onto the confirmation button on the Hall effect joystick. If the operator approves the judgment, they only need to press the confirmation button to complete the entire process of "screenshot + code entry + level determination" with one click, reducing the single operation time to less than 1 second.
[0072] The integrated application of AI-based defect pre-assessment and visual odometry technology further enhances the accuracy and reliability of inspection data. The implementation of this system will significantly improve the efficiency of internal interpretation in the drainage pipe network inspection industry, reduce labor costs, and has extremely high promotional value and social benefits.
[0073] Monocular visual odometry distance calibration: including feature tracking, scale correction and error warning.
[0074] Feature tracking: First, the Oriented FAST and Rotated BRIEF (ORB) algorithm is used to extract the texture features (such as concrete spots and joint gaps) of the inner wall of the pipe.
[0075] Pose estimation: By matching feature points between consecutive frames, an equation for minimizing reprojection error is constructed to calculate the camera's displacement along the pipe axis. .
[0076] The formula for calculating the error is: ; in, For image feature points, For spatial points, Let be the pose transformation matrix to be determined. S This represents the total number of feature points in the image.
[0077] The displacement calculation process includes: Feature extraction: Key points and descriptors are extracted from two consecutive frames of images using the ORB algorithm.
[0078] Feature matching: The ORB descriptors between two frames are matched using Hamming distance, and outliers are eliminated using the Random Sample Consensus (RANSAC) algorithm.
[0079] Essential matrix solution: Using matching point pairs, the essential matrix E is estimated through the eight-point algorithm, and then decomposed to obtain the relative rotation R and the normalized translation direction t.
[0080] Scale recovery: Due to the scale uncertainty of monocular vision, the system uses the known pipe diameter D or standard pipe section length (2.0m / 2.5m) as the scale factor to recover the normalized translation t to the actual physical displacement Δz (along the pipe axis).
[0081] Cumulative mileage calculation: = Σ k Δz k ; = ; in, For visual calculation of readings, Let Δz be the cumulative displacement of the camera along the axial direction of the pipe. k For the first k Frame to the k +1 frame of axial displacement, k For frame index number.
[0082] Visual calculation readings Readings from physical cables D cable Real-time comparison; a verification alarm is triggered when the deviation percentage exceeds 5%.
[0083] Scale correction: Since monocular vision lacks absolute scale, the system uses the known pipe diameter D or standard pipe section length (usually 2.0 meters or 2.5 meters) as a scale factor for real-time correction. Whenever a pipe section joint is detected, the system automatically corrects for accumulated errors using the joint spacing.
[0084] Error warning: The system compares the readings of the physical cables in real time. Visual computation readings When the two deviate When the system issues a yellow alert, it automatically marks "distance needs verification" in the final report, significantly improving the rigor of the data.
[0085] Click to rewind: The operator fast-forwards at 16x speed and suddenly sees what appears to be a slit. By the time the brain processes the visual signal and issues the command to pause, approximately 500ms have passed (including visual processing, cognitive decision-making, and motor execution time). At 16x speed, this 500ms corresponds to 8 seconds of the original video content, and the scene has already skipped the target point. Implementation logic: The system maintains a state history stack in memory, recording the playback speed of each frame within the past 10 seconds with a 10ms time granularity. and timestamp When an "emergency stop" operation is detected and the "backtrack" button is pressed, the algorithm calculates the backtrack point. : ; in, To rewind time, For the current time, This is the estimated reaction time window (default setting is 600ms). For safety redundancy (set to 2 seconds), the player automatically seeks to... It is also slowed down at 1x speed, eliminating the need for operators to manually drag back and forth to search, greatly improving the user experience.
[0086] This step asynchronously captures video frames at a sampling rate lower than the playback frame rate and inputs them into an improved YOLOv8 network for defect detection. While ensuring smooth playback at high speeds, it achieves high-precision real-time identification of pipeline defects such as tiny cracks and low-contrast tree roots.
[0087] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0088] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0089] Figure 4 A schematic diagram of the pipe defect video detection device based on a Hall effect rocker provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 4 As shown, the Hall effect rocker-based video detection device 4 for pipeline defects includes: The acquisition module 401 is used to acquire the physical displacement signal applied by the operator obtained by the Hall joystick, and normalize the physical displacement signal to obtain the analog displacement signal.
[0090] The target video playback magnification mapping module 402 is used to map the analog displacement signal to the target video playback magnification through a piecewise exponential velocity mapping function.
[0091] The video decoding module 403 is used to decode the pipeline detection video according to the relationship between the target video playback magnification and a preset threshold.
[0092] The defect identification module 404 is used to render and output the decoded pipeline inspection video frame to the display terminal according to the target video playback magnification for defect identification.
[0093] The piecewise exponential velocity mapping function characterizes the mapping relationship between the target video playback magnification and the power function of the simulated displacement signal through a nonlinear curvature coefficient.
[0094] In the acquisition module 401, traditional potentiometers change the voltage division ratio through the mechanical sliding of brushes on a resistive element. Their contact-type structure inevitably suffers from mechanical wear, contact noise, and center point drift. In one embodiment, a linear Hall sensor (Hall rocker) is used as the core displacement sensing element. Its working principle is based on the Hall effect under the action of Lorentz force: when a constant current... A current flows vertically through a Hall semiconductor element, and the element is located at a magnetic flux density of When the element is in a magnetic field, the charge carriers are deflected by the Lorentz force, accumulating charge on both sides of the element, thus generating a potential difference. (Hall voltage) 1. Its mathematical expression is: ; in, Hall coefficient, For component thickness, The angle between the magnetic field lines and the element's normal. It represents electric current.
[0095] In this embodiment, the mechanical axis of the Hall effect rocker is connected to a pair of high-performance neodymium iron boron (NdFeB, N35 grade) permanent magnets. When the operator pushes the Hall effect rocker, the magnets rotate relative to the fixed Hall effect chip, changing the magnetic flux density passing through the effective area of the chip. Due to Hall voltage With magnetic flux density The mechanical angle range exhibits a highly linear relationship, and the process involves no physical contact, thus eliminating wear. Theoretically, the mechanical life can reach over 5 million cycles.
[0096] To convert the weak analog voltage signal into a computer-processable digital signal, the system employs an onboard 12-bit high-precision analog-to-digital converter (ADC). Compared to the 256-level resolution of a traditional 8-bit controller, this system achieves a sampling resolution of [missing information]. Level. This means that at the full travel of the Hall effect sensor (assuming it is...). Within a degree, each level of change corresponds to approximately The mechanical deflection of a certain degree provides a solid physical data foundation for achieving micron-level speed adjustment. Meanwhile, to suppress power frequency interference and high-frequency noise, a first-order RC low-pass filter is added to the front end of the ADC in the circuit design, with a cutoff frequency set at 50Hz.
[0097] In this embodiment, the Hall effect rocker utilizes changes in magnetic flux density to generate an analog voltage signal, eliminating contact noise and zero-point drift caused by mechanical wear. Its internal mechanical structure integrates a nonlinear damping mechanism and an isotropic, centered elastic component (variable pitch helical spring) or hydraulic damper, providing force feedback that conforms to an exponential function.
[0098] The expression for the mechanical resistance of the Hall effect rocker is: ; in, For mechanical resistance, It is a physical displacement signal. The linear stiffness coefficient is... The nonlinear hardening coefficient is... is the viscous damping coefficient.
[0099] In the central area ( The smaller speed plays a dominant role, providing less resistance and making it easier for the operator to make small speed corrections (such as 1.1x to 1.5x).
[0100] As the push rod amplitude increases ( (get bigger) The number of items increased sharply, and the resistance became significantly greater.
[0101] Used to provide a hydraulic-like feel and prevent underdamped oscillations during rapid rebound of the Hall effect rocker.
[0102] The force feedback mechanism provides the operator with a clear proprioceptive feel: the further you push, the greater the resistance. This establishes a "tactile firewall" at the physical level, preventing accidental fast-forwarding of the video due to unconscious hand movements. At the hardware level, the introduction of an industrial-grade Hall effect joystick combined with nonlinear damping design physically reconstructs the tactile feedback mechanism of human-computer interaction, enabling operators to intuitively switch seamlessly between micrometer-level observation and kilometer-level browsing.
[0103] In one embodiment, the defect identification module 404 integrates a macro instruction mechanical keyboard specifically designed for the CJJ181 standard, which supports direct triggering of defect code input via hardware interrupt, enabling "blind typing" operation.
[0104] To be compatible with the CJJ 181 standard, the controller panel integrates a set of mechanical axis buttons specifically mapped to commonly used defect codes. One-click input is achieved through macro definitions in the underlying firmware.
[0105] KEY_PL (Broken): Click to insert a PL marker at the current timestamp; double-click to bring up a menu to select levels 1-4.
[0106] KEY_BX (Deformation): Press and hold to activate the electronic gauge on the screen. Use the Hall effect joystick to measure the percentage of deformation along the X / Y axis. The system will automatically determine the level according to Table 5.3.2 of CJJ 181.
[0107] KEY_CJ (Deposition): Use the knob on the right to input the percentage of deposition depth, and the system will automatically determine the level (e.g., 20%-30% is level 1).
[0108] Communication utilizes the RS485 differential bus protocol, rather than the less interference-resistant Transistor-Transistor Logic (TTL) or standard USB cables. The physical layer is based on the TIA / EIA-485 standard and uses twisted-pair shielded cable, effectively resisting high-frequency electromagnetic interference generated by industrial inverters, high-power water pumps, and motors. The data link layer employs a custom binary protocol, with the frame structure designed as follows: [Header 0xAA][Packet_Len][X_Axis_High][X_Axis_Low] The sampling rate is set to 100Hz (i.e., refreshed once every 10ms), which is much higher than the persistence of vision of the human eye, ensuring the real-time performance and smoothness of the control signal.
[0109] Figure 5 This is a schematic diagram of a pipeline defect video detection device based on a Hall effect rocker provided in an embodiment of the present invention. Figure 5 As shown, the Hall effect rocker-based pipeline defect video detection device 5 of this embodiment includes a processor 500 and a memory 501. The memory 501 stores a computer program 502. When the processor 500 executes the computer program 502, it implements the steps in the above-described method embodiments. Alternatively, when the processor 500 executes the computer program 502, it implements the functions of each module / unit in the above-described device embodiments.
[0110] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0111] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0112] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A video detection method for pipeline defects based on Hall effect rocker, characterized in that, include: The physical displacement signal applied by the operator is acquired by the Hall effect sensor and normalized to obtain a simulated displacement signal. The simulated displacement signal is mapped to the target video playback magnification using a piecewise exponential velocity mapping function; The pipeline inspection video is decoded based on the relationship between the target video playback magnification and a preset threshold; The decoded pipeline inspection video frames are rendered and output to the display terminal at the target video playback magnification for defect identification. The piecewise exponential velocity mapping function characterizes the mapping relationship between the target video playback magnification and the power function of the simulated displacement signal through a nonlinear curvature coefficient.
2. The video detection method for pipeline defects based on Hall effect rocker as described in claim 1, characterized in that, The step of mapping the analog displacement signal to the target video playback magnification using a piecewise exponential velocity mapping function includes: When the simulated displacement signal enters the dead zone from the non-zero zone, a timer of preset duration is started, and the target video playback magnification is set to zero. Outside the timer's timing window, when the analog displacement signal is positive, the target video playback magnification is obtained through the piecewise exponential velocity mapping function; Outside the timer's timing window, when the simulated displacement signal is negative and when the simulated displacement signal is greater than the reverse threshold, the target video playback magnification is obtained through the piecewise exponential velocity mapping function.
3. The video detection method for pipeline defects based on a Hall effect rocker as described in claim 2, characterized in that, The expression for the piecewise exponential velocity mapping function is: ; in, The target video playback ratio. The simulated displacement signal, The nonlinear curvature coefficient is... This is the maximum magnification factor. As initial compensation, Dead zone threshold, For symbolic functions, Let be the Herveside step function.
4. The video detection method for pipeline defects based on Hall effect rocker as described in claim 1, characterized in that, Decoding the pipeline detection video based on the relationship between the target video playback ratio and a preset threshold includes: When the target video playback ratio is less than or equal to the preset threshold, the pipeline detection video is decoded using full-frame decoding mode; When the target video playback ratio is greater than the preset threshold, the pipeline detection video is decoded using a sparse keyframe decoding mode.
5. The video detection method for pipeline defects based on a Hall effect rocker as described in claim 4, characterized in that, The decoding of the pipeline detection video using the sparse keyframe decoding mode includes: Scan the pipeline detection video, extract the byte offsets and corresponding timestamps of all key frames, and construct an image group cache index table; Calculate the timestamp of the next target moment based on the target video playback ratio, and locate the keyframe closest to the timestamp in the image group cache index table using a binary search method. Jump to the physical byte position of the nearest keyframe and decode it, discarding non-keyframes; Based on the acceleration direction of the Hall effect sensor, subsequent keyframes are pre-read into the circular buffer.
6. The video detection method for pipeline defects based on a Hall effect rocker as described in claim 5, characterized in that, Based on the acceleration direction of the Hall effect sensor, subsequent keyframes are pre-read into a circular buffer, including: The acceleration of the Hall rocker is calculated based on the rate of change of the physical displacement signal acquired by the Hall rocker. When the acceleration is positive, the next first preset value of the key frames of the pipeline inspection video are read and stored in the circular buffer; When the acceleration is negative, read the second preset value of key frames from the pipeline detection video and store them in the circular buffer.
7. The video detection method for pipeline defects based on Hall effect rocker as described in claim 1, characterized in that, The step of rendering and outputting the decoded pipeline inspection video frames to the display terminal at the target video playback magnification for defect identification includes: The decoded pipeline detection video frames are time-aligned and rendered according to the target video playback magnification to obtain the display video; Video frames of the displayed video are asynchronously captured at a sampling rate lower than the playback frame rate as feature maps, which are then input into an improved YOLOv8 network for defect detection, and the defect identification results are output.
8. The video detection method for pipeline defects based on a Hall effect rocker as described in claim 7, characterized in that, The improved YOLOv8 network includes: An input layer is used to receive the feature map; The backbone network embeds a convolutional attention module after each C2f module; the convolutional attention module includes a channel attention submodule and a spatial attention submodule in sequence. The channel attention submodule weights the channel dimension of the feature map, and the spatial attention submodule weights the spatial dimension of the feature map to obtain the weighted features. The neck network employs a fusion structure of feature pyramid and path aggregation network to fuse the weighted features and obtain fused features. The detection head adopts a decoupled head structure, which separates the classification branch and regression branch of the fused features to optimize the positioning accuracy of the defect category and the detection box respectively. The output layer outputs the detection box, its corresponding confidence score, and the defect category label.
9. A video detection device for pipeline defects based on a Hall effect rocker, characterized in that, include: The acquisition module is used to acquire the physical displacement signal applied by the operator obtained by the Hall joystick, and normalize the physical displacement signal to obtain the analog displacement signal; The target video playback magnification mapping module is used to map the analog displacement signal to the target video playback magnification through a piecewise exponential velocity mapping function. The video decoding module is used to decode the pipeline detection video according to the relationship between the target video playback magnification and a preset threshold. The defect identification module is used to render and output the decoded pipeline inspection video frame to the display terminal according to the target video playback magnification for defect identification; The piecewise exponential velocity mapping function characterizes the mapping relationship between the target video playback magnification and the power function of the simulated displacement signal through a nonlinear curvature coefficient.
10. A video inspection device for pipeline defects based on a Hall effect rocker, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the video detection method for pipeline defects based on a Hall effect rocker as described in any one of claims 1 to 8.