Image processing method, device and electronic device

CN115409875BActive Publication Date: 2026-10-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110594925.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2026-10-30
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

[0004]本公开实施例提供一种图像处理方法、设备及电子设备,以解决现有技术中相机高度漂移的问题

Benefits of technology

[0016]本公开实施例提供的图像处理方法、设备及电子设备,该方法包括获取待处理的图像帧,并确定所述图像帧对应的当前相机位姿;其中,所述图像帧对应的当前相机位姿包括当前相机高度;在确定所述当前相机高度满足预设漂移条件时,对所述图像帧对应的当前相机位姿进行修正,得到所述图像帧对应的目标相机位姿。本公开实施例通过在获取到待处理的图像帧时,需确定该图像帧对应的相机高度,即拍摄得到该图像帧时的相机高度是否存在较大程度的偏移,则确定该图像帧对应的当前相机位姿,该当前相机位姿包括拍摄得到该图像帧时的相机高度,即当前相机高度。判断当前相机高度是否满足预设漂移条件,以确定相机高度是否漂移较大,在确定当前相机高度满足预设漂移条件时,表明相机高度漂移较大,需要进行修正,则对该图像帧对应的当前相机位姿进行修正,以实现对相机高度的修正,避免相机高度出现较大程度地漂移,从而在利用该图像帧对应的修正后的当前相机位姿,即目标相机位姿放置虚拟对象时,可以避免虚拟对象存在较大程度的漂移,使得虚拟对象可以正常显示,保证虚拟对象的显示效果,用户体验高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409875B_ABST
    Figure CN115409875B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an image processing method, device and electronic device, the method comprising: acquiring an image frame to be processed, and determining a current camera pose corresponding to the image frame; wherein the current camera pose corresponding to the image frame comprises a current camera height; when it is determined that the current camera height satisfies a preset drift condition, correcting the current camera pose corresponding to the image frame to obtain a target camera pose corresponding to the image frame, so as to correct the camera height and avoid a large degree of drift of the camera height, thereby avoiding a large degree of drift of a virtual object when the virtual object is placed by using the corrected current camera pose, i.e., the target camera pose, corresponding to the image frame, so that the virtual object can be normally displayed, the display effect of the virtual object is ensured, and the user experience is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of augmented reality (AR) technology, and more particularly to an image processing method, apparatus, and electronic device. Background Technology

[0002] Augmented reality (AR) technology is a technique that cleverly integrates virtual information with the real world, and it is widely used in various scenarios. Currently, when applying AR technology, planar tracking is often required, which involves using a mobile device to capture an image containing the plane to be tracked, so that the corresponding virtual object can be placed using that image frame.

[0003] However, when the mobile terminal does not perform camera calibration, the camera height corresponding to the image frame will drift significantly after a certain period of time. As a result, when placing virtual objects using the captured image frames, the virtual objects will also drift significantly, resulting in poor display quality. Summary of the Invention

[0004] This disclosure provides an image processing method, apparatus, and electronic device to solve the problem of camera height drift in the prior art.

[0005] In a first aspect, embodiments of this disclosure provide an image processing method, including:

[0006] Acquire the image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height;

[0007] When the current camera height is determined to meet the preset drift condition, the current camera pose corresponding to the image frame is corrected to obtain the target camera pose corresponding to the image frame.

[0008] In a second aspect, embodiments of this disclosure provide an image processing apparatus, comprising:

[0009] An information acquisition module is used to acquire an image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height;

[0010] The correction module is used to correct the current camera pose corresponding to the image frame when it is determined that the current camera height meets the preset drift conditions, so as to obtain the target camera pose corresponding to the image frame.

[0011] Thirdly, embodiments of this disclosure provide an electronic device, including at least one processor and a memory.

[0012] The memory stores computer-executed instructions.

[0013] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the image processing method as described in the first aspect and various possible designs of the first aspect.

[0014] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the image processing method described in the first aspect and various possible designs of the first aspect.

[0015] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the image processing method described in the first aspect and various possible designs of the first aspect.

[0016] This disclosure provides an image processing method, apparatus, and electronic device. The method includes acquiring an image frame to be processed and determining the current camera pose corresponding to the image frame. The current camera pose includes the current camera height. When the current camera height satisfies a preset drift condition, the current camera pose is corrected to obtain the target camera pose corresponding to the image frame. This disclosure determines the current camera pose by determining the camera height corresponding to the image frame when acquiring it, i.e., whether there is a significant shift in the camera height when the image frame was captured. The current camera pose includes the camera height when the image frame was captured, i.e., the current camera height. The system determines whether the current camera height meets the preset drift conditions to identify significant camera height drift. If the conditions are met, it indicates a large drift that requires correction. The system then corrects the current camera pose corresponding to the image frame to adjust the camera height, preventing excessive drift. This correction ensures that when placing virtual objects using the corrected target camera pose, the virtual objects are displayed correctly, resulting in a better user experience. Attached Figure Description

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

[0018] Figure 1This is a schematic diagram illustrating the display of a virtual object provided in an embodiment of this disclosure;

[0019] Figure 2 A schematic diagram of a scene for the image processing method provided in an embodiment of this disclosure;

[0020] Figure 3 Flowchart of the image processing method provided in the embodiments of this disclosure Figure 1 ;

[0021] Figure 4 Flowchart of the image processing method provided in the embodiments of this disclosure Figure 2 ;

[0022] Figure 5 This is a structural block diagram of an image processing apparatus provided in an embodiment of the present disclosure;

[0023] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0025] AR technology is widely used in various scenarios. In existing technologies, planar tracking is often required when applying AR technology. This involves using a mobile terminal to capture image frames containing the plane to be tracked, which are then used to place virtual objects using the camera pose corresponding to that image frame (i.e., the camera pose at the time the image frame was captured). For example, tracking the real indoor floor yields image frames containing the actual indoor environment. When a virtual object needs to be placed at a specific location on the indoor floor, the camera pose corresponding to the image frame containing that location is used for placement. However, when the mobile terminal is not calibrated, after a certain period of time, the camera height (i.e., the camera height at the time the image frame was captured) will drift significantly. This is equivalent to the camera (i.e., the mobile terminal) moving up or down considerably. Consequently, when placing virtual objects using the camera pose corresponding to the captured image frame (i.e., the camera height), the virtual objects will also exhibit significant drift. For example, when a user views AR content on a user device, such as... Figure 1 As shown in (b), if the camera height corresponding to the image frame drifts upwards significantly, the displayed virtual object 10 will also drift upwards significantly, and the size of the virtual object 10 will become smaller, making it impossible to achieve the desired effect. Figure 1 The virtual object 10 shown in (a) has a poor display effect.

[0026] Therefore, to address the aforementioned problems, the technical concept of this invention is to determine, through a preset threshold, whether the camera height corresponding to an image frame deviates significantly from the initial camera height, thereby determining whether a significant camera height drift has occurred. When a significant camera height drift is detected, the camera height is corrected, resolving the height drift problem during planar tracking by mobile terminals that have not undergone camera calibration. Consequently, when placing corresponding virtual objects using the corrected camera height (i.e., camera pose), the problem of significant drift in the virtual object can be avoided, ensuring the virtual object can be displayed correctly, guaranteeing its display effect, and improving the user experience.

[0027] Figure 2 This is a scene illustration of the image processing method provided in an embodiment of the present invention, such as... Figure 2 As shown, during the tracking of the plane, the mobile terminal 101 captures image frames including the plane, i.e., the real environment corresponding to the plane. The electronic device 102 acquires the image frames captured by the mobile terminal 101 in real time or periodically to correct the camera height corresponding to the image frame.

[0028] Optionally, the plane refers to the plane in the scene that needs to be combined with AR technology, that is, the plane in the scene where virtual objects need to be added, such as the real indoor ground when displaying an indoor AR.

[0029] Optionally, the electronic device 102 can be a computer, server or other device with processing capabilities. Of course, the electronic device 102 can also be a mobile terminal 101, that is, when the mobile terminal 101 captures an image frame, it can directly correct the corresponding camera height.

[0030] Optionally, the mobile terminal 101 may include mobile devices with shooting capabilities such as smartphones, PDAs, and tablets.

[0031] refer to Figure 3 , Figure 3 Flowchart of the image processing method provided in the embodiments of this disclosure Figure 1 The method of this embodiment can be applied to electronic devices. Specifically, in a processing device applied to an electronic device, the image processing method includes:

[0032] S301: Acquire the image frame to be processed and determine the current camera pose corresponding to the image frame. The current camera pose corresponding to the image frame includes the current camera height.

[0033] In this embodiment of the disclosure, during the tracking of the plane, the user continuously uses a mobile terminal to photograph the plane, i.e., the real environment corresponding to the plane. During the photographing of the plane, the electronic device acquires image frames captured by the mobile terminal in real time, i.e., image frames containing the plane, and identifies them as image frames to be processed.

[0034] When the mobile terminal does not perform camera calibration, after running for a period of time, that is, after using the mobile terminal to track the plane for a certain period of time, the height of the mobile terminal, i.e. the camera height, will drift significantly. Therefore, when acquiring the image frame to be processed, it is necessary to determine whether the current camera height has drifted significantly. Then, the current camera pose corresponding to the image frame is obtained to determine whether the current camera height in the current camera pose has drifted.

[0035] Here, "camera" refers to the camera on the mobile terminal used to capture images of a plane, that is, the camera used to capture image frames. The current camera pose corresponding to the image frame represents the camera pose at the time the image frame was captured.

[0036] Optionally, the camera pose includes a translation vector, which represents the camera's position in the world coordinate system, i.e., it can be represented by (x, y, z). The translation vector includes the camera height, which is the vertical distance from the camera to the plane, i.e., the height of the camera above the plane, equivalent to the camera's Y-axis coordinate value y.

[0037] Correspondingly, the current camera height corresponding to the image frame represents the camera height at the time the image frame was captured.

[0038] S302: When it is determined that the current camera height meets the preset drift condition, the current camera pose corresponding to the image frame is corrected to obtain the target camera pose corresponding to the image frame.

[0039] In this embodiment of the disclosure, when the camera height at the time of capturing an image frame is obtained, that is, the current camera height corresponding to the image frame, it is determined whether the current camera height meets the preset drift condition in order to determine whether the camera height, that is, whether the mobile terminal height has drifted significantly.

[0040] When the current camera height corresponding to an image frame meets the preset drift condition, it indicates that the camera height has drifted significantly, which is equivalent to the mobile terminal moving up or down to a large extent. Therefore, it needs to be corrected. The current camera pose corresponding to the image frame is corrected to obtain the target camera pose corresponding to the image frame. That is, the target camera pose is used as the camera pose when the image frame was captured, thereby correcting the camera pose corresponding to the image frame, which in turn corrects the camera height corresponding to the image frame and avoids significant camera height drift.

[0041] Optionally, the target camera pose represents the available camera pose corresponding to the image frame, i.e., the camera pose with a small degree of drift. When the camera pose of the image frame needs to be utilized, corresponding operations are performed based on the target camera pose corresponding to that image frame (e.g., placing virtual objects).

[0042] Optionally, the target camera pose includes the target translation vector. When correcting the camera pose corresponding to an image frame, the translation vector including the camera height in the camera pose is actually corrected to obtain the corrected translation vector, i.e., the target translation vector.

[0043] It is understood that during planar tracking, the height of the mobile terminal needs to be relatively fixed, meaning the mobile terminal will not change significantly vertically. Of course, the camera height drift correction process described in this disclosure also applies to the height of other mobile terminals, i.e., scenarios where the camera height needs to be relatively stable and will not move significantly vertically, and this disclosure does not impose any limitations on this.

[0044] In this embodiment of the present disclosure, when an image frame is obtained, it is determined whether there is a drift in the camera height when the image frame is captured. If it is determined that there is a drift in the camera height, the current camera pose corresponding to the image frame is corrected, that is, the camera height is corrected, so as to make the camera height relatively stable and avoid a large degree of drift in the camera height.

[0045] As described above, when an image frame to be processed is acquired, it indicates that the camera height corresponding to that image frame needs to be determined. Specifically, it checks if there is a significant deviation in the camera height when the image frame was captured. This involves determining the current camera pose corresponding to the image frame, which includes the camera height at the time the image frame was captured. The system then checks if the current camera height meets a preset drift condition to determine if the camera height drift is significant. If the current camera height meets the preset drift condition, it indicates a significant camera height drift, requiring correction. The current camera pose corresponding to the image frame is then corrected to adjust the camera height, preventing significant drift. Therefore, when placing virtual objects using the corrected current camera pose (the target camera pose), significant drift in the virtual objects can be avoided, ensuring proper display and a high-quality user experience.

[0046] refer to Figure 4 , Figure 4 Flowchart of the image processing method provided in the embodiments of this disclosure Figure 2 This embodiment describes in detail the process of correcting the camera pose corresponding to an image frame. The image processing method includes:

[0047] S401: Acquire the image frame to be processed and determine the current camera pose corresponding to the image frame. The current camera pose corresponding to the image frame includes the current camera height.

[0048] In this embodiment of the disclosure, when determining the camera pose corresponding to the image frame, i.e. the current camera pose, the current camera pose corresponding to the image frame is determined based on a planar tracking algorithm.

[0049] Specifically, the image frame is processed by a planar tracking algorithm to obtain the camera pose when the image frame was captured, that is, to obtain the current camera pose corresponding to the image frame.

[0050] Optional, planar tracking algorithms include Simultaneous Localization and Mapping (SLAM) algorithms.

[0051] S402: When it is determined that the current camera height meets the preset drift conditions, obtain the correction parameters.

[0052] S403: Update the correction parameters to obtain the updated correction parameters.

[0053] In this embodiment of the disclosure, when the camera height at the time of capturing the image frame is obtained, that is, when the current camera height corresponding to the image frame is obtained, it is determined whether the current camera height meets the preset drift condition to determine whether the camera height has a large drift. If it is determined that the current camera height meets the preset drift condition, it indicates that the camera height has a large drift and the current correction parameters cannot be directly used to adjust the camera pose. The correction parameters need to be re-determined, and the correction parameters are updated so that the updated correction parameters, that is, the latest correction parameters, can be used to correct the camera height.

[0054] Optionally, the correction parameters include adjustment coefficients and adjustment vectors.

[0055] The adjustment factor represents the camera height adjustment factor, which is mainly used to adjust the camera height. The adjustment vector represents the compensation vector. Since adjusting the camera height involves adjusting the translation vector as a whole, it also adjusts the camera's position in other dimensions, i.e., directions (e.g., the X and Z directions), i.e., the coordinate values. To prevent changes in the camera's coordinate values ​​in other directions, the adjustment vector is used to compensate for these coordinate values, thus correcting any deviations in the camera's position in those directions.

[0056] In this embodiment of the disclosure, optionally, when updating the correction parameters, the initial camera height can be used for updating. The specific process is as follows: obtain the initial camera height; update the adjustment coefficients based on the initial camera height and the current camera height to obtain the updated adjustment coefficients; update the current translation vector based on the updated adjustment coefficients to obtain the updated adjustment vector.

[0057] Specifically, during planar tracking, the camera height needs to be relatively stable, meaning it needs to be close to the initial camera height. Therefore, the adjustment coefficients can be adjusted based on the initial camera height, i.e., updated. The updated adjustment coefficients are then used to correct the camera height, thus ensuring that the difference between the camera height and the initial camera height is small.

[0058] Since adjusting the camera height (i.e., the translation vector) with adjustment coefficients also corrects the camera's position in other directions, i.e., the coordinate values ​​of the other two dimensions (X and Z) of the translation vector, the adjustment vector can be updated based on the updated adjustment coefficients (i.e., the latest adjustment coefficients) and the current translation vector (i.e., the translation vector to be corrected). This allows the updated adjustment vector (i.e., the latest adjustment vector) to compensate for the translation vector, thus keeping the coordinate values ​​of the other two dimensions of the compensated translation vector unchanged.

[0059] Optionally, the initial camera height refers to the camera height at the start of shooting, that is, the camera height corresponding to the first image frame captured.

[0060] Further, optionally, when updating the adjustment coefficient based on the initial camera height and the current camera height, the ratio of the initial camera height to the current camera height is obtained and determined as the updated adjustment coefficient.

[0061] Specifically, the ratio of the initial camera height to the current camera height is calculated, that is, the initial camera height is divided by the current camera height to obtain the updated adjustment coefficient, so as to update the adjustment coefficient.

[0062] Further, optionally, when updating the current translation vector based on the updated adjustment coefficients, the product of the current translation vector and the updated adjustment coefficients is obtained and used as the first translation vector. The target translation vector corresponding to the current translation vector is then obtained. The difference between the target translation vector and the first translation vector is calculated to obtain the updated adjustment vector.

[0063] Specifically, the product of the current translation vector and the updated adjustment coefficient is calculated to obtain the first translation vector, and the difference between the target translation vector and the first translation vector is calculated to obtain the updated adjustment vector, thereby updating the adjustment vector.

[0064] In this context, the camera height in the target translation vector is the initial camera height. The parameter values ​​other than the camera height, i.e., the coordinate values ​​corresponding to other dimensions, are the same as the parameter values ​​other than the camera height in the current translation vector, i.e., the coordinate values ​​corresponding to other dimensions. That is, the x value in the target translation vector is the x value in the current translation vector, the z value in the target translation vector is the z value in the current translation vector, and the y value in the target translation vector is the initial camera height.

[0065] For example, the adjustment factor is 1, and the adjustment vector is (0,0,0). The initial camera height is 1, and the current camera height is 1.6, so the updated adjustment factor is 1 / 1.6. The current translation vector is (0.2,1.6,0.2), and the target translation vector is (0.2,1,0.2). The product of (0.2,1.6,0.2) and 1 / 1.6 is calculated, resulting in the first translation vector (0.125,1,0.125). The difference between (0.2,1,0.2) and (0.125,1,0.125) is calculated, resulting in the updated adjustment vector (0.075,0,0.075).

[0066] In any disclosed embodiment, optionally, when determining whether there is a significant camera height drift, an initial camera height is obtained. A height deviation value is obtained based on the current camera height and the initial camera height. The height deviation value is then used to determine whether the current camera height meets a preset drift condition. That is, using the current camera height and the initial camera height corresponding to an image frame, the height deviation value corresponding to that image frame is determined. This height deviation value indicates how much the current camera height deviates from the initial camera height, allowing for determination of whether the current camera height deviates significantly from the initial height, thereby determining whether the current camera height has drifted significantly.

[0067] In addition, the initial adjustment coefficient, i.e., the initial value of the adjustment coefficient, can be 1. The initial adjustment vector, i.e., the initial value of the adjustment vector, can be (0,0,0).

[0068] Furthermore, optionally, when determining the deviation height value using the current camera height and the initial camera height, it can be determined in the following ways.

[0069] One approach is to obtain the difference between the current camera height and the initial camera height, and determine it as the height deviation value. That is, calculate the difference between the current camera height and the initial camera height to obtain the height deviation value.

[0070] Another approach is to obtain the ratio of the current camera height to the initial camera height and determine it as the height deviation value. That is, calculate the ratio of the current camera height to the initial camera height to obtain the height deviation value.

[0071] When calculating the ratio of the current camera height to the initial camera height, you can divide the current camera height by the initial camera height or vice versa; there is no restriction on which method you choose.

[0072] It is understood that when determining the deviation height value using the current camera height and the initial camera height, other methods can also be used. For example, the proportion of the difference between the current camera height and the initial camera height can be calculated, that is, the difference between the current camera height and the initial camera height can be calculated, and the ratio of the difference to the initial camera height can be calculated to obtain the height deviation value. As long as the height deviation value can characterize the deviation of the current height of the camera from the initial height, this disclosure does not limit it.

[0073] Further, optionally, the system determines whether the current camera height meets the preset drift conditions based on the height deviation value, including:

[0074] Determine if the height deviation value is within the preset normal deviation range. If the height deviation value is not within the preset normal deviation range, then the current camera height is determined to meet the preset drift condition. If the height deviation value is within the preset normal deviation range, then the current camera height is determined not to meet the preset drift condition.

[0075] Specifically, a preset normal deviation range is obtained, and it is determined whether the height deviation value corresponding to the image frame is within the preset normal deviation range. If so, it indicates that the current camera height deviates slightly from the initial camera height, meaning that the current camera height has not drifted significantly, and thus the current camera height does not meet the preset drift condition. If not, it indicates that the current camera height deviates significantly from the initial camera height, meaning that the current camera height has drifted significantly, and thus the current camera height meets the preset drift condition.

[0076] S404: Correct the current camera pose corresponding to the image frame according to the updated correction parameters to obtain the target camera pose corresponding to the image frame.

[0077] In this embodiment of the disclosure, after determining that the current camera height has drifted to a large extent, it is necessary to correct the camera height. That is, the updated correction parameters, i.e. the latest correction parameters, are used to correct the current camera pose to obtain the target camera pose corresponding to the image frame, so as to correct the camera pose, i.e., to correct the camera height, so that the current camera height deviates from the initial camera height by a small margin.

[0078] Alternatively, the S404 can be implemented as follows:

[0079] Obtain the product of the updated correction parameters and the current translation vector, and use it as the second translation vector. Obtain the sum of the second translation vector and the updated adjustment vector, and use it as the target translation vector for the corresponding image frame.

[0080] Specifically, the updated correction parameters are calculated, which are the product of the latest correction parameters and the current translation vector, to obtain the second translation vector. The camera height in this second translation vector is the initial camera height, thus restoring the camera height to its initial height and achieving camera height correction. After obtaining the second translation vector, the sum of the second translation vector and the updated adjustment vector (the latest adjustment vector) is calculated to obtain the target translation vector corresponding to the image frame. The coordinate values ​​of other dimensions in this target translation vector are the same as the coordinate values ​​of other dimensions in the current translation vector, thereby keeping the coordinate values ​​of other dimensions in the translation vector corresponding to the image frame unchanged. This achieves correction only for the camera height, avoiding changes in the camera's position in other dimensions, i.e., avoiding changes in the camera's position relative to the plane.

[0081] S405: When it is determined that the current camera height does not meet the preset drift conditions, the target camera pose corresponding to the image frame is obtained according to the correction parameters and the current camera pose.

[0082] In this embodiment of the disclosure, when it is determined that the current camera height corresponding to the image frame does not meet the preset drift condition, there is no need to update the current correction parameter. The current camera pose can be directly adjusted using the correction parameter to obtain the target camera pose corresponding to the image frame, that is, to obtain the available camera pose corresponding to the image frame.

[0083] In addition, after obtaining the target camera pose corresponding to the image frame, that is, after obtaining the available camera pose corresponding to the image frame, the target virtual object is placed on the image frame based on the target camera pose corresponding to the image frame. That is, when it is necessary to place a virtual object at a certain position, the target camera pose of the image frame containing that position, that is, the target translation vector, is used to place the corresponding virtual object at that position, so as to realize the combination of virtual object and real environment.

[0084] Taking a specific application scenario as an example, when implementing indoor AR displays, it is necessary to track the real indoor ground to obtain image frames corresponding to the real indoor environment. When it is necessary to place a virtual object at a certain location indoors, for example, when it is necessary to place a 3D (3-dimension) virtual character on doorway 1, the position of doorway 1 in the world coordinate system is determined by using the target camera pose corresponding to the image frame containing doorway 1, and then the 3D virtual character is placed at that position.

[0085] In this embodiment of the disclosure, when it is determined that the current camera height corresponding to the image frame deviates significantly from the initial camera height, it indicates that the camera height, i.e., the height of the mobile terminal, has drifted to a large extent. Therefore, it is necessary to update the correction parameters to correct the camera pose using the updated correction parameters. When it is determined that the camera height corresponding to the image frame after the image frame deviates less from the initial camera height, i.e., the camera height drift is small, the updated correction parameters are still used to adjust the camera pose so that the camera pose can change smoothly and avoid large changes in the camera pose, thereby avoiding the phenomenon of "tilting" (i.e., the plane tilting upward) in the captured plane.

[0086] In this embodiment of the disclosure, when it is determined that the current camera height corresponding to the image frame meets the preset drift condition, that is, when it is determined that the camera height has a large degree of drift, the current camera pose corresponding to the image frame is corrected using correction parameters to correct the camera height. Thus, when a virtual object is placed using the corrected current camera pose corresponding to the image frame, that is, the target camera pose, the virtual object can be prevented from drifting in a certain direction, that is, the size of the virtual object is prevented from changing, ensuring the stability of the virtual effect and improving user satisfaction.

[0087] Corresponding to the image processing method described in the above embodiments, Figure 5 This is a structural block diagram of an image processing apparatus provided according to embodiments of the present disclosure. For ease of explanation, only the parts relevant to embodiments of the present disclosure are shown. (Refer to...) Figure 5 The image processing device 50 includes: an information acquisition module 501 and a correction module 502.

[0088] The information acquisition module 501 is used to acquire the image frame to be processed and determine the current camera pose corresponding to the image frame. The current camera pose corresponding to the image frame includes the current camera height.

[0089] The correction module 502 is used to correct the current camera pose corresponding to the image frame when it is determined that the current camera height meets the preset drift conditions, so as to obtain the target camera pose corresponding to the image frame.

[0090] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0091] Get the correction parameters.

[0092] The correction parameters are updated to obtain the updated correction parameters.

[0093] The current camera pose corresponding to the image frame is corrected based on the updated correction parameters to obtain the target camera pose corresponding to the image frame.

[0094] In one embodiment of this disclosure, the correction parameters include adjustment coefficients and adjustment vectors. The current camera pose includes the current translation vector.

[0095] The correction module 502 is also used for:

[0096] Obtain the initial camera height.

[0097] The adjustment coefficients are updated based on the initial camera height and the current camera height to obtain the updated adjustment coefficients.

[0098] The adjustment vector is updated based on the updated adjustment coefficients and the current translation vector to obtain the updated adjustment vector.

[0099] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0100] Obtain the product of the current translation vector and the updated adjustment coefficient, and determine it as the first translation vector.

[0101] Obtain the target translation vector corresponding to the current translation vector.

[0102] Calculate the difference between the target translation vector and the first translation vector to obtain the updated adjustment vector.

[0103] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0104] Obtain the ratio of the initial camera height to the current camera height, and determine it as the updated adjustment factor.

[0105] In one embodiment of this disclosure, the target camera pose includes a target translation vector.

[0106] The correction module 502 is also used for:

[0107] Obtain the product of the updated correction parameters and the current translation vector, and determine it as the second translation vector.

[0108] Obtain the sum of the second translation vector and the updated adjustment vector, and use it to determine the target translation vector corresponding to the image frame.

[0109] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0110] Obtain the initial camera height.

[0111] The height deviation value is obtained based on the current camera height and the initial camera height.

[0112] The height deviation value is used to determine whether the current camera height meets the preset drift conditions.

[0113] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0114] Obtain the difference between the current camera height and the initial camera height, and determine it as the height deviation value.

[0115] or,

[0116] Obtain the ratio of the current camera height to the initial camera height, and determine it as the height deviation value.

[0117] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0118] Determine whether the height deviation value is within the preset normal deviation range.

[0119] If the height deviation value is not within the preset normal deviation range, then the current camera height is determined to meet the preset drift condition.

[0120] If the height deviation is within the preset normal deviation range, then the current camera height is determined not to meet the preset drift condition.

[0121] In one embodiment of this disclosure, the correction module 502 is further configured to:

[0122] When it is determined that the current camera height does not meet the preset drift conditions, the correction parameters are obtained, and the target camera pose corresponding to the image frame is obtained based on the correction parameters and the current camera pose.

[0123] In one embodiment of this disclosure, the information acquisition module 501 is further configured to:

[0124] Based on the planar tracking algorithm, the current camera pose corresponding to the image frame is determined.

[0125] In one embodiment of this disclosure, the image processing apparatus further includes a processing module.

[0126] The processing module is used to place virtual target objects on the image frame based on the target camera pose corresponding to the image frame.

[0127] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0128] refer to Figure 6The diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of the present disclosure. The electronic device 600 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0129] like Figure 6 As shown, electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0130] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 608. Communication device 608 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0131] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 608, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0132] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the image processing method described above.

[0133] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0134] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0135] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0136] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0138] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0139] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0140] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0141] In a first aspect, according to one or more embodiments of the present disclosure, an image processing method is provided, comprising:

[0142] Acquire the image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height;

[0143] When the current camera height is determined to meet the preset drift condition, the current camera pose corresponding to the image frame is corrected to obtain the target camera pose corresponding to the image frame.

[0144] According to one or more embodiments of this disclosure, correcting the current camera pose corresponding to the image frame to obtain the target camera pose corresponding to the image frame includes:

[0145] Obtain the correction parameters;

[0146] The correction parameters are updated to obtain the updated correction parameters;

[0147] The current camera pose corresponding to the image frame is corrected according to the updated correction parameters to obtain the target camera pose corresponding to the image frame.

[0148] According to one or more embodiments of this disclosure, the correction parameters include adjustment coefficients and adjustment vectors; the current camera pose includes a current translation vector;

[0149] The step of updating the correction parameters to obtain the updated correction parameters includes:

[0150] Obtain the initial camera height;

[0151] The adjustment coefficients are updated based on the initial camera height and the current camera height to obtain the updated adjustment coefficients;

[0152] The adjustment vector is updated based on the updated adjustment coefficient and the current translation vector to obtain the updated adjustment vector.

[0153] According to one or more embodiments of this disclosure, updating the adjustment vector based on the updated adjustment coefficient and the current translation vector to obtain the updated adjustment vector includes:

[0154] Obtain the product of the current translation vector and the updated adjustment coefficient, and determine it as the first translation vector;

[0155] Obtain the target translation vector corresponding to the current translation vector;

[0156] The difference between the target translation vector and the first translation vector is calculated to obtain the updated adjustment vector.

[0157] According to one or more embodiments of this disclosure, updating the adjustment coefficient based on the initial camera height and the current camera height to obtain the updated adjustment coefficient includes:

[0158] Obtain the ratio of the initial camera height to the current camera height, and determine it as the updated adjustment coefficient.

[0159] According to one or more embodiments of this disclosure, the target camera pose includes a target translation vector;

[0160] The step of correcting the current camera pose corresponding to the image frame according to the updated correction parameters to obtain the target camera pose corresponding to the image frame includes:

[0161] Obtain the product of the updated correction parameter and the current translation vector, and determine it as the second translation vector;

[0162] Obtain the sum of the second translation vector and the updated adjustment vector, and use it to determine the target translation vector corresponding to the image frame.

[0163] According to one or more embodiments of this disclosure, the method further includes:

[0164] Obtain the initial camera height;

[0165] The height deviation value is obtained based on the current camera height and the initial camera height;

[0166] Based on the height deviation value, determine whether the current camera height meets the preset drift condition.

[0167] According to one or more embodiments of this disclosure, obtaining the deviation height value based on the current camera height and the initial camera height includes:

[0168] Obtain the difference between the current camera height and the initial camera height, and determine it as the height deviation value;

[0169] or,

[0170] Obtain the ratio of the current camera height to the initial camera height, and determine it as the height deviation value.

[0171] According to one or more embodiments of this disclosure, determining whether the current camera height meets a preset drift condition based on the height deviation value includes:

[0172] Determine whether the height deviation value is within the preset normal deviation range;

[0173] If the height deviation value is not within the preset normal deviation range, then the current camera height is determined to meet the preset drift condition;

[0174] If the height deviation value is within the preset normal deviation range, then it is determined that the current camera height does not meet the preset drift condition.

[0175] According to one or more embodiments of this disclosure, the method further includes:

[0176] When it is determined that the current camera height does not meet the preset drift conditions, correction parameters are obtained, and the target camera pose corresponding to the image frame is obtained based on the correction parameters and the current camera pose.

[0177] According to one or more embodiments of this disclosure, determining the current camera pose corresponding to the image frame includes:

[0178] Based on a planar tracking algorithm, the current camera pose corresponding to the image frame is determined.

[0179] According to one or more embodiments of this disclosure, the method further includes:

[0180] Based on the target camera pose corresponding to the image frame, a target virtual object is placed on the image frame.

[0181] Secondly, according to one or more embodiments of the present disclosure, an image processing apparatus is provided, comprising:

[0182] An information acquisition module is used to acquire an image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height;

[0183] The correction module is used to correct the current camera pose corresponding to the image frame when it is determined that the current camera height meets the preset drift conditions, so as to obtain the target camera pose corresponding to the image frame.

[0184] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0185] Obtain the correction parameters;

[0186] The correction parameters are updated to obtain the updated correction parameters;

[0187] The current camera pose corresponding to the image frame is corrected according to the updated correction parameters to obtain the target camera pose corresponding to the image frame.

[0188] According to one or more embodiments of this disclosure, the correction parameters include adjustment coefficients and adjustment vectors; the current camera pose includes a current translation vector;

[0189] The correction module is also used for:

[0190] Obtain the initial camera height;

[0191] The adjustment coefficients are updated based on the initial camera height and the current camera height to obtain the updated adjustment coefficients;

[0192] The adjustment vector is updated based on the updated adjustment coefficient and the current translation vector to obtain the updated adjustment vector.

[0193] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0194] Obtain the product of the current translation vector and the updated adjustment coefficient, and determine it as the first translation vector;

[0195] Obtain the target translation vector corresponding to the current translation vector;

[0196] The difference between the target translation vector and the first translation vector is calculated to obtain the updated adjustment vector.

[0197] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0198] Obtain the ratio of the initial camera height to the current camera height, and determine it as the updated adjustment coefficient.

[0199] According to one or more embodiments of this disclosure, the target camera pose includes a target translation vector;

[0200] The correction module is also used for:

[0201] Obtain the product of the updated correction parameter and the current translation vector, and determine it as the second translation vector;

[0202] Obtain the sum of the second translation vector and the updated adjustment vector, and use it to determine the target translation vector corresponding to the image frame.

[0203] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0204] Obtain the initial camera height;

[0205] The height deviation value is obtained based on the current camera height and the initial camera height;

[0206] Based on the height deviation value, determine whether the current camera height meets the preset drift condition.

[0207] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0208] Obtain the difference between the current camera height and the initial camera height, and determine it as the height deviation value;

[0209] or,

[0210] Obtain the ratio of the current camera height to the initial camera height, and determine it as the height deviation value.

[0211] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0212] Determine whether the height deviation value is within the preset normal deviation range;

[0213] If the height deviation value is not within the preset normal deviation range, then the current camera height is determined to meet the preset drift condition;

[0214] If the height deviation value is within the preset normal deviation range, then it is determined that the current camera height does not meet the preset drift condition.

[0215] According to one or more embodiments of this disclosure, the correction module is further configured to:

[0216] When it is determined that the current camera height does not meet the preset drift conditions, correction parameters are obtained, and the target camera pose corresponding to the image frame is obtained based on the correction parameters and the current camera pose.

[0217] According to one or more embodiments of this disclosure, the information acquisition module is further configured to:

[0218] Based on a planar tracking algorithm, the current camera pose corresponding to the image frame is determined.

[0219] In one embodiment of this disclosure, the image processing device further includes a processing module;

[0220] The processing module is used to place a target virtual object on the image frame based on the target camera pose corresponding to the image frame.

[0221] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0222] The memory stores computer-executed instructions;

[0223] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the image processing method as described in the first aspect and various possible designs of the first aspect.

[0224] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the image processing method described in the first aspect and various possible designs of the first aspect.

[0225] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the image processing method as described in the first aspect and various possible designs of the first aspect.

[0226] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0227] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0228] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. An image processing method, characterized in that, include: Acquire the image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height; When the current camera height is determined to meet the preset drift conditions, correction parameters are obtained; the correction parameters include adjustment coefficients and adjustment vectors; the current camera pose includes the current translation vector. Obtain the initial camera height; update the adjustment coefficient based on the initial camera height and the current camera height to obtain the updated adjustment coefficient; obtain the product of the current translation vector and the updated adjustment coefficient, and determine it as the first translation vector; obtain the target translation vector corresponding to the current translation vector; calculate the difference between the target translation vector and the first translation vector to obtain the updated adjustment vector; The current camera pose corresponding to the image frame is corrected based on the updated adjustment coefficients and adjustment vectors to obtain the target camera pose corresponding to the image frame.

2. The method according to claim 1, characterized in that, The step of updating the adjustment coefficients based on the initial camera height and the current camera height to obtain the updated adjustment coefficients includes: Obtain the ratio of the initial camera height to the current camera height, and determine it as the updated adjustment coefficient.

3. The method according to claim 1, characterized in that, The target camera pose includes the target translation vector; The step of correcting the current camera pose corresponding to the image frame based on the updated adjustment coefficients and adjustment vector to obtain the target camera pose corresponding to the image frame includes: Obtain the product of the updated adjustment coefficient and adjustment vector with the current translation vector, and determine it as the second translation vector; Obtain the sum of the second translation vector and the updated adjustment vector, and use it to determine the target translation vector corresponding to the image frame.

4. The method according to claim 1, characterized in that, The method further includes: Obtain the initial camera height; The height deviation value is obtained based on the current camera height and the initial camera height; Based on the height deviation value, determine whether the current camera height meets the preset drift condition.

5. The method according to claim 4, characterized in that, The step of obtaining the deviation height value based on the current camera height and the initial camera height includes: Obtain the difference between the current camera height and the initial camera height, and determine it as the height deviation value; or, Obtain the ratio of the current camera height to the initial camera height, and determine it as the height deviation value.

6. The method according to claim 4, characterized in that, The step of determining whether the current camera height meets the preset drift condition based on the height deviation value includes: Determine whether the height deviation value is within the preset normal deviation range; If the height deviation value is not within the preset normal deviation range, then the current camera height is determined to meet the preset drift condition; If the height deviation value is within the preset normal deviation range, then it is determined that the current camera height does not meet the preset drift condition.

7. The method according to claim 1, characterized in that, The method further includes: When it is determined that the current camera height does not meet the preset drift conditions, correction parameters are obtained, and the target camera pose corresponding to the image frame is obtained based on the correction parameters and the current camera pose.

8. The method according to any one of claims 1 to 7, characterized in that, Determining the current camera pose corresponding to the image frame includes: Based on a planar tracking algorithm, the current camera pose corresponding to the image frame is determined.

9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Based on the target camera pose corresponding to the image frame, a target virtual object is placed on the image frame.

10. An image processing device, characterized in that, include: An information acquisition module is used to acquire an image frame to be processed and determine the current camera pose corresponding to the image frame; wherein, the current camera pose corresponding to the image frame includes the current camera height; The correction module is used to obtain correction parameters when it is determined that the current camera height meets a preset drift condition; the correction parameters include adjustment coefficients and adjustment vectors; the current camera pose includes a current translation vector; obtain an initial camera height; update the adjustment coefficients according to the initial camera height and the current camera height to obtain updated adjustment coefficients; obtain the product of the current translation vector and the updated adjustment coefficients, and determine it as a first translation vector; obtain the target translation vector corresponding to the current translation vector; calculate the difference between the target translation vector and the first translation vector to obtain an updated adjustment vector; and correct the current camera pose corresponding to the image frame according to the updated adjustment coefficients and adjustment vectors to obtain the target camera pose corresponding to the image frame.

11. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the image processing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the image processing method as described in any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the image processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Framework for reference-free drift-corrected planar tracking using lucas-kanade optical flow

    US20130076915A1

  • System, Vehicle and Method for Online Calibration of a Camera on a Vehicle

    US20150092058A1