Image processing method and device and electronic equipment

By using correction information including the coordinate relationship between the distorted image and the target image, the image is corrected, and the problem of inaccurate fitting results during the calibration process of small distortion lenses in the prior art is solved, and the dedistortion effect is improved.

CN119648871APending Publication Date: 2025-03-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311199299.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the process of calibration of small distortion lenses, pixel points in the center and edge areas of the image are prone to diverge when fitting the distortion coefficients, resulting in inaccurate fitting results, which in turn affects the dedistortion effect.

Method used

The distorted image is corrected using correction information including the coordinate relationship between the distorted image and the target image after dedistortion processing. This coordinate relationship is determined by a polynomial of the distance between the pixel point and the center point of the image in the target image, which includes odd and even terms to improve the fitting ability of the image center and edge regions to the distortion coefficient.

Benefits of technology

The ability to fit the distortion coefficients in the center and edge areas of the image during calibration is improved, thereby improving the effect of correcting the distorted images and obtaining a more accurate and clear target image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648871A_ABST
    Figure CN119648871A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and apparatus, and an electronic device. A specific implementation mode of the method comprises the steps of obtaining a to-be-processed distorted image; obtaining correction information used for carrying out distortion removal processing on the distorted image; the correction information comprises a coordinate relationship between the distorted image and a target image subjected to distortion removal processing; the coordinate relation is determined by a distance between a pixel point in the target image and an image center point; and performing distortion removal processing on the distorted image based on the correction information to obtain the target image. According to the embodiment, the fitting capability of the central area and the edge area of the image to the distortion coefficient in the calibration process is improved, so that the effect of correcting the distorted image 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 an image processing method, device and electronic equipment. Background Art

[0002] With the continuous development of digital image technology, the application of digital images is becoming more and more extensive, and the application of digital images has brought more convenience to people's lives and work. The acquisition devices of digital images are also becoming more and more diverse. The most common digital image acquisition devices include cameras, mobile phones, cameras, monitoring and vehicle-mounted lenses. The types of lenses used for digital image acquisition devices are different for different purposes. The digital images taken by some types of lenses will be distorted, causing the image to be distorted. Therefore, an effective method for correcting distorted images is needed. Summary of the invention

[0003] The present disclosure provides an image processing method, an image processing device and an electronic device.

[0004] According to a first aspect, there is provided an image processing method, the method comprising:

[0005] Obtaining a distorted image to be processed;

[0006] Acquire correction information for dedistorting the distorted image; the correction information includes a coordinate relationship between the distorted image and a target image after dedistortion processing; the coordinate relationship is determined by a distance between a pixel point in the target image and a center point of the image;

[0007] The distorted image is dedistorted based on the correction information to obtain the target image.

[0008] According to a second aspect, there is provided an image processing apparatus, the apparatus comprising:

[0009] A first acquisition module, used to acquire a distorted image to be processed;

[0010] A second acquisition module is used to acquire correction information for dedistorting the distorted image; the correction information includes a coordinate relationship between the distorted image and a target image after dedistortion processing; the coordinate relationship is determined by a distance between a pixel point in the target image and a center point of the image;

[0011] A correction module is used to perform dedistortion processing on the distorted image based on the correction information to obtain the target image.

[0012] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.

[0013] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the first aspects is implemented.

[0014] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0015] The embodiments of the present disclosure provide an image processing method and device, which corrects a distorted image by using correction information including the coordinate relationship between the distorted image and the target image after dedistortion processing, thereby obtaining a target image after correction processing. The coordinate relationship is determined by the distance between the pixel point in the target image and the center point of the image. The fitting ability of the central area and the edge area of ​​the image to the distortion coefficient during the calibration process is improved, thereby improving the effect of correcting the distorted image.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure;

[0019] Figure 2 is a flowchart of an image processing method according to an exemplary embodiment of the present disclosure;

[0020] Figure 3 is a block diagram of an image processing device according to an exemplary embodiment of the present disclosure;

[0021] Figure 4 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;

[0022] Figure 5 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;

[0023] Figure 6 It is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0025] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.

[0026] The terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms of "a", "the" and "the" used in this disclosure are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0027] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0028] With the continuous development of digital image technology, the application of digital images is becoming more and more extensive, and the application of digital images has brought more convenience to people's lives and work. The acquisition devices of digital images are also becoming more and more diverse. The most common digital image acquisition devices include cameras, mobile phones, cameras, monitoring and vehicle-mounted lenses. The types of lenses used by digital image acquisition devices are different for different purposes. The lens types can include super telephoto lenses (macro lenses), telephoto lenses, wide-angle lenses, ultra-wide-angle lenses, fisheye lenses, etc. In the order from front to back, the distortion of the digital images taken by these lens types is getting greater and greater, and the distortion of the image is also getting greater and greater, which gradually affects the user's use.

[0029] In the related art, a preset dedistortion algorithm is usually used to correct a distorted image. For example, a preset dedistortion model is used to correct a distorted image. The preset dedistortion model includes radial distortion and tangential distortion. The radial distortion is described by the first two or three terms of the Taylor series expansion around the principal point of the image. The preset dedistortion model includes some distortion coefficients. Different lenses correspond to different distortion coefficients. Therefore, different lenses need to be calibrated in advance to obtain corresponding distortion coefficients.

[0030] However, the inventors have found that in the process of calibrating a lens with small distortion, the pixels in the center and edge areas of the image tend to diverge when fitting the distortion coefficient, resulting in inaccurate fitting results. This results in poor correction effects on distorted images using a dedistortion model that includes the distortion coefficient. For example, the center and edge of the distorted image may be convex or concave, and after correction using a preset dedistortion model, the center or edge of the corrected image may still be convex or concave.

[0031] The present disclosure provides an image processing method, which corrects a distorted image by using correction information including the coordinate relationship between the distorted image and the target image after dedistortion processing, thereby obtaining a target image after correction processing. The coordinate relationship is determined by a polynomial of the distance between the pixel point in the target image and the center point of the image, and the polynomial includes odd-order terms and even-order terms. Since the present embodiment introduces odd-order terms in the polynomial included in the correction information, the fitting ability of the central area and the edge area of ​​the image to the distortion coefficient during the calibration process is improved, thereby improving the effect of correcting the distorted image.

[0032] See also Figure 1 , is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure.

[0033] like Figure 1As shown, the system architecture 100 may include a terminal device 102, a network 103, a server 104 and a server 105. It should be understood that Figure 1 The number or type of terminal devices, networks, and servers in the embodiment are merely illustrative. Any number or type of terminal devices, networks, and servers may be provided as required.

[0034] The network 103 is used to provide a medium for communication links between terminal devices and servers. The network 103 may include various connection types, such as wired or wireless communication links or optical fiber cables.

[0035] The terminal device 102 and the server 105 can interact with the server 104 through the network 103 to receive or send requests or information, etc. The terminal device 102 can be various electronic devices, including but not limited to smart phones, tablet computers, digital cameras, smart wearable devices, personal digital assistants, etc.

[0036] The servers 104 and 105 can store and analyze the received data, and can also send control commands or requests to the terminal device or other servers. The server can provide services in response to the user's service request. It is understood that a server can provide one or more services, and the same service can also be provided by multiple servers.

[0037] based on Figure 1 In the system architecture shown, in the embodiment of the present disclosure, the terminal device 102 may be a terminal device held by a user, the server 105 may be a server held by the manufacturer of the image acquisition device, and the server 104 may be a device held by a service provider that provides image correction services. On the one hand, after the manufacturer of the image acquisition device has generated the image acquisition device, it may calibrate the lens of the image acquisition device to obtain the camera intrinsic parameters and distortion coefficients corresponding to the image acquisition device. Then, the server 105 may upload the camera intrinsic parameters and distortion coefficients corresponding to the image acquisition device, together with the identification information corresponding to the image acquisition device, to the server 104 and store them in the server 104.

[0038] On the other hand, user 101 can take a digital image A through an image acquisition device, and there is distortion in digital image A. User 101 can send a request carrying digital image A to server 104 through terminal device 102 via network 103 to request server 104 to correct digital image A. Server 104 can obtain correction information such as camera internal parameters and distortion coefficients corresponding to the image acquisition device that took digital image A from the stored data according to the request sent by terminal device 102. Then, digital image A is corrected based on the correction information to obtain a target image. Finally, server 104 can return the corrected target image to terminal device 102.

[0039] The present disclosure will be described in detail below in conjunction with specific embodiments.

[0040] Figure 2 The flowchart of an image processing method according to an exemplary embodiment is shown. The execution subject of the method can be implemented as any device, platform, server or device cluster with computing and processing capabilities. The method may include the following steps:

[0041] like Figure 2 As shown, in step 201, a distorted image to be processed is obtained.

[0042] In this embodiment, the target device executing the method may be a device for shooting distorted images, or may be another device different from the device for shooting distorted images, or may be a device dedicated to providing services for correcting distorted images. The distorted image may be an image that is distorted due to the lens of the image shooting device. If the target device is a device for shooting distorted images, the target device may process the distorted image after shooting the distorted image, or may retrieve the distorted image from a locally stored image. If the target device is not a device for shooting distorted images, the target device may obtain the distorted image from other devices or networks. It can be understood that this embodiment does not limit the specific method for obtaining the distorted image.

[0043] In step 202, correction information for dedistorting the distorted image is obtained.

[0044] In this embodiment, the correction information may at least include a coordinate relationship between the distorted image and the target image after dedistortion processing, and the coordinate relationship is determined by a polynomial of the distance between the pixel point in the target image and the center point of the image, and the polynomial includes at least one odd-order term and at least one even-order term. The number of odd-order terms and even-order terms may be any reasonable number, and this embodiment does not limit this aspect.

[0045] Specifically, in one implementation, the coordinate relationship may be expressed as the sum of the radial distortion coordinate relationship and the tangential distortion coordinate relationship. For example, the coordinate relationship may be expressed as follows:

[0046] X d =X u (1+k1r+k2r 2 +k3r 3 +k4r 4 +k5r 5 +k6r 6 )+2p1xy+p2(r 2 +2x 2 )

[0047] Y d =Y u (1+k1r+k2r 2 +k3r 3 +k4r 4 +k5r 5 +k6r 6 )+p1(r 2 +2y 2 )+2p2xy

[0048] r 2 =X u 2 +Y u 2

[0049] Among them, X d Represents the normalized image coordinate value of the pixel point in the distorted image in the horizontal direction, Y d Indicates the normalized image coordinate value of the pixel point in the distorted image in the vertical direction, X u Indicates the normalized image coordinate value of the pixel point in the target image without distortion in the horizontal direction, Y u represents the normalized image coordinate value of the pixel point in the target image without distortion in the vertical direction, r represents the distance between the pixel point in the target image and the center point of the image, x and y represent the original pixel coordinates of the pixel point in the distorted image without normalization, 2p1xy+p2(r 2 +2x 2 ) and p1(r 2 +2y 2 )+2p2xy represents the tangential distortion term, and k1~k6, p1 and p2 are distortion coefficients determined by calibration.

[0050] In another implementation, the coordinate relationship can be represented by only the radial distortion coordinate relationship, omitting the tangential distortion term, that is, the ratio of the coordinate value of the pixel point in the target image to the coordinate value of the pixel point in the distorted image is equal to the polynomial of the distance between the pixel point in the target image and the center point of the image. For example, the coordinate relationship can be represented as follows:

[0051] X d =X u (1+k1r+k2r 2 +k3r 3 +k4r 4 +k5r 5 +k6r 6 )

[0052] Y d =Y u (1+k1r+k2r 2 +k3r 3 +k4r 4 +k5r 5 +k6r 6 )

[0053] r 2 =X u 2 +Y u 2

[0054] Among them, X d Represents the normalized image coordinate value of the pixel point in the distorted image in the horizontal direction, Y d Indicates the normalized image coordinate value of the pixel point in the distorted image in the vertical direction, X u Indicates the normalized image coordinate value of the pixel point in the target image without distortion in the horizontal direction, Y u It represents the normalized image coordinate value of the pixel point in the target image without distortion in the vertical axis direction, r represents the distance between the pixel point in the target image and the image center point, and k1~k6 are all distortion coefficients determined by calibration.

[0055] With the continuous improvement of lens manufacturing technology, the influence of tangential distortion on image distortion is getting smaller and smaller. In this embodiment, only the influence of radial distortion on the image is considered. Under the premise of not affecting the correction effect of the distorted image, the difficulty of fitting the distortion coefficient and the complexity of the correction algorithm are reduced, thereby improving the efficiency of correcting the distorted image.

[0056] Optionally, the correction information may also include focus information and focal length information corresponding to the distorted image, that is, camera parameter information. In one implementation, the image acquisition device may store the camera parameter information in association with the image when capturing the image. When it is necessary to correct the image to be processed and the camera parameter information associated with the image, the image to be processed and the camera parameter information associated with the image may be directly obtained from the pre-stored data.

[0057] In another implementation, if the image acquisition device does not store the camera parameter information in association with the image after taking the image, when it is necessary to correct the image distortion, the camera parameter information corresponding to the image to be processed can also be calculated based on the pixel information of the image and a preset algorithm. It can be understood that this embodiment does not limit the specific method of obtaining the camera parameter information.

[0058] In addition, the coordinate relationship between the distorted image and the target image includes information about distortion parameters, which may be coefficients corresponding to each odd-order term and each even-order term in the polynomial in the coordinate relationship. Different lenses or different focal lengths of the same lens correspond to different distortion parameters. Therefore, the distortion parameters corresponding to the distorted image may be obtained according to the focal length information in the camera parameter information.

[0059] It should be noted that the distortion parameters can be determined by a pre-performed calibration operation. Specifically, during the calibration operation, the calibration plate can be photographed from multiple different angles to obtain a distorted image. Then, based on the size information of the calibration plate, the standard image information is calculated. The standard image information can be the pixel value information of the standard image of the calibration plate taken assuming that no distortion occurs (there is no distortion in the standard image). Then, a corrected image is obtained based on the distorted image and the correction information, and the difference between the corrected image and the standard image is calculated as the target loss. The distortion parameters in the coordinate relationship are adjusted according to the target loss until the target loss converges.

[0060] In one embodiment, in the process of calculating the target loss, the highest-order term in the polynomial is regularized, for example, using the formula X d =X u (1+k1r+k2r 2 +k3r 3 +k4r 4 +k5r 5 +k6r 6 ), in the process of calculating the target loss, the highest-order item k6r 6 Regularization of the L1 norm can be performed, for example, by adding a coefficient before the term. This can reduce the overfitting during the calibration process and reduce the divergence of the target loss.

[0061] In one embodiment, in the process of calculating the target loss, the first loss corresponding to the preset area around the center of the image has a greater weight in the target loss than the second loss corresponding to other areas of the image. For example, a larger weight can be added to the first loss item corresponding to the preset area around the center of the image. In this way, the overfitting in the calibration operation process can be reduced, and the divergence of the target loss can be reduced.

[0062] In step 203, the distorted image is dedistorted based on the correction information to obtain a target image.

[0063] Specifically, first, the coordinate values ​​of the pixels in the distorted image can be obtained, and an empty map can be constructed, which is used to generate the target image. Then, the camera parameter information (i.e., focus information and focal length information) included in the correction information is obtained, and based on the coordinate values ​​of the pixels in the distorted image, the camera parameter information is used to perform coordinate normalization processing to obtain the coordinate values ​​of the pixels in the distorted image in the normalized coordinate system. The coordinate values ​​of the pixels in the distorted image in the normalized coordinate system can be substituted into the coordinate relationship included in the correction information, so as to calculate the coordinate values ​​corresponding to the pixels in the distorted image in the target image in the normalized coordinate system. Finally, based on the coordinate values ​​corresponding to the pixels in the distorted image in the target image in the normalized coordinate system, the pixel values ​​of each pixel in the target image can be obtained from the distorted image, and the target image can be constructed in the pre-constructed empty map by searching.

[0064] The present disclosure provides an image processing method, which corrects a distorted image by using correction information including the coordinate relationship between the distorted image and the target image after dedistortion processing, thereby obtaining a target image after correction processing. The coordinate relationship is determined by the distance between the pixel point in the target image and the center point of the image. This improves the fitting ability of the central area and the edge area of ​​the image to the distortion coefficient during the calibration process, and also improves the effect of correcting the distorted image.

[0065] It should be noted that although the operations of the method of the disclosed embodiment are described in a specific order in the above embodiments, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0066] Corresponding to the aforementioned image processing method embodiment, the present disclosure also provides an embodiment of an image processing device.

[0067] like Figure 3 As shown, Figure 3is a block diagram of an image processing device according to an exemplary embodiment of the present disclosure. The device may include: a first acquisition module 301, a second acquisition module 302 and a correction module 303.

[0068] The first acquisition module 301 is used to acquire the distorted image to be processed.

[0069] The second acquisition module 302 is used to acquire correction information for dedistorting the distorted image, where the correction information includes a coordinate relationship between the distorted image and a target image after dedistortion, where the coordinate relationship is determined by a distance between a pixel point in the target image and a center point of the image.

[0070] The correction module 303 is used to perform dedistortion processing on the distorted image based on the correction information to obtain a target image.

[0071] In some embodiments, the above-mentioned coordinate relationship is determined by the distance between the pixel point in the target image and the center point of the image, including that the ratio of the coordinate value of the pixel point in the target image to the coordinate value of the pixel point in the distorted image is equal to a polynomial of the distance between the pixel point in the target image and the center point of the image, and the polynomial includes odd-order terms and even-order terms.

[0072] In other embodiments, the correction information further includes focus information and focal length information corresponding to the distorted image.

[0073] In other embodiments, the second acquisition module 302 is configured to: acquire pre-stored camera parameter information corresponding to the distorted image, the camera parameter information including focus information and focal length information corresponding to the distorted image, and acquire distortion parameters corresponding to the distorted image based on the focal length information. The distortion parameters include coefficients corresponding to each odd-order term and each even-order term in the polynomial, and the distortion parameters are determined by a pre-performed calibration operation.

[0074] In some other embodiments, the calibration operation process includes: calculating the target loss according to the captured distorted image, the correction information and the known standard image information. In the target loss, the first loss corresponding to the first area of ​​the image has a greater weight in the target loss than the second loss corresponding to the second area of ​​the image. The first area of ​​the image includes a preset area around the center of the image, and the second area of ​​the image includes an area of ​​the image other than the first area.

[0075] In some other embodiments, the calibration operation process includes: calculating the target loss according to the captured distorted image, the correction information and the known standard image information. In the process of calculating the target loss, the highest order term in the polynomial is regularized.

[0076] In other embodiments, the correction module 303 is configured to: obtain the coordinate values ​​of the pixels in the distorted image, and perform coordinate normalization processing based on the coordinate values ​​of the pixels in the distorted image and using the focus information and focal length information corresponding to the distorted image included in the correction information. Based on the coordinate values ​​of the pixels in the distorted image after the coordinate normalization processing and the coordinate relationship included in the correction information, determine the coordinate values ​​corresponding to the pixels in the distorted image in the target image, and obtain the target image based on the coordinate values ​​corresponding to the pixels in the distorted image in the target image.

[0077] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0078] Figure 4 A schematic block diagram of an electronic device provided in some embodiments of the present disclosure. Figure 4 As shown, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or a server. The memory 912 is used to store computer executable instructions (e.g., one or more computer program modules) non-transiently. The processor 911 is used to run the computer executable instructions, and when the computer executable instructions are run by the processor 911, one or more steps in the image processing method described above can be executed, thereby implementing the image processing method described above. The memory 912 and the processor 911 can be interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0079] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture, etc. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.

[0080] For example, the memory 912 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may run one or more computer program modules to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium.

[0081] It should be noted that, in the embodiments of the present disclosure, the specific functions and technical effects of the electronic device 910 can refer to the above description of the image processing method, which will not be repeated here.

[0082] Figure 5 A schematic block diagram of another electronic device provided for some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the image processing method provided in the embodiments of the present disclosure. The electronic device 920 may be a terminal device, etc., and may be used to implement a client or a server. The electronic device 920 may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that Figure 5 The electronic device 920 shown is only an example and does not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0083] like Figure 5 As shown, the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. In the RAM 923, various programs and data required for the operation of the electronic device 920 are also stored. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.

[0084] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 920 is shown to have various devices, but it should be understood that it is not required to implement or possess all of the devices shown, and the electronic device 920 may alternatively implement or possess more or fewer devices.

[0085] For example, according to an embodiment of the present disclosure, the above-mentioned image processing method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned image processing method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 929, or installed from a storage device 928, or installed from a ROM 922. When the computer program is executed by the processing device 921, the functions defined in the image processing method provided in the embodiment of the present disclosure can be implemented.

[0086] Figure 6 A schematic diagram of a storage medium provided in some embodiments of the present disclosure. Figure 6 As shown, the storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When the non-transitory computer-executable instructions 931 are executed by a processor, the image processing method described in the embodiment of the present disclosure may be implemented. For example, when the non-transitory computer-executable instructions 931 are executed by a processor, one or more steps in the image processing method described above may be executed.

[0087] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.

[0088] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), flash memory, or any combination of the above storage media, or other applicable storage media.

[0089] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the image processing method above, and are not repeated here.

[0090] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer-readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by an instruction execution system, device or device or used in combination with it. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0091] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0092] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, the method comprising: Obtaining a distorted image to be processed; Acquiring correction information for dedistorting the distorted image; The correction information includes a coordinate relationship between the distorted image and the target image after dedistortion processing; the coordinate relationship is determined by the distance between the pixel point in the target image and the center point of the image; The distorted image is dedistorted based on the correction information to obtain the target image.

2. The method according to claim 1, wherein: The coordinate relationship is determined by the distance between the pixel point in the target image and the center point of the image, including that the ratio of the coordinate value of the pixel point in the target image to the coordinate value of the pixel point in the distorted image is equal to a polynomial of the distance between the pixel point in the target image and the center point of the image; the polynomial includes odd-order terms and even-order terms.

3. The method according to claim 1, wherein: The correction information also includes focus information and focal length information corresponding to the distorted image.

4. The method according to claim 3, wherein: The obtaining of correction information for performing dedistortion processing on the distorted image includes: Acquire pre-stored camera parameter information corresponding to the distorted image; the camera parameter information includes focus information and focal length information corresponding to the distorted image; and Based on the focal length information, distortion parameters corresponding to the distorted image are obtained; the distortion parameters include coefficients corresponding to each odd-order term and each even-order term in the polynomial; the distortion parameters are determined by a pre-performed calibration operation.

5. The method according to claim 4, wherein: The calibration operation process includes: calculating the target loss based on the captured distorted image, the correction information and the known standard image information; in the target loss, the first loss corresponding to the first area of ​​the image has a greater weight than the second loss corresponding to the second area of ​​the image, and the first area of ​​the image includes a preset area around the center of the image; the second area of ​​the image includes the area in the image other than the first area.

6. The method according to claim 4, wherein: The calibration operation process includes: calculating the target loss according to the captured distorted image, the correction information and known standard image information; in the process of calculating the target loss, regularizing the highest-order term in the polynomial.

7. The method according to claim 3, wherein: The dedistorting the distorted image based on the correction information to obtain the target image includes: Obtaining coordinate values ​​of pixel points in the distorted image; Based on the coordinate values ​​of the pixels in the distorted image, coordinate normalization processing is performed using the focus information and focal length information corresponding to the distorted image included in the correction information; Determining the coordinate value of the pixel point in the distorted image in the target image based on the coordinate value of the pixel point in the distorted image after the coordinate normalization processing and the coordinate relationship included in the correction information; A target image is obtained based on the coordinate values ​​corresponding to the pixel points in the distorted image in the target image.

8. An image processing device, comprising: A first acquisition module, used to acquire a distorted image to be processed; A second acquisition module is used to acquire correction information for dedistorting the distorted image; the correction information includes a coordinate relationship between the distorted image and a target image after dedistortion processing; the coordinate relationship is determined by a distance between a pixel point in the target image and a center point of the image; A correction module is used to perform dedistortion processing on the distorted image based on the correction information to obtain the target image.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.