A method for measuring the height of a deep-hole firework fuse

CN120702352BActive Publication Date: 2026-09-11RUZHONG INTELLIGENT TECH SUZHOU CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510820780.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2026-09-11
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

[0002]烟花纸筒引线高度标准为(5±3)mm,当前行业年检测量达18亿件,但人工抽检漏检率>7%,接触式检测导致产品报废率>5%

Benefits of technology

本发明利用YOLO-OBB与散焦检测的融合架构将YOLO-OBB与散焦法结合,通过OBB精准锁定深孔内倾斜引线区域,倾斜角θ∈[-45°,45°],消除传统矩形ROI包含孔壁背景导致的方差计算干扰,有效区域占比从60%提升至95%;根据位移增强-差分方差联合评价机制在伺服步进间隔内,步进间隔为1mm,通过相位相关法计算亚像素级位移量,精度为0.05像素,并对补偿后图像执行差分运算,机械振动导致的图像错位影响降低85%,方差曲线信噪比提升至28dB;采用伺服系统与检测算法的协同优化,伺服使用编码器位置比较技术精确控制每1mm飞拍一次确保位置精度,单孔检测时间压缩至0.7s;不仅消除深孔内部激光反射干扰,还替代低效人工检测方式,并且提升散焦法检测速度与稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702352B_ABST
    Figure CN120702352B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of visual detection, and in particular to a deep-hole firework fuse height measurement method, which has the technical scheme of combining YOLO-OBB with the defocusing method, accurately locking the inclined fuse area in the deep hole through OBB, the inclination angle θ∈[-45°, 45°], eliminating the variance calculation interference caused by the traditional rectangular ROI containing the hole wall background, and increasing the effective area ratio from 60% to 95%; in the servo stepping interval, the stepping interval is 1 mm, the sub-pixel level displacement is calculated through the phase correlation method, the accuracy is 0.05 pixels, and the differential operation is performed on the compensated image, the image misregistration influence caused by mechanical vibration is reduced by 85%, and the signal-to-noise ratio of the variance curve is increased to 28 dB; the encoder position comparison technology is used for servo to accurately control the flying shot once every 1 mm to ensure the position accuracy, and the single-hole detection time is compressed to 0.7 s; not only the laser reflection interference in the deep hole is eliminated, but also the inefficient manual detection method is replaced, and the detection speed and stability of the defocusing method are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual inspection technology, and in particular to a method for measuring the height of a deep-hole firework fuse. Background Technology

[0002] The standard height of the lead wire in a fireworks paper tube is (5±3) mm. The current annual inspection volume in the industry reaches 1.8 billion pieces, but the missed inspection rate for manual sampling is >7%, and contact inspection results in a product scrap rate >5%. In existing technical solutions, the laser triangulation method involves projecting a 45° incident laser beam and capturing the displacement of the reflected light spot using a CMOS sensor. The drawback is that the angle is too large, and the deep hole wall blocks the laser emission, preventing the sensor from receiving the returned laser. The TOF (Time-of-Flight) ranging method calculates the distance by converting the laser pulse flight time. The drawback is that multiple reflections within the hole cause time signal aliasing, resulting in a measurement failure rate >60%. In summary, when using the existing laser triangulation and TOF methods to detect the lead wire height inside fireworks paper tubes (hole diameter ≤5mm, depth ≥30mm), the laser beam undergoes multiple reflections on the hole wall, causing the sensor's received light spot signal-to-noise ratio to be below 40%, making it impossible to obtain effective height data. Manual inspection involves an operator inserting a scale probe into the paper tube for contact measurement. The drawback is that the inspection speed is ≤3 seconds / piece, and probe friction causes a lead wire detachment rate >10%. Current production lines rely on manual visual estimation (error ±3mm) or contact probe measurement (damage rate 8%-12%), which cannot achieve 100% full inspection, and the inspection efficiency is less than 10 pieces / minute. Existing defocusing methods (such as the Tenengrad gradient method) can avoid interference from hole wall reflections, but require full-frame image sharpness calculations, with 1080p image processing taking ≥1.5s, and the mechanical focusing mechanism's movement speed ≤5mm / s, making rapid positioning at 1mm / step impossible. In summary, traditional defocusing methods require acquiring 5-7 focal plane images (taking ≥2s / piece), resulting in high computational load, low real-time performance, and sharpness evaluation function fluctuations exceeding ±15%, failing to meet the production line's required 0.7s inspection cycle.

[0003] In view of this, we propose a method for measuring the height of deep-hole fireworks fuses to solve the existing problems. Summary of the Invention

[0004] The purpose of this invention is to provide a method for measuring the height of a deep-hole firework fuse, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for measuring the height of a deep-hole firework fuse, comprising: combining a motion control module with an imaging module to acquire N images by multi-frame image acquisition, using YOLOv11-OBB for fuse positioning, pre-positioning to the fuse vertex, then using the vertex region ROI to calculate the sharpness in the N images, and using SIMD instructions to accelerate the calculation.

[0006] Furthermore, the motion control module uses a servo motor to drive a ball screw with a lead of 2mm, and with the encoder closed-loop feedback, it can achieve a Z-axis displacement of 1mm step and a repeatability of ±0.005mm.

[0007] Furthermore, the imaging module is equipped with a 5-megapixel global shutter CMOS camera with a frame rate of 60fps, a fixed focal length lens, a depth of field of 2mm, and a working distance of 300mm.

[0008] Furthermore, during the multi-frame image acquisition process, the servo system acquires N images within a 20mm range along the Z-axis at a step rate of 1mm / step, with a total travel of 20mm, an exposure time of 20ms per frame, and an image resolution of 2448×2048 pixels.

[0009] Furthermore, in the ROI extraction process based on YOLO-OBB, a lightweight YOLOv11-OBB model is deployed with an input resolution of 640×640. The target region is cropped based on the detection results to eliminate background interference.

[0010] Furthermore, the implementation process of the YOLO-OBB-based ROI extraction algorithm includes image displacement enhancement and differential calculation, local variance sharpness evaluation, height mapping and peak localization.

[0011] Furthermore, the image displacement enhancement and difference calculation includes: defining a displacement vector, performing an affine transformation on the nth frame image, and calculating the absolute difference between the displacement image and the original image.

[0012] Furthermore, the evaluation of local variance clarity includes: directly calculating the overall variance of the YOLO-OBB defined region.

[0013] Furthermore, height mapping and peak localization include: constructing a sharpness curve, fitting the curve through cubic spline interpolation, and locating the height corresponding to the maximum variance value.

[0014] Furthermore, N=20.

[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention utilizes a fusion architecture combining YOLO-OBB and defocus detection, integrating YOLO-OBB with the defocusing method. OBB precisely locates the tilted lead area within deep holes, with a tilt angle θ ∈ [-45°, 45°], eliminating variance calculation interference caused by the inclusion of the hole wall background in traditional rectangular ROIs, increasing the effective area ratio from 60% to 95%. Based on a displacement enhancement-differential variance joint evaluation mechanism, within a servo step interval of 1 mm, sub-pixel-level displacement is calculated using the phase correlation method with an accuracy of 0.05 pixels. Differential operations are performed on the compensated image, reducing image misalignment caused by mechanical vibration by 85%, and improving the variance curve signal-to-noise ratio to 28 dB. Through collaborative optimization of the servo system and detection algorithm, the servo uses encoder position comparison technology to precisely control the shooting every 1 mm to ensure positional accuracy, compressing the single-hole detection time to 0.7 s. This not only eliminates laser reflection interference inside deep holes but also replaces inefficient manual detection methods, improving the speed and stability of the defocusing detection method. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the process of a deep-hole fireworks fuse height measurement method according to the present invention. Figure 2 Image of the imaging module of the present invention; Figure 3 This is a schematic diagram illustrating the implementation process of the YOLO-OBB-based ROI extraction algorithm of the present invention. Detailed Implementation

[0017] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments. Example

[0018] like Figure 1 As shown, a method for measuring the height of a deep-hole firework fuse includes: combining a motion control module with an imaging module to acquire N images from multiple frames; using YOLOv11-OBB for fuse positioning, pre-locating to the fuse vertex; then using the vertex region ROI to calculate the sharpness in the N images; and using SIMD instructions to accelerate the calculation.

[0019] The motion control module uses a servo motor to drive the ball screw with a lead of 2mm. Combined with encoder closed-loop feedback, it can achieve a Z-axis displacement of 1mm step and a repeatability of ±0.005mm.

[0020] like Figure 2 As shown, the imaging module is equipped with a 5-megapixel global shutter CMOS camera with a frame rate of 60fps, a fixed focal length lens, a depth of field of 2mm, and a working distance of 300mm.

[0021] During the multi-frame image acquisition process, the servo system acquires 20 images within a 20mm range along the Z-axis at a step rate of 1mm / step, with a total travel of 20mm, an exposure time of 20ms per frame, and an image resolution of 2448×2048 pixels.

[0022] During the algorithm processing, YOLOv11-OBB is used for lead line localization, pre-locating to the lead line vertex, and then the sharpness in 20 images is calculated using the vertex region ROI. SIMD instructions are used to accelerate the calculation.

[0023] In the YOLO-OBB-based ROI extraction process, a lightweight YOLOv11-OBB model is deployed with an input resolution of 640×640. The target region is cropped based on the detection results to eliminate background interference.

[0024] like Figure 3 As shown, the implementation process of the YOLO-OBB-based ROI extraction algorithm includes image displacement enhancement and differential calculation, local variance sharpness evaluation, height mapping and peak localization.

[0025] Image displacement enhancement and difference calculation include: defining the displacement vector For the nth frame image Perform affine transformation: Calculate the absolute difference between the image after displacement and the original image: .

[0026] Local variance clarity evaluation includes: directly calculating the overall variance of the region defined by YOLO-OBB: N is the total number of pixels in the ROI, and μ is the average gray value of the ROI region.

[0027] Height mapping and peak localization include: constructing a sharpness curve Where z is the Z-axis position, the height corresponding to the maximum variance is located by fitting a curve using cubic spline interpolation. The calculation formula is as follows: ,in, =0.5mm is the Gaussian smoothing coefficient.

[0028] The above specific embodiments are merely several preferred embodiments of the present invention. Based on the technical solutions of the present invention and the relevant teachings of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.

Claims

1. A method for measuring the height of a deep-hole firework fuse, characterized in that, include: The motion control module and imaging module are combined to acquire N images from multiple frames. YOLOv11-OBB is used for lead wire positioning, pre-locating to the lead wire vertex. A fusion architecture combining YOLO-OBB and defocus detection is used to combine YOLO-OBB with the defocusing method. The OBB is used to lock the inclined lead wire region within the deep hole, with an inclination angle θ∈[-45°, 45°], eliminating variance calculation interference caused by the inclusion of the hole wall background in traditional rectangular ROIs. The sharpness of the N images is then calculated using the vertex region ROI, and SIMD instructions are used to accelerate the calculation. The motion control module uses a servo motor to drive a ball screw with a lead of 2mm, combined with encoder closed-loop feedback, to achieve a Z-axis displacement of 1mm step, with a repeatability accuracy of ±0.005mm. The imaging module is configured with 50... A 10-megapixel global shutter CMOS camera with a frame rate of 60fps, paired with a fixed focal length lens, has a depth of field of 2mm and a working distance of 300mm. During multi-frame image acquisition, the servo system acquires N images within a 20mm Z-axis range at a step size of 1mm / step, with a total travel of 20mm. The exposure time for each frame is 20ms, and the image resolution is 2448×2048 pixels, with N=20. In the YOLO-OBB-based ROI extraction process, a lightweight YOLOv11-OBB model is deployed with an input resolution of 640×640. The target region is cropped based on the detection results to eliminate background interference. The YOLO-OBB-based ROI extraction algorithm implementation process includes image displacement enhancement and differential calculation, local variance sharpness evaluation, height mapping, and peak localization. Image displacement enhancement and difference calculation include: defining a displacement vector, performing an affine transformation on the nth frame image, and calculating the absolute difference between the displacement image and the original image; local variance sharpness evaluation includes: directly calculating the overall variance of the YOLO-OBB defined region; height mapping and peak localization include: constructing a sharpness curve, fitting the curve through cubic spline interpolation, and locating the height corresponding to the maximum variance value.

Citation Information

Patent Citations

  • Lead-wire detection device for firework combined pot

    CN105737684A

  • Visual system for disassembly of container lock pin

    CN114332598A

  • Projection device and ROI feature region selection method

    CN115002433A