A method and device for locating a fiber port based on machine vision
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,现有基于机器视觉的光纤端口定位方法,仅采用单一光谱进行图像采集,未结合红外与可见光光谱的图像特征开展同步采集,且曝光调节缺乏针对性,无法适配光纤端口的实际采集环境;在图像融合环节,未依据光纤端口的反光特征设定灰度阈值,也未通过统计反光区域像素占比分配融合权重,仅做简单的图像叠加处理;特征提取仅依靠常规的轮廓识别,未精确计算像素点梯度幅值支撑边缘识别,定位校准也未结合成像模组的标定参数与特征信息集开展分析
[0026]一、本发明通过多光谱成像模组同步采集光纤端口的红外光谱图像和可见光光谱图像,配合自适应曝光调节单元调整曝光参数,对采集的两类光谱图像完成降噪、灰度化、归一化及对比度增强的预处理操作,对预处理后的两类光谱图像进行二值化处理,依托光纤端口反光特征的历史统计数据设定灰度值阈值划分反光与非反光像素点,统计反光区域像素占比并为两类光谱图像分配融合权重,完成像素级融合得到光纤端口融合图像,让图像采集、预处理与融合的环节形成连贯的技术流程,各环节操作均贴合光纤端口的图像特征与实际采集需求。
Smart Images

Figure CN122550441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, specifically to a method and apparatus for locating fiber optic ports based on machine vision. Background Technology
[0002] Optical fiber communication is one of the core technologies in the modern communication field. It is widely used in data transmission, communication networking, industrial interconnection and other fields, and has become an important foundation for supporting the development of informatization. As a key connection node in optical fiber communication links, the positioning operation of optical fiber ports is a prerequisite for subsequent operations such as optical fiber docking, fusion splicing and testing. It is directly related to the efficiency of optical fiber communication link construction. With the advantage of non-contact detection, machine vision technology is increasingly widely used in the field of industrial positioning and detection, and has gradually become the mainstream technical means for optical fiber port positioning.
[0003] However, existing machine vision-based fiber optic port positioning methods only use a single spectrum for image acquisition, without combining image features from infrared and visible light spectra for simultaneous acquisition. Furthermore, the exposure adjustment lacks specificity and cannot adapt to the actual acquisition environment of the fiber optic port. In the image fusion stage, grayscale thresholds are not set based on the reflective characteristics of the fiber optic port, nor are fusion weights allocated by statistically analyzing the pixel proportions of reflective areas; only simple image overlay processing is performed. Feature extraction relies solely on conventional contour recognition, without accurately calculating pixel gradient magnitudes to support edge recognition. Positioning calibration also fails to combine the calibration parameters of the imaging module with the feature information set for analysis. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a machine vision-based fiber optic port positioning method and device. This invention simultaneously acquires infrared and visible light spectral images of the fiber optic port using a multispectral imaging module, and adjusts exposure parameters with an adaptive exposure adjustment unit. Preprocessing operations such as noise reduction, grayscale conversion, normalization, and contrast enhancement are performed on the acquired two types of spectral images. The preprocessed two types of spectral images are then binarized. Based on historical statistical data of the fiber optic port's reflectivity, a grayscale threshold is set to divide reflective and non-reflective pixels. The pixel ratio of reflective areas is statistically analyzed, and fusion weights are assigned to the two types of spectral images. Pixel-level fusion is then completed to obtain a fused image of the fiber optic port. This allows the image acquisition, preprocessing, and fusion stages to form a coherent technical process, with each stage operation closely aligned with the image characteristics of the fiber optic port and actual acquisition requirements.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: On one hand, a fiber optic port positioning method based on machine vision, the specific steps of which are as follows:
[0006] Multispectral acquisition: The infrared and visible light spectral images from the fiber optic port are acquired simultaneously through a multispectral imaging module, and the exposure parameters are adjusted by adaptive exposure adjustment before the acquired two types of spectral images are transmitted.
[0007] Image preprocessing: Receive two types of transmitted spectral images, perform preprocessing operations on the two types of spectral images in sequence to complete basic image optimization, and then transmit the two types of preprocessed spectral images;
[0008] Spectral fusion: Receive two types of preprocessed spectral images, then perform pixel-by-pixel detection and count the pixel ratio of reflective areas, assign fusion weights to the two types of spectral images, and perform pixel-level fusion operation on the two types of spectral images to obtain the fiber optic port fused image;
[0009] Feature extraction: Edge recognition and contour fitting are performed on the fused image of the fiber port to extract the edge contour, core center coordinates and cladding boundary features of the fiber port, and the extracted features are integrated to form a feature information set;
[0010] Positioning calibration: retrieve the calibration parameters of the multispectral imaging module, combine them with the feature information set, calculate the actual spatial coordinates of the fiber optic port, and generate and output the positioning result.
[0011] Furthermore, in the multispectral acquisition, the multispectral imaging module integrates an infrared imaging unit, a visible light imaging unit, and an adaptive exposure adjustment unit. The infrared imaging unit uses an infrared CCD camera or an infrared CMOS camera, and the visible light imaging unit uses an industrial visible light high-definition camera. The shooting optical axes of the infrared imaging unit and the visible light imaging unit are kept coaxial, the shooting focal length is the same, and the shooting frame rate is synchronized. The adaptive exposure adjustment unit includes a light sensor and an image recognition component. When performing adaptive exposure adjustment, the light sensor collects light intensity data of the environment collected by the multispectral imaging module, and the image recognition component detects the surface of the fiber optic port and obtains the distribution data of the reflective area. The light intensity data and the distribution data of the reflective area are transmitted to the control unit of the multispectral imaging module. The control unit matches the basic exposure parameters according to the light intensity data and performs secondary adjustments to the basic exposure parameters according to the distribution data of the reflective area to determine the final exposure time and imaging gain parameters. The multispectral imaging module completes the acquisition of infrared spectral images and visible light spectral images according to the final exposure time and imaging gain parameters.
[0012] Furthermore, in the image preprocessing, the infrared spectral image and the visible light spectral image are respectively subjected to noise reduction processing to remove noise from the image. The denoised infrared spectral image and the denoised visible light spectral image are then converted to grayscale to obtain grayscale infrared spectral image and grayscale visible light spectral image. The grayscale infrared spectral image and the grayscale visible light spectral image are first subjected to grayscale value normalization processing, and then the two types of images after normalization are subjected to contrast enhancement processing to complete the preprocessing operation of the infrared spectral image and the visible light spectral image.
[0013] Furthermore, in the spectral fusion process, when performing pixel proportion statistics of reflective areas and fusion weight allocation, the preprocessed infrared and visible light spectral images are binarized. A grayscale threshold is set based on historical statistical data of the reflective characteristics of the fiber optic port. Based on the grayscale threshold, the image is divided into reflective and non-reflective pixels. The reflective pixels in the image are traversed row by row, and the total number of reflective pixels is counted. At the same time, the total number of pixels in the preprocessed infrared and visible light spectral images is counted. The pixel proportion of reflective areas is obtained by the ratio of the total number of reflective pixels to the total number of pixels. Based on the pixel proportion of reflective areas, a first fusion weight is assigned to the preprocessed infrared spectral image and a second fusion weight is assigned to the preprocessed visible light spectral image using an adaptive spectral weight allocation formula. Based on the assigned first and second fusion weights, a pixel-level fusion operation is performed on the preprocessed infrared and visible light spectral images to obtain the fused image of the fiber optic port.
[0014] Furthermore, in the spectral fusion, the adaptive spectral weight allocation formula is as follows: ,in, The first fusion weight of the preprocessed infrared spectral image. The second fusion weight is the preprocessed visible light spectrum image, and , This represents the percentage of pixels in the reflective area.
[0015] Furthermore, in the feature extraction, the gradient magnitude of pixels in the fused image of the fiber optic port is calculated using the edge detection algorithm formula. Based on the gradient magnitude, edge recognition and contour fitting are performed on the fused image of the fiber optic port to extract the edge contour of the fiber optic port. The circular edge region in the image is marked from the fitted edge contour. The circular edge region is fitted to obtain the circular contour of the fiber core, and the pixel coordinate set of the circular contour of the fiber core is extracted to obtain the coordinates of the fiber core center and the fiber core radius. The region is traversed outward from the center coordinates of the fiber core to mark the inner and outer edge pixels of the cladding. The inner and outer edge pixels of the cladding are fitted to obtain the inner and outer boundary contours of the cladding, and the pixel coordinate set of the inner and outer boundaries of the cladding is extracted as the cladding boundary features. The extracted edge contour of the fiber optic port, the fiber core center coordinates, and the cladding boundary features are then integrated to form the feature information set of the fiber optic port.
[0016] Furthermore, in the aforementioned feature extraction, the edge detection algorithm formula is as follows: ,in, The coordinates in the fiber optic port fusion image are The gradient magnitude of the pixel, The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the x-direction. The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the y-direction. and The coordinates in the fused image from the fiber optic port are The difference in grayscale value between a pixel and its neighboring pixels is used to determine the pixel's value.
[0017] Furthermore, in the positioning calibration, the calibration parameters of the multispectral imaging module include the camera intrinsic parameters, camera extrinsic parameters, and camera distortion parameters of the infrared imaging unit and the visible light imaging unit; combined with the feature information set of the fiber optic port, the actual spatial position coordinates of the fiber optic port are calculated using the actual position coordinate transformation formula of the fiber optic port.
[0018] Furthermore, in the positioning calibration, the formula for transforming the actual position coordinates of the fiber optic port is: ,in, These are the two-dimensional coordinates of the fiber optic port in actual space. The pixel coordinates of the fiber core circle. The coordinates of the principal point in the camera's intrinsic parameters. This refers to the focal length parameter in the camera's intrinsic parameters. The translation vector parameter in the camera's extrinsic parameters. This refers to the actual distance between the fiber optic port and the camera. The coefficients for weighting are adjusted by... and The mean is determined.
[0019] On the other hand, a machine vision-based fiber optic port positioning device includes:
[0020] Multispectral acquisition module: Simultaneously acquires infrared and visible light spectral images from the fiber optic port through the multispectral imaging module, performs adaptive exposure adjustment to adjust the exposure parameters, and then transmits the acquired two types of spectral images;
[0021] Image preprocessing module: Receives two types of transmitted spectral images, performs preprocessing operations on the two types of spectral images in sequence, completes basic image optimization, and transmits the preprocessed two types of spectral images;
[0022] Spectral fusion module: Receives two types of preprocessed spectral images, performs pixel-by-pixel detection and counts the pixel ratio of reflective areas, assigns fusion weights to the two types of spectral images, and performs pixel-level fusion operation on the two types of spectral images to obtain the fiber optic port fused image;
[0023] Feature extraction module: performs edge recognition and contour fitting on the fused image of the fiber port, extracts the edge contour, core center coordinates and cladding boundary features of the fiber port, and integrates the extracted features to form a feature information set;
[0024] Positioning calibration module: retrieves the calibration parameters of the multispectral imaging module, combines them with the feature information set, calculates the actual spatial coordinates of the fiber optic port, and generates and outputs the positioning results.
[0025] Compared with existing technologies, this machine vision-based fiber optic port positioning method and device has the following advantages:
[0026] I. This invention simultaneously acquires infrared and visible light spectral images of an optical fiber port using a multispectral imaging module. An adaptive exposure adjustment unit adjusts exposure parameters, performing preprocessing operations such as noise reduction, grayscale conversion, normalization, and contrast enhancement on the acquired two types of spectral images. The preprocessed spectral images are then binarized. Based on historical statistical data of the optical fiber port's reflectivity, a grayscale threshold is set to distinguish reflective and non-reflective pixels. The pixel percentage of reflective areas is statistically analyzed, and fusion weights are assigned to the two types of spectral images. Pixel-level fusion is then completed to obtain a fused image of the optical fiber port. This allows the image acquisition, preprocessing, and fusion processes to form a coherent technical workflow, with each step closely aligned with the image characteristics of the optical fiber port and actual acquisition requirements.
[0027] Second, this invention calculates the gradient magnitude of pixels in the fused image of the fiber optic port using an edge detection algorithm formula. Based on the gradient magnitude, it performs edge recognition and contour fitting on the fused image, sequentially extracting the edge contour, core center coordinates, and cladding boundary features of the fiber optic port. The extracted features are integrated to form a feature information set. Then, the calibration parameters of the multispectral imaging module are retrieved, and the actual spatial coordinates of the fiber optic port are calculated using a coordinate transformation formula in combination with the feature information set, and the positioning result is output. Feature extraction is achieved through a quantized algorithm. The positioning calibration step combines the inherent parameters of the imaging module with the extracted feature information, making feature extraction and positioning calibration a complete technical link. The operations of each step support each other to form a closed-loop positioning process.
[0028] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0030] Figure 1 This is a flowchart of a machine vision-based fiber optic port positioning method.
[0031] Figure 2 This is a frame diagram of a machine vision-based fiber optic port positioning device.
[0032] Figure 3 This is a framework diagram of feature extraction in a machine vision-based fiber optic port localization method. Detailed Implementation
[0033] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0034] Example 1:
[0035] In the field splicing of single-mode optical fibers in outdoor long-distance optical fiber communication projects, there are characteristics such as variable ambient light caused by direct sunlight, local reflection of the coating layer of the optical fiber port, and high requirements for port positioning accuracy in splicing operations. It is necessary to complete the precise positioning of the optical fiber port before splicing to provide an accurate position reference for the fully automatic splicing equipment. The entire positioning process is completed by machine vision positioning device.
[0036] During the multispectral acquisition phase, the device's multispectral imaging module simultaneously acquires infrared and visible light spectral images from the fiber optic port. This multispectral imaging module integrates an infrared imaging unit, a visible light imaging unit, and an adaptive exposure adjustment unit. The infrared imaging unit uses an infrared CCD camera, and the visible light imaging unit uses an industrial high-definition visible light camera. The shooting optical axes of the infrared and visible light imaging units are coaxially aligned, the shooting focal length is adjusted to the same value, and the shooting frame rate is kept completely synchronized. The adaptive exposure adjustment unit is equipped with a light sensor and an image recognition component. The light sensor collects real-time light intensity data of the outdoor working environment, and the image recognition component... The device precisely detects the surface of the fiber optic port and acquires the distribution data of the reflective area. Then, it transmits both the light intensity data and the reflective area distribution data to the control unit of the multispectral imaging module. The control unit first matches the corresponding basic exposure parameters based on the light intensity data, and then performs a second precise adjustment of the basic exposure parameters based on the reflective area distribution data to determine the final exposure time and imaging gain parameters. The multispectral imaging module, according to the finally determined parameters, simultaneously acquires infrared and visible light spectral images through the infrared imaging unit and the visible light imaging unit. After acquisition, the two types of spectral images are transmitted to the subsequent image preprocessing stage, such as... Figure 1 As shown.
[0037] In the image preprocessing stage, infrared and visible light spectral images transmitted from the multispectral acquisition stage are received. First, noise reduction processing is performed on the infrared and visible light spectral images respectively to effectively remove image noise caused by stray light from the outdoor environment and slight vibration of the equipment. Then, grayscale processing is performed on the noise-reduced infrared and visible light spectral images to convert all color spectral images into grayscale images, resulting in corresponding grayscale infrared and grayscale visible light spectral images. Next, grayscale value normalization processing is performed on the grayscale infrared and visible light spectral images. Finally, contrast enhancement processing is performed on the two normalized images. After completing all the basic image optimization operations, the preprocessed two types of spectral images are transmitted to the subsequent spectral fusion stage.
[0038] In the spectral fusion stage, the preprocessed infrared and visible light spectral images transmitted from the image preprocessing stage are received. The pixel proportion statistics of reflective areas, fusion weight allocation, and pixel-level fusion operations are then performed sequentially. First, the two types of spectral images are binarized. A grayscale threshold is pre-set based on historical statistical data of the reflective characteristics of the fiber optic port. Then, based on this grayscale threshold, the image is precisely divided into reflective and non-reflective pixels. Subsequently, the reflective pixels in the image are traversed row by row, and the total number of reflective pixels is counted. Simultaneously, the total number of pixels in the preprocessed infrared and visible light spectral images is counted. The pixel proportion of reflective areas is calculated by the ratio of the total number of reflective pixels to the total number of pixels. Based on the calculated pixel proportion of reflective areas, a first fusion weight is assigned to the preprocessed infrared spectral image, and a second fusion weight is assigned to the preprocessed visible light spectral image using an adaptive spectral weight allocation formula. The adaptive spectral weight allocation formula is as follows: ,in, The first fusion weight of the preprocessed infrared spectral image. The second fusion weight is the preprocessed visible light spectrum image, and , The pixel percentage of the reflective area is used as the basis for calculation. Finally, based on the assigned first and second fusion weights, pixel-level fusion is performed on the preprocessed infrared and visible light spectral images to obtain the final fused image of the fiber optic port, as shown below. Figure 2 As shown.
[0039] In the feature extraction stage, a complete feature extraction and feature information integration operation is performed on the fused image of the fiber optic port obtained from the spectral fusion step. First, the gradient magnitude of all pixels in the fused image of the fiber optic port is calculated using the edge detection algorithm formula, which is as follows: ,in, The coordinates in the fiber optic port fusion image are The gradient magnitude of the pixel, The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the x-direction. The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the y-direction. and The coordinates in the fused image from the fiber optic port are The difference in grayscale values between the pixel and its neighboring pixels is determined; based on the calculated gradient magnitude, precise edge recognition and contour fitting are performed on the fused image of the fiber optic port to extract the complete edge contour of the fiber optic port. Then, the circular edge region in the image is accurately marked from the fitted edge contour. The circular edge region is then fitted again to obtain the circular contour of the fiber core, and the pixel coordinate set of the fiber core circular contour is extracted. Based on the extracted pixel coordinate set, the coordinates of the fiber core center and the fiber core radius are obtained. Subsequently, the region is traversed step by step outward from the fiber core center coordinates to mark the inner and outer edge pixels of the cladding. Contour fitting is performed on the inner and outer edge pixels of the cladding to obtain the inner and outer boundary contours of the cladding, and the pixel coordinate set of the inner and outer boundaries of the cladding is extracted. This pixel coordinate set is used as the cladding boundary feature. Finally, the extracted edge contour of the fiber optic port, the fiber core center coordinates, and the cladding boundary features are integrated to form a complete fiber optic port feature information set, such as... Figure 3 As shown.
[0040] During the positioning and calibration phase, the actual spatial position of the fiber optic port is calculated, and the positioning results are generated and output. First, the calibration parameters of the multispectral imaging module are retrieved. These parameters include the camera intrinsic parameters, camera extrinsic parameters, and camera distortion parameters of the infrared and visible light imaging units. Then, the retrieved calibration parameters are combined with the fiber optic port feature information set formed in the feature extraction phase. The actual spatial position coordinates of the fiber optic port are calculated using the fiber optic port actual position coordinate transformation formula. The fiber optic port actual position coordinate transformation formula is as follows: ,in, These are the two-dimensional coordinates of the fiber optic port in actual space. The pixel coordinates of the fiber core circle. The coordinates of the principal point in the camera's intrinsic parameters. This refers to the focal length parameter in the camera's intrinsic parameters. The translation vector parameter in the camera's extrinsic parameters. This refers to the actual distance between the fiber optic port and the camera. The coefficients for weighting are adjusted by... and The mean value is determined; finally, the fiber optic port positioning result is generated based on the calculated coordinate data and output in real time. This positioning result is directly transmitted to the fully automatic fiber optic fusion splicing equipment on site, providing a positional basis for the accurate docking of the fusion splicing equipment ports.
[0041] In summary, in the field splicing of single-mode optical fibers in outdoor long-distance optical fiber communication projects, considering the characteristics of variable outdoor light and easy reflection at the fiber optic port, the entire process of dual-spectral synchronous acquisition, image preprocessing, spectral fusion, feature extraction, and positioning calibration of the fiber optic port is completed sequentially. Adaptation processing of each step is completed to meet the actual environmental requirements of outdoor operations. Finally, the actual spatial coordinates of the fiber optic port are accurately calculated and the positioning result is output, providing a reliable positional basis for the accurate docking of the port of the fully automatic splicing equipment and meeting the high-precision requirements for port positioning in outdoor optical fiber splicing operations.
[0042] Example 2:
[0043] In the daily inspection of multimode fiber optic equipment in large indoor communication equipment rooms, the equipment room is characterized by constant temperature and humidity, stable ambient light, but dense fiber optic ports are arranged in the cabinets, the port surfaces are prone to local reflection due to dust in the equipment room, and the inspection operation requires rapid and accurate positioning of multiple ports. By completing the position detection of each fiber optic equipment port in the equipment room, it provides accurate position information for inspection personnel to troubleshoot port connection faults and carry out equipment maintenance. The entire positioning process is completed by a dedicated machine vision inspection device for the equipment room.
[0044] During the multispectral acquisition phase, the multispectral imaging module of the detection device simultaneously acquires infrared and visible light spectral images of the fiber optic equipment ports in the equipment room. This multispectral imaging module integrates an infrared imaging unit, a visible light imaging unit, and an adaptive exposure adjustment unit. The infrared imaging unit uses an infrared CMOS camera, and the visible light imaging unit uses an industrial high-definition visible light camera. The shooting optical axes of the infrared and visible light imaging units are kept coaxial. Considering the dense port arrangement within the equipment rack, the shooting focal length is adjusted to the same adaptive value, and the shooting frame rate is kept completely synchronized. The adaptive exposure adjustment unit is equipped with a light sensor and an image recognition component. The light sensor acquires stable ambient light intensity data within the equipment room. The image recognition component performs close-range, precise detection of the fiber optic port surface within the cabinet and acquires the distribution data of reflective areas caused by dust accumulation. It then transmits both the light intensity data and the reflective area distribution data to the control unit of the multispectral imaging module. The control unit first matches the corresponding basic exposure parameters based on the light intensity data, and then performs a second, precise adjustment of the basic exposure parameters based on the reflective area distribution data to determine the final exposure time and imaging gain parameters. The multispectral imaging module, according to the final determined parameters, simultaneously acquires infrared and visible light spectral images through the infrared imaging unit and the visible light imaging unit. After acquisition, the two types of spectral images are transmitted to the subsequent image preprocessing stage.
[0045] In the image preprocessing stage, infrared and visible light spectral images transmitted from the multispectral acquisition stage are received, and preprocessing operations are performed on the two types of spectral images sequentially. First, noise reduction processing is performed on the infrared and visible light spectral images to effectively remove image noise caused by electromagnetic interference from equipment in the equipment room and slight movement of the detection terminal. Then, grayscale processing is performed on the noise-reduced infrared and visible light spectral images to convert all color spectral images into grayscale images, resulting in corresponding grayscale infrared and grayscale visible light spectral images. Next, grayscale value normalization processing is performed on the grayscale infrared and visible light spectral images to eliminate grayscale value deviations caused by different imaging units. Finally, contrast enhancement processing is performed on the two normalized images to improve the distinction between the fiber optic port outline and the background of the equipment in the equipment room. After completing all the basic image optimization operations, the preprocessed two types of spectral images are transmitted to the subsequent spectral fusion stage.
[0046] In the spectral fusion stage, the preprocessed infrared and visible light spectral images transmitted from the image preprocessing stage are received. Then, the pixel proportion of reflective areas, fusion weight allocation, and pixel-level fusion operations are performed sequentially. First, the two types of spectral images are binarized. A grayscale threshold is pre-set based on historical statistical data of the reflective characteristics of the fiber optic port. Based on this grayscale threshold, the image is precisely divided into reflective and non-reflective pixels. Then, the reflective pixels in the image are traversed row by row, and the total number of reflective pixels is meticulously counted. Simultaneously, the total number of pixels in the preprocessed infrared and visible light spectral images is counted. The pixel proportion of reflective areas is calculated by the ratio of the total number of reflective pixels to the total number of pixels. Based on the calculated pixel proportion of reflective areas, a first fusion weight is assigned to the preprocessed infrared spectral image, and a second fusion weight is assigned to the preprocessed visible light spectral image using an adaptive spectral weight allocation formula. Finally, based on the assigned first and second fusion weights, the adaptive spectral weight allocation formula is as follows: A pixel-level fusion operation is performed on the preprocessed infrared and visible light spectral images to obtain a clear fused image of the fiber optic port.
[0047] In the feature extraction stage, a complete feature extraction and feature information integration operation is performed on the fused image of the fiber optic port obtained from the spectral fusion step. First, the gradient magnitude of all pixels in the fused image of the fiber optic port is calculated using the edge detection algorithm formula, which is as follows: Based on the calculated gradient magnitude, precise edge recognition and contour fitting are performed on the fused image of the fiber optic port to extract the complete edge contour of the fiber optic port. Then, the circular edge region in the image is accurately marked from the fitted edge contour. The circular edge region is fitted again to obtain the circular contour of the fiber core, and the pixel coordinate set of the fiber core circular contour is extracted. The fiber core center coordinate and fiber core radius value are obtained based on the extracted pixel coordinate set. Then, the region is traversed step by step outward from the fiber core center coordinate to accurately mark the inner and outer edge pixels of the cladding. The inner and outer edge pixels of the cladding are fitted to obtain the inner and outer boundary contours of the cladding, and the pixel coordinate set of the inner and outer boundaries of the cladding is extracted. This pixel coordinate set is used as the cladding boundary feature. Finally, the extracted edge contour of the fiber optic port, the fiber core center coordinate, and the cladding boundary feature are systematically integrated to form a standardized fiber optic port feature information set.
[0048] During the positioning and calibration phase, the actual spatial position of the fiber optic port is calculated, and the positioning results are generated and output. First, the calibration parameters of the multispectral imaging module are retrieved from the detection terminal system. These calibration parameters include the camera intrinsic parameters, camera extrinsic parameters, and camera distortion parameters of the infrared and visible light imaging units. Then, the retrieved calibration parameters are combined with the fiber optic port feature information set formed during the feature extraction phase. The actual spatial position coordinates of the fiber optic port are calculated using the fiber optic port actual position coordinate transformation formula. The fiber optic port actual position coordinate transformation formula is as follows: Finally, the fiber optic port positioning result is generated based on the calculated coordinate data and output in real time. This positioning result is simultaneously displayed on the screen of the testing terminal, providing accurate location reference for the testing personnel in the computer room to troubleshoot fiber optic port connection faults, carry out equipment maintenance and port replacement.
[0049] In summary, during the routine inspection of multimode fiber optic equipment in large indoor communication equipment rooms, considering the characteristics of the environment—stable lighting but densely packed ports and susceptibility to reflections due to dust—the system completes the entire process of dual-spectrum acquisition, image optimization processing, spectral fusion, feature integration, and location calculation. It accurately extracts various features of the fiber optic ports and calculates their actual spatial locations, simultaneously outputting the positioning results and displaying them on the inspection terminal. This provides precise location references for equipment room inspectors to troubleshoot port faults and perform equipment maintenance, meeting the operational needs of refined inspection of fiber optic equipment in equipment rooms.
[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A machine vision based method of locating a fiber port, the method comprising: The specific steps of this method are as follows: Multispectral acquisition: The infrared and visible light spectral images from the fiber optic port are acquired simultaneously through a multispectral imaging module, and the exposure parameters are adjusted by adaptive exposure adjustment before the acquired two types of spectral images are transmitted. Image preprocessing: Receive two types of transmitted spectral images, perform preprocessing operations on the two types of spectral images in sequence to complete basic image optimization, and then transmit the two types of preprocessed spectral images; Spectral fusion: Receive two types of preprocessed spectral images, then perform pixel-by-pixel detection and count the pixel ratio of reflective areas, assign fusion weights to the two types of spectral images, and perform pixel-level fusion operation on the two types of spectral images to obtain the fiber optic port fused image; Feature extraction: Edge recognition and contour fitting are performed on the fused image of the fiber port to extract the edge contour, core center coordinates and cladding boundary features of the fiber port, and the extracted features are integrated to form a feature information set; Positioning calibration: retrieve the calibration parameters of the multispectral imaging module, combine them with the feature information set, calculate the actual spatial coordinates of the fiber optic port, and generate and output the positioning result.
2. The fiber optic port positioning method based on machine vision according to claim 1, characterized in that, In the multispectral acquisition, the multispectral imaging module integrates an infrared imaging unit, a visible light imaging unit, and an adaptive exposure adjustment unit. The infrared imaging unit uses an infrared CCD camera or an infrared CMOS camera, and the visible light imaging unit uses an industrial visible light high-definition camera. The shooting optical axes of the infrared imaging unit and the visible light imaging unit are kept coaxial, the shooting focal length is the same, and the shooting frame rate is synchronized. The adaptive exposure adjustment unit includes a light sensor and an image recognition component. When performing adaptive exposure adjustment, the light sensor collects light intensity data of the environment collected by the multispectral imaging module, and the image recognition component detects the surface of the fiber optic port and obtains the distribution data of the reflective area. The light intensity data and the distribution data of the reflective area are transmitted to the control unit of the multispectral imaging module. The control unit matches the basic exposure parameters according to the light intensity data and makes secondary adjustments to the basic exposure parameters according to the distribution data of the reflective area to determine the final exposure time and imaging gain parameters. The multispectral imaging module completes the acquisition of infrared spectral images and visible light spectral images according to the final exposure time and imaging gain parameters.
3. The method of claim 1, wherein, In the image preprocessing, the infrared and visible light spectral images are denoised to remove noise. The denoised infrared and visible light spectral images are then converted to grayscale to obtain grayscale infrared and visible light spectral images. The grayscale infrared and visible light spectral images are then normalized, and contrast enhancement is performed on the two normalized images to complete the preprocessing of the infrared and visible light spectral images.
4. The method of claim 1, wherein, In the spectral fusion process, when calculating the pixel proportion of the reflective region and allocating fusion weights, the preprocessed infrared and visible light spectral images are binarized. A grayscale threshold is set based on historical statistical data of the reflective characteristics of the fiber optic port. Based on the grayscale threshold, the image is divided into reflective and non-reflective pixels. The reflective pixels in the image are traversed row by row, and the total number of reflective pixels is counted. At the same time, the total number of pixels in the preprocessed infrared and visible light spectral images is counted. The pixel proportion of the reflective region is obtained by the ratio of the total number of reflective pixels to the total number of pixels. Based on the pixel proportion of the reflective region, an adaptive spectral weight allocation formula is used to assign a first fusion weight to the preprocessed infrared spectral image and a second fusion weight to the preprocessed visible light spectral image. Based on the assigned first and second fusion weights, a pixel-level fusion operation is performed on the preprocessed infrared and visible light spectral images to obtain the fused image of the fiber optic port.
5. The method of claim 4, wherein, In the spectrum fusion, the adaptive spectrum weight distribution formula is: wherein, is the first fusion weight of the preprocessed infrared spectrum image, is the second fusion weight of the preprocessed visible spectrum image, and , is the pixel proportion of the reflective region.
6. The method of claim 1, wherein, In the feature extraction process, the gradient magnitude of pixels in the fused image of the fiber optic port is calculated using an edge detection algorithm. Based on the gradient magnitude, edge recognition and contour fitting are performed on the fused image of the fiber optic port to extract the edge contour of the fiber optic port. Circular edge regions in the image are marked from the fitted edge contours. Contour fitting is performed on the circular edge regions to obtain the circular contour of the fiber core. The pixel coordinate set of the circular contour of the fiber core is extracted to obtain the coordinates of the fiber core center and the fiber core radius. The region is traversed outward from the fiber core center coordinates to mark the inner and outer edge pixels of the cladding. Contour fitting is performed on the inner and outer edge pixels of the cladding to obtain the inner and outer boundary contours of the cladding. The pixel coordinate set of the inner and outer boundaries of the cladding is extracted as the cladding boundary features. Finally, the extracted edge contours of the fiber optic port, the fiber core center coordinates, and the cladding boundary features are integrated to form the feature information set of the fiber optic port.
7. The method of claim 6, wherein, In the feature extraction, the edge detection algorithm formula is as follows: ,in, The coordinates in the fiber optic port fusion image are The gradient magnitude of the pixel, The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the x-direction. The coordinates in the fiber optic port fusion image are The gradient value of the pixel in the y-direction. and The coordinates of the fiber optic port fused image are The difference in grayscale value between a pixel and its neighboring pixels is used to determine the pixel's value.
8. The fiber optic port positioning method based on machine vision according to claim 1, characterized in that, In the positioning calibration, the calibration parameters of the multispectral imaging module include the camera intrinsic parameters, camera extrinsic parameters, and camera distortion parameters of the infrared imaging unit and the visible light imaging unit; combined with the feature information set of the fiber optic port, the actual spatial position coordinates of the fiber optic port are calculated by the actual position coordinate transformation formula of the fiber optic port.
9. The method of claim 8, wherein, In the positioning calibration, the formula for transforming the actual position coordinates of the fiber optic port is: ,in, These are the two-dimensional coordinates of the fiber optic port in actual space. The pixel coordinates of the fiber core circle. The coordinates of the principal point in the camera's intrinsic parameters. This refers to the focal length parameter in the camera's intrinsic parameters. The translation vector parameter in the camera's extrinsic parameters. This refers to the actual distance between the fiber optic port and the camera. The coefficients for weighting are adjusted by... and The mean is determined.
10. A machine vision-based fiber optic port positioning device, the device being applicable to the machine vision-based fiber optic port positioning method according to any one of claims 1-9, characterized in that, The device includes: Multispectral acquisition module: Simultaneously acquires infrared and visible light spectral images from the fiber optic port through the multispectral imaging module, performs adaptive exposure adjustment to adjust the exposure parameters, and then transmits the acquired two types of spectral images; Image preprocessing module: Receives two types of transmitted spectral images, performs preprocessing operations on the two types of spectral images in sequence, completes basic image optimization, and transmits the preprocessed two types of spectral images; Spectral fusion module: Receives two types of preprocessed spectral images, performs pixel-by-pixel detection and counts the pixel ratio of reflective areas, assigns fusion weights to the two types of spectral images, and performs pixel-level fusion operation on the two types of spectral images to obtain the fiber optic port fused image; Feature extraction module: performs edge recognition and contour fitting on the fused image of the fiber port, extracts the edge contour, core center coordinates and cladding boundary features of the fiber port, and integrates the extracted features to form a feature information set; Positioning calibration module: retrieves the calibration parameters of the multispectral imaging module, combines them with the feature information set, calculates the actual spatial coordinates of the fiber optic port, and generates and outputs the positioning results.