Image acquisition method of foldable electronic equipment and foldable electronic equipment

By using a camera module set at an included angle in a foldable electronic device to obtain image data and perform image correction, the problem of image tilt caused by the non-fixed angle between the camera component and the target object in the electronic device is solved, and the accuracy of information recognition is improved. sex.

CN118691783AInactive Publication Date: 2024-09-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310300187.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In electronic devices, the relative angle between the camera component and the target object is not fixed, causing the target object in the captured image to tilt, affecting the electronic device's accurate recognition of image information.

Method used

Design a foldable electronic device that acquires the first image data and the second image data of the target object through a camera module with an angle between the first sub-part and the second sub-part, and the processor performs image processing Tilt correction, generating corrected images to ensure the accuracy of information recognition.

Benefits of technology

It can effectively correct the image tilt and improve the recognition accuracy of target object information by electronic devices, especially in scenes such as QR codes to improve the recognition rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691783A
    Figure CN118691783A
Patent Text Reader

Abstract

The invention discloses an image acquisition method of foldable electronic equipment and the foldable electronic equipment. The electronic equipment comprises a body and a camera shooting assembly arranged on the body, the body comprises a first sub-part and a second sub-part which can be folded relatively, and the camera shooting assembly comprises a first camera shooting module arranged on the first sub-part and a second camera shooting module arranged on the second sub-part. The image acquisition method comprises the following steps: when a folding angle between a first sub-part and a second sub-part is an included angle, acquiring first image data of a target object through a first camera module, and acquiring second image data of the target object through a second camera module; and generating a corrected image of the target object according to the first image data and the second image data. When the folding angle between the first sub-part and the second sub-part is the included angle, the first image data and the second image data are acquired to perform image tilt correction and generate the corrected image of the target object, and the corrected image can ensure the accuracy of target object information recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of imaging technology, and in particular to an image acquisition method for a foldable electronic device and a foldable electronic device. Background Art

[0002] Nowadays, people use electronic devices including camera components to take photos more and more frequently. In actual use, the relative angle between the camera component and the target object is not certain. Sometimes the target object is tilted towards the camera component, resulting in the target object in the captured image being tilted, making it impossible for the electronic device to accurately identify the information of the target object in the image. Summary of the invention

[0003] Embodiments of the present application provide an image acquisition method for a foldable electronic device and a foldable electronic device.

[0004] The image acquisition method of the embodiment of the present application can be applied to a foldable electronic device, the electronic device includes a main body and a camera assembly arranged on the main body, the main body includes a first sub-section and a second sub-section that can be folded relative to each other, and the camera assembly includes a first camera module arranged on the first sub-section and a second camera module arranged on the second sub-section. The image acquisition method includes: when the folding angle between the first sub-section and the second sub-section is an angle, acquiring first image data of the target object through the first camera module, and acquiring second image data of the target object through the second camera module; and generating a corrected image of the target object according to the first image data and the second image data.

[0005] The foldable electronic device of the embodiment of the present application includes a main body, a camera assembly and a processor. The main body includes a first sub-section and a second sub-section that can be folded relative to each other. The camera assembly is installed on the main body, and the camera assembly includes a first camera module arranged in the first sub-section and a second camera module arranged in the second sub-section. The processor is used to obtain the first image data of the target object through the first camera module and the second image data of the target object through the second camera module when the folding angle between the first sub-section and the second sub-section is an angle; and generate a corrected image of the target object according to the first image data and the second image data.

[0006] The image acquisition method of the foldable electronic device and the foldable electronic device of the embodiment of the present application, when the folding angle between the first sub-section and the second sub-section is an angle, acquires the first image data of the target object through the first camera module, and acquires the second image data of the target object through the second camera module, so that the first image data and the second image data are different. Then, the processor performs image tilt correction on the image according to the first image data and the second image data, and generates a corrected image of the target object, and the corrected image can ensure the accuracy of the electronic device in identifying the target object information.

[0007] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0009] Figure 1 is a flowchart of an image acquisition method for a foldable electronic device according to certain embodiments of the present application;

[0010] Figure 2 is a schematic structural diagram of a foldable electronic device in some embodiments of the present application in a partially folded state;

[0011] Figure 3 yes Figure 2 A schematic structural diagram of the foldable electronic device shown in a fully unfolded state;

[0012] Figure 4 It is a schematic diagram of a shooting scene of an image acquisition method of a foldable electronic device according to certain embodiments of the present application;

[0013] Figure 5 It is a schematic diagram of image data acquisition and processing of an image acquisition method of a foldable electronic device according to certain embodiments of the present application;

[0014] Figure 6 is a flowchart of an image acquisition method for a foldable electronic device according to certain embodiments of the present application;

[0015] Figure 7 is a schematic diagram of image distortion of an image acquisition method for a foldable electronic device in some embodiments of the present application;

[0016] Figure 8 is a schematic diagram of image distortion of an image acquisition method for a foldable electronic device according to other embodiments of the present application;

[0017] Fig. 9 is a flowchart of an image acquisition method for a foldable electronic device according to certain embodiments of the present application;

[0018] Fig.10 is a schematic diagram of the correction principle of the image acquisition method of the foldable electronic device in certain embodiments of the present application;

[0019] Fig.11 is a schematic diagram of the correction principle of the image acquisition method of the foldable electronic device in certain embodiments of the present application;

[0020] Fig.12 is a flowchart of an image acquisition method for a foldable electronic device according to certain embodiments of the present application;

[0021] Fig.13 is a flowchart of an image acquisition method for a foldable electronic device according to certain embodiments of the present application;

[0022] Fig.14 It is a schematic diagram of image data acquisition and processing of an image acquisition method for a foldable electronic device in certain embodiments of the present application. DETAILED DESCRIPTION

[0023] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.

[0024] Electronic devices generally use camera components to shoot target objects to obtain images of the target objects. Nowadays, people are increasingly using electronic devices including camera components to shoot. In actual use, the relative angle between the camera component and the target object is not fixed. Sometimes the target object is tilted toward the camera component, resulting in the target object in the captured image being tilted, causing the electronic device to be unable to accurately identify the information of the target object in the image. In order to solve this problem, the present application provides an image acquisition method for a foldable electronic device and a foldable electronic device 100( Figure 2 and Figure 3 Show).

[0025] See also Figure 1 and Figure 2The embodiment of the present application provides an image acquisition method for a foldable electronic device, which can be applied to a foldable electronic device 100. The foldable electronic device 100 includes a body 10 and a camera assembly 20 disposed on the body 10. The body 10 includes a first sub-section 11 and a second sub-section 13 that can be folded relative to each other. The camera assembly 20 includes a first camera module 21 disposed on the first sub-section 11 and a second camera module 23 disposed on the second sub-section 13. The image acquisition method includes:

[0026] 01: When the folding angle between the first sub-section 11 and the second sub-section 13 is an included angle, first image data of the target object is acquired through the first camera module 21, and second image data of the target object is acquired through the second camera module 23; and

[0027] 03: Generate a corrected image of the target object based on the first image data and the second image data.

[0028] See also Figure 2 The foldable electronic device 100 of the embodiment of the present application also includes a processor 30. When the angle between the first sub-section 11 and the second sub-section 13 is a preset angle, the processor 30 is used to obtain first image data of the target object through the first camera module 21 and obtain second image data of the target object through the second camera module 23 when the folding angle between the first sub-section 11 and the second sub-section 13 is an angle; and generate a corrected image of the target object according to the first image data and the second image data.

[0029] The electronic device 100 includes but is not limited to a structure having two foldable parts such as a mobile phone, a tablet computer, a camera, a video camera, a personal digital assistant, a wearable device, an intelligent robot, an intelligent vehicle, etc. Among them, the wearable device includes a smart bracelet, a smart watch, smart glasses, etc.

[0030] The main body 10 is the main body of the electronic device 100, and may include components such as a housing and a screen. According to the foldable feature of the electronic device 100, the main body 10 includes a first sub-section 11 and a second sub-section 13 that can be folded relative to each other. If the electronic device 100 is a left-right foldable mobile phone, such as Figure 2 and Figure 3 As shown, with the folding boundary MM1 as the boundary, the left half of the mobile phone can be used as the first sub-section 11, and the right half can be used as the second sub-section 13.

[0031] The camera assembly 20 is a device that obtains image data based on the principle of optical imaging. There are many types of camera assemblies 20. For example, the camera assembly 20 may include a main camera and a secondary camera, for example, the rear camera of a mobile phone is the main camera, and the front camera is the secondary camera. The camera assembly 20 may include a telephoto camera, a macro camera, and a wide-angle camera, depending on the focal length of the camera assembly 20. The camera assembly 20 may include a color camera and a black and white camera, depending on the color of the image captured by the camera assembly 20.

[0032] In order to enhance the shooting function of the camera assembly 20, the camera assembly 20 includes a first camera module 21 and a second camera module 23. In addition, in order to facilitate the user to understand the information of the electronic device 100 through the screen when the body 10 is in the unfolded state and in the folded state, the electronic device 100 may include a first screen 40 and a second screen 50. For example, when the body 10 is fully unfolded, the body 10 includes a first side 15 and a second side 17 opposite to each other, such as Figure 2 and Figure 3 As shown. From the perspective of a user normally using the electronic device 100 (such as a mobile phone), the first side 15 is the side facing the user, and the second side 17 is the side facing away from the user. Figure 2 and Figure 3 The electronic device 100 includes a first screen 40 and a second screen 50, wherein the first screen 40 is disposed on the first side 15 of the body 10, and the first camera module 21, the second camera module 23 and the second screen 50 are disposed on the second side 17 of the body 10, wherein the first camera module 21 is disposed on the first sub-portion 11, and the second screen 50 and the second camera module 23 are disposed on the second sub-portion 13. Of course, in other examples, the second screen 50 may also be omitted.

[0033] When the first camera module 21 and the second camera module 23 shoot the target object, the folding angle between the first sub-unit 11 and the second sub-unit 13 needs to be any angle within the optimal angle range for the electronic device 100 to completely shoot the target object. If the angle between the first sub-unit 11 and the second sub-unit 13 exceeds the optimal angle range, at least one of the first image data and the second image data will only contain partial information of the target object. Figure 4 As shown, at this time the shooting angle is γ1 which exceeds the optimal angle range. Assuming that the optimal angle range is [β1, β2], then γ1>β2, or γ1<β1. Only when the angle between the first subsection 11 and the second subsection 13 is within [β1, β2], the electronic device 100 can completely capture the target object, so that the first image data and the second image data contain complete target object information. Figure 4Figure (P1) is the first initial image corresponding to the first image data, and Figure (P2) is the second initial image corresponding to the second image data. Obviously, at this time, the angle between the first sub-section 11 and the second sub-section 13 is too small, resulting in the inability to fully present the target object in the captured image, and the first image data and the second image data contain less target object information, which affects the subsequent image tilt correction. Therefore, when it is necessary to obtain a corrected image of the target object, the processor 30 controls the first camera module 21 and the second camera module 23 to shoot the target object when the folding angle is an angle, so as to obtain the first image data and the second image data, and ensure the integrity of the target object information in the first image data and the second image data.

[0034] When the folding angle of the first camera module 21 and the second camera module 23 is an angle, the first camera module 21 and the second camera module 23 will shoot the target object from different angles. At this time, the angle and position of the first camera module 21 and the second camera module 23 relative to the target object, as well as the distance between the camera module 21 and the target object (i.e., depth information) are different, so that the corresponding image data are different. Therefore, after the processor 30 controls the first camera module 21 and the second camera module 23 to shoot the target object, the first image data and the second image data with different depth information can be obtained. Then, after obtaining the first image data and the second image data, the processor 30 performs image tilt correction according to the first image data and the second image data, and obtains an intermediate image after image tilt correction of the first image data and an intermediate image after image tilt correction of the second image data. The two intermediate images are then processed, for example, the coordinates of the predetermined point in the two intermediate images are obtained, and the average of the two coordinates is taken as the coordinates of the predetermined point in the corrected image to generate a corrected image of the target object. By generating a corrected image of the target object, the processor 30 can recognize more information about the object based on the corrected image.

[0035] For example, see Figure 5 In daily life, the use of QR codes is increasing, and the electronic device 100 identifies the information in the QR code by photographing the QR code. However, during use, the QR code is often tilted relative to the electronic device 100, which makes it difficult for the electronic device 100 to accurately identify the QR code. Assume that when the first camera module 21 and the second camera module 23 photograph the target object (QR code), the folding angle between the first subsection 11 and the second subsection 13 is γ2 (located within [β1, β2]). When the folding angle between the first subsection 11 and the second subsection 13 is γ2, after the first camera module 21 and the second camera module 23 photograph the target object (QR code), the processor 30 can obtain the first image data (i.e., Figure (P1)) and the second image data (i.e., Figure (P2)). From Figure 5It can be seen that the target objects (two-dimensional codes) in Figure (P1) and Figure (P2) are complete, but the target objects (two-dimensional codes) in Figure (P1) and Figure (P2) are tilted, making it difficult for the electronic device 100 to accurately identify the two-dimensional code. After the processor 30 controls the first camera module 21 and the second camera module 23 to shoot the target object (two-dimensional code), the image tilt correction can be performed according to the first image data and the second image data to obtain an intermediate image after the image tilt correction of the first image data (i.e., Figure (M1)), and an intermediate image after the image tilt correction of the second image data (i.e., Figure (M2)). Then the two intermediate images are processed to generate a corrected image of the target object (two-dimensional code) (i.e., Figure (D1)), so that the processor 30 can identify the upright (non-tilted) two-dimensional code from Figure (D1) and obtain more information of the two-dimensional code, thereby improving the accuracy of the electronic device 100 in identifying the two-dimensional code.

[0036] The foldable electronic device 100 and the image acquisition method of the foldable electronic device of the embodiment of the present application acquire the first image data of the target object through the first camera module 21, and acquire the second image data of the target object through the second camera module 23, so that the first image data and the second image data are different. Then, the processor 30 performs image tilt correction on the image according to the first image data and the second image data, and generates a corrected image of the target object, and the corrected image can ensure the accuracy of the electronic device in identifying the target object information.

[0037] See also Figure 6 In some embodiments, 01: when the folding angle between the first sub-section 11 and the second sub-section 13 is an included angle, obtaining first image data of the target object through the first camera module 21 and obtaining second image data of the target object through the second camera module 23 may include:

[0038] 011: When the folding angle between the first sub-section 11 and the second sub-section 13 is an included angle, the first original data of the target object is obtained by photographing with the first camera module 21, and the second original data of the target object is obtained by photographing with the second camera module 23; and

[0039] 013: Perform distortion correction processing on the first original data to obtain first image data, and perform distortion correction processing on the second original data to obtain second image data.

[0040] See also Figure 2The image acquisition method of the foldable electronic device can be applied to the foldable electronic device 100, and the processor 30 is also used to obtain the first original data of the target object by photographing through the first camera module 21, and obtain the second original data of the target object by photographing through the second camera module 23 when the folding angle between the first sub-section 11 and the second sub-section 13 is an included angle; and perform distortion correction processing on the first original data to obtain first image data, and perform distortion correction processing on the second original data to obtain second image data.

[0041] The imaging process of the camera assembly 20 is actually the process of converting the point of the world coordinate system to the camera assembly coordinate system, projecting it to obtain the image coordinate system, and then converting it to the pixel coordinate system. However, due to the lens accuracy and process, distortion will be introduced (the so-called distortion means that the straight line in the world coordinate system is no longer a straight line when converted to other coordinate systems), resulting in distortion. Distortion can be divided into radial distortion and tangential distortion. Please combine Figure 7 , Figure 7 Figure (a) is an image without distortion. Radial distortion is caused by the inherent characteristics of the convex lens of the camera assembly 20 itself. The reason for this is that light is more bent away from the center of the lens than near the center. Usually, a short focal length lens produces barrel distortion during imaging, such as Figure (b), and a long focal length lens produces pincushion distortion, such as Figure (c). Tangential distortion is caused by the lens itself not being parallel to the imaging plane or image plane of the camera assembly 20. This is mostly caused by the installation deviation of the lens being attached to the camera assembly 20, such as Figure 8 Figure (a) is an image without distortion, and Figure (b) is an image with tangential distortion. Therefore, before image tilt processing, distortion correction processing can also be performed.

[0042] When the folding angle between the first sub-section 11 and the second sub-section 13 is an included angle, the processor 30 obtains the first original data of the target object by photographing through the first camera module 21, and obtains the second original data of the target object by photographing through the second camera module 23, wherein the first original data is the data directly obtained after the first camera module 21 photographs, and the second original data is the data directly obtained after the second camera module 23 photographs. Then, the first original data and the second original data are subjected to distortion correction processing.

[0043] For example, in one embodiment, the first original data and the second original data are radially distorted. In this case, the adjustment formula x0=x(1+k1r 2 +k2r 4 +k3r 6 ), y0=y(1+k1r 2 +k2r 4 +k3r 6), to perform distortion correction processing, where (x0, y0) is the position data of the distortion point on the original data, (x, y) is the new position data of the distortion point after the distortion correction processing, that is, the position data of the distortion point on the image data, r is the radius with the point at the center of the optical axis as the origin, k1, k2 and k3 are radial distortion coefficients. In another embodiment, the first original data and the second original data belong to tangential distortion. At this time, the adjustment formula x0=x+(2p1y+p2(r 2 +2x 2 )), y0=y+(2p2x+p1(r 2 +2y 2 )) is used to perform distortion correction processing, where (x0, y0) is the position data of the distortion point on the original data, (x, y) is the new position data of the distortion point after distortion correction processing, that is, the position data of the distortion point on the image data, r is the radius with the point at the center of the optical axis as the origin, and p1 and p2 are tangential distortion coefficients.

[0044] In this way, after the first original data and the second original data are subjected to distortion correction processing, the first image data and the second image data can be obtained, so that the image tilt correction can be performed based on the first image data and the second image data after the distortion correction processing, thereby reducing the influence of the distorted data on the image tilt correction, thereby improving the accuracy of the subsequent image tilt correction. Of course, in other examples, the first original data can be directly used as the first image data and the second original data as the second image data, that is, the first original data and the second original data are not subjected to distortion correction processing, so as to improve the rate of generating the corrected image.

[0045] See also Fig. 9 In some embodiments, 03: generating a corrected image of the target object according to the first image data and the second image data may include:

[0046] 031: Determine the parameters of the virtual imaging component according to the parameters of the camera component 20, wherein the virtual imaging component includes two identical imaging modules, the imaging surfaces of the two imaging modules are coplanar, and the baseline of the camera component 20 is parallel to the imaging surface of the imaging component;

[0047] 033: Obtaining an image tilt correction relationship according to the parameters of the camera component 20 and the parameters of the virtual imaging component; and

[0048] 035: A corrected image of the target object is generated according to the first image data, the second image data and the image tilt correction equation.

[0049] See also Figure 2The above-mentioned image acquisition method of a foldable electronic device can be applied to a foldable electronic device 100, and the processor 30 is also used to: determine the parameters of a virtual imaging component according to the parameters of the camera component 20, the virtual imaging component includes two completely identical imaging modules, the imaging surfaces of the two imaging modules are coplanar, and the baseline of the camera component 20 is parallel to the imaging surface of the imaging component; obtain an image tilt correction relationship according to the parameters of the camera component 20 and the parameters of the virtual imaging component; and form a corrected image of the target object according to the first image data, the second image data and the image tilt correction relationship.

[0050] The parameters of the camera assembly 20 include external parameters and internal parameters of the camera assembly 20. The internal parameters are parameters related to the camera assembly 20's own characteristics, such as the focal length and pixel size of the camera assembly 20, and the external parameters are parameters of the camera assembly 20 in the world coordinate system, such as the position and rotation direction of the camera assembly 20. The world coordinate system is the coordinate system of the entire shooting scene, the origin can be any point in the shooting scene, and the three coordinate axes can be any three mutually orthogonal unit axes. The processor 30 obtains the first image data through the first camera module 21 and obtains the second image data through the second camera module 23, so the external parameters also include the rotation matrix and the translation matrix between the module coordinate system of the first camera module 21 and the module coordinate system of the second camera module 23, wherein the rotation matrix is ​​used to describe the relative rotation angle relationship between the two module coordinate systems, and the translation matrix is ​​used to describe the relative position relationship between the two module coordinate systems.

[0051] Please combine Fig.10In the figure, point S is the predetermined point of the target object, C1 is the first camera module 21, C2 is the second camera module 23, P1 is the first imaging plane corresponding to the first image data, P2 is the second imaging plane corresponding to the second image data, S1 is the imaging point of the predetermined point on the first imaging plane, E1 is the intersection of the first imaging plane and the line connecting C1 and C2, S2 is the imaging point of the predetermined point on the second imaging plane, and E2 is the intersection of the second imaging plane and the line connecting C1 and C2. After connecting the predetermined point of the target object, the first camera module 21 and the second camera module 23 to form a plane, it can be seen that this plane intersects with the first imaging plane in a line, and this line is called the first polar line (i.e., L1 in the figure), and this plane intersects with the second imaging plane in a line, and this line is called the second polar line (i.e., L2 in the figure). It can be seen that after the first camera module 21 and the second camera module 23 shoot the target object from two directions, the first polar line and the second polar line may not be parallel, and the first imaging plane and the second imaging plane may not be parallel to the baseline of the camera assembly 20 (i.e., the line between the optical center of the first camera module 21 and the optical center of the second camera module 23. After confirming the parameters of the first camera module 21 and the second camera module 23, the position of the optical center of the first camera module 21 and the position of the optical center of the second camera module 23 can be determined), so that the target object in the image shot by the first camera module 21 and the image shot by the second camera module 23 is tilted. To correct the image tilt, the first polar line and the second polar line are parallel, and the first imaging plane and the second imaging plane are parallel to the baseline of the camera assembly 20, for example Fig.11 , thereby ensuring that the target object in the output rectified image is correct.

[0052] Therefore, please combine Fig.11 , two completely identical imaging modules can be first virtualized, the imaging modules include a first imaging module and a second imaging module, the parameters of the first imaging module and the second imaging module are consistent, that is, the internal parameters of the first imaging module and the second imaging module are completely consistent. According to the imaging principle of the imaging module, since the focal lengths of the two imaging modules are the same, the imaging planes of the two imaging modules are coplanar, and since the internal parameters of the two imaging modules are the same, the corresponding points of the predetermined points on the first imaging plane and the corresponding points on the second imaging plane are on the same horizontal line. In particular, in order to ensure that the corresponding epipolar lines on the two imaging planes are parallel, the baseline of the camera assembly 20 is parallel to the imaging plane of the imaging assembly.

[0053] Then determine the internal parameters and rotation matrix of the two imaging modules. The internal parameters of the imaging module can be the average of the internal parameters of the first camera module 21 and the internal parameters of the second camera module 23. The rotation matrix of the two imaging modules can be expanded to Rn = [r1, r2, r3], where r1 represents the x-axis of the imaging module, r2 represents the y-axis of the imaging module, and r3 represents the z-axis of the imaging module. The x-axis of the imaging module should be parallel to the baselines of the two imaging modules, so r1 can be calculated according to the formula Calculate, where c1 and c2 are the coordinates of the optical centers of the two imaging modules respectively. The y-axis of the imaging module should be perpendicular to the plane where the x-axis of the imaging module and the z-axis of the first camera module coordinate system or the second camera module coordinate system (i.e., k in the following formula) are located, therefore, r2=k*r1. The z-axis of the imaging module should be perpendicular to the plane where the x-axis of the imaging module and the y-axis of the imaging module are located, therefore, r3=r1*r2. Then, according to the above three formulas, the rotation matrix of the two imaging modules can be calculated.

[0054] Then, according to the parameters of the first camera module 21 and the second camera module 23, the parameters of the first imaging module and the second imaging module, the image tilt correction relationship is obtained, that is, the conversion relationship between the first camera module coordinate system and the first imaging module coordinate system, and the conversion relationship between the second camera module coordinate system and the second imaging module coordinate system is obtained. After the image tilt correction relationship is obtained, the image tilt correction can be performed according to the first image data, the second image data and the image tilt relationship, so that the imaging origin coordinates of the first imaging plane and the second imaging plane after the image tilt correction are consistent, the first imaging plane and the second imaging plane are coplanar, and the corresponding polar lines in the first imaging plane and the second imaging plane are aligned, so that the target object in the generated corrected image is upright, thereby facilitating the subsequent recognition of the corrected image.

[0055] See also Fig.12 In some embodiments, 033: according to the parameters of the camera assembly 20 and the parameters of the virtual imaging assembly, obtaining an image tilt correction relationship includes, and may also include:

[0056] 0331: Obtaining a first conversion relationship between the coordinates of a predetermined point on the target object in the world coordinate system and the coordinates of the predetermined point in the first coordinate system where the camera assembly 20 is located according to the rotation matrix of the camera assembly 20, the translation vector of the camera assembly 20, and the adjustment coefficient;

[0057] 0333: Obtaining a second conversion relationship between the coordinates of the predetermined point in the world coordinate system and the coordinates of the predetermined point in the second coordinate system where the virtual imaging component is located according to the first conversion relationship, the internal parameter of the virtual imaging component, the inverse rotation matrix of the virtual imaging component, and the translation vector of the virtual imaging component;

[0058] 0335: Obtain an image tilt correction relationship according to the first conversion relationship and the second conversion relationship.

[0059] See also Figure 2 The above-mentioned image acquisition method of a foldable electronic device can be applied to a foldable electronic device 100. At this time, the processor 30 is also used to: obtain a first conversion relationship between the coordinates of a predetermined point on the target object in the world coordinate system and the coordinates of the predetermined point in the first coordinate system where the camera component 20 is located according to the rotation matrix of the camera component 20, the translation vector of the camera component 20, and the adjustment coefficient; obtain a second conversion relationship between the coordinates of the predetermined point in the world coordinate system and the coordinates of the predetermined point in the second coordinate system where the virtual imaging component is located according to the first conversion relationship, the internal parameters of the virtual imaging component, the inverse rotation matrix of the virtual imaging component, and the translation vector of the virtual imaging component; and obtain an image tilt correction relationship according to the first conversion relationship and the second conversion relationship.

[0060] In order to achieve image tilt correction, it is necessary to obtain the image tilt correction relationship between the first camera module 21 and the first imaging module, and the image tilt correction relationship between the second camera module 23 and the second imaging module. The first coordinate system can be divided into the first camera module coordinate system and the second camera module coordinate system. The second coordinate system can be divided into the first imaging module coordinate system and the second imaging module coordinate system.

[0061] First, a first conversion relationship between the coordinates of a predetermined point on the target object in the world coordinate system and the coordinates of the predetermined point in the first coordinate system where the camera assembly 20 is located is obtained according to the rotation matrix of the camera assembly 20, the translation vector of the camera assembly 20, and the adjustment coefficient. For example, according to the formula P C =R*P W +T to transform the coordinates of the predetermined point from the world coordinate system to the coordinates of the first coordinate system, where P C is the coordinate of the predetermined point in the first coordinate system, P W is the coordinate of the predetermined point in the world coordinate system, and for the convenience of calculation, the coordinates in the first coordinate system are normalized, that is, the coordinates in the first coordinate system are divided by the corresponding z-axis coordinates. At this time, the formula can be organized into Wherein, σ is the scale factor between the first coordinate system and the world coordinate system, i.e., the adjustment coefficient, K is the internal parameter of the corresponding camera module, T is the translation vector of the corresponding camera module, R is the rotation matrix of the corresponding camera module, u is the x-axis coordinate of the predetermined point in the first coordinate system of the predetermined point, v is the y-axis coordinate of the predetermined point in the first coordinate system, X W The x-axis coordinate of the corresponding predetermined point in the world coordinate system, Y W Corresponding to the y-axis coordinate of the predetermined point in the world coordinate system, Z W The z-axis coordinate of the corresponding predetermined point in the world coordinate system.

[0062] Then, when converting the predetermined point from the first coordinate system to the world coordinate system, the formula P W =R*P C +T to convert, at this time P C =R -1 (P W -T). In order to facilitate the conversion of coordinate systems, T can be set to C, where C is the coordinate of the origin of the first coordinate system in the world coordinate system. Therefore, P C According to the formula P C =R -1 (P W -C) to convert. After sorting, we can get the formula This formula is the first conversion relationship. Therefore, the third conversion relationship between the first camera module coordinate system and the world coordinate system can be obtained as follows: The fifth transformation relationship between the second camera module coordinate system and the world coordinate system is:

[0063] According to the above steps of determining the parameters of the virtual imaging component, the internal parameters of the virtual imaging component, the inverse rotation matrix of the virtual imaging component, and the translation vector of the virtual imaging component can be determined. And for the convenience of calculation, it is stipulated that the coordinates of the origin of the first coordinate system in the world coordinate system are the same as the coordinates of the origin of the second coordinate system in the world coordinate system. Therefore, after obtaining the first transformation relationship, the second transformation relationship between the coordinates of the predetermined point in the world coordinate system and the coordinates of the predetermined point in the second coordinate system where the virtual imaging component is located can be obtained, that is, Among them, σ' is the scale factor between the second coordinate system and the world coordinate system, K' is the internal parameter of the corresponding camera module, R ’-1 is the inverse rotation matrix of the corresponding camera module, u' is the x-axis coordinate of the predetermined point in the second coordinate system, and v' is the y-axis coordinate of the predetermined point in the second coordinate system. Therefore, the fourth transformation relationship between the first imaging component coordinate system and the world coordinate system can be obtained as The sixth transformation relationship between the second imaging component coordinate system and the world coordinate system can be:

[0064] After comparing the first conversion relationship and the second conversion relationship, it is found that there is a common formula between the two, so the image tilt correction formula can be obtained based on this common formula. That is, by comparing the third conversion relationship and the fourth conversion relationship, it can be found that both of them have Therefore, the image tilt correction relationship between the first camera module 21 and the first imaging component can be obtained based on the common part, that is, Comparing the fifth conversion relationship with the sixth conversion relationship, it can be found that both of them have Therefore, the image tilt correction relationship between the second camera module 23 and the second imaging component can be obtained based on this common part, that is,

[0065] In this way, the image tilt correction relationship between the first camera module 21 and the first imaging component, and the image tilt correction relationship between the second camera module 23 and the second imaging component can be determined according to the parameters of the camera component 20 and the parameters of the virtual imaging component. After the processor 30 converts the first image data and the second image data according to the two image tilt correction relationships, the image tilt correction can be achieved and a corrected image can be generated.

[0066] See also Fig.13 In some embodiments, the image acquisition method may include:

[0067] 05: Crop the rectified image to output the target image.

[0068] See also Figure 2 The above-mentioned image acquisition method of a foldable electronic device can be applied to the foldable electronic device 100. At this time, the processor 30 is also used to: crop the corrected image to output the target image.

[0069] After image tilt correction, the corners of the corrected image may be irregular, and these corners may affect subsequent information recognition. Fig.14 , Figure (P1) is the first initial image captured by the first camera module 21, and Figure (P2) is the second initial image captured by the second camera module 23. After image tilt correction is performed on Figure (P1), a corrected image, i.e., Figure (D1), can be obtained. It can be seen that the corner area of ​​Figure (D1) is irregular, and the corner area does not include the information of the target object (QR code), but when the processor 30 analyzes the information of the corrected image, it will also analyze the information of the corner area, resulting in a longer processing time for the processor 30. Therefore, after outputting the corrected image, the irregular corner area in the corrected image can be identified, and then the corrected image can be cropped according to the corner area to output the target image, i.e., Figure (T1), thereby ensuring that the target object in the target image is upright on the one hand, and ensuring that there is less useless information in the target image on the other hand, thereby ensuring the subsequent information recognition efficiency.

[0070] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0071] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0072] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor 30, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a computer-readable storage medium can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0073] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0074] A person of ordinary skill in the art will appreciate that all or part of the steps carried by the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0075] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for acquiring an image of a foldable electronic device, the electronic device comprising a body and a camera assembly mounted on the body, the body comprising a first sub-section and a second sub-section that can be folded relative to each other, the camera assembly comprising a first camera module disposed in the first sub-section and a second camera module disposed in the second sub-section; the image acquisition method comprising: When the folding angle between the first sub-section and the second sub-section is an included angle, first image data of the target object is acquired through the first camera module, and second image data of the target object is acquired through the second camera module; and A corrected image of the target object is generated according to the first image data and the second image data.

2. The image acquisition method according to claim 1, characterized in that: In a case where the folding angle between the first sub-section and the second sub-section is an included angle, acquiring first image data of a target object through the first camera module, and acquiring second image data of the target object through the second camera module, comprises: In the case where the folding angle between the first sub-section and the second sub-section is an included angle, first original data of the target object is obtained by photographing with the first camera module, and second original data of the target object is obtained by photographing with the second camera module; and The first original data is subjected to distortion correction processing to obtain the first image data, and the second original data is subjected to distortion correction processing to obtain the second image data.

3. The image acquisition method according to claim 1, characterized in that: Generating a corrected image of the target object according to the first image data and the second image data includes: Determine the parameters of the virtual imaging component according to the parameters of the camera component, wherein the virtual imaging component includes two identical imaging modules, the imaging surfaces of the two imaging modules are coplanar, and the baseline of the camera component is parallel to the imaging surface of the imaging component; Obtaining an image tilt correction relationship according to the parameters of the camera component and the parameters of the virtual imaging component; and A corrected image of the target object is generated according to the first image data, the second image data and the image tilt correction relationship.

4. The image acquisition method according to claim 3, characterized in that: According to the parameters of the camera component and the parameters of the virtual imaging component, an image tilt correction relationship is obtained, including: Acquire a first conversion relationship between the coordinates of a predetermined point on the target object in a world coordinate system and the coordinates of the predetermined point in a first coordinate system where the camera assembly is located according to a rotation matrix of the camera assembly, a translation vector of the camera assembly, and an adjustment coefficient; Acquire a second conversion relationship between the coordinates of the predetermined point in the world coordinate system and the coordinates of the predetermined point in the second coordinate system where the virtual imaging component is located according to the first conversion relationship, the internal parameters of the virtual imaging component, the inverse rotation matrix of the virtual imaging component, and the translation vector of the virtual imaging component; and The image tilt correction relationship is obtained according to the first conversion relationship and the second conversion relationship.

5. The image acquisition method according to claim 1, characterized in that: Also includes: The rectified image is cropped to output a target image.

6. A foldable electronic device, characterized in that: The electronic device comprises: A body, the body comprising a first sub-section and a second sub-section capable of being folded relative to each other; A camera assembly, the camera assembly is mounted on the body, the camera assembly includes a first camera module disposed in the first sub-unit and a second camera module disposed in the second sub-unit; and A processor, wherein the processor is used to obtain first image data of a target object through the first camera module and second image data of the target object through the second camera module when the folding angle between the first sub-section and the second sub-section is an included angle; and to generate a corrected image of the target object based on the first image data and the second image data.

7. The electronic device according to claim 6, characterized in that: The processor is further configured to: In the case where the folding angle between the first sub-section and the second sub-section is an included angle, first original data of the target object is obtained by photographing with the first camera module, and second original data of the target object is obtained by photographing with the second camera module; and The first original data is subjected to distortion correction processing to obtain the first image data, and the second original data is subjected to distortion correction processing to obtain the second image data.

8. The electronic device according to claim 6, characterized in that: The processor is further configured to: Determine the parameters of the virtual imaging component according to the parameters of the camera component, wherein the virtual imaging component includes two identical imaging modules, the imaging surfaces of the two imaging modules are coplanar, and the baseline of the camera component is parallel to the imaging surface of the imaging component; Obtaining an image tilt correction relationship according to the parameters of the camera component and the parameters of the virtual imaging component; and A corrected image of the target object is generated according to the first image data, the second image data and the image tilt correction relationship.

9. The electronic device according to claim 8, characterized in that: The processor is further configured to: Acquire a first conversion relationship between the coordinates of a predetermined point on the target object in a world coordinate system and the coordinates of the predetermined point in a first coordinate system where the camera assembly is located according to a rotation matrix of the camera assembly, a translation vector of the camera assembly, and an adjustment coefficient; Acquire a second conversion relationship between the coordinates of the predetermined point in the world coordinate system and the coordinates of the predetermined point in the second coordinate system where the virtual imaging component is located according to the first conversion relationship, the internal parameters of the virtual imaging component, the inverse rotation matrix of the virtual imaging component, and the translation vector of the virtual imaging component; and The image tilt correction relationship is obtained according to the first conversion relationship and the second conversion relationship.

10. The electronic device according to claim 6, characterized in that: The processor is further configured to: The rectified image is cropped to output a target image.

Citation Information

Patent Citations

  • Image correction method and device and electronic system

    CN111340737A

  • Image processing method based on folding screen and electronic equipment

    CN115601373A

  • Blending a real world with a virtual world

    EP2442280A1