Calibration method of optical imaging module, distortion correction method and related device
By employing multi-angle image acquisition and local fitting methods, the problem of difficult distortion correction in optical freeform surface imaging modules has been solved, achieving more efficient and accurate image correction and ensuring the authenticity of images captured by electronic devices.
Patent Information
- Application Number
- CN202010815081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-13
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2040-08-13
AI Technical Summary
The distortion introduced by optical imaging modules with freeform optical surfaces during the imaging process is difficult to accurately represent using traditional distortion models, resulting in image distortion, especially since the distortion data varies in different directions within the field of view of the optical imaging module.
By acquiring images from multiple angles, calculating the true coordinates of feature points, and using local fitting, calibration results for each region are generated, thereby correcting the distortion introduced by the optical freeform surface.
It effectively corrects distortions introduced by optical freeform surfaces, improves image correction efficiency and accuracy, and makes images captured by electronic devices more realistic.
Smart Images

Figure CN114078165B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical electronic device technology, and in particular to a calibration method for an optical imaging module, a distortion correction method, and related equipment. Background Technology
[0002] Optical freeform surfaces are optical surfaces whose light propagation axes lack translational and rotational symmetry. Lenses made from optical freeform surfaces have complex and irregular shapes. Incorporating optical freeform surfaces into optical imaging modules can further correct aberrations in the optical system, thereby improving the optical performance of the imaging module. Furthermore, optical imaging modules incorporating optical freeform surfaces have a compact structure, are easy to manufacture in lightweight form, and are suitable for augmented reality (AR) / virtual reality (VR) head-mounted display devices (such as VR glasses), cameras, mobile phones, and other end products.
[0003] However, due to the irregular shape of optical freeform surfaces, incorporating them into an optical imaging module introduces optical distortion during the imaging process. This distortion cannot be accurately explained using conventional optical distortion models. Specifically, when generating images using an optical imaging module with an optical freeform surface, the distortion data differs in different directions within the module's field of view. In other words, images acquired using this optical imaging module do not conform to conventional distortion models based on rotational center symmetry, making it difficult to characterize the optical distortion of the optical freeform surface using conventional distortion models.
[0004] Understandably, if the optical imaging module of an electronic device includes an optical freeform surface, then distortion correction of the optical imaging module is required to make the image obtained by the electronic device through the optical imaging module more realistic. Summary of the Invention
[0005] This application provides a calibration method, a distortion correction method, and related equipment for an optical imaging module, which can calibrate an optical imaging module with an optical freeform surface to correct the image acquired by the optical imaging module, so that the image acquired by the electronic device using the optical imaging module is more realistic.
[0006] To achieve the above technical objectives, this application adopts the following technical solution:
[0007] Firstly, this application provides a calibration method for an optical imaging module. This method can be applied to electronic devices, where the optical imaging module includes an optical freeform surface. It is understood that incorporating an optical freeform surface into the optical imaging module will cause distortion in the image acquired by the module, resulting in image distortion by the electronic device. Using the calibration method provided in this application, the optical imaging module can be calibrated, and calibration results can be obtained. This allows the electronic device to correct the image acquired by the optical imaging module based on the calibration results, resulting in a more realistic image.
[0008] The method for calibrating the imaging module may include: an electronic device acquiring N images of a preset calibration board, each of the N images including multiple feature points on the preset calibration board, where N is a positive integer greater than 2. The N images are acquired at N angles sequentially between the preset calibration board and the imaging surface of the optical imaging module, including a first preset angle. Based on the coordinates of the feature points in the N images, the true coordinates of the multiple feature points on the preset calibration board can be calculated. The true coordinates of the multiple feature points on the preset calibration board can be: the undistorted coordinates of the multiple feature points on the preset calibration board when the preset calibration board and the imaging surface of the optical imaging module form the first preset angle; or, in other words, the true coordinates of the multiple feature points on the calibration board.
[0009] Since the electronic device can calculate the true coordinates of the preset calibration plate and the optical imaging module at a first preset angle based on the coordinates of feature points in N images, the first image corresponding to the first preset angle in the N images can be divided into M regions. Each of the M regions includes at least one feature point, and M is a positive integer. Using the true coordinates of multiple feature points, the coordinates of the feature points in each of the M regions are fitted and calculated to obtain the calibration result for each region. The calibration result for each region includes the offset of the coordinates of each feature point in that region relative to the corresponding true coordinates.
[0010] Understandably, the electronic device calculates the true coordinates of feature points in the first image based on N images, enabling it to determine the distortion of the image acquired by the optical imaging module based on the coordinates of the feature points and the true coordinates in the first image. Specifically, the electronic device divides the first image into M regions, each containing at least one feature point, and calculates calibration data for each region separately. This method can effectively detect various distortions generated in the captured image corresponding to the optical freeform surface. Moreover, even with large image sizes, distortion correction can be performed separately for each region after image division. In other words, the method provided in this application can reduce the correction time for large images, thereby improving image correction efficiency.
[0011] In one possible design approach of the first aspect, after the electronic device divides the first image into M regions, it can perform the following operations for each region: the electronic device can generate a fitted surface for a region based on the calibration result of a region; calculate the fitting error of the fitted surface for a region based on the true coordinates of multiple feature points of a region; if the fitting error is less than a preset threshold, it means that the fitted surface fitted according to the calibration result reduces the distortion caused by the optical freeform surface, and the calibration result of that region can be saved.
[0012] Understandably, the electronic device divides the first image into M regions and fits a surface to each region. In other words, the electronic device uses a local fitting approach to fit each region of the first image. This method effectively covers all feature points in the first image and improves the fitting efficiency for distorted images.
[0013] In another possible design approach of the first aspect, before the electronic device calculates the true coordinates of multiple feature points on the preset calibration board based on the coordinates of feature points in N images, the electronic device can also acquire N angles corresponding to the N images, as well as N distance values between the electronic device and the preset calibration board when acquiring N images. It can be understood that when the electronic device acquires N images, the preset calibration board is at N angles to the electronic device in sequence when acquiring the images of the preset calibration board.
[0014] The first image corresponds to a first preset angle and a first distance value. The electronic device calculates the angle corresponding to the true coordinates as the first preset angle based on the coordinates of feature points in the N images, and calculates the distance value corresponding to the true coordinates as the first distance value.
[0015] Understandably, during the process of acquiring N images, the preset calibration plate and the electronic device are sequentially positioned at preset angles. For example, the electronic device and the preset calibration plate are at a first preset angle, and the distance between them is a first distance, at which point the electronic device acquires the first image. The angles between the preset calibration plate and the electronic device are adjusted sequentially to acquire N images. When the electronic device calculates the ground truth coordinates based on the N images, the ground truth coordinates on the preset calibration plate can be calculated based on the distances between the N images and the electronic device, as well as the preset angles.
[0016] Secondly, this application also provides a distortion correction method that can be applied to an electronic device, wherein the optical imaging module of the electronic device may include an optical freeform surface. The optical freeform surface may introduce distortion into the image acquired by the electronic device, and this distortion correction method can correct the distortion introduced by the optical freeform surface, making the image acquired by the electronic device more realistic.
[0017] The method may include: an electronic device acquiring an image to be corrected and dividing the image into M regions. Here, M is a positive integer, and the electronic device may pre-store the calibration results for each of the M regions. The calibration result for each region corresponds to the offset of the coordinates of each feature point in that region relative to its corresponding ground truth coordinates. This allows the electronic device to perform distortion correction on each pixel in each region based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region, thereby generating a corrected image.
[0018] Understandably, the electronic device pre-stores the calibration results of each of the M regions, and can correct the image based on the calibration results. Therefore, after acquiring the image to be corrected, the electronic device can divide it into M regions. The M regions stored by the electronic device are obtained after dividing the image, and are the same M regions obtained by dividing the image to be corrected using the same method as the electronic device. Thus, the electronic device can correct the divided image to be corrected based on the preset calibration results to obtain the corrected image. Implementing the distortion correction method provided in this application can correct the distortion introduced by optical freeform surfaces to obtain a realistic image.
[0019] In one possible design approach of the second aspect, the electronic device performs distortion correction on each pixel in each region based on the calibration results of each region, as well as the coordinates of each feature point and each pixel in each region, to generate a corrected image.
[0020] The electronic device can generate a pixel distortion lookup table based on the calibration results of each region, as well as the coordinates of each feature point and each pixel in each region. The distortion lookup table can include offsets corresponding to the coordinates of multiple pixels. The electronic device can then perform distortion correction on each pixel in each region based on the distortion lookup table and the coordinates of each pixel in each region to generate a corrected image.
[0021] In this process, the electronic device can correct the coordinates of each pixel based on the calibration results. In other words, based on the calibration results for each region, the electronic device can perform distortion correction for each pixel. This correction method can effectively correct the image acquired by the electronic device, ensuring that the corrected image obtained by the electronic device is identical to the real scene.
[0022] For example, the distortion lookup table may include the offsets corresponding to the coordinates of some pixels in the image to be corrected, and the electronic device can calculate the offset of each pixel in the image to be corrected based on the distortion lookup table. As another example, the distortion lookup table may include the offsets corresponding to the coordinates of each pixel in the image to be corrected, and the electronic device can obtain the coordinate offset of each pixel by looking up the distortion lookup table.
[0023] In another possible design approach, the electronic device performs distortion correction on each pixel in each region to generate a corrected image, including: the electronic device can use interpolation to perform distortion correction on each pixel in each region to generate a corrected image.
[0024] Understandably, interpolation can accurately correct geometric distortions in images. When the image to be corrected contains geometric shapes, interpolation can correct the distortion of those shapes, thus improving the realism of the corrected image.
[0025] In another possible design approach, prior to acquiring the image to be corrected and dividing it into M regions, the electronic device may also acquire a captured image and preprocess it to obtain the image to be corrected. This preprocessing may include at least noise reduction and deblurring.
[0026] In another possible design approach, before acquiring the image to be calibrated and dividing it into M regions, the electronic device can also acquire N images of a preset calibration board. Each of the N images includes multiple feature points on the preset calibration board, where N is a positive integer greater than 2. These N images are acquired at N angles sequentially between the preset calibration board and the imaging surface of the optical imaging module, including a first preset angle. Based on the coordinates of the feature points in the N images, the true coordinates of the multiple feature points on the preset calibration board can be calculated. The true coordinates of the multiple feature points on the preset calibration board can be the undistorted coordinates of the multiple feature points on the preset calibration board when the preset calibration board and the imaging surface of the optical imaging module form the first preset angle; or, in other words, the true coordinates of the multiple feature points on the calibration board. The electronic device can divide the first image corresponding to the first preset angle in the N images into M regions, each of the M regions including at least one feature point. In this way, the electronic device can use the true coordinates of multiple feature points to fit the coordinates of the feature points in each of the M regions to obtain the calibration result for each region.
[0027] In another possible design approach, after the electronic device divides the first image into M regions, it can perform the following operations for each region: the electronic device can calculate the fitting error of multiple feature points in a region based on the true coordinates of multiple feature points in a region, i.e., the calibration result of that region; generate a fitting surface for a region based on the calibration result of that region; if the multiple fitting errors in that region are all less than a preset threshold, it indicates that the calibration result is valid, and the fitting surface fitted based on the calibration result can reduce the distortion caused by the optical freeform surface, and the calibration result of that region can be saved.
[0028] In another possible design approach of the first aspect, before the electronic device calculates the true coordinates of multiple feature points on the preset calibration board based on the coordinates of feature points in N images, the electronic device can also acquire N angles corresponding to the N images, as well as N distance values between the electronic device and the preset calibration board when acquiring N images. It can be understood that when the electronic device acquires N images, the preset calibration board is at N angles to the electronic device in sequence when acquiring the images of the preset calibration board.
[0029] Thirdly, this application also provides an electronic device, which may include an acquisition module and a calibration module. The acquisition module can be used to acquire an image to be corrected and divide the image to be corrected into M regions. Here, M is a positive integer, and the electronic device may pre-store the calibration results of each of the M regions, where the calibration result corresponds to the offset of the coordinates of each feature point in the region relative to the corresponding ground truth coordinates. The calibration module can be used to perform distortion correction on each pixel in each region based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region, thereby generating a corrected image.
[0030] In one possible design approach of the third aspect, the calibration module can specifically be used to generate a pixel distortion lookup table based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region. The distortion lookup table can include offsets corresponding to the coordinates of multiple pixels, and the electronic device can calculate the offset corresponding to the coordinates of each pixel based on the distortion lookup table. Furthermore, based on the distortion lookup table and the coordinates of each pixel in each region, distortion correction is performed on each pixel in each region to generate a corrected image.
[0031] In another possible design approach, the calibration module can also be used to perform distortion correction on each pixel in each region using interpolation to generate a corrected image.
[0032] In another possible design approach, the acquisition module can also be used to acquire captured images and preprocess them to obtain the image to be corrected. Preprocessing may include at least noise reduction and deblurring.
[0033] In another possible design approach, the electronic device may also include a computing module.
[0034] The acquisition module can also be used to acquire N images of a preset calibration board. Each of the N images includes multiple feature points on the preset calibration board, where N is a positive integer greater than 2. The N images are acquired by sequentially placing the preset calibration board and the imaging surface of the optical imaging module at N angles, including a first preset angle.
[0035] The calculation module can be used to calculate the true coordinates of multiple feature points on a preset calibration plate based on the coordinates of feature points in N images. The true coordinates of multiple feature points on the preset calibration plate can be: the undistorted coordinates of multiple feature points on the preset calibration plate when the preset calibration plate forms a first preset angle with the imaging surface of the optical imaging module.
[0036] The acquisition module is also used to divide the first image corresponding to the first preset angle in N images into M regions, and each of the M regions includes at least one feature point.
[0037] The calibration module can also be used to fit the coordinates of the feature points in each of the M regions using the true coordinates of multiple feature points, so as to obtain the calibration result for each region.
[0038] Fourthly, this application also provides an electronic device, comprising: a memory, a display device, and one or more processors; the memory, the display device, and the processor are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the steps described in the first aspect and any possible design of the second aspect and any possible design of the third aspect.
[0039] Fifthly, this application also provides a chip system applied to an electronic device including a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected via lines; the interface circuits are used to receive signals from the memory and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the methods of the first aspect and any possible design of the second aspect and any possible design of the third aspect.
[0040] Sixthly, this application also provides a computer-readable storage medium including computer instructions that, when executed on a control device, cause the control device to perform the methods described in the first aspect and any possible design of the second aspect and any possible design of the third aspect.
[0041] In a seventh aspect, this application also provides a computer program product that, when run on a computer, enables the computer to execute the methods described in the first aspect and any possible design of the first aspect and any possible design of the second aspect.
[0042] It is understood that the beneficial effects achieved by the third aspect and any possible design of the above-mentioned application, the electronic device of the fourth aspect, the chip system of the fifth aspect, the computer-readable storage medium of the sixth aspect, and the computer program product of the seventh aspect can be referred to the beneficial effects of the first aspect, the second aspect and any possible design of the above-mentioned application, which will not be repeated here. Attached Figure Description
[0043] Figure 1 A schematic diagram of the structure of a testing device provided in this application;
[0044] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0045] Figure 3 A flowchart illustrating a calibration method for an optical imaging module provided in this application embodiment;
[0046] Figure 4 This is a test schematic diagram of a test device provided in an embodiment of this application;
[0047] Figure 5 A schematic diagram of a calibration plate provided in an embodiment of this application;
[0048] Figure 6A This application provides a schematic diagram of a first image segmentation method according to an embodiment of the present application.
[0049] Figure 6B This is another schematic diagram of first image segmentation provided in an embodiment of this application;
[0050] Figure 7 A flowchart of a distortion correction method provided in an embodiment of this application;
[0051] Figure 8A An image to be corrected is provided for an embodiment of this application;
[0052] Figure 8B A corrected image provided for an embodiment of this application;
[0053] Figure 9A A schematic diagram of an image to be corrected provided in an embodiment of this application;
[0054] Figure 9B A schematic diagram of a corrected image provided in an embodiment of this application;
[0055] Figure 10 A schematic diagram of the module structure of an electronic device provided in an embodiment of this application;
[0056] Figure 11 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0057] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0058] Traditional optical imaging modules are based on spherical or aspherical lenses. Due to variations in lens manufacturing precision and assembly processes, optical distortion occurs during image formation in traditional optical imaging modules. Understandably, because spherical and aspherical lenses possess rotational symmetry, the optical distortion in traditional imaging modules also exhibits rotational symmetry. For example, the distortions occurring when acquiring images using traditional optical imaging modules include radial and tangential distortion. In other words, the optical distortions formed by traditional optical imaging modules can be characterized by radial and tangential distortion.
[0059] Understandably, the light propagation axis of an optical freeform surface lacks translational and rotational symmetry, and the lens shape of an optical freeform surface is irregular. The structural characteristics of optical freeform surfaces allow for further correction of aberrations in optical systems and better improvement of optical performance. Furthermore, optical imaging modules incorporating optical freeform surfaces are compact and easy to manufacture in lightweight form. However, due to the irregular lens shape of optical freeform surfaces, incorporating them into an optical imaging module introduces optical distortion, which does not conform to conventional distortion models. Based on the structural characteristics of optical freeform surfaces, an optical lens with an incorporated optical freeform surface is calibrated, yielding calibration results. When this optical imaging module is installed on an electronic device, the device can correct the distortion of the image acquired by the optical imaging module based on the calibration results, resulting in a more realistic image.
[0060] In the first implementation, a calibration board is fixed at a preset distance from the electronic device. The electronic device can acquire images of the calibration board through an optical imaging module. The calibration board has multiple feature points, and the image acquired by the electronic device includes these feature points. The electronic device can recognize the image of the calibration board to extract the coordinates of the feature points. The electronic device then calculates the distortion parameters of each feature point by comparing the extracted coordinates with the coordinates of the actual feature points on the calibration board. This results in the calibration result. Therefore, when the electronic device captures an image, it can correct the distortion of the pixels in the captured image based on the calibration result, making the image more realistic.
[0061] It should be noted that in the above implementation, the angle between the fixed test board and the electronic device is difficult to obtain accurately, resulting in inaccurate calibration results calculated by the electronic device. Therefore, this calibration method is not suitable for high-precision distortion correction. Furthermore, the distortion in the image acquired by the optical imaging module of the optical freeform surface does not conform to conventional distortion models, and this calibration method cannot accurately identify and correct the distortion caused by the optical freeform surface.
[0062] In the second implementation, a measurement coordinate system can be established using three theodolites. The calibration plate is set within this coordinate system, and the angles of the calibration plate and the electronic equipment within the field of view of the optical system are calibrated through datum transformation. This allows for the calculation of the two-dimensional distortion distribution on the image of the calibration plate acquired by the electronic equipment when its field of view is 76°, within the measurement coordinate system established by the three theodolites.
[0063] This method can accurately obtain the calibration results of the optical imaging module. However, it is costly, complex, and difficult to implement.
[0064] In the third implementation, an electronic device can be used to capture an image of the geometric shape. The device can then identify structural distortions in the image and calibrate the distorted shape based on the actual geometric structure. Understandably, this method can eliminate distortion in images captured by electronic devices; however, this technique cannot accurately identify the distortion of each pixel in the image.
[0065] In other words, while this implementation method allows the electronic device to calculate the global parameters of the image, it cannot identify the distortion of each individual pixel based on the image's pixels, and the distortion residual is difficult to guarantee. Therefore, this implementation method is not suitable for high-precision distortion correction.
[0066] This application provides a calibration method for an optical imaging module, which can be applied to an electronic device whose optical imaging module includes an optical freeform surface. The electronic device uses the method provided in this application to acquire images from multiple angles and calculate the true coordinates of feature points on the images at preset angles. Based on the calculated true coordinates, a local fitting method is used to calculate the calibration result for each local area, and the calibration result of the entire image is obtained based on the calibration results of each local area. In other words, the method provided in this application can calculate the distortion in each direction of the image acquired by the optical imaging module, and then correct the image based on the calibration results to obtain a more realistic image.
[0067] It is understandable that by using the method provided in this application to obtain the calibration results of an optical imaging module with an optical freeform surface, the distortion caused by the lens shape of the optical freeform surface to the optical imaging module can be understood based on the calibration results. Therefore, the design of the optical freeform surface can be adjusted based on the calibration results to improve the lens shape of the optical freeform surface.
[0068] This application also provides a distortion correction method, which uses the calibration results obtained by the calibration method of the optical imaging module in the above embodiments to correct the distortion of the image obtained by the optical imaging module.
[0069] In the calibration process of optical imaging modules, testing devices can be used to calibrate electronic devices equipped with optical imaging modules. For example... Figure 1 The diagram shown is a structural schematic of a testing device provided in an embodiment of this application. Figure 1 The testing apparatus includes a testing fixture 10, a rotating mechanism 20, and a calibration plate 30. The testing fixture 10 is used to fix the electronic equipment, and the calibration plate 30 can be fixed to the rotating mechanism 20. When the rotating mechanism 20 rotates, it drives the calibration plate 30 to rotate as well. Figure 1 As shown, the rotating mechanism 20 can be a rotating shaft.
[0070] When the electronic device is fixed on the test fixture 10, the optical axis of the electronic device's optical imaging module is perpendicular to the calibration plate at the 0° position. An angle measuring device can also be installed on the rotating mechanism 20 to measure the angle between the rotating mechanism 20 and the test fixture 10. The test fixture 10 is fixed and its angle is not adjustable; the angle between the test plate on the rotating mechanism 20 and the electronic device on the test fixture 10 can be adjusted by adjusting the rotating mechanism 20.
[0071] For example, the electronic device in this application embodiment may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. This application embodiment does not impose any special restrictions on the specific form of the electronic device.
[0072] Assuming the electronic device is a mobile phone, the optical imaging module is a camera module on the phone. For example, an optical imaging module with a freeform optical surface could be an ultra-wide-angle camera module on the phone. When the ultra-wide-angle camera module on the phone includes a freeform optical surface, distortion correction can be performed on the images captured by the ultra-wide-angle camera module, making the images taken by the phone more realistic.
[0073] The technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings.
[0074] Please refer to Figure 2 This is a schematic diagram of the structure of an electronic device 200 provided in an embodiment of this application. Figure 2 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 250, a wireless communication module 260, a sensor module 280, buttons 290, a camera 291, and a display screen 294, etc. The sensor module 280 may include a pressure sensor, a gyroscope sensor, a vibration sensor, an orientation sensor, an acceleration sensor, a distance sensor, a proximity sensor, a temperature sensor, a touch sensor, an ambient light sensor, etc.
[0075] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0076] Processor 210 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0077] The controller can be the nerve center and command center of the electronic device 200. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0078] The processor 210 may also include a memory for storing instructions and data.
[0079] In some embodiments, the processor 210 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0080] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0081] The external storage interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external storage interface 220 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0082] Internal memory 221 can be used to store computer executable program code, which includes instructions. Processor 210 executes various functional applications and data processing of electronic device 200 by running the instructions stored in internal memory 221.
[0083] The charging management module 240 receives charging input from a charger, which can be a wireless or wired charger. The power management module 241 connects to the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, providing power to the processor 210, internal memory 221, external memory, display 294, etc.
[0084] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor, and baseband processor.
[0085] The electronic device 200 can implement its shooting function through an ISP, a camera 291, a video codec, a GPU, a display 294, and an application processor. The electronic device 200 may include 1 to N cameras 291, where N is a positive integer greater than 1. For example, the electronic device 200 includes a wide-angle camera, which includes an optical freeform surface. The wide-angle camera and the ISP together form an optical imaging module.
[0086] The ISP is used to process data fed back from the camera 291. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 291.
[0087] Camera 291 is used to capture still images or videos. An object is projected onto a photosensitive element through a lens, generating an optical image. This photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP (Image Signal Processor) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for further processing. The DSP converts the digital image signal into standard image signals in formats such as RGB and YUV.
[0088] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 200 selects a frequency, the DSP is used to perform Fourier transforms on the frequency energy.
[0089] Video codecs are used to compress or decompress digital video. Electronic device 200 may support one or more video codecs. Thus, electronic device 200 can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0090] Electronic device 200 implements display functions through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0091] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 200 may include one or N displays 294, where N is a positive integer greater than 1.
[0092] The methods described in the following embodiments can all be implemented on electronic devices with the above-described hardware structure.
[0093] Please refer to Figure 3 This is a flowchart of the calibration method for the optical imaging module provided in the embodiments of this application. Figure 3 As shown, the method includes steps 301-305.
[0094] Understandably, an optical imaging module includes an optical freeform surface; this optical imaging module is a camera module mounted on an electronic device. Taking a mobile phone as an example, it can employ... Figure 1 The test apparatus shown performs the above calibration method on the camera module on the mobile phone.
[0095] Step 301: Obtain N images of the preset calibration board. Each of the N images includes multiple feature points on the preset calibration board, and N is a positive integer greater than 2.
[0096] Among them, N images are images acquired sequentially at N angles from the imaging surfaces of the preset calibration plate and the optical imaging module, including the first preset angle.
[0097] For example, taking N as 3, the first preset angle is 0°, so the angle between the phone's camera and the preset calibration plate is 0°, meaning the phone's camera is parallel to the preset calibration plate. The second preset angle is -20°, so the angle between the phone's camera and the preset calibration plate is -20°. The third preset angle is 20°, so the angle between the phone's camera and the preset calibration plate is 20°. Figure 4 As shown, when the preset calibration plate is in position 1 (e.g.) Figure 4In position S1), the angle between the mobile phone and the preset calibration plate is the second preset angle; when the preset calibration plate is in position 2 (e.g., ... Figure 4 In position S2), the angle between the mobile phone and the preset calibration board is the first preset angle; when the preset calibration board is in position 3 (e.g., ... Figure 4 In S3), the angle between the mobile phone and the preset calibration plate is the third preset angle.
[0098] The angle of the rotating mechanism 20 on the testing device is adjusted to regulate the angle between the mobile phone and the preset calibration plate. Adjusting the rotating mechanism causes the preset calibration plate to sequentially occupy positions 1, 2, and 3. When the preset calibration plate is in the corresponding position, the mobile phone acquires an image of the preset calibration plate. In one possible implementation, when the preset calibration plate is in position 1, the mobile phone acquires an image of the preset calibration plate. The mobile phone then determines whether the image of the calibration plate is clear. If the image is clear, one capture is completed. When N is 3, if the mobile phone determines that it has acquired 3 images of different calibration plates, then the acquisition of calibration plate images is complete.
[0099] It should be noted that N can be user-defined, for example, N is 3, 4, or 5. The mobile phone can obtain the user-defined value of N to determine whether the acquisition of calibration board images is complete. Furthermore, the angle corresponding to each of the N calibration board images can also be user-defined; for example, if N is 3, the preset angles can also be -10°, 0°, and 10°.
[0100] The preset calibration board includes multiple feature points. When the mobile phone acquires an image of the preset calibration board, the image of the preset calibration board includes multiple feature points. In other words, the image of the preset calibration board acquired by the mobile phone includes multiple feature points of the preset calibration board. In one possible implementation, assuming the preset calibration board includes 30*20 feature points, after the mobile phone acquires the image of the calibration board, if it determines that the image of the calibration board includes 30*20 feature points, then the image of the calibration board is determined to be a compliant image.
[0101] For example, the preset calibration board includes 38*26 feature points, of which 10 may be special feature points, and the rest are non-special feature points. Please refer to [reference needed]. Figure 5 This is a partial schematic diagram of the preset calibration plate provided in an embodiment of this application. Figure 5 As shown, A represents a special feature point, which is a circular ring. B represents a non-special feature point, which is a solid circle.
[0102] The preset calibration board can be composed of multiple feature points arranged in a checkerboard pattern, such as... Figure 5 The arrangement shown can be either a circular grid or a combination of multiple feature points. The feature points can be solid circles, rings, asymmetrical circles, etc.
[0103] It should be noted that, when the first preset angle is 0°, when the mobile phone acquires an image of the preset calibration board, the feature points of the preset calibration board should be distributed throughout the entire field of view of the mobile phone's camera, and the special feature points should be located within the field of view of the camera. In this way, the image field of view acquired by the mobile phone is also distributed throughout the feature points of the preset calibration board, including the special feature points.
[0104] Step 302: Based on the coordinates of the feature points in N images, the true coordinates of multiple feature points on the first image when the mobile phone and the preset calibration plate form a first preset angle can be calculated.
[0105] The true coordinates of multiple feature points on the preset calibration plate can be: the undistorted coordinates of multiple feature points on the preset calibration plate when the preset calibration plate forms a first preset angle with the imaging surface of the optical imaging module, or it can be understood as the true coordinates of multiple feature points on the calibration plate.
[0106] Understandably, after acquiring N images, the phone identifies the coordinates of feature points on a preset marker in each of the N images. Based on the coordinates of the feature points in the N images, it calculates the ground truth coordinates of the feature points in the first image. Since the phone does not perform distortion correction on the N images, the N images are distorted.
[0107] For example, the mobile phone calculates the ground truth coordinates of the first image based on the coordinates of feature points in each of the N images, as well as the distance and angle between the mobile phone and the preset calibration plate for each image.
[0108] Step 303: Based on the coordinates of feature points in N images, the true distance and angle between the mobile phone and the preset calibration plate when the mobile phone and the preset calibration plate form a first preset angle can be calculated.
[0109] For example, the mobile phone can calculate the actual distance and angle between the mobile phone and the preset calibration plate when the mobile phone is at 0° to the preset calibration plate based on the coordinates of feature points in N images.
[0110] In the process of acquiring N images, the phone can obtain the true distance and angle between the phone and the preset calibration board when capturing just one image. The true angle corresponding to the first image is 0°, so the phone calculates the true coordinates of the first image.
[0111] Step 304: Divide the first image into M regions, each of the M regions including at least one feature point, where M is a positive integer.
[0112] For example, such as Figure 6AAs shown, the first image is divided into 12*9 regions according to a preset division method. The division of the first image can be uniform or non-uniform; here, a non-uniform division is used as an example. Figure 6A As shown, the first image is divided into non-uniform sections. It should be noted that... Figure 6A As shown, multiple feature points on the first image are displayed in the form of a cross. The cross on the first image can represent the distribution of feature points on the preset calibration plate.
[0113] For example, such as Figure 6B The first image is divided into 12*9 regions according to a preset uniform division method. It should be noted that the preset calibration plate includes special feature points and non-special feature points. The function of the special feature points is to mark the orientation of the preset calibration plate. Therefore, all feature points on the preset calibration plate in the first image are represented by a cross shape.
[0114] This application does not specifically limit the method of dividing the first image. For example, the first image can be divided into 12*9 regions, or into 22*13 regions, etc. As long as each region includes feature points, the specific division method shall be based on the preset division method.
[0115] Step 305: Using the true coordinates of multiple feature points, fit and calculate the coordinates of the feature points in each of the M regions to obtain the calibration results for each region.
[0116] The calibration result for each region includes the offset of the coordinates of each feature point in the corresponding region relative to the corresponding ground truth coordinates.
[0117] For example, after the mobile phone divides the first image into M regions, it can perform the following operations for each region: calculate the fitting error of the fitted surface of a region based on the true coordinates of multiple feature points in the region; if the fitting error is less than a preset threshold, it means that the calibration result is valid and the calibration result of that region can be saved.
[0118] In one possible implementation, the distortion of each feature point can be described based on discrete data points within the regions divided in the first image. For example, the calibration process for each region is as follows: A Cartesian coordinate system is established for the first image; for a feature point in a region, two families of basis functions are constructed based on the x-axis and y-axis coordinates. The number of feature points in the region is identified, including the number in the x-axis direction and the y-axis direction, to obtain the number of rows and columns of feature points in the region. The coordinate difference between each feature point and the true coordinates is fitted using a local surface to obtain a fitted surface. Specifically, fitting the coordinate difference between each feature point and the true coordinates using a local surface includes: first, fitting the coordinates of the feature points in the x-direction using a univariate function to obtain m curves; and then fitting the coordinates of the feature points in the y-direction using a function to obtain the fitted surface.
[0119] In order to ensure smooth distortion between adjacent regions, the coordinates of feature points at the edge of each region can be controlled to ensure smooth distortion between adjacent regions.
[0120] It should be noted that, for each feature point in each of the M regions on the first image, the difference between the original coordinates and the ground truth coordinates is calculated. After fitting the data for each region based on these differences, a fitted surface is obtained. This includes calculating the standard deviation and maximum error of the surface fitting error. If the surface fitting error for a region is less than a preset threshold, the fitted surface for that region is determined to represent the image distortion, and the calibration result for that region is stored in memory. This allows the calibration results for each region to be used to correct image distortion during subsequent use of the phone, ensuring that the image acquired by the phone is a true image.
[0121] For example, suppose that in one of the M regions of the first image, the surface fitting error exceeds a preset threshold, then that region needs to be refitted. Alternatively, the calibration result for that region can be recalculated, and surface fitting can be performed based on the recalculated calibration result.
[0122] For example, the mobile phone will generate a pixel distortion lookup table based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region; wherein, the offset corresponding to the coordinates of each pixel can be calculated through the distortion lookup table; the distortion lookup table includes, but is not limited to, the original image size, the 1 / 2 downsampled size, and the 1 / 4 size.
[0123] This application also provides a distortion correction method. After the mobile phone completes calibration, the calibration results of each region are stored in memory. When the mobile phone acquires images, distortion correction needs to be performed on the acquired images. Figure 7 As shown, the method may include steps 701-703.
[0124] Step 701: The mobile phone acquires the captured image and preprocesses the captured image to obtain the image to be corrected.
[0125] Preprocessing can include at least noise reduction and deblurring.
[0126] Understandably, images captured by a mobile phone's camera can be pre-processed by the phone's image processor. This pre-processing addresses image formation issues, enabling further post-processing.
[0127] Step 702: The mobile phone uses the calibration results of each region to determine the distortion data corresponding to each pixel in the captured image based on the distortion lookup table.
[0128] The distortion lookup table can include the offsets of the coordinates of multiple pixels in the captured image. For example, if the captured image contains 1600*1200 pixels, the distortion lookup table can include the offsets of the coordinates of 40*30 pixels. The mobile phone can calculate the offset of the coordinates of each pixel in the captured image based on the relationships between the pixels using the distortion lookup table.
[0129] In one possible implementation, the distortion lookup table may include the offset of the coordinates of each pixel in the captured image. This allows the phone to directly obtain the offset of the coordinates of each pixel from the distortion lookup table.
[0130] Step 703: The mobile phone can perform distortion correction on each pixel in the captured image based on the distortion data of each pixel in the captured image, as well as the coordinates of each feature point and the coordinates of each pixel in each region, and generate a corrected image.
[0131] In this process, electronic devices can use interpolation to correct the distortion of each pixel in each region and generate a corrected image.
[0132] For example, a mobile phone can use interpolation to correct the distortion of the image to be corrected in order to obtain a corrected image.
[0133] It's understandable that distortions in the first image captured by the phone will also appear in the image to be corrected. Therefore, using the calibration results of the first image to correct distortions in the image to be corrected can accurately correct the distorted image, making the image captured by the phone through the optical imaging module more realistic.
[0134] For example, suppose the distortion produced by the first image is as follows: Figure 8A As shown, where, Figure 8A In the first image shown, the positions of feature points in three rows are distorted. For example... Figure 8B As shown, this is for Figure 8A The image shown is the result of distortion correction for the first image. Figure 8B As shown, the positions of the feature points in the first three rows are corrected to the positions of the true coordinates.
[0135] For example, if the goal is to correct distortion caused by the phone, the actual scene captured by the phone would look like... Figure 9A As shown, where, Figure 9A The 90° area shown represents the region where distortion occurs. Understandably, an image like 9A is distorted. Distortion correction is applied to the image shown in 9A to generate an image like... Figure 9B The image shown is as follows: Figure 9B The region shown as 91 represents the region after distortion correction. Among them, Figure 9B The images shown are more realistic and closer to the shape of real buildings.
[0136] The embodiments also provide an electronic device, corresponding to the mobile phone in the above embodiments, such as... Figure 10 As shown, the mobile phone may include: an acquisition module 101, a calibration module 102, and a calculation module 103.
[0137] The acquisition module 101 is used to acquire the image to be corrected and divide the image to be corrected into M regions.
[0138] The calibration module 102 can be used to perform distortion correction on each pixel in each region based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region, to generate a corrected image.
[0139] The calculation module 103 can be used to calculate the true coordinates of multiple feature points on a preset calibration plate based on the coordinates of feature points in N images. The true coordinates of multiple feature points on the preset calibration plate can be the undistorted coordinates of multiple feature points on the preset calibration plate when the preset calibration plate forms a first preset angle with the imaging surface of the optical imaging module.
[0140] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0141] This application also provides a chip system, such as... Figure 11As shown, the chip system includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 are interconnected via lines. For example, the interface circuit 1002 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1002 can be used to send signals to other devices (e.g., the processor 1001). Exemplarily, the interface circuit 1002 can read instructions stored in the memory and send those instructions to the processor 1001. When the instructions are executed by the processor 1001, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.
[0142] This application also provides a computer storage medium that includes computer instructions. When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform various functions or steps performed by the mobile phone in the above method embodiment.
[0143] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0145] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0146] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0148] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A calibration method for an optical imaging module, characterized in that, Applied to electronic devices, wherein the optical imaging module of the electronic device includes an optical freeform surface, the method includes: The electronic device acquires N images of a preset calibration board. Each of the N images includes multiple feature points on the preset calibration board, where N is a positive integer greater than 2. The N images are images acquired by the preset calibration board and the imaging surface of the optical imaging module at N angles in sequence, where the N angles include a first preset angle. The electronic device acquires N angles corresponding to the N images, and N distance values between the electronic device and the preset calibration board when acquiring the N images, wherein the first image corresponds to a first preset angle and a first distance value; the electronic device calculates the angle corresponding to the true coordinates as the first preset angle based on the coordinates of the feature points of the N images, and calculates the distance value corresponding to the true coordinates as the first distance value; The electronic device calculates the true coordinates of multiple feature points on the preset calibration board based on the coordinates of feature points in the N images; the true coordinates of multiple feature points on the preset calibration board are: the undistorted coordinates of multiple feature points on the preset calibration board when the preset calibration board forms the first preset angle with the imaging surface of the optical imaging module; The electronic device divides the first image corresponding to the first preset angle in the N images into M regions, and each of the M regions includes at least one feature point, where M is a positive integer; The electronic device uses the true coordinates of the multiple feature points to fit and calculate the coordinates of the feature points in each of the M regions to obtain the calibration result of each region; wherein, the calibration result of each region includes the offset of the coordinates of each feature point in the corresponding region relative to the corresponding true coordinates.
2. The method according to claim 1, characterized in that, The method further includes: The electronic device performs the following operations for each region: the electronic device generates a fitted surface for a region based on the calibration result of a region; calculates the fitting error of the fitted surface for a region based on the true coordinates of multiple feature points of the region; and saves the calibration result of the region if the fitting error is less than a preset threshold.
3. A method for distortion correction, characterized in that, Applied to electronic devices, wherein the optical imaging module of the electronic device includes an optical freeform surface, the method includes: The electronic device acquires N images of a preset calibration board. Each of the N images includes multiple feature points on the preset calibration board, where N is a positive integer greater than 2. The N images are images acquired by the preset calibration board and the imaging surface of the optical imaging module at N angles in sequence, where the N angles include a first preset angle. The electronic device acquires N angles corresponding to the N images, and N distance values between the electronic device and the preset calibration board when acquiring the N images, wherein the first image corresponds to a first preset angle and a first distance value; the electronic device calculates the angle corresponding to the true coordinates as the first preset angle based on the coordinates of the feature points of the N images, and calculates the distance value corresponding to the true coordinates as the first distance value; The electronic device calculates the true coordinates of multiple feature points on the preset calibration board based on the coordinates of feature points in the N images; the true coordinates of multiple feature points on the preset calibration board are: the undistorted coordinates of multiple feature points on the preset calibration board when the preset calibration board forms the first preset angle with the imaging surface of the optical imaging module; The electronic device divides the first image corresponding to the first preset angle in the N images into M regions, and each of the M regions includes at least one feature point; The electronic device uses the true coordinates of the multiple feature points to fit and calculate the coordinates of the feature points in each of the M regions, thereby obtaining the calibration result for each region. The electronic device acquires the image to be calibrated and divides the image to be calibrated into M regions; where M is a positive integer, the electronic device pre-stores the calibration results of each of the M regions, and the calibration results of each region include the offset of the coordinates of each feature point in the corresponding region relative to the corresponding ground truth coordinates; The electronic device performs distortion correction on each pixel in each region based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region, thereby generating a corrected image.
4. The method according to claim 3, characterized in that, The electronic device performs distortion correction on each pixel in each region based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region, generating a corrected image, including: The electronic device generates a pixel distortion lookup table based on the calibration results of each region, the coordinates of each feature point in each region, and the coordinates of each pixel in each region; wherein, the distortion lookup table includes offsets corresponding to the coordinates of multiple pixels; The electronic device performs distortion correction on each pixel in each region according to the distortion lookup table and the coordinates of each pixel in each region, and generates the corrected image.
5. The method according to claim 3 or 4, characterized in that, The step of performing distortion correction on each pixel in each region to generate the corrected image includes: The electronic device uses interpolation to correct the distortion of each pixel in each region, generating the corrected image.
6. The method according to claim 3 or 4, characterized in that, Before the electronic device acquires the image to be corrected and divides the image to be corrected into M regions, the method further includes: The electronic device acquires captured images; The electronic device preprocesses the captured image to obtain the image to be corrected, wherein the preprocessing includes at least noise reduction or deblurring.
7. The method according to claim 3, characterized in that, The method further includes: The electronic device performs the following operations for each region: the electronic device generates a fitted surface for a region based on the calibration result of a region; calculates the fitting error of the fitted surface for a region based on the true coordinates of multiple feature points of the region; and saves the calibration result of the region if the fitting error is less than a preset threshold.
8. An electronic device, characterized in that, The electronic device includes: a memory, a display device, and one or more processors; the memory, the display device, and the processors are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-7.
9. A chip system, characterized in that, The chip system is applied to an electronic device including a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected via lines; the interface circuits are used to receive signals from the memory and send the signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on a control device, cause the control device to perform the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Structured light module calibration method, electronic equipment and computer readable storage medium
CN110689581A