Distortion correction method, device, equipment and medium for inspection image of railway communication base station

By extracting and updating distortion parameters based on the pinhole camera model and nonlinear optimization algorithm during the inspection of railway communication base stations, the image distortion problem caused by lens distortion is solved, efficient and accurate distortion correction is achieved, and the stability and environmental adaptability of the system are improved.

CN120655550AActive Publication Date: 2025-09-16CHINA RAILWAY CONSTR ELECTRIFICATION BUREAU GRP CO LTD +2

Patent Information

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

AI Technical Summary

Technical Problem

The inspection images of railway communication base stations are subject to significant distortion due to lens distortion, which affects the inspection effect.

Method used

Based on the images of the marker points captured by the camera at multiple preset positions, the real distorted pixel coordinates are extracted, and the undistorted calibration pixel coordinates are determined using the pinhole camera model. The distortion parameters are iteratively updated through a nonlinear optimization algorithm until the convergence conditions are met to achieve distortion correction.

Benefits of technology

It improves the accuracy and efficiency of image distortion correction, reduces dependence on traditional physical calibration plates, improves system stability and environmental adaptability, simplifies the calibration process and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655550A_ABST
    Figure CN120655550A_ABST
Patent Text Reader

Abstract

The invention relates to a distortion correction method and device for a railway communication base station inspection image, equipment and a medium. The method comprises the following steps: extracting real distortion pixel coordinates based on images shot by a camera on a mark point at a plurality of preset positions; determining a first calibration pixel coordinate of the mark point based on a pinhole camera model; converting the first calibration pixel coordinate to a normalized plane to obtain a first calibration plane coordinate; distortion forward transformation is carried out on the first calibration plane coordinates, and expected distortion pixel coordinates are obtained through pixel coordinate reduction transformation; respectively calculating a target deviation between the expected distortion pixel coordinate and the real distortion pixel coordinate at each preset position; and taking target deviation minimization as an optimization target, iteratively updating the distortion parameter by using a nonlinear optimization algorithm until a preset convergence condition is met, and obtaining a target distortion parameter. According to the invention, the accuracy of distortion parameters can be improved, so that the accuracy of image distortion correction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a method, device, equipment and medium for correcting distortion of inspection images of railway communication base stations. Background Art

[0002] During railway communication base station inspections, full-coverage basic scanning is a crucial component of the overall inspection. Currently, when using cameras for full-coverage basic scanning, a single image covers a specific area, and a panoramic cabinet inspection image is generated through image stitching.

[0003] However, during the camera imaging process, distortion will occur due to lens issues, and the captured inspection images will be significantly distorted, affecting the inspection effect. Summary of the Invention

[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and medium for distortion correction of railway communication base station inspection images.

[0005] According to one aspect of the present disclosure, a method for correcting distortion of inspection images of a railway communication base station is provided, the method comprising: Extracting the real distorted pixel coordinates of the marker points in the images captured by the camera at multiple preset positions; Determine, based on a pinhole camera model, a first undistorted calibrated pixel coordinate of the marker point at the preset position; Converting the first calibration pixel coordinates to a normalized plane to obtain first calibration plane coordinates of the marker point at the preset position; Performing a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and performing pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; At each of the preset positions, respectively calculating 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 determining a target deviation based on the first deviations and the second deviations at the plurality of preset positions; Minimizing the target deviation is used as the optimization goal, and the distortion parameters are iteratively updated 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.

[0006] According to another aspect of the present disclosure, a device for correcting distortion of inspection images of a railway communication base station is provided, the device comprising: A real coordinate extraction module, configured to extract the real distorted pixel coordinates of the marker point in the image based on images captured by a camera at multiple preset positions; A first calibration pixel coordinate determination module, configured to determine, based on a pinhole camera model, a first undistorted calibration pixel coordinate of the marker point at the preset position; a first calibration plane coordinate determination module, configured to convert the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; an expected distorted pixel coordinate determination module, configured to perform a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and perform pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; a target deviation determination module, configured 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 determine a target deviation based on the first deviations and the second deviations at the plurality of preset positions; The distortion parameter updating module is used to minimize the target deviation as the optimization goal, 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.

[0007] The present disclosure further provides an electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the above method.

[0008] The present disclosure also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the above method.

[0009] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: The technical solution provided by the embodiment of the present disclosure includes: extracting the real distorted pixel coordinates of the marker point in the image based on the image captured by the camera at multiple preset positions; determining the first undistorted calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model; converting the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; performing a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera internal parameters and obtaining the expected distorted pixel coordinates of the marker point at the preset position through pixel coordinate restoration transformation; at each preset position, calculating the first deviation in the x direction and the second deviation in the y direction between the expected distorted pixel coordinates and the real distorted pixel coordinates; determining the target deviation based on the first deviation and the second deviation of the multiple preset positions; taking minimization of the target deviation as the optimization goal, and iteratively updating the distortion parameters using a nonlinear optimization algorithm until the preset convergence conditions are met to obtain the target distortion parameters; wherein the target distortion parameters are used to perform distortion correction on the inspection image.

[0010] In the above scheme, the distortion-free first calibration pixel coordinates calculated by the ideal pinhole camera model get rid of the dependence on the traditional physical calibration plate; the first calibration pixel coordinates are used to determine the expected distorted pixel coordinates of the marker point at the 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 the theoretical prediction and the 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. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 Schematic diagram of the triple distortion correction method according to an embodiment of the present disclosure; Figure 2 This is a flow chart of the method for correcting the distortion of inspection images of railway communication base stations according to an embodiment of the present disclosure; Figure 3 This is a schematic structural diagram of the device for correcting the distortion of inspection images of a railway communication base station according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of the electronic device described in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0015] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0016] Currently, when using cameras for full-coverage basic scanning, distortion occurs due to lens issues. This can significantly distort the inspection images captured, affecting inspection effectiveness. To address this issue, the present disclosure provides a method, device, equipment, and medium for correcting distortion in railway communication base station inspection images. For ease of understanding, the following describes the present disclosure in detail.

[0017] 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 visual joint calibration. The details are shown below.

[0018] Single-camera dynamic distortion correction model: Build a lightweight convolutional neural network (CNN) whose input is the original distorted image and output is an undistorted image. For example, the CNN may consist of five convolutional layers and two fully connected layers.

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

[0020] Joint mechanical and visual calibration: Establish a mapping relationship between mechanical displacement and image feature displacement. Automatically trigger the calibration process after completing several inspections. Use the guide rail encoder to feedback the actual displacement and compare it with the image feature displacement to iteratively update the distortion parameters.

[0021] Based on the above embodiments, the present disclosure provides a Figure 2The method for correcting the distortion of railway communication base station inspection images is shown. This method can be applied to any image distortion correction scenario, specifically, to perform distortion correction on inspection images during railway communication base station inspection operations. This method can be performed by a device for correcting the distortion of railway communication base station inspection images, which can be implemented using software and / or hardware.

[0022] Reference Figure 1 The method for correcting the distortion of the inspection image of the railway communication base station provided in this embodiment may include the following steps S102-S112.

[0023] S102 , based on images of the marker point captured by a camera at multiple preset positions, extracting the real distorted pixel coordinates of the marker point in the image.

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

[0025] Mount the camera on a two-axis truss, ensuring that the camera's optical axis is approximately perpendicular to the plane of the object being photographed. Select several landmarks on the object's plane. The landmarks should have high contrast and be easy to image and locate (e.g., human-made markers, object boundaries, specific patterns, etc.). Obtain the camera's intrinsic and extrinsic parameters in advance, such as focal length f. x 、f y , main point C x 、C y , radial distortion parameters K1, K2, tangential distortion parameters P1, P2, etc.

[0026] When 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 .

[0027] The image processing algorithm is used to accurately extract the actual distorted image coordinates of the marker points in the captured image, that is, the true distorted pixel coordinates, which can be expressed as .

[0028] S104: Determine, based on a pinhole camera model, a first undistorted calibrated pixel coordinate of the marker point at a preset position.

[0029] In this embodiment, the preset position P of each camera is i , use the pinhole camera model to calculate the marker point at the preset position P i The ideal undistorted image coordinates under , that is, the first calibration pixel coordinates, can be expressed as .

[0030] During implementation, determining the undistorted first calibration pixel coordinates of the marker point at a preset position based on the pinhole camera model may include: Determine the fixed coordinates of the marker point in the world coordinate system; determine the movement displacement of the camera relative to the world coordinate system at a preset position; determine the coordinates of the marker point in the camera coordinate system based on the fixed coordinates and the movement 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.

[0031] Specifically, determine the marker point in the world coordinate system The fixed coordinates in At the preset position , the camera relative to the world coordinate system The displacement of Then, the marker point is at the preset position The coordinates in the camera coordinate system You can refer to the following formula (1): (1) Refer to the following formula (2), according to the pinhole camera model, the coordinates of the marker point in the camera coordinate system are Perform the transformation to obtain the ideal distortion-free first calibration pixel coordinates : (2) The parameters in the above formula are explained as follows. It is a fixed world system with landmark points The coordinates of (although its value is unknown, it will be eliminated when calculating the relative displacement); It is the precise movement displacement of the camera; 、 、 、 is the known internal parameter of the camera, It is the vertical distance from the optical center of the camera to the plane of the photographed object. In the current actual operating environment, it can be approximated as a constant.

[0032] Therefore, different preset positions The first calibration pixel coordinates calculated under Completely determined by known displacement Sure.

[0033] S106: Convert the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at a preset position.

[0034] In this embodiment, in order to eliminate the absolute world coordinate Dependency, usually select the first position among multiple preset positions In this case, the first calibration pixel coordinates are converted to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position, which may include: Set the reference position among multiple preset positions The corresponding first calibration pixel coordinates are determined as the reference calibration pixel coordinates ; Make sure the camera is in the reference position The base displacement relative to the world coordinate system .

[0035] Then, move the marker to other preset positions The first calibration pixel coordinates under , converted to the second calibration pixel coordinates based on the reference calibration pixel coordinates and the reference displacement representation .

[0036] Specifically, for any other preset position , the marker point is at the preset position The coordinates in the camera coordinate system With reference position The coordinates below The relationship between them is: (3) Therefore, in the preset position The ideal undistorted first calibration pixel coordinates Reference position can be used Benchmark calibration pixel coordinates under and known datum displacement It is represented by the following formula (4): (4) According to the above embodiments, it can be seen that the theoretical image displacement between any two points is completely determined by the known physical displacement (i.e., the reference displacement ) and a small number of unknown parameters, and the absolute world coordinates of the landmark points Not relevant.

[0037] Based on the above embodiment, the second calibration pixel coordinates Convert to the normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position .

[0038] In the specific implementation, the second calibration pixel coordinates Transform to a normalized plane that is independent of the physical focal length to eliminate the influence of the camera's internal parameters (such as focal length and principal point). In the following formula (5), 、 is the ideal distortion-free second calibration pixel coordinate, 、 are the principal point coordinates, 、 are the focal lengths of the camera in the horizontal and vertical directions on the image plane respectively; according to formula (5), the second calibration pixel coordinates Convert to the normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position .

[0039] (5) S108 , performing a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera internal parameters and performing pixel coordinate restoration transformation to obtain expected distorted pixel coordinates of the marker point at the preset position.

[0040] This embodiment may include: First, according to the first calibration plane coordinates Calculate radial distance .

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

[0042] (6) Secondly, based on the preset distortion parameters, camera internal parameters and radial distance, the first calibration plane coordinates are distorted forward transformed to obtain the expected distortion plane coordinates of the marker point at the preset position. .

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

[0044] (7) Then the above expected distortion plane coordinates are Convert to expected distorted pixel coordinates , as shown in the following formula (8): (8) Next, at a plurality of preset positions, target deviations between expected distorted pixel coordinates and actual distorted pixel coordinates are determined, as shown in the following step S110 .

[0045] S110 , at each preset position, respectively calculating 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 determining a target deviation based on the first deviations and the second deviations at multiple preset positions.

[0046] First, at each preset position , respectively calculate the expected distorted pixel coordinates and the true distorted pixel coordinates A first deviation is in the x-direction and a second deviation is in the y-direction.

[0047] Specifically, referring to the following formula (9), for each preset position , the expected distorted pixel coordinates calculated in the above steps are and the true distorted pixel coordinates Compare and calculate the first deviation of the two in the x direction and the second deviation in the y direction .

[0048] (9) Secondly, the target deviation is determined based on the first deviations 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. and the second deviation Calculate the sum of squares to get the target deviation E: (10) S112, minimizing the target deviation is used as the optimization goal, and the distortion parameters are iteratively updated using a nonlinear optimization algorithm until a preset convergence condition is met, thereby obtaining target distortion parameters; wherein the target distortion parameters are used to perform distortion correction on the inspection image.

[0049] This embodiment takes minimization of the overall target deviation E as the optimization goal, and uses a nonlinear optimization algorithm such as the Levenberg-Marquardt method (LM) to iteratively update the distortion parameters k1, k2, p1, and p2.

[0050] The nonlinear optimization algorithm calculates the target deviation E and the derivative (Jacobian matrix) of the target deviation E with respect to the distortion parameters based on the current distortion parameters. Based on these derivatives and the current target deviation E, the algorithm calculates an update to the distortion parameters to reduce the target deviation E. The distortion parameters are updated, and the target deviation E and derivatives are repeatedly calculated until convergence conditions are met. Convergence conditions include at least one of the following: the target deviation is less than a preset deviation threshold, the maximum number of iterations is reached, and the change in the distortion parameters is less than a preset change value.

[0051] The above process is repeated several times, and after the convergence condition is met to determine that the optimization process has converged, the optimized target distortion parameters are obtained.

[0052] The above embodiment uses the physical movement to accurately calculate the expected distorted pixel coordinates of the ideal marker point with distortion As the "true value", it is compared with the actual distorted pixel coordinates actually captured by the camera Compare and establish the error function E, and optimize and update the distortion parameters through iterative algorithm to make the expected distorted pixel coordinates and the true distorted pixel coordinates The target deviation is minimized, and the optimized target distortion parameters are finally obtained.

[0053] In this embodiment, the optimized target distortion parameters can be applied to the visual system. When performing actual image processing tasks, the target distortion parameters are used to correct the distortion of subsequently captured images, and the actual distorted coordinates (x', y') are reversely transformed back to the ideal undistorted coordinates (u, v). Based on this, this embodiment uses the inspection operation scenario of a railway communication system as an example to provide a method for applying the target distortion parameters to perform image distortion correction, including the following: Collect multiple original inspection images of base station equipment in the railway communication system; perform distortion correction on each original inspection image according to the target distortion parameter to obtain the target inspection image; and stitch the multiple target inspection images into a panoramic inspection image.

[0054] During the inspection of the railway communication system, a full-coverage basic scan is automatically triggered according to a preset cycle (such as once a day). The full-coverage basic scan can be understood as the three-axis mobile platform moving from top to bottom along the Y axis (vertical) and from left to right along the X axis (horizontal), and automatically adjusting the focal length 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-20 cm). The dual cameras synchronously capture multiple original inspection images, and a single original inspection image covers an area of ​​approximately 20 cm × 20 cm. A panoramic inspection image of the entire cabinet needs to be generated through image stitching. The original inspection image in this embodiment may include a visible light image captured by the main camera and / or a depth image captured by the TOF camera.

[0055] Since the distortion of images taken at close distances is significant, before image stitching, it is necessary to perform distortion correction on each original inspection image according to the target distortion parameters to obtain a standardized target inspection image.

[0056] In a specific embodiment, the original inspection image with distortion is inversely transformed according to the target distortion parameter to obtain the target inspection image.

[0057] In addition, this embodiment is described as follows: converting an undistorted image into a distorted image is called a forward transformation; converting a distorted image into an undistorted image is called a reverse transformation. Accordingly, the distortion correction method may include: Method 1: Obtaining a distortion-free inspection image by performing an inverse transformation on the distorted inspection image. This embodiment adopts method 1, and performs distortion correction on each distorted original inspection image according to the target distortion parameter to obtain a standardized, distortion-free target inspection image.

[0058] Method 2: Perform a forward transformation on each pixel of the undistorted 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 in the relevant distorted image, and fill the RGB information back into the pixels of the undistorted inspection image.

[0059] After obtaining a standardized, distortion-free target inspection image according to the above embodiment, multiple target inspection images are stitched together to form a panoramic inspection image. The above embodiment can improve the accuracy and efficiency of image correction, thereby improving the accuracy of the stitched panoramic inspection image.

[0060] Furthermore, in actual applications, this embodiment can trigger the re-execution of the railway communication base station inspection image distortion correction method shown in steps S102-S112 above when a preset trigger condition is met, thereby re-updating the target distortion parameters to ensure long-term accuracy. Examples of such preset penalty conditions include: reaching a preset parameter update period (e.g., one month) or a decrease in the accuracy of the image corrected based on the current target distortion parameters.

[0061] In summary, the distortion correction method for railway communication base station inspection images provided by the embodiment of the present disclosure includes: extracting the real distorted pixel coordinates of the marker point in the image based on the image taken by the camera at multiple preset positions; determining the first undistorted calibration pixel coordinates of the marker point at the preset position based on the pinhole camera model; converting the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; performing a distortion forward transformation on the first calibration plane coordinates based on the preset distortion parameters and the camera internal parameters and performing a pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; determining the target deviation between the expected distorted pixel coordinates and the real distorted pixel coordinates at multiple preset positions; taking minimizing the target deviation as the optimization goal, and iteratively updating the distortion parameters using a nonlinear optimization algorithm until the preset convergence conditions are met to obtain the target distortion parameters; wherein the target distortion parameters are used to perform distortion correction on the inspection image.

[0062] In the above scheme, the absolute reference is generated by physical displacement. The physical displacement of the high-precision truss motion platform is used to actively and accurately change the relative position of the camera and the fixed marker, thereby generating a series of reference points with absolutely known positional relationships on the image plane. The first calibration pixel coordinates without distortion are calculated by the ideal pinhole camera model. , getting rid of the dependence on traditional physical calibration plates. Constructed a "theoretical prediction (i.e. expected distortion pixel coordinates) ) — actual measurement (i.e., true distorted pixel coordinates The closed-loop feedback optimization system of "prediction-target deviation-parameter update" directly optimizes the distortion parameters by minimizing the target deviation between theoretical prediction and actual measurement, which can improve the accuracy of the distortion parameters and thus improve the accuracy and efficiency of image distortion correction.

[0063] By directly implementing this distortion parameter optimization solution in the real-world camera environment, combined with automated control, we can achieve periodic or on-demand online calibration and parameter updates, significantly improving the system's long-term stability and environmental adaptability. The overall solution's accuracy is determined by the positioning accuracy of the motion platform and the accuracy of image coordinate extraction, resulting in high overall precision.

[0064] Based on this, this technical solution has at least the following advantages: (1) Eliminate dependence on calibration plates: No need to make, use, and maintain external calibration plates, reducing costs and simplifying processes.

[0065] (2) Improve calibration accuracy and reliability: Using the high-precision physical displacement of the motion platform as a reference benchmark reduces the uncertainty introduced by calibration plate manufacturing errors, feature extraction errors, matching errors, etc. in traditional methods, and improves the absolute accuracy and reliability of the calibration results.

[0066] (3) Achieve true on-site calibration: Calibration can be performed in the actual working position and working environment of the camera, eliminating the system errors introduced by changes in the installation position and environment (temperature, humidity), and the calibration results are more in line with actual usage conditions.

[0067] (4) Support online update and adaptation: enable the vision system to have the ability to self-calibrate and adapt to environmental / mechanical changes, ensure long-term operation accuracy, and reduce maintenance frequency and downtime.

[0068] (5) Improve system robustness: When the landmarks can be stably detected, this solution is based on physical displacement and closed-loop optimization, and has a certain degree of robustness to illumination changes, image noise, etc.

[0069] (6) Simplified integration: For visual inspection systems equipped with precision motion platforms, this method can be seamlessly integrated to fully utilize existing hardware resources.

[0070] The present disclosure provides a Figure 3 The device for correcting the distortion of the inspection image of the railway communication base station shown in the figure is used to implement the method for correcting the distortion of the inspection image of the railway communication base station provided in the above embodiment. Figure 3 The distortion correction device for inspection images of railway communication base stations may include the following modules: A real coordinate extraction module 210 is configured to extract the real distorted pixel coordinates of the marker point in the image based on images captured by a camera at multiple preset positions; A first calibration pixel coordinate determination module 220 is configured to determine, based on a pinhole camera model, the first undistorted calibration pixel coordinates of the marker point at the preset position; A first calibration plane coordinate determination module 230 is configured to convert the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; An expected distorted pixel coordinate determination module 240 is configured to perform a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and perform pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; a target deviation determination module 250 configured 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 determine a target deviation based on the first deviations and the second deviations at the plurality of preset positions; The distortion parameter updating module 260 is used to minimize the target deviation as the optimization goal, and iteratively update the distortion parameters using a nonlinear optimization algorithm until a preset convergence condition is met to obtain target distortion parameters; wherein the target distortion parameters are used to perform distortion correction on the inspection image.

[0071] The device provided in this embodiment has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

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

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

[0074] 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), a 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 above-described method for correcting the distortion of railway communication base station inspection images in the embodiment of the present disclosure and / or other desired functions. The computer-readable storage medium may also store various contents such as input signals, signal components, noise components, etc.

[0075] In one example, the electronic device 300 may further include an input device 303 and an output device 304 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0076] In addition, the input device 303 may also include, for example, a keyboard, a mouse, and the like.

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

[0078] Of course, to simplify, Figure 4 Only some of the components related to the present disclosure in the electronic device 300 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 300 may further include any other appropriate components according to specific application scenarios.

[0079] Furthermore, this embodiment also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the above-mentioned method for correcting the distortion of the inspection image of the railway communication base station.

[0080] The embodiments of the present disclosure provide a computer program product of a method, device, electronic device, and medium for correcting distortion of inspection images of a railway communication base station, including 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 previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.

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

[0082] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. 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 the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for correcting distortion of inspection images of railway communication base stations, characterized in that: The method comprises: Based on images captured by a camera at multiple preset positions of a marker point, an image processing algorithm is used to extract the true distorted pixel coordinates of the marker point in the image; Determine, based on a pinhole camera model, a first undistorted calibrated pixel coordinate of the marker point at the preset position; Converting the first calibration pixel coordinates to a normalized plane to obtain first calibration plane coordinates of the marker point at the preset position; Performing a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and performing pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; At each of the preset positions, respectively calculating 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 determining a target deviation based on the first deviations and the second deviations at the plurality of preset positions; Minimizing the target deviation is used as the optimization goal, and the distortion parameters are iteratively updated 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.

2. The method according to claim 1, characterized in that The determining, based on the pinhole camera model, the first undistorted calibrated pixel coordinates of the marker point at the preset position includes: Determining the fixed coordinates of the marker point in the world coordinate system; Determining a movement displacement of the camera relative to the world coordinate system at the preset position; Determining the coordinates of the marker point in a camera coordinate system according to the fixed coordinates and the moving displacement; The coordinates of the marker point in the camera coordinate system are converted into distortion-free first calibration pixel coordinates according to the pinhole camera model.

3. The method according to claim 1, characterized in that The converting the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position includes: Determining the first calibration pixel coordinates corresponding to a reference position among the plurality of preset positions as reference calibration pixel coordinates; Determining a reference displacement of the camera relative to a world coordinate system at the reference position; Converting the first calibrated pixel coordinates of the marker point at the preset position into second calibrated pixel coordinates based on the reference calibrated pixel coordinates and the reference displacement representation; The second calibration pixel coordinates are converted to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position.

4. The method according to claim 1, wherein The method of performing a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and restoring the transformation through pixel coordinates to obtain the expected distorted pixel coordinates of the marker point at the preset position includes: Calculating the radial distance according to the first calibration plane coordinates; Based on the preset distortion parameters, the camera intrinsic parameters and the radial distance, the first calibration plane coordinates are subjected to a distortion forward transformation and restored through pixel coordinate transformation to obtain the expected distortion plane coordinates of the marker point at the preset position; The expected distorted plane coordinates are converted into expected distorted pixel coordinates.

5. The method according to claim 1, wherein 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 a parameter change of the distortion parameter is less than a preset change value.

6. The method according to claim 1, wherein The method further comprises: Collect multiple original inspection images of base station equipment in railway communication systems; Performing distortion correction on each of the original inspection images according to the target distortion parameter to obtain a target inspection image; The plurality of target inspection images are stitched together into a panoramic inspection image.

7. A device for correcting distortion of inspection images of railway communication base stations, characterized in that: The device comprises: A real coordinate extraction module, configured to extract the real distorted pixel coordinates of the marker point in the image based on images captured by a camera at multiple preset positions; A first calibration pixel coordinate determination module, configured to determine, based on a pinhole camera model, a first undistorted calibration pixel coordinate of the marker point at the preset position; a first calibration plane coordinate determination module, configured to convert the first calibration pixel coordinates to a normalized plane to obtain the first calibration plane coordinates of the marker point at the preset position; an expected distorted pixel coordinate determination module, configured to perform a distortion forward transformation on the first calibration plane coordinates based on preset distortion parameters and camera intrinsic parameters and perform pixel coordinate restoration transformation to obtain the expected distorted pixel coordinates of the marker point at the preset position; a target deviation determination module, configured 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 determine a target deviation based on the first deviations and the second deviations at the plurality of preset positions; The distortion parameter updating module is used to minimize the target deviation as the optimization goal, 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.

8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 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

  • Image distortion correction method and device, electronic equipment and storage medium

    CN119295358A

  • Image distortion correction enhancement method based on deep learning

    CN120374464A

  • Method and apparatus for correcting image distortion of wide-angle lens, and photographing device

    WO2023070862A1

Cited By

  • Camera calibration method and device, equipment, storage medium and program product

    CN120953395A