Distortion correction methods, devices, equipment and media for railway communication base station inspection images

By utilizing a pinhole camera model and nonlinear optimization algorithm during the inspection of railway communication base stations, distortion parameters were extracted and updated, solving the image distortion problem caused by lens distortion and achieving efficient distortion correction and system stability.

CN120655550BActive Publication Date: 2025-12-02CHINA RAILWAY CONSTR ELECTRIFICATION BUREAU GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511161354.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-12-02
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

The images from railway communication base station inspections are significantly distorted due to lens distortion, which affects the inspection results.

Method used

By capturing images of marker points at multiple preset locations using a camera, the coordinates of the real distorted pixels are extracted. The coordinates of the first calibrated pixel without distortion are determined using a pinhole camera model. The distortion parameters are then iteratively updated using a nonlinear optimization algorithm until the convergence condition is met, thus achieving distortion correction.

Benefits of technology

It improves the accuracy and efficiency of image distortion correction, eliminates the dependence on traditional physical calibration boards, enhances system stability and environmental adaptability, and supports online updates and adaptive capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655550B_ABST
    Figure CN120655550B_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, device, and medium for distortion correction of images from railway communication base station inspections. The method includes: extracting the true distorted pixel coordinates from images of marker points captured by a camera at multiple preset locations; determining the first calibration pixel coordinates of the marker points based on a pinhole camera model; transforming the first calibration pixel coordinates to a normalized plane to obtain first calibration plane coordinates; performing a forward distortion transformation on the first calibration plane coordinates and then performing a pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates; calculating the target deviation between the expected distorted pixel coordinates and the true distorted pixel coordinates at each preset location; using the minimization of the target deviation as the optimization objective, iteratively updating the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters. This disclosure can improve the accuracy of distortion parameters, thereby improving the accuracy of image distortion correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method, apparatus, equipment and medium for distortion correction of railway communication base station inspection images. Background Technology

[0002] In railway communication base station inspection operations, full-coverage basic scanning is an important part of the overall inspection. Currently, when using cameras for full-coverage basic scanning, a single image covers a certain area, and the images are stitched together to generate a panoramic inspection image of the equipment rack.

[0003] However, during the camera imaging process, distortion may occur due to lens limitations, resulting in significantly distorted inspection images that affect the inspection results. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a method, apparatus, equipment, and medium for distortion correction of railway communication base station inspection images.

[0005] According to one aspect of this disclosure, a method for distortion correction of railway communication base station inspection images is provided, the method comprising:

[0006] Based on images of the marker points captured by the camera at multiple preset locations, the true distorted pixel coordinates of the marker points in the images are extracted.

[0007] Based on the pinhole camera model, determine the first calibrated pixel coordinates of the marker point at the preset position without distortion;

[0008] Transform the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position;

[0009] Based on preset distortion parameters and camera intrinsic parameters, the first calibration plane coordinates are subjected to a positive distortion transformation and then restored by pixel coordinate transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position.

[0010] At each of the preset positions, a first deviation in the x-direction and a second deviation in the y-direction between the expected distorted pixel coordinates and the actual distorted pixel coordinates are calculated; a target deviation is determined based on the first deviation and the second deviation at the multiple preset positions.

[0011] Minimizing the target deviation is taken as the optimization objective. A nonlinear optimization algorithm is used to iteratively update the distortion parameters until a preset convergence condition is met, thereby obtaining the target distortion parameters. The target distortion parameters are used to correct the distortion of the inspection image.

[0012] According to another aspect of this disclosure, a distortion correction device for railway communication base station inspection images is also provided, the device comprising:

[0013] The real coordinate extraction module is used to extract the real distorted pixel coordinates of the marker point in the image based on the image captured by the camera at multiple preset positions.

[0014] The first calibration pixel coordinate determination module is used to determine the distortion-free first calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model;

[0015] The first calibration plane coordinate determination module is used to transform the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position;

[0016] The expected distortion pixel coordinate determination module is used to perform a positive distortion transformation on the coordinates of the first calibration plane based on preset distortion parameters and camera intrinsic parameters, and then restore the transformation by pixel coordinates to obtain the expected distortion pixel coordinates of the marker point at the preset position.

[0017] The target deviation determination module is used to calculate, at each of the preset positions, a first deviation in the x-direction and a second deviation in the y-direction between the expected distorted pixel coordinates and the actual distorted pixel coordinates; and to determine the target deviation based on the first deviation and the second deviation at the multiple preset positions.

[0018] The distortion parameter update module is used to minimize the target deviation as the optimization objective, and iteratively update the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters; wherein, the target distortion parameters are used to perform distortion correction on the inspection image.

[0019] This disclosure also provides an electronic device, the electronic device comprising:

[0020] processor;

[0021] Memory used to store the processor's executable instructions;

[0022] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the above method.

[0023] This disclosure also provides a computer-readable storage medium storing a computer program for performing the above-described methods.

[0024] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0025] The technical solution provided in this disclosure includes: extracting the true distorted pixel coordinates of the marker points in the images captured by a camera at multiple preset positions; determining the first calibration pixel coordinates of the marker points at the preset positions without distortion based on a pinhole camera model; transforming the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker points at the preset positions; performing a forward distortion transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters, and then restoring the transformation through pixel coordinates to obtain the expected distorted pixel coordinates of the marker points at the preset positions; calculating, at each preset position, a first deviation in the x-direction and a second deviation in the y-direction between the expected distorted pixel coordinates and the true distorted pixel coordinates; determining the target deviation based on the first and second deviations at multiple preset positions; using the minimization of the target deviation as the optimization objective, iteratively updating the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters; wherein, the target distortion parameters are used to correct the distortion of the inspection images.

[0026] In the above scheme, the first calibration pixel coordinates without distortion are calculated using an ideal pinhole camera model, eliminating the reliance on traditional physical calibration plates. The first calibration pixel coordinates are used to determine the expected distorted pixel coordinates of the marker point at a preset position. Based on this, a closed-loop feedback optimization system of "theoretical prediction (i.e., expected distorted pixel coordinates) - actual measurement (i.e., true distorted pixel coordinates) - target deviation - parameter update" is constructed. By minimizing the target deviation between theoretical prediction and actual measurement, the distortion parameters are directly optimized, which can improve the accuracy of the distortion parameters, thereby improving the accuracy and efficiency of image distortion correction. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0028] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of the triple distortion correction method described in the embodiments of this disclosure;

[0030] Figure 2 This is a flowchart of the distortion correction method for railway communication base station inspection images according to an embodiment of this disclosure;

[0031] Figure 3This is a schematic diagram of the distortion correction device for railway communication base station inspection images according to an embodiment of this disclosure;

[0032] Figure 4 This is a schematic diagram of the structure of the electronic device described in an embodiment of this disclosure. Detailed Implementation

[0033] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0034] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0035] Currently, when using cameras for full-coverage basic scanning, distortion occurs due to lens limitations, resulting in significantly distorted inspection images and affecting inspection effectiveness. To address this issue, this disclosure provides a method, apparatus, device, and medium for distortion correction of inspection images from railway communication base stations. For ease of understanding, the embodiments of this disclosure are described below.

[0036] Reference Figure 1 This embodiment first introduces a triple distortion correction method, including a single-camera dynamic distortion correction model, multi-camera joint calibration compensation, and mechanical and vision joint calibration. See below for details.

[0037] Single-camera dynamic distortion correction model: Construct a lightweight CNN (Convolutional Neural Network) whose input is the original distorted image and output is a distortion-free image. The CNN network described above, for example, contains 5 convolutional layers and 2 fully connected layers.

[0038] Multi-camera joint calibration and compensation: The main camera and auxiliary camera establish a unified coordinate system through Zhang's calibration method, extract the corner points of the chessboard (≥100 images) for feature matching, and establish a cross-modal distortion mapping relationship; use dual cameras to collect data synchronously, and correct the distortion parameters of the single camera through cross-validation.

[0039] Mechanical and vision joint calibration: Establish a mapping relationship between mechanical displacement and image feature displacement. After a certain number of inspections, the calibration process is automatically triggered. The actual displacement is compared with the image feature displacement through the guide rail encoder, and the distortion parameters are iteratively updated.

[0040] Based on the above embodiments, this disclosure provides a method such as Figure 2The diagram illustrates a distortion correction method for railway communication base station inspection images. This method is applicable to any image distortion correction scenario, specifically for railway communication base station inspection operations, where distortion correction is applied to the inspection images. This distortion correction method can be executed by a railway communication base station inspection image distortion correction device, which can be implemented using software and / or hardware.

[0041] Reference Figure 1 The distortion correction method for railway communication base station inspection images provided in this embodiment may include the following steps S102-S112.

[0042] S102 extracts the true distorted pixel coordinates of the marker points in the images captured by the camera at multiple preset positions.

[0043] In this embodiment, a camera mounted on a high-precision truss can be used to precisely control the truss to move in two directions (X-axis and Y-axis) parallel to the plane of the object being photographed (such as a core switch or other base station equipment), so that the camera can capture images of a marker fixed in the scene.

[0044] Mount the camera securely on a two-axis truss, ensuring the camera's optical axis is approximately perpendicular to the plane of the object being photographed. Select several marker points on the plane of the object. These marker points should possess high contrast and be easy to image and locate (e.g., artificial markings, object boundary points, specific patterns, etc.). Pre-acquire the camera's intrinsic and extrinsic parameters, such as focal length f. x f y Principal point C x C y Radial distortion parameters K1 and K2, tangential distortion parameters P1 and P2, etc.

[0045] While capturing images, the truss system is controlled to move the camera to N different preset positions P. i (i=1, 2,..., N). Preset position P i Relative to a fixed world coordinate system origin O w The translation amount is .

[0046] Image processing algorithms are used to accurately extract the actual distorted image coordinates of the marker points in the captured image, i.e., the true distorted pixel coordinates. These true distorted pixel coordinates can be represented as follows: .

[0047] S104, based on the pinhole camera model, determines the first calibration pixel coordinates of the marker point at the preset position without distortion.

[0048] In this embodiment, for each camera at a preset position P i Using a pinhole camera model, the marker point at the preset position P is calculated. i The ideal, distortion-free image coordinates, i.e., the first calibration pixel coordinates, can be expressed as: .

[0049] During implementation, determining the distortion-free first calibration pixel coordinates of the marker point at a preset position based on the pinhole camera model can include:

[0050] Determine the fixed coordinates of the marker point in the world coordinate system; determine the displacement of the camera relative to the world coordinate system at the preset position; determine the coordinates of the marker point in the camera coordinate system based on the fixed coordinates and displacement; convert the coordinates of the marker point in the camera coordinate system into the first calibration pixel coordinates without distortion based on the pinhole camera model.

[0051] Specifically, determine the location of the marker point in the world coordinate system. The fixed coordinates in are In the preset position The camera relative to the world coordinate system The displacement is Therefore, the marker point is at the preset position. coordinates in the camera coordinate system You can refer to the following formula (1):

[0052] (1)

[0053] Referring to the following formula (2), the coordinates of the marker point in the camera coordinate system are determined based on the pinhole camera model. Perform the transformation to obtain the ideal, distortion-free first calibration pixel coordinates. :

[0054] (2)

[0055] The parameters in the above formula are explained as follows. It is a fixed world system of marker points. The coordinates (although their values ​​are unknown, they will be eliminated when calculating relative displacement); It refers to the precise movement and displacement of the camera; , , , Given the known intrinsic parameters of the camera, This is the vertical distance from the optical center of the camera to the plane of the object being photographed. In the current actual operating environment, it can be approximated as a constant.

[0056] Therefore, different preset positions The first calibrated pixel coordinates calculated below Completely based on known displacements Sure.

[0057] S106, transform the first calibration pixel coordinates to the normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position.

[0058] In this embodiment, in order to eliminate the need for absolute world coordinates The dependency is usually selected as the first of several preset positions. As a reference position. In this case, this embodiment transforms the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at a preset position, which may include:

[0059] Reference position among multiple preset positions The corresponding first calibration pixel coordinates are determined as the reference calibration pixel coordinates. Determine the camera's position on the reference line. Reference displacement relative to the world coordinate system .

[0060] Then, the markers are placed at other preset locations. The first calibrated pixel coordinates This is converted into second calibration pixel coordinates based on the reference calibration pixel coordinates and the reference displacement representation. .

[0061] Specifically, for any other preset position The marker is at the preset position. coordinates in the camera coordinate system relative to the reference position coordinates below The relationship between them is:

[0062] (3)

[0063] Therefore, in the preset position Ideal distortion-free first calibration pixel coordinates A reference position can be used. The reference calibration pixel coordinates and known reference displacement This is indicated by the following formula (4):

[0064] (4)

[0065] As can be seen from the above examples, the theoretical image displacement between any two points is entirely determined by the known physical displacement (i.e., the reference displacement). The coordinates of the marker point are determined by a small number of unknown parameters and are related to the absolute world coordinates of the marker point. Irrelevant.

[0066] Based on the above embodiments, the second calibrated pixel coordinates Transform to the normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position. .

[0067] In the specific implementation, the second calibrated pixel coordinates The plane is transformed to a normalized plane independent of the physical focal length to eliminate the influence of camera intrinsic parameters (such as focal length and principal point). In the following formula (5), , The second calibration pixel coordinates are ideal and distortion-free. , Principal point coordinates , These are the focal lengths of the camera in the horizontal and vertical directions of the image plane, respectively; according to formula (5), the second calibration pixel coordinates are... Transform to the normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position. .

[0068] (5)

[0069] S108, based on preset distortion parameters and camera intrinsic parameters, performs a positive distortion transformation on the coordinates of the first calibration plane and restores the transformation through pixel coordinates to obtain the expected distorted pixel coordinates of the marker point at the preset position.

[0070] This embodiment may include:

[0071] First, based on the coordinates of the first calibration plane Calculate radial distance .

[0072] Specifically, the radial distance can be calculated according to the following formula (6). .

[0073] (6)

[0074] Secondly, based on preset distortion parameters, camera intrinsic parameters, and radial distance, a positive distortion transformation is performed on the coordinates of the first calibration plane to obtain the expected distorted plane coordinates of the marker point at the preset position. .

[0075] Specifically, according to formula (7), using the current distortion parameters (including k1, k2, p1, p2) and camera intrinsic parameters, the ideal distortion-free first calibration plane coordinates calculated above are used to calculate the preset position through the distortion model (including radial and tangential distortion). The expected distortion plane coordinates of the lower expected theory have distortion. .

[0076] (7)

[0077] Next, the above-mentioned expected distortion plane coordinates are... Convert to expected distorted pixel coordinates As shown in the following formula (8):

[0078] (8)

[0079] Next, at multiple preset locations, the target deviation between the expected distorted pixel coordinates and the actual distorted pixel coordinates is determined. Refer to the following step S110.

[0080] S110, at each preset position, calculate the first deviation in the x-direction and the second deviation in the y-direction between the expected distorted pixel coordinates and the actual distorted pixel coordinates; determine the target deviation based on the first and second deviations of multiple preset positions.

[0081] First, at each preset position Calculate the expected distorted pixel coordinates respectively Compared with the actual distorted pixel coordinates The first deviation in the x-direction and the second deviation in the y-direction.

[0082] Specifically, referring to the following formula (9), for each preset position The expected distorted pixel coordinates obtained from the above steps are used. Compared with the actual distorted pixel coordinates Compare and calculate the first deviation between the two in the x-direction. and the second deviation in the y direction .

[0083] (9)

[0084] Secondly, the target deviation is determined based on the first and second deviations of multiple preset positions. Specifically, referring to the following formula (10), the overall error function E is defined, using the first deviations of all preset positions. Second deviation Calculate the sum of squares to obtain the target deviation E:

[0085] (10)

[0086] S112, taking the minimization of the target deviation as the optimization objective, the distortion parameters are iteratively updated using a nonlinear optimization algorithm until the preset convergence condition is met, thus obtaining the target distortion parameters; wherein, the target distortion parameters are used to correct the distortion of the inspection image.

[0087] In this embodiment, minimizing the overall target deviation E is taken as the optimization objective, and nonlinear optimization algorithms such as Levenberg-Marquardt (LM) are used to iteratively update the distortion parameters k1, k2, p1, and p2.

[0088] The nonlinear optimization algorithm calculates the target deviation E and its derivative with respect to the distortion parameters (Jacobi matrix) based on the current distortion parameters. Using the derivative and the current target deviation E, it calculates the update amount of the distortion parameters to reduce the target deviation E. The distortion parameters are updated, and the calculation of the target deviation E and its derivative is repeated until a convergence condition is met. The convergence condition includes at least one of the following: the target deviation is less than a preset deviation threshold, a preset maximum number of iterations is reached, and the change in the distortion parameters is less than a preset change value.

[0089] Repeat the above process multiple times. Once the convergence condition is met and the optimization process is confirmed to have converged, the optimized target distortion parameters are obtained.

[0090] The above embodiments utilize physical movement to accurately calculate the expected distorted pixel coordinates of the marker point with ideal distortion. As the "truth value", it is compared with the actual distorted pixel coordinates captured by the camera. By comparing the results, an error function E is established, and the distortion parameters are optimized and updated through an iterative algorithm to achieve the desired distorted pixel coordinates. Compared with the actual distorted pixel coordinates By minimizing the target deviation, the optimized target distortion parameters are finally obtained.

[0091] In this embodiment, the optimized target distortion parameters can be applied to the vision system. During actual image processing tasks, the aforementioned target distortion parameters are used to correct distortion in subsequently captured images, transforming the actual distorted coordinates (x', y') back to ideal distortion-free coordinates (u, v). Based on this, this embodiment takes the inspection operation scenario of a railway communication system as an example to provide a method for image distortion correction using the aforementioned target distortion parameters, including the following:

[0092] Multiple original inspection images of base station equipment in the railway communication system are acquired; distortion correction is performed on each original inspection image according to the target distortion parameters to obtain the target inspection image; multiple target inspection images are stitched together to form a panoramic inspection image.

[0093] In the inspection of railway communication systems, a full-coverage basic scan is automatically triggered according to a preset cycle (e.g., once daily). This full-coverage basic scan can be understood as follows: a three-axis moving platform moves from top to bottom along the Y-axis (vertical), from left to right along the X-axis (horizontal), and automatically adjusts its focus along the Z-axis (depth) according to the installation depth of the base station equipment to be inspected, ensuring that the distance between the camera and the surface of the base station equipment remains at a preset distance (generally 15-20cm). Multiple original inspection images are simultaneously acquired by dual cameras. Each original inspection image covers an area of ​​approximately 20cm × 20cm, and these images need to be stitched together to generate a panoramic inspection image of the entire cabinet. In this embodiment, the original inspection images may include visible light images acquired by the main camera and / or depth images acquired by the TOF camera.

[0094] Because images taken at close range have significant distortion, it is necessary to correct the distortion of each original inspection image according to the target distortion parameters before image stitching to obtain a standardized target inspection image.

[0095] In a specific method, the original inspection image with distortion is transformed in reverse according to the target distortion parameters to obtain the target inspection image.

[0096] Furthermore, this embodiment is described as follows: converting a distortion-free image to a distorted image is a forward transformation; converting a distorted image to a distortion-free image is a reverse transformation. Accordingly, distortion correction methods may include:

[0097] Method 1: Obtain distortion-free inspection images by performing an inverse transformation on the distorted images detected during inspection. This embodiment adopts Method 1, which corrects the distortion of each original inspection image based on the target distortion parameters to obtain a standardized, distortion-free target inspection image.

[0098] Method 2: Perform a forward transformation on each pixel of the distortion-free inspection image to obtain the pixel coordinates of the distorted image. Then, obtain the RGB information corresponding to the pixel coordinates of the distorted image from the relevant distorted image and fill the pixels of the distortion-free inspection image with the RGB information.

[0099] After obtaining standardized, distortion-free target inspection images according to the above embodiments, multiple target inspection images are stitched together to form a panoramic inspection image. These embodiments improve the accuracy and efficiency of image correction, thereby enhancing the accuracy of the stitched panoramic inspection image.

[0100] Furthermore, in practical applications, this embodiment can trigger the re-execution of the distortion correction method for railway communication base station inspection images shown in steps S102-S112 when preset triggering conditions are met, so as to update the target distortion parameters and ensure long-term accuracy. The preset penalty conditions include, for example, reaching a preset parameter update cycle (e.g., 1 month) or a decrease in the accuracy of the image corrected based on the current target distortion parameters.

[0101] In summary, the distortion correction method for railway communication base station inspection images provided in this embodiment includes: extracting the true distorted pixel coordinates of the marker points in the images captured by a camera at multiple preset locations; determining the first calibration pixel coordinates of the marker points at the preset locations without distortion based on a pinhole camera model; transforming the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker points at the preset locations; performing a forward distortion transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters, and then restoring the transformation through pixel coordinates to obtain the expected distorted pixel coordinates of the marker points at the preset locations; determining the target deviation between the expected distorted pixel coordinates and the true distorted pixel coordinates at multiple preset locations; using the minimization of the target deviation as the optimization objective, iteratively updating the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters; wherein, the target distortion parameters are used to correct the distortion of the inspection images.

[0102] In the above scheme, an absolute reference is generated using physical displacement. By utilizing the physical displacement of a high-precision truss motion platform, the relative position between the camera and the fixed marker point is actively and precisely changed, thereby generating a series of reference points with absolutely known positional relationships on the image plane. The distortion-free first calibration pixel coordinates are calculated using an ideal pinhole camera model. This eliminates the reliance on traditional physical calibration boards. It constructs a "theoretical prediction (i.e., expected distorted pixel coordinates)" system. — Actual measurement (i.e., true distorted pixel coordinates) The closed-loop feedback optimization system of "target deviation - parameter update" directly optimizes distortion parameters by minimizing the target deviation between theoretical prediction and actual measurement, which can improve the accuracy of distortion parameters and thus improve the accuracy and efficiency of image distortion correction.

[0103] By implementing the aforementioned distortion parameter optimization scheme directly in the real-world scenario where the camera is operating, combined with automated control, periodic or on-demand online calibration and parameter updates can be achieved, significantly improving the system's long-term stability and environmental adaptability. The overall accuracy of the solution depends on the positioning accuracy of the motion platform and the image coordinate extraction accuracy, and the overall accuracy is relatively high.

[0104] Based on this, the technical solution has at least the following advantages:

[0105] (1) Eliminate the dependence on calibration boards: There is no need to make, use and maintain external calibration boards, reducing costs and simplifying the process.

[0106] (2) Improve calibration accuracy and reliability: By using the high-precision physical displacement of the motion platform as a reference benchmark, the uncertainty introduced by calibration plate manufacturing error, feature extraction error, matching error and other factors in traditional methods is reduced, thereby improving the absolute accuracy and reliability of calibration results.

[0107] (3) Achieve true in-situ calibration: Calibration can be performed in the actual working position and working environment of the camera, eliminating systematic errors caused by changes in installation position and environment (temperature, humidity), and the calibration results are more in line with actual use conditions.

[0108] (4) Support online updates and adaptation: Enables the vision system to self-calibrate and adapt to environmental / mechanical changes, ensuring long-term operating accuracy and reducing maintenance frequency and downtime.

[0109] (5) Improve system robustness: Under the condition that the marker point can be detected stably, this scheme is based on physical displacement and closed-loop optimization, and has a certain robustness to changes in illumination and image noise.

[0110] (6) Simplified integration: This method can be seamlessly integrated for vision inspection systems that are already equipped with precision motion platforms, making full use of existing hardware resources.

[0111] This disclosure provides a method such as Figure 3 The distortion correction device for railway communication base station inspection images shown is used to implement the distortion correction method for railway communication base station inspection images provided in the above embodiments. (Refer to...) Figure 3 The distortion correction device for railway communication base station inspection images may include the following modules:

[0112] The real coordinate extraction module 210 is used to extract the real distorted pixel coordinates of the marker point in the image based on the image captured by the camera at multiple preset positions of the marker point;

[0113] The first calibration pixel coordinate determination module 220 is used to determine the distortion-free first calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model;

[0114] The first calibration plane coordinate determination module 230 is used to transform the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position;

[0115] The expected distortion pixel coordinate determination module 240 is used to perform a positive distortion transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters, and then perform a pixel coordinate restoration transformation to obtain the expected distortion pixel coordinates of the marker point at the preset position.

[0116] The target deviation determination module 250 is used to calculate, at each of the preset positions, a first deviation in the x-direction and a second deviation in the y-direction between the expected distorted pixel coordinates and the actual distorted pixel coordinates; and to determine the target deviation based on the first deviation and the second deviation of the multiple preset positions.

[0117] The distortion parameter update module 260 is used to minimize the target deviation as the optimization objective, and iteratively update the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters; wherein, the target distortion parameters are used to perform distortion correction on the inspection image.

[0118] The device provided in this embodiment has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0119] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 4 As shown, the electronic device 300 includes one or more processors 301 and memory 302.

[0120] The processor 301 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 300 to perform desired functions.

[0121] The memory 302 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may execute the program instructions to implement the distortion correction method for railway communication base station inspection images described above, and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0122] In one example, the electronic device 300 may also include an input device 303 and an output device 304, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0123] In addition, the input device 303 may also include, for example, a keyboard, a mouse, etc.

[0124] The output device 304 can output various information to the outside, including determined distance information, direction information, etc. The output device 304 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0125] Of course, for the sake of simplicity, Figure 4 Only some of the components of the electronic device 300 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 300 may include any other suitable components depending on the specific application.

[0126] Furthermore, this embodiment also provides a computer-readable storage medium storing a computer program for executing the above-described method for distortion correction of railway communication base station inspection images.

[0127] The computer program product of the distortion correction method, device, electronic device and medium for railway communication base station inspection images provided in this disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0128] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0129] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for distortion correction of railway communication base station inspection images, characterized in that, The method includes: Based on images of the marker points captured by the camera at multiple preset locations, the true distorted pixel coordinates of the marker points in the images are extracted. Based on the pinhole camera model, determine the first calibrated pixel coordinates of the marker point at the preset position without distortion; Transform the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; Based on preset distortion parameters and camera intrinsic parameters, the first calibration plane coordinates are subjected to a positive distortion transformation and then restored by pixel coordinate transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position. At multiple preset locations, the target deviation between the expected distorted pixel coordinates and the actual distorted pixel coordinates is determined; Minimizing the target deviation is taken as the optimization objective. A nonlinear optimization algorithm is used to iteratively update the distortion parameters until a preset convergence condition is met, thereby obtaining the target distortion parameters. The target distortion parameters are used to correct the distortion of the inspection image. The step of determining the distortion-free first calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model includes: Determine the fixed coordinates of the marker point in the world coordinate system; Determine the displacement of the camera relative to the world coordinate system at the preset position; Based on the fixed coordinates and the displacement, determine the coordinates of the marker point in the camera coordinate system; Based on the pinhole camera model, the coordinates of the marker point in the camera coordinate system are converted into the first calibration pixel coordinates without distortion.

2. The method according to claim 1, characterized in that, The step of transforming the first calibrated pixel coordinates to a normalized plane to obtain the first calibrated plane coordinates of the marker point at the preset position includes: The first calibration pixel coordinates corresponding to the reference position among the multiple preset positions are determined as the reference calibration pixel coordinates; Determine the reference displacement of the camera relative to the world coordinate system at the reference position; The first calibrated pixel coordinates of the marker point at the preset position are converted into second calibrated pixel coordinates based on the reference calibrated pixel coordinates and the reference displacement; The second calibration pixel coordinates are transformed to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position.

3. The method according to claim 1, characterized in that, The step of performing a forward distortion transformation on the coordinates of the first calibration plane based on preset distortion parameters and camera intrinsic parameters, and then restoring the transformation using pixel coordinates to obtain the expected distorted pixel coordinates of the marker point at the preset position, includes: Calculate the radial distance based on the coordinates of the first calibration plane; Based on preset distortion parameters, camera intrinsic parameters, and the radial distance, the first calibration plane coordinates are subjected to a positive distortion transformation and restored by pixel coordinates to obtain the expected distortion plane coordinates of the marker point at the preset position. The expected distortion plane coordinates are converted into expected distortion pixel coordinates.

4. The method according to claim 1, characterized in that, Determining the target deviation between the expected distorted pixel coordinates and the actual distorted pixel coordinates at multiple preset locations includes: At each of the preset positions, the first deviation in the x-direction and the second deviation in the y-direction between the expected distorted pixel coordinates and the actual distorted pixel coordinates are calculated respectively. The target deviation is determined based on the first deviation and the second deviation of the multiple preset positions.

5. The method according to claim 1, characterized in that, The convergence condition includes at least one of the following: the target deviation is less than a preset deviation threshold, the preset maximum number of iterations is reached, and the change in the distortion parameter is less than a preset change value.

6. The method according to claim 1, characterized in that, The method further includes: Collect multiple raw inspection images of base station equipment in the railway communication system; The original inspection images are distorted according to the target distortion parameters to obtain the target inspection image; Multiple images of the target inspection are stitched together to form a panoramic inspection image.

7. A distortion correction device for inspection images of railway communication base stations, characterized in that, The device includes: The real coordinate extraction module is used to extract the real distorted pixel coordinates of the marker point in the image based on the image captured by the camera at multiple preset positions. The first calibration pixel coordinate determination module is used to determine the distortion-free first calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model; The first calibration plane coordinate determination module is used to transform the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; The expected distortion pixel coordinate determination module is used to perform a positive distortion transformation on the coordinates of the first calibration plane based on preset distortion parameters and camera intrinsic parameters, and then restore the transformation by pixel coordinates to obtain the expected distortion pixel coordinates of the marker point at the preset position. The target deviation determination module is used to determine the target deviation between the expected distorted pixel coordinates and the actual distorted pixel coordinates at multiple preset positions; The distortion parameter update module is used to minimize the target deviation as the optimization objective, and iteratively update the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain the target distortion parameters; wherein, the target distortion parameters are used to perform distortion correction on the inspection image; The first calibration pixel coordinate determination module is further configured to: Determine the fixed coordinates of the marker point in the world coordinate system; Determine the displacement of the camera relative to the world coordinate system at the preset position; Based on the fixed coordinates and the displacement, determine the coordinates of the marker point in the camera coordinate system; Based on the pinhole camera model, the coordinates of the marker point in the camera coordinate system are converted into the first calibration pixel coordinates without distortion.

8. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Camera distortion correction method and device, equipment and storage medium

    CN110738707A

  • Image sensor internal reference calibration method and device, equipment and storage medium

    CN113096192A