Shooting method, electronic equipment, storage medium and chip
By adding a pixel area within the image circle of the foldable phone, the problem of low image resolution caused by the lens image circle diameter being smaller than the diagonal length of the camera target surface is solved, achieving higher image resolution and a larger field of view, thus improving the user experience.
Patent Information
- Application Number
- CN202410412224.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2025-10-21
AI Technical Summary
Because the image circle diameter of the lens of a foldable phone is smaller than the diagonal length of the camera's sensor, the size of the effective light-sensitive area is smaller than the size of the camera's sensor, resulting in lower image resolution when shooting with a foldable phone, which affects the user experience.
By including a first type of pixel and a second type of pixel within the image circle of the lens, where the first type of pixel is the pixel within the first light-sensitive area and the second type of pixel is the pixel within the image circle excluding the first light-sensitive area, and through the display interface and control operation, the number of pixels contained in the image is increased, thereby improving the image resolution.
The number of pixels in the image is increased, which improves the image resolution and framing range, and improves the user experience.
Smart Images

Figure CN120825622A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a shooting method, electronic device, storage medium and chip. Background Art
[0002] With the continuous development of electronic devices, more and more electronic devices with displays are being used in people's work and daily lives, such as mobile phones with displays. Among them, foldable screen phones are very popular because they can provide users with a larger display size when unfolded and are easy to carry when folded. Foldable screen phones have multiple functions, such as photography.
[0003] Usually, due to reasons such as the overall thickness of a foldable screen mobile phone when in the unfolded state being smaller than that of a straight screen mobile phone, the image circle diameter of the lens is smaller than the diagonal length of the camera target surface, thereby making the size of the effective photosensitive area of the foldable screen mobile phone smaller than the size of the camera target surface of the foldable screen mobile phone.
[0004] When taking photos with a foldable phone, the captured image includes pixels within the effective photosensitive area. Because the size of the effective photosensitive area of the foldable phone is smaller than the size of the camera target surface of the foldable phone, the number of pixels included in the effective photosensitive area is smaller than the number of pixels included in the camera target surface. Usually, the image size captured by a foldable phone is larger, which results in the resolution of the image captured by the foldable phone in the related solution being lower (the image resolution is obtained by the ratio of the number of pixels to the image size), affecting the user experience. Summary of the Invention
[0005] The present application provides a shooting method, electronic device, storage medium and chip, which can improve the resolution of images and enhance the user experience.
[0006] In a first aspect, a shooting method is provided, which is applied to an electronic device. The electronic device is equipped with a lens and an image sensor, the image circle diameter of the lens is smaller than the diagonal length of the camera target surface of the image sensor, and the image circle on the camera target surface includes first-class pixels and second-class pixels. The first-class pixels are pixels within a first photosensitive area, which is a photosensitive area within the image circle with an aspect ratio of a preset ratio, and the second-class pixels are pixels within an area within the image circle other than the first photosensitive area. The method includes: displaying a first interface, the first interface including a preview box and a first control, the first control being used to instruct the electronic device to shoot, the preview box including a first image, the frame ratio of the first image being a first ratio, the first ratio being different from the preset ratio, and the first image including the first-class pixels and the second-class pixels; in response to an operation on the first control, displaying a second interface, the second interface including the first image.
[0007] In the related solution, the image captured by the user only contains pixels within the effective photosensitive area (for example, the image captured by the user only contains Figure 2 The black circles shown represent pixels), because the size of the effective photosensitive area of the foldable screen mobile phone is smaller than the size of the camera target surface of the foldable screen mobile phone, the number of pixels included in the effective photosensitive area is smaller than the number of pixels included in the camera target surface. Usually, the image size taken by the foldable screen mobile phone is larger, which leads to the lower resolution of the image taken by the foldable screen mobile phone in the related scheme (the image resolution is obtained by the ratio of the number of pixels to the image size), which affects the user experience.
[0008] In the embodiment of the present application, when the diameter of the image circle of the lens is smaller than the diagonal length of the camera target surface of the image sensor, the image obtained by the electronic device after shooting includes the first type of pixels (the first type of pixels are pixels in the first photosensitive area, and the first photosensitive area is a photosensitive area in the image circle with a preset aspect ratio, for example, the first type of pixels are Figure 2 The black circles shown represent pixels) and the second type of pixels (for example, the second type of pixels can be Figure 2 The white circles in the image circle except the black circles represent the pixels), compared with the related solutions in which the image taken by the user only includes the pixels in the effective photosensitive area (for example, the image taken by the user only includes Figure 2 The black circles shown represent pixels), which can increase the number of pixels in the captured image. Usually, when shooting images with the same aspect ratio, the image size of the related scheme and the present application is the same. In this way, since the present application can increase the number of pixels in the captured image, the image resolution can be improved (the image resolution is obtained by the ratio of the number of pixels to the image size), thereby improving the user experience.
[0009] Moreover, since the present application can increase the number of pixels in the captured image, the image captured using the method provided in the embodiment of the present application contains more objects than the image captured using the related scheme. Therefore, the method provided in the embodiment of the present application can increase the framing range of the image and improve the user experience.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, before displaying the first interface, the method further includes:
[0011] According to a first ratio and a first correspondence, a target group pixel set corresponding to the first ratio is determined, the first correspondence is used to indicate a correspondence between multiple frame ratios and multiple pixel sets, one frame ratio corresponds to one pixel set, the first ratio is one of the multiple frame ratios, the target group pixel set is one of the multiple pixel sets, the area of each pixel set in the camera target surface is located within the image circle, the aspect ratio of the area of the target group pixel set in the camera target surface is the first ratio, the target group pixel set includes first and second types of pixels; and, displaying a first interface, including: displaying a first image in a preview box based on the target group pixel set.
[0012] In the embodiment of the present application, since the first relationship is used to indicate the correspondence between multiple frame ratios and multiple groups of pixel sets, the electronic device can accurately determine the target group pixel set corresponding to the first ratio based on the first ratio and the first correspondence, thereby improving the accuracy of determining the target group pixel set.
[0013] In combination with the first aspect, in some implementations of the first aspect, the electronic device is an electronic device with a foldable screen, and the electronic device has multiple forms; and before determining the target group pixel set corresponding to the first ratio based on the first ratio and the first correspondence, the method also includes: detecting the target form of the electronic device, the target form is one of the multiple forms; determining the first correspondence corresponding to the target form of the electronic device, the first correspondence is one of multiple correspondences, and one correspondence among the multiple correspondences is used to indicate the correspondence between multiple aspect ratios and multiple groups of pixel sets under the form of an electronic device.
[0014] In an embodiment of the present application, when the electronic device is an electronic device with a foldable screen, since the electronic device has multiple forms, the electronic device can detect the target form of the electronic device, and thus can determine a first corresponding relationship from multiple corresponding relationships based on the target form, which can improve the accuracy of the determined first relationship.
[0015] In combination with the first aspect, in certain implementations of the first aspect, determining the target group pixel set corresponding to the first ratio based on the first ratio and the first correspondence includes: displaying a third interface, the third interface including multiple options, the multiple options being used to indicate multiple aspect ratios in the first correspondence, the multiple options including a first option, the first option being used to indicate a first ratio among the multiple aspect ratios; in response to an operation on the first option, determining the target group pixel set corresponding to the first ratio based on the first ratio and the first correspondence.
[0016] In combination with the first aspect, in certain implementations of the first aspect, displaying the first image in the preview frame based on the target group pixel set includes: based on the position information of each pixel in the target group pixel set, controlling each pixel to convert the optical signal into an electrical signal to display the first image in the preview frame.
[0017] In combination with the first aspect, in some implementations of the first aspect, the electronic device includes a hardware abstraction layer, and the multiple corresponding relationships are stored in the hardware abstraction layer.
[0018] In combination with the first aspect, in some implementations of the first aspect, the preset ratio is 4:3.
[0019] In a second aspect, an electronic device is provided, wherein the electronic device is configured to execute the method provided in the first aspect. Specifically, the electronic device may include a processing unit configured to execute any possible implementation of the first aspect.
[0020] In a third aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to execute a method in any possible implementation of the first aspect.
[0021] In a fourth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect.
[0022] In a fifth aspect, a chip is provided, comprising a memory for storing instructions; and a processor for calling and executing instructions from the memory, so that an electronic device equipped with the chip executes the method described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is an example diagram of the image circle and camera target surface of a straight-screen mobile phone.
[0024] Figure 2 This is an example diagram of the image circle and camera target surface of a foldable screen mobile phone.
[0025] Figure 3 This is an example diagram of pixels in a captured image provided by an embodiment of the present application.
[0026] Figure 4 1 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
[0027] Figure 5 Schematic diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
[0028] Figure 6 This is a schematic diagram of using a mobile phone to capture an image provided in an embodiment of the present application.
[0029] Figure 7 This is another schematic diagram of utilizing captured images provided in an embodiment of the present application.
[0030] Figure 8 This is an example image taken by a foldable screen mobile phone provided in an embodiment of the present application.
[0031] Figure 9 This is a timing diagram of a shooting method provided in an embodiment of the present application.
[0032] Figure 10 It is a schematic flow chart of a shooting method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.
[0034] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0035] With the continuous development of electronic devices, more and more electronic devices with displays are being used in people's work and daily lives, such as mobile phones with displays. Among them, foldable screen phones are very popular because they can provide users with a larger display size when unfolded and are easy to carry when folded. Foldable screen phones have multiple functions, such as photography.
[0036] Foldable screen mobile phones can shoot images or videos with different aspect ratios. For example, the aspect ratio can be 4:3, 1:1, 16:9, 19.5:9, etc. In the relevant solution, the process of shooting images or videos with different aspect ratios on a foldable screen mobile phone is as follows:
[0037] Light passes through the lens of the foldable screen phone to reach the image sensor. The photosensitive area in the image sensor can convert the light signal into an electrical signal, and then convert it into a digital signal through the internal analog-to-digital converter. The digital signal is then post-processed (post-processing includes correction, white balance, exposure control, adding filters, etc.) and finally displayed on the display.
[0038] The photosensitive area of an image sensor is also called the camera target surface. The camera target surface refers to the area of the image sensor that receives light. The size of the camera target surface can affect the resolution and clarity of images captured by foldable screen phones. To conform to the human eye's visual habits (the human eye's field of view is a roughly rectangular shape that is wide horizontally and narrow vertically), the aspect ratio of the camera target surface is typically 4:3. The photosensitive area of an image sensor is a one-dimensional or two-dimensional array of multiple pixels (pixels can also be called picture elements), which can be called a pixel array.
[0039] The aspect ratio of images captured by a foldable phone depends on the size of the effective photosensitive area in the camera target surface of the phone's image sensor, as well as the ratio of the number of pixels in the effective photosensitive area that are in working condition in the length direction to the number of pixels in the width direction. A pixel in working condition means that the pixel can convert the received light signal into an electrical signal. For example, if the ratio of the number of pixels in the effective photosensitive area that are in working condition in the length direction to the number of pixels in the width direction is 4:3, then the aspect ratio of the image captured by the foldable phone is 4:3. For another example, if the ratio of the number of pixels in the effective photosensitive area that are in working condition in the length direction to the number of pixels in the width direction is 1:1, then the aspect ratio of the image captured by the foldable phone is 1:1.
[0040] It should be understood that the above-mentioned aspect ratio of the image specifically refers to the aspect ratio of the image. The aspect ratio of the image can also be called the width-to-length ratio, the height-to-width ratio, etc.
[0041] The size of the effective photosensitive area of a foldable screen phone is related to the distance between the lens and the image sensor. The distance between the lens and the image sensor in a typical straight screen phone is moderate, which can make the image circle diameter of the lens greater than or equal to the diagonal length of the camera target surface. This can avoid the formation of dark areas in the four corners of the camera target surface, which affects the image quality. The image circle refers to the circular, bright and clear image format presented on the image sensor of the mobile phone after the incident light passes through the lens. The image circle of the lens is determined by the optical structure of the lens. Once the optical structure design of the lens is completed, the corresponding image circle is determined. For example, please refer to Figure 1 , Figure 1 This is an example diagram of the image circle and camera target surface of a straight-screen mobile phone. Figure 1Where I1 represents the image circle diameter, S1 represents the diagonal length of the camera target surface, and I1 is greater than S1. In this case, the effective photosensitive area is the same as the camera target surface, for example Figure 1 The size of the effective photosensitive area A shown is the same as the size of the camera target surface.
[0042] From the above and Figure 1 It can be seen that when the image circle diameter of the lens of a straight-screen mobile phone is greater than or equal to the diagonal length of the camera target surface, since light can illuminate all pixels in the pixel array within the camera target surface, and since the size of the effective photosensitive area A is the same as the size of the camera target surface, all pixels in the pixel array included in the effective photosensitive area A can be in a working state. For example, Figure 1 The 16 rows × 12 columns of pixels included in the effective photosensitive area A shown can all be in working state. In implementation, the process of shooting images or videos with different aspect ratios by a straight-screen mobile phone in the relevant scheme can be: for example, when a straight-screen mobile phone shoots an image with an aspect ratio of 4:3, all pixels in its effective photosensitive area A can be in working state, and each pixel converts the light signal into an electrical signal, and finally obtains an image with an aspect ratio of 4:3. When shooting other aspect ratios (other aspect ratios can be aspect ratios other than 4:3) on a straight-screen mobile phone, for example, other aspect ratios are 1:1, then some pixels in the effective photosensitive area A are in working state, and the ratio of the number of pixels in the length direction to the number of pixels in the width direction of these some pixels is 1:1. For example, some pixels can be Figure 1 The pixels included in the 3rd to 14th rows and the 1st to 12th columns shown can ultimately form an image with an aspect ratio of 1:1.
[0043] The above introduction states that when the distance between the lens and the image sensor in a straight-screen mobile phone is moderate, the image circle diameter of the lens in the straight-screen mobile phone is greater than or equal to the diagonal length of the camera target surface. When a folding-screen mobile phone is shooting images or videos, in order to avoid the formation of dark areas at the four corners of the camera target surface, the image circle diameter of the lens also needs to be greater than or equal to the diagonal length of the camera target surface. However, when a folding-screen mobile phone is in the unfolded state, its overall thickness is less than that of a straight-screen mobile phone. For example, the industry's typical folding-screen mobile phones have an overall thickness of 4 mm to 6 mm when in the unfolded state, and the thickness of a straight-screen mobile phone is 8 mm to 10 mm. This will cause the distance from the lens to the image sensor in the folding-screen mobile phone to be less than that in the straight-screen mobile phone. In order to ensure imaging quality and based on price considerations, the size of the image sensor configured in the folding-screen mobile phone is the same as that configured in the straight-screen mobile phone. This will cause the image circle diameter of the lens of the folding-screen mobile phone to be less than the diagonal length of the camera target surface. For example, please refer to Figure 2 , Figure 2This is an example diagram of the image circle and camera target surface of a foldable screen mobile phone. Figure 2 Where I2 represents the image circle diameter, S2 represents the diagonal length of the camera target surface, and I2 is smaller than S2. In this way, the size of the effective photosensitive area of the folding screen mobile phone when shooting images or videos is smaller than the size of the camera target surface. For example, Figure 2 The area where the black circle is located is the effective photosensitive area B. In addition, in order to conform to the visual habits of the human eye when viewing images, the ratio of the number of pixels in the length direction to the number of pixels in the width direction in the effective photosensitive area B is 4:3. For example, Figure 2 In the effective photosensitive area B shown, the number of pixels in the length direction is 8 and the number of pixels in the width direction is 6, and the ratio is 4:3.
[0044] From the above and Figure 2 It can be seen that when the image circle diameter of the lens of the foldable screen mobile phone is smaller than the diagonal length of the camera target surface, all pixels in its effective photosensitive area B can be in working state, for example, Figure 2 The 8 rows × 6 columns of pixels included in the effective photosensitive area B shown can all be in a working state. In implementation, the process of the folding screen mobile phone in the relevant scheme to shoot images or videos with different aspect ratios can be: for example, when the folding screen mobile phone shoots an image with an aspect ratio of 4:3, all pixels in its effective photosensitive area B can be in a working state, and each pixel converts the light signal into an electrical signal, and finally obtains an image with an aspect ratio of 4:3. When the folding screen mobile phone shoots other aspect ratios (other aspect ratios may be aspect ratios other than 4:3), for example, other aspect ratios are 1:1, then some pixels in the effective photosensitive area B are in a working state, and the ratio of the number of pixels in the length direction to the number of pixels in the width direction of these some pixels is 1:1. For example, some pixels may be Figure 2 The pixels included in the 6th to 11th rows and the 4th to 9th columns shown can ultimately form an image with an aspect ratio of 1:1.
[0045] From the above Figure 1 and Figure 2It can be seen that in the relevant solutions, because the overall thickness of the foldable screen phone is smaller than that of the candy-bar phone when in its unfolded state, the distance from the lens to the image sensor in the foldable screen phone is smaller than that in the candy-bar phone. Furthermore, because the size of the image sensor configured in the foldable screen phone is the same as that configured in the candy-bar phone, and the distance from the lens to the image sensor in the foldable screen phone is smaller than that in the candy-bar phone, the image circle diameter of the lens of the foldable screen phone is smaller than the diagonal length of the camera target surface, which results in the size of the effective photosensitive area B of the foldable screen phone being smaller than the size of the camera target surface of the foldable screen phone. When the size of the effective photosensitive area B of the foldable screen phone is smaller than the size of the camera target surface of the foldable screen phone, the pixels included in the image captured by the foldable screen phone are the pixels within the effective photosensitive area B. The number of pixels included in the effective photosensitive area B is smaller than the number of pixels included in the camera target surface of the foldable screen phone. Moreover, the image size of the image captured by the foldable screen phone is generally larger. Since image resolution is obtained by the ratio of the number of pixels to the image size, the resolution of the image captured by the foldable screen phone in the relevant solutions is low, affecting the user experience.
[0046] Based on the above problems, an embodiment of the present application provides a shooting method, which can enable the image taken by a foldable screen mobile phone to include pixels in the photosensitive area of the image sensor within the image circle. Compared with the related scheme in which the image taken by the foldable screen mobile phone only includes pixels within the effective photosensitive area B, the method can increase the number of pixels in the image taken by the foldable screen mobile phone, improve the image resolution, and enhance the user experience.
[0047] For example, please refer to Figure 3 , Figure 3 This is an example diagram of pixels in a captured image provided by an embodiment of the present application. Figure 3 As shown in (a), in the related solution, the effective photosensitive area B of the image sensor of the folding screen mobile phone includes 8 rows and 6 columns, totaling 48 pixels. In the embodiment of the present application, the pixels in the photosensitive area of the image sensor in the image circle are referred to as Figure 3 (b) in Figure 3 The black circles shown in (b) are pixels in the photosensitive area of the image sensor within the image circle.
[0048] For example, when a foldable screen mobile phone shoots an image with an aspect ratio of 1:1 through a related solution, the image contains pixels in the area with an aspect ratio of 1:1 within the effective photosensitive area B, such as Figure 3 (c) shows the pixels in the 6th to 11th rows, the 4th column and the 9th column on the camera target surface ( Figure 3When a foldable screen mobile phone shoots an image with an aspect ratio of 1:1 using the method provided in the embodiment of the present application, the image contains pixels in the photosensitive area of the image sensor within the image circle with an aspect ratio of 1:1, such as the pixels in the 4th to 13th rows and the 3rd to 10th columns on the camera target surface within the image circle ( Figure 3 (d) shows the pixels within the image circle), a total of 64 pixels.
[0049] For example, when a foldable screen mobile phone shoots an image with an aspect ratio of 3:2 through a related solution, the image contains pixels with an aspect ratio of 3:2 in the effective photosensitive area B, such as Figure 3 (e) shows the 6th to 11th rows and 5th to 8th columns of pixels on the camera target surface ( Figure 3 When a foldable mobile phone shoots an image with an aspect ratio of 3:2 using the method provided in the embodiment of the present application, for example, the image contains pixels from the 4th to the 12th row and the 4th to the 9th column on the camera target surface within the image circle ( Figure 3 Pixels included in the image circle shown in (f) in the figure), a total of 54 pixels.
[0050] Depend on Figure 3 It can be seen that the number of pixels in the image with an aspect ratio of 1:1 taken by the foldable screen mobile phone through the method provided in the embodiment of the present application (64 pixels) is greater than the number of pixels in the image with an aspect ratio of 1:1 taken by the foldable screen mobile phone through the related solution (36 pixels), and the number of pixels in the image with an aspect ratio of 3:2 taken by the foldable screen mobile phone through the method provided in the embodiment of the present application (54 pixels) is greater than the number of pixels in the image with an aspect ratio of 3:2 taken by the foldable screen mobile phone through the related solution (24 pixels). Since the image taken by the foldable screen mobile phone in the embodiment of the present application contains more pixels, and the present application and the related solution are both solutions applied to foldable screen mobile phones, the size of the image taken can be considered to be the same, so the resolution of the image taken by the embodiment of the present application is higher than the resolution of the image taken by the related solution, which can improve the resolution of the captured image and enhance the user experience.
[0051] The shooting method provided in the embodiment of the present application is applied to electronic devices. The electronic device may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device may be a straight screen mobile phone, a folding screen mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in a smart city (smart city), a wireless terminal in a smart home (smart home), etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.
[0052] In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is introduced below.
[0053] Figure 4 1 is a schematic diagram of the structure of an electronic device 100 (taking a mobile phone as an example) provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, an antenna 1, an antenna 2, a mobile communication module 140, a wireless communication module 150, a sensor module 160, a pressure sensor 160A, a touch sensor 160B, a display screen 170, a camera 180, and the like.
[0054] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0055] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (App), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0056] In the embodiment of the present application, when shooting an image or video, when light passes through the lens of the folding screen mobile phone and reaches the image sensor, the processor 110 can control Figure 3 All pixels within the image circle shown in (b) are in working state, converting light signals into electrical signals, which are then converted into digital signals through an internal analog-to-digital converter. The digital signals are then post-processed (post-processing includes correction, white balance, exposure control, adding filters, etc.) and finally displayed on the display.
[0057] The processor 110 may also include a memory for storing instructions and data.
[0058] The wireless communication module 150 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication function of the electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 140, wireless communication module 150, modulation and demodulation processor and baseband processor. Specifically in the embodiment of the present application, the electronic device 100 can be connected to the Bluetooth device through antenna 1, antenna 2, mobile communication module 140, wireless communication module 150, etc., so that the electronic device 100 and the Bluetooth device can realize wireless communication functions.
[0059] The display screen 170 refers to a foldable screen, which is a branch of the flexible screen. The display screen 170 is used to display images, videos, etc.
[0060] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
[0061] The internal memory 121 may be used to store computer executable program codes, where the executable program codes include instructions.
[0062] The pressure sensor 160A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 160A can be disposed on the display screen 170. There are many types of pressure sensors 160A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
[0063] The touch sensor 160B, also known as a "touch panel," can be disposed on the display screen 170. The touch sensor 160B and the display screen 170 form a touch screen, also known as a "touch screen." The touch sensor 160B is used to detect touch operations applied to or near the touch sensor 160B.
[0064] The electronic device 100 can implement a shooting function through an ISP, a camera 293, a video codec, a GPU, a display screen 294, and an application processor.
[0065] This concludes the introduction to the hardware structure of the electronic device 100. It is understood that Figure 2 The components included in the hardware structure shown do not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits. For example, the low-power wake-up receiving module 180 can be integrated in a Bluetooth module, and the Bluetooth module can be integrated in the processor 110. For another example, the Bluetooth module can be integrated in the processor 110, and the low-power wake-up receiving module 180 and the processor 110 are two independent components.
[0066] Furthermore, operating systems run on the above components, such as the iOS operating system developed by Apple, the Android open-source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on these operating systems.
[0067] The operating system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the operating system of the electronic device 100.
[0068] Figure 5 Schematic diagram of the software architecture of electronic device 100 according to an embodiment of the present application. The software architecture comprises several layers, each with distinct roles and divisions of labor, and communication between layers via software interfaces. In some embodiments, the software architecture is divided from top to bottom into the application layer, application framework layer, hardware abstraction layer (HAL), and kernel layer.
[0069] The application layer may include a series of application packages, such as system-level image capture applications (such as cameras), third-party image capture applications (such as photo editing software), image libraries, etc. In some embodiments, the application layer may also include calendars, maps, navigation, Bluetooth, settings, etc., which are not limited in this embodiment of the present application.
[0070] The application framework layer, referred to as the framework layer, provides APIs and programming frameworks for applications in the application layer. The framework layer includes some predefined functions. When the application in the application layer is run, the relevant functions of the application can be implemented by calling the API. For example, Figure 5 As shown, the framework layer may include a camera manager.
[0071] The camera manager is a system service specifically designed to detect and open cameras and retrieve camera device characteristics. It includes the camera Java layer interface, the Java Native Interface (JNI), the camera native framework, and the camera native service. It primarily provides API capabilities to upper layers and calls down to the HAL layer via HIDL. The camera manager also includes the creation of a stream module and Tag 2.
[0072] The stream creation module is used to receive a request from the application layer to create a capture stream and a preview stream, so as to notify the HAL layer to obtain an image stream based on the request.
[0073] Tag 2 is used to mark an object or function point. In the embodiment of the present application, the configuration information of the image can be written into Tag 2. For the explanation of the configuration information of the image, please refer to the following embodiment and will not be repeated here.
[0074] The HAL layer is a package of the Linux kernel driver, providing an interface to the upper layer. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. The HAL layer defines a set of standard interfaces, including the camera HAL. The camera HAL includes Figure 5 The configuration stream module (Configstream) and tag 1 (Tag1) are shown, wherein the configuration stream module user obtains the image stream and outputs the preview image, and tag 1 is configured with the image configuration information. For the explanation of the configuration information, please refer to the embodiment below and will not be repeated here.
[0075] In the HAL layer implementation, the HAL layer is generally divided into two layers: interface layer and OEM layer ( Figure 5 (Not shown) The OEM layer is the lower layer, used to shield different camera hardware; the interface layer is the upper layer, which completes the shielding of the HAL version. The interface layer implements the interface defined by the HAL by calling the external interface of the OEM layer. Different camera hardware must support the external interface provided by the OEM layer. Therefore, the interface layer is unaware of the version of the underlying camera hardware. Similarly, the OEM layer is also unaware of the upper layer's HAL version and Android version.
[0076] The kernel layer is the layer between hardware and software, and can include multiple driver modules, such as camera driver, display driver, audio driver, and sensor driver.
[0077] It is understandable that Figure 5 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown, and each layer may include more or fewer components. For example, the software structure may also include system libraries, etc., and this application does not limit this.
[0078] It is understandable that in order to implement the shooting method in the embodiment of the present application, the electronic device includes hardware and / or software modules that perform the corresponding functions. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments.
[0079] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.
[0080] The execution subject of the shooting method provided in the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and / or functional entity in the electronic device that can implement the shooting method, and the present application solution can be implemented through hardware and / or software. The specific implementation can be determined according to actual usage requirements and is not limited by the embodiment of the present application.
[0081] Below, taking the electronic device being a foldable screen mobile phone as an example, the application scenarios of the shooting method provided in the embodiment of the present application are introduced in conjunction with the accompanying drawings.
[0082] Please refer to Figure 6 , Figure 6 This is a schematic diagram of using a mobile phone to capture an image provided in an embodiment of the present application. Figure 6 The interface 610 shown in (a) is the main interface of the folding screen mobile phone in the unfolded state, and the interface 610 includes an icon 611. The user can click on the icon 611, and the mobile phone responds to the user's operation of clicking the icon 611, and the mobile phone displays the following Figure 6 The interface 620 shown in (b) includes a preview box 622 of a default aspect ratio, wherein the default aspect ratio is the ratio of the length of 622A to the width of 622B, which is 4:3. The interface 620 includes a control 621. The user can click on the control 621, and the mobile phone displays the following in response to the user's operation of clicking on the control 621: Figure 6 In the interface 630 shown in (c), the interface 630 includes an option 631, which is used to indicate the photo ratio. The default photo ratio is 4:3. The user can click on the option to switch the photo ratio. For example, the user can click on the option 631, and the mobile phone will display the following in response to the user clicking on the option 631: Figure 6 The interface 640 shown in (d) includes an option box 641, which includes multiple different options. Each option corresponds to a photo ratio. For example, the photo ratio can be 4:3, 1:1, full screen, etc., where the full screen ratio can be 3:4, etc. In other embodiments, the option box can also include more or fewer photo ratios. For example, the option box includes a photo ratio of 16:9, and the full screen ratio can also be other ratios, such as a full screen ratio of 19.5:9, etc.
[0083] When the user wants to switch the default photo ratio to another photo ratio, such as full screen ratio, the user can click the full screen ratio option in the option box. For example, please refer to Figure 7 , Figure 7This is another schematic diagram of utilizing captured images provided in an embodiment of the present application. Figure 7 The interface 710 shown in (a) includes an option box 642. The user can click on the option 642 included in the option box 642. In response to the user clicking on the option 642, the mobile phone displays the following information: Figure 7 The interface 720 shown in (b) includes a preview box 721 with a full-screen ratio. The full-screen ratio refers to the ratio of the length of 721A to the length of 721B, which is 3:4. The preview box 721 includes a preview image. The interface 720 also includes a "shutter" control 722. The user can click the control 722. In response to the user clicking the control 722, the mobile phone captures the image based on the full-screen ratio and displays it. Figure 7 The interface 730 shown in (c) includes a thumbnail 731. The user can click on the thumbnail 731, and the mobile phone displays the following in response to the user clicking on the thumbnail 731: Figure 7 FIG. 7 shows an interface 740 shown in (d), which includes capturing an image based on a full-screen ratio.
[0084] In the embodiment of the present application, when the folding screen mobile phone takes an image, the folding screen mobile phone is based on Figure 3 The image captured by the folding screen mobile phone is based on the pixels in the photosensitive area of the image sensor in the lens image circle shown in (b). The captured image includes the pixels in the photosensitive area of the image sensor in the lens image circle. Compared with the related solution, the image captured by the folding screen mobile phone only includes Figure 3 The pixels in the effective photosensitive area B shown in (a) can increase the number of pixels in the image captured by the folding screen mobile phone, improve the image resolution, and enhance the user experience. In addition, when the folding screen mobile phone takes pictures using the shooting method provided in the embodiment of the present application, the increase in the number of pixels leads to a larger framing range of the final image. For example, please refer to Figure 8 , Figure 8 This is an example image taken by a foldable screen mobile phone provided in an embodiment of the present application. Figure 8 (a) and (b) are images taken by a user using a foldable phone to shoot object A at the same position. Figure 8 (a) is an image obtained based on the shooting method in the related scheme. Figure 8 (b) is an image captured based on the shooting method provided in the embodiment of the present application, Figure 8 From (a) and (b) in FIG. 1 , it can be seen that the images obtained by the shooting method provided by the embodiment of the present application are Figure 8 The image (b) has a larger number of pixels. Figure 8The image (b) includes the photographed objects A and B. The image photographed using the method provided in the embodiment of the present application contains more photographed objects than the image photographed using the related scheme. Therefore, the method provided in the embodiment of the present application can improve the image's framing range and enhance the user experience.
[0085] The above embodiments introduce the application scenarios of the shooting method provided by the embodiments of the present application. Figure 5 The software architecture shown introduces the implementation process of the shooting method provided in the embodiment of the present application.
[0086] Please refer to Figure 9 , Figure 9 9 is a timing diagram of a shooting method provided in an embodiment of the present application. The method includes steps 910 to 970.
[0087] Step 910: During the initialization process of the mobile phone, the camera application installed in the mobile phone obtains configuration information in the HAL layer.
[0088] It should be understood that the initialization operation can be performed after the mobile phone is activated (first power-on), or after each power-on, or when the system is updated, or when the factory settings are restored, or when the mobile phone runs an application that can capture images. This application does not limit the triggering operation that triggers the mobile phone to initialize.
[0089] It should also be understood that the application installed in the mobile phone that can take pictures can be a system-level application such as a camera, or a third-party application such as a photo editing software.
[0090] It is also understandable that when a system-level application or a third-party application in the application layer wants to call the camera hardware for shooting, it must first obtain the image configuration information before it can issue a reasonable request within the camera's capabilities so that the camera hardware can support the needs of the upper-level camera application.
[0091] The HAL layer includes a pre-configured tag 1, which contains image configuration information, including aspect ratio, pixel count, and other information. Tag 1 is a private tag and can be directly called by system-level applications, but not by third-party applications.
[0092] It should be understood that the aspect ratio in the image configuration information is related to the form of the foldable screen mobile phone. For example, when the mobile phone is in the folded state, the aspect ratio configured in the configuration information includes but is not limited to 4:3, 1:1, 16:9, etc., among which 16:9 can be considered as the full-screen ratio of the mobile phone when the mobile phone is in the folded state. When the mobile phone is in the unfolded state, the aspect ratio configured in the configuration information includes but is not limited to 4:3, 1:1, 16:9, 3:4, etc., among which 3:4 can be considered as the full-screen ratio of the mobile phone when the mobile phone is in the unfolded state.
[0093] It can also be understood that foldable screen mobile phones can be divided into folded state, unfolded state and semi-folded state according to their shape. The folded state refers to the shape of the mobile phone fully folded, the unfolded state refers to the shape of the mobile phone fully unfolded, and the semi-folded state refers to the shape of the mobile phone between the folded state and the unfolded state. The semi-folded state can also be called the hovering state.
[0094] It can also be understood that no matter what form the mobile phone is in, the pixels corresponding to its aspect ratio are the same. For example, the commonly used pixels in an image with an aspect ratio of 4:3 are: 12032*9024, 4032*3024, 3456*2592. These pixels are different due to the different sizes of the image sensor. The camera target surface of the image sensor includes 12032*9024 pixels, so the commonly used pixels in an image with an aspect ratio of 4:3 are 12032*9024. The camera target surface of the image sensor includes 4032*3024 pixels, so the commonly used pixels in an image with an aspect ratio of 4:3 are 4032*3024. This embodiment of the present application does not limit this. The embodiment of the present application uses the example of 12032*9024 pixels corresponding to an aspect ratio of 4:3. The pixels in an image with an aspect ratio of 1:1 can be: 3008*3008. The pixels in an image with an aspect ratio of 16:9 may be 3840*2160. The pixels in an image with an aspect ratio of 3:4 may be 4512*6016. The above pixels are merely exemplary and do not constitute a limitation of the present application.
[0095] For example, the image configuration information may refer to Table 1:
[0096] Table 1
[0097]
[0098]
[0099] In Table 1, the pixels in the pixel column refer to the pixels in the image circle on the camera target surface, such as Figure 3 For the pixels within the black circle shown in (b), N is an integer greater than 1, and the specific value of N is not limited in this embodiment of the application.
[0100] In the implementation, system-level applications or third-party applications in the application layer can call the metadate public interface in the framework layer to write the configuration information in tag 1 to tag 2 in the framework layer. In addition, tag 2 in the framework layer is a public tag, which means that tag 2 can be called by the phone's system applications, such as the camera, and can also be called by other third-party applications, such as photo editing software. Afterwards, the application layer reads the data in tag 2 in the framework layer through a key function provided by the camera manager (CameraManager), namely camera characteristics (CameraCharacteristics). That is to say, CameraCharacteristics can carry a large amount of image configuration information, so that both system-level applications and third-party applications can obtain the configuration information in the HAL layer.
[0101] In step 920, the application layer detects the shape of the foldable screen mobile phone and determines the aspect ratio and pixels corresponding to the shape in the configuration information.
[0102] In implementation, the application layer can monitor the physical size of the display screen through a monitoring function, and detect the form of the folding screen mobile phone by monitoring the physical size of the display screen. Specifically, the application layer can first obtain the physical size of the display screen when the mobile phone is in the folded state, and then monitor the physical size of the display screen. Assuming that the physical size of the display screen monitored is the same as the physical size of the display screen when the mobile phone is in the folded state, then it is detected that the mobile phone is in the folded state. Assuming that the physical size of the display screen monitored is larger than the physical size of the display screen when the mobile phone is in the folded state, and the difference between the physical size of the display screen monitored and the physical size of the display screen when the mobile phone is in the folded state is threshold 1, and the threshold 1 refers to the difference between the physical size of the display screen when the mobile phone is in the unfolded state and the physical size of the display screen when the mobile phone is in the folded state. The embodiment of the present application does not limit the specific value of threshold 1, then it is detected that the mobile phone is in the unfolded state. Assuming that the physical size of the display screen monitored is larger than the physical size of the display screen when the mobile phone is in the folded state, and the difference between the physical size of the display screen monitored and the physical size of the display screen when the mobile phone is in the folded state is less than threshold 1, then it is detected that the mobile phone is in the semi-folded state. The above-mentioned method of detecting the shape of a foldable screen mobile phone is only an exemplary description. In some embodiments, the shape of a foldable screen mobile phone can also be detected by other detection methods, and the embodiments of the present application are not limited to this.
[0103] Assuming that the state of the mobile phone detected by the application layer is the unfolded state, the aspect ratio and pixels corresponding to the unfolded state can be determined by referring to the aspect ratio and pixels corresponding to the unfolded state shown in Table 1.
[0104] In step 930 , the application layer detects user operation 1 , and in response to user operation 1 , determines in the configuration information an aspect ratio 1 corresponding to user operation 1 and a pixel 1 corresponding to aspect ratio 1 .
[0105] User action 1 can be a user click Figure 6 Option 642 shown in (d) Figure 6 The interface 630 shown in (d) is the interface when the mobile phone is in the unfolded state. As can be seen from option 642, the aspect ratio selected by the user is the full screen ratio. For example, if the full screen ratio is 3:4, then the full screen ratio is aspect ratio 1.
[0106] The application layer may determine pixel 1 corresponding to aspect ratio 1 in the configuration information. For example, the determined pixel 1 is pixel 3N*4N corresponding to aspect ratio 3:4 in Table 1.
[0107] In step 940 , the application layer sends a request 1 (which carries pixel 1) to create a capture stream and a preview stream to the framework layer based on pixel 1 corresponding to aspect ratio 1.
[0108] It should be understood that request 1 is used to instruct the mobile phone to display a preview image of the aspect ratio selected by the user.
[0109] It can also be understood that after determining the aspect ratio 1 and pixel 1, the application layer generates a request 1 for creating a capture stream and a preview stream based on pixel 1, and then the application layer sends the request 1 to the framework layer.
[0110] Step 950 : After receiving request 1 , the create stream module in the framework layer notifies the configure stream module in the HAL layer to obtain the image stream based on request 1 .
[0111] Step 960: The configuration stream module in the HAL layer outputs the preview image.
[0112] It should be understood that after the framework layer notifies the configuration stream module in the HAL layer to obtain the image stream based on request 1, the configuration stream module obtains the image stream based on the carried pixel 1 in request 1, that is, fills the preview frame into the surface used to draw the preview image, and then outputs the preview image.
[0113] In the implementation, for example, it is assumed that the aspect ratio 1 is Figure 3 (f) shows a 3:2, pixel 1 is Figure 3 9*6 shown in (f), then the framework layer notifies the configuration stream module in the HAL layer based on request 1 (the pixel 1 carried in the request 1 includes the position information of pixel 1, such as Figure 3 The 9*6 position information shown in (f) is the pixels from the 4th to the 12th row and the 4th to the 9th column on the camera target surface) After acquiring the image stream, the configuration stream module can be controlled by the sensor driver of the kernel layer. Figure 3 The pixels in the 4th to 12th rows and the 4th to 9th columns (a total of 54 pixels) in the image circle on the camera target surface shown in (f) are in working state. These 54 pixels convert the optical signal into an electrical signal, which is then converted into a digital signal by the analog-to-digital converter inside the mobile phone. The digital signal is then post-processed and a preview image is output. The post-processing can also include a scaling process, which is used to instruct the mobile phone to scale the image to the same size as the preview frame. The preview image can refer to the image in the preview frame 721 shown in (b) in 7, and the aspect ratio of the preview image is 1.
[0114] In step 970 , the application layer in the mobile phone detects user operation 2 . In response to user operation 2 , the mobile phone captures an image with an aspect ratio of 1 and displays the image.
[0115] It should be understood that user operation 2 can be a user clicking Figure 7 In response to user operation 2, the application layer can call the camera to capture the preview image corresponding to user operation 2, fill it into the surface used to draw the image, and store the image. So that the user can display the image when viewing it. The displayed image can refer to Figure 7 The image shown in (d).
[0116] In the related solution, when the preview image is output in step 950, it is based on the effective photosensitive area of the image sensor of the mobile phone (such as Figure 3 In the embodiment of the present application, the preview image is output based on the pixels in the effective photosensitive area B) and the frame ratio 1 shown in (a). In this way, the image displayed in step 960 only includes the image in the effective photosensitive area B. When the preview image is output in step 950 in the embodiment of the present application, the preview image is output based on the pixels in the photosensitive area within the image circle on the image sensor (such as shown in (b) in Image 3) and the frame ratio 1. In this way, the image displayed in step 960 includes the pixels in the photosensitive area within the image circle. The image displayed in the embodiment of the present application includes more pixels than the image displayed in the related scheme. The present application and the related scheme are both schemes applied to foldable screen mobile phones. The size of the captured image can be considered to be the same. Therefore, the resolution of the image captured by the embodiment of the present application is higher than the resolution of the image captured by the related scheme (resolution refers to the ratio of the number of pixels to the image size), which can improve the resolution of the captured image and improve the user experience. Moreover, since the image captured by the embodiment of the present application has more pixels than the image captured by the related scheme, the image captured by the method provided by the embodiment of the present application contains more objects than the image captured by the related scheme. Therefore, the method provided by the embodiment of the present application can improve the framing range of the image and enhance the user experience.
[0117] A shooting method provided in an embodiment of the present application is introduced below with reference to the accompanying drawings.
[0118] Please refer to Figure 10 , Figure 10 This is a schematic flow chart of a shooting method provided by an embodiment of the present application. Figure 4 The electronic device 100 shown here may also be executed by a processor or chip in the electronic device 100, and the present application does not impose any limitation thereto. For ease of description, the method is described in detail using an electronic device as an example. The method includes steps 1010 to 1020.
[0119] In step 1010 , the electronic device displays a first interface, which includes a preview box and a first control.
[0120] The electronic device in the embodiment of the present application can be a straight-screen mobile phone, a folding-screen mobile phone, a curved-screen mobile phone, etc., and the embodiment of the present application does not limit this.
[0121] Electronic devices are equipped with lenses and image sensors. The lens, based on the principle of light refraction, can focus light from the subject to form an image. An image sensor, also known as a photosensitive element, is a device that converts optical images into electronic signals.
[0122] In the embodiment of the present application, the image circle diameter of the lens is smaller than the diagonal length of the camera target surface of the image sensor. For the explanation of the image circle and the camera target surface, please refer to the above embodiment and will not be repeated here. For example, please refer to Figure 2 , Figure 2 Here, S2 represents the diagonal length of the camera target surface, and I2 represents the image circle diameter. I2 is smaller than S2.
[0123] In the embodiment of the present application, the image circle on the camera target surface includes first-class pixels and second-class pixels. The first-class pixels are pixels in the first photosensitive area, which is a photosensitive area with a preset aspect ratio in the image circle. The second-class pixels are pixels in the area of the image circle other than the first photosensitive area. For example, please refer to Figure 2 The first type of pixels may be pixels within the black circle area within the image circle. For ease of description, the black circle area is referred to as the first photosensitive area, and the aspect ratio of the area is a preset ratio. In some embodiments, the preset ratio may be 4:3, for example, Figure 2 The area where the black circle is located has 8 pixels in the length direction and 6 pixels in the width direction, and its aspect ratio is 4:3. The second type of pixels can be Figure 2 The pixels included in the area outside the black circle in the image circle are shown. For example, please refer to Figure 3In (b), the first type of pixels and the second type of pixels included in the image circle on the camera target surface can be the sum of the pixels represented by the black circles in the image circle.
[0124] It should be understood that the first interface can refer to Figure 7 The first control can refer to the interface 720 shown in (b). Figure 7 The first control is used to instruct the electronic device to take a picture. The preview box can refer to Figure 7 The preview frame includes the first image, which can be referenced by Figure 7 The image included in 721 shown in (b) of FIG. The aspect ratio of the first image is a first ratio, and the first ratio is different from the preset ratio. For example, assuming that the electronic device is configured with multiple aspect ratios, such as 4:3, 1:1, 16:9, and 3:4, and the preset ratio is 4:3, then the first ratio can be one of 1:1, 16:9, and 3:4.
[0125] It should also be understood that the first image includes pixels of the first category and pixels of the second category. Figure 7 The image shown in (b) includes Figure 3 The black circles in the image circle shown in (b) represent the pixels.
[0126] Step 1020: The electronic device displays a second interface in response to an operation on the first control, where the second interface includes the first image.
[0127] It should be understood that the second interface can refer to Figure 7 Interface 740 is shown in (d).
[0128] In the implementation, for example, the user can click Figure 7 (c) includes a control 722, and the electronic device displays in response to the operation of the control 722. Figure 7 (c) shows an interface 730, which includes a thumbnail 731. The user can click on the thumbnail 731, and the electronic device displays the thumbnail 731 in response to the user clicking on the thumbnail 731. Figure 7 FIG. 7 shows an interface 740 shown in FIG. 7 (d), which includes a first image.
[0129] In other embodiments, the second interface may also refer to a gallery interface, which includes the first image, and the user can view the first image in the gallery interface.
[0130] In the related solution, the image captured by the user only contains pixels within the effective photosensitive area (for example, the image captured by the user only contains Figure 2The black circles shown represent pixels), because the size of the effective photosensitive area of the foldable screen mobile phone is smaller than the size of the camera target surface of the foldable screen mobile phone, the number of pixels included in the effective photosensitive area is smaller than the number of pixels included in the camera target surface. Usually, the image size taken by the foldable screen mobile phone is larger, which leads to the lower resolution of the image taken by the foldable screen mobile phone in the related scheme (the image resolution is obtained by the ratio of the number of pixels to the image size), which affects the user experience.
[0131] In the embodiment of the present application, when the diameter of the image circle of the lens is smaller than the diagonal length of the camera target surface of the image sensor, the image obtained by the electronic device after shooting includes the first type of pixels (the first type of pixels are pixels in the first photosensitive area, and the first photosensitive area is a photosensitive area in the image circle with a preset aspect ratio, for example, the first type of pixels are Figure 2 The black circles shown represent pixels) and the second type of pixels (for example, the second type of pixels can be Figure 2 The white circles in the image circle except the black circles represent the pixels), compared with the related solutions in which the image taken by the user only includes the pixels in the effective photosensitive area (for example, the image taken by the user only includes Figure 2 The black circles shown represent pixels), which can increase the number of pixels in the captured image. Usually, when shooting images with the same aspect ratio, the image size of the related scheme and the present application is the same. In this way, since the present application can increase the number of pixels in the captured image, the image resolution can be improved (the image resolution is obtained by the ratio of the number of pixels to the image size), thereby improving the user experience.
[0132] Moreover, since the present application can increase the number of pixels in the captured image, the image captured using the method provided in the embodiment of the present application contains more objects than the image captured using the related scheme. Therefore, the method provided in the embodiment of the present application can increase the framing range of the image and improve the user experience.
[0133] In some embodiments, before the electronic device displays the first interface, the method further includes:
[0134] The electronic device determines a target group pixel set corresponding to the first ratio according to the first ratio and the first corresponding relationship.
[0135] It should be understood that the meaning of the first ratio has been stated in the above embodiment and will not be repeated here.
[0136] It should also be understood that the first correspondence is used to indicate the correspondence between multiple aspect ratios and multiple pixel sets, with one aspect ratio corresponding to one pixel set. For example, when the electronic device is a straight screen mobile phone or a curved screen mobile phone, the first correspondence can refer to Table 2:
[0137] Table 2
[0138] Aspect Ratio Pixel 4:3 4N*3N 1:1 4N*4N 16:9 4N*(9 / 4)N 3:4 3N*4N
[0139] Among them, multiple aspect ratios can be 4:3, 1:1, 16:9 and 3:4, etc. Each aspect ratio corresponds to a set of pixels. For example, a set of pixels corresponding to 4:3 is 4N*3N, and a set of pixels corresponding to 1:1 is 4N*4N, where N is an integer greater than 1.
[0140] In the case where the electronic device is a foldable screen mobile phone, the first corresponding relationship refers to the corresponding relationship in one of the multiple forms of the foldable screen mobile phone. Please refer to Table 1 mentioned above. It can be seen from Table 1 that foldable screen mobile phones have multiple forms, such as folded state, unfolded state and semi-folded state. There is a corresponding relationship in each form. For example, when the mobile phone is in the folded state, the multiple aspect ratios are 4:3, 1:1, and 16:9. Each aspect ratio corresponds to a set of pixels. For example, a set of pixels corresponding to 4:3 is 4N*3N, a set of pixels corresponding to 1:1 is 4N*4N, and 16:9 corresponds to 4N*(9 / 4)N. The corresponding relationship when the mobile phone is in the unfolded state and the semi-folded state can be referred to Table 1 and will not be repeated here. The first corresponding relationship can be the corresponding relationship in one of the three forms in Table 1, for example, it can be the corresponding relationship in the unfolded state.
[0141] It should also be understood that the first ratio is one of multiple aspect ratios, and the first ratio is not a preset ratio. For example, assuming the preset ratio is 4:3, the first ratio can be one of the three ratios other than 4:3 among the four aspect ratios shown in Table 2: 1:1, 16:9, and 3:4. For another example, assuming the preset ratio is 4:3 and the first correspondence is the correspondence in the expanded state shown in Table 1, the first ratio can be one of the three ratios other than 4:3 among the four aspect ratios in the expanded state: 1:1, 16:9, and 3:4.
[0142] It can also be understood that the target group pixel set is one of the multiple pixel sets, the aspect ratio of the target group pixel set on the camera target plane is a first ratio, and the target group pixel set includes first-type pixels and second-type pixels. For example, the first ratio can be one of the three ratios 1:1, 16:9, and 3:4, other than 4:3, among the four aspect ratios shown in Table 2. The target group pixel set can then be one of the pixel set 4N*4N corresponding to 1:1, the pixel set 4N*(9 / 4)N corresponding to 16:9, and the pixel set 3N*4N corresponding to 3:4.
[0143] It should also be understood that the area of each pixel set in the camera target surface is located within the image circle. For example, the pixels in each pixel set are located Figure 2 Shown inside the image circle.
[0144] In implementation, assuming that the first ratio is 3:4, the electronic device can query the pixel set corresponding to 3:4 in the first correspondence, such as the correspondence in Table 2 or the folded state in Table 1, and determine the queried pixel set corresponding to 3:4 (for example, the pixel set is 3N:4N) as the target group pixel set.
[0145] Furthermore, the electronic device displays a first interface, including:
[0146] The electronic device displays the first image in the preview frame based on the target group pixel set.
[0147] During implementation, the electronic device may control each pixel to convert the optical signal into an electrical signal based on the position information of each pixel in the target group pixel set, so as to display the first image in the preview frame.
[0148] It should be understood that the above correspondence refers to the correspondence between multiple aspect ratios and multiple pixel sets. In some embodiments, the correspondence also includes the position information of each pixel set, for example, the correspondence also includes the coordinates of each pixel set in the camera target surface. For example, please refer to Figure 3 In (d), a set of pixels includes 10 rows by 8 columns of pixels in the image circle, so the position coordinates can be the coordinates of the pixels in the 4th to 13th rows and the 3rd to 10th columns on the camera target surface. The pixel in the first row and the first column can be used as the coordinate origin, the length direction is the positive direction of the X axis, and the width direction is the square of the Y axis. Then the coordinates of a pixel in the 10 rows by 8 columns of pixels, such as the coordinates of the 5th row and the 8th column, can be expressed as (5, 8).
[0149] The electronic device can obtain the position information of each pixel in the target group pixel set from the corresponding relationship, and then control each pixel to convert the optical signal into an electrical signal based on the position information of each pixel in the target group pixel set to display the first image in the preview frame.
[0150] In the embodiment of the present application, since the first relationship is used to indicate the correspondence between multiple frame ratios and multiple groups of pixel sets, the electronic device can accurately determine the target group pixel set corresponding to the first ratio based on the first ratio and the first correspondence, thereby improving the accuracy of determining the target group pixel set.
[0151] In some embodiments, the electronic device is an electronic device with a foldable screen, and the electronic device has multiple forms; and before the electronic device determines the target pixel set corresponding to the first ratio based on the first ratio and the first correspondence, the method further includes:
[0152] The electronic device detects a target form of the electronic device, where the target form is one of multiple forms; the electronic device determines a first correspondence corresponding to the target form of the electronic device, where the first correspondence is one of multiple correspondences, and one of the multiple correspondences is used to indicate a correspondence between multiple aspect ratios and multiple pixel sets under a form of the electronic device.
[0153] It should be understood that the various forms of the electronic device may include the folded state, semi-folded state, and unfolded state mentioned above. The target form may be one of the folded state, semi-folded state, and unfolded state. For example, the target form may be the unfolded state. The multiple corresponding relationships may include the corresponding relationship for the folded state, the corresponding relationship for the semi-folded state, and the corresponding relationship for the unfolded state in Table 1.
[0154] It should also be understood that electronic devices include a hardware abstraction layer, e.g., an electronic device includes Figure 5 The HAL layer shown. Multiple correspondences are stored in the hardware abstraction layer. For example, multiple correspondences can be stored in Figure 5 The HAL layer is shown in tag 1.
[0155] The manner in which the electronic device detects the target form of the electronic device can be referred to in the above embodiments and will not be described in detail here.
[0156] In implementation, the process of the electronic device determining the first correspondence corresponding to the target form of the electronic device can be: for example, the target form is the unfolded state, and the electronic device can query the correspondence under the unfolded state in Table 1. For example, the correspondence under the unfolded state in Table 1 has multiple aspect ratios of 4:3, 1:1, 16:9 and 3:4, among which the pixel set corresponding to 4:3 is 4N*4N, the pixel set corresponding to 1:1 is 4N*4N, the pixel set corresponding to 16:9 is 4N*(9 / 4)N, and the pixel set corresponding to 3:4 is 3N*4N.
[0157] In an embodiment of the present application, when the electronic device is an electronic device with a foldable screen, since the electronic device has multiple forms, the electronic device can detect the target form of the electronic device, and thus can determine a first corresponding relationship from multiple corresponding relationships based on the target form, which can improve the accuracy of the determined first relationship.
[0158] In some embodiments, the electronic device determines, based on the first ratio and the first correspondence, a target group pixel set corresponding to the first ratio, including:
[0159] The electronic device displays a third interface, the third interface including a plurality of options, the plurality of options being used to indicate a plurality of aspect ratios in the first corresponding relationship, the plurality of options including a first option, the first option being used to indicate a first ratio among the plurality of aspect ratios;
[0160] In response to an operation on the first option, a target pixel set corresponding to the first ratio is determined according to the first ratio and the first corresponding relationship.
[0161] It should be understood that the third interface can refer to Figure 6 The interface 640 shown in (d) in FIG. 640. The multiple options may be a 4:3 option, a 1:1 option, and a full-screen option 642 included in the interface 640. In the case where the electronic device is a foldable screen mobile phone, the aspect ratio indicated by the full-screen option in the unfolded state may be 3:4, the aspect ratio indicated by the full-screen option in the folded state may be 16:9, and the aspect ratio indicated by the full-screen option in the semi-folded state may be 1:1. In the case where the electronic device is a straight-screen mobile phone, the aspect ratio indicated by the full-screen option may be 16:9. The embodiment of the present application takes the example that the electronic device is a foldable screen mobile phone and the aspect ratio indicated by the full-screen option may be 3:4.
[0162] In the implementation, it is assumed that the user Figure 7 In the interface 710 shown in (a), option 642 is clicked. At this time, the first option is option 642, and the first ratio is 3:4. In response to the user clicking option 642, the electronic device can determine the target pixel set corresponding to the first ratio based on the first ratio and the first correspondence. The implementation method of determining the target pixel set corresponding to the first ratio based on the first ratio and the first correspondence can be referred to in the above embodiment and will not be repeated here.
[0163] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0164] The present application provides a computer program product that, when executed on an electronic device, enables the electronic device to execute the technical solution in the above embodiment. The implementation principle and technical effects are similar to those of the above method-related embodiments and will not be described in detail here.
[0165] The embodiment of the present application provides a readable storage medium, which contains instructions. When the instructions are executed on an electronic device, the electronic device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0166] The present application provides a chip for executing instructions. When the chip is running, the technical solution of the above embodiment is executed. The implementation principle and technical effect are similar and will not be described here.
[0167] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0168] It should be understood that the “embodiment” mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0169] Those skilled in the art will understand that the various numerical numbers such as first and second involved in this application are only for the convenience of description and are not used to limit the scope of the embodiments of this application, and also indicate the order of precedence.
[0170] In this application, elements expressed in the singular are intended to mean "one or more" rather than "one and only one" unless otherwise specified. In this application, unless otherwise specified, "at least one" is intended to mean "one or more" and "a plurality" is intended to mean "two or more."
[0171] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A can be singular or plural, and B can be singular or plural.
[0172] The term "at least one of..." in this document refers to all or any combination of the listed items. For example, "at least one of A, B and C" can mean: A exists alone, B exists alone, C exists alone, A and B exist at the same time, B and C exist at the same time, and A, B and C exist at the same time. A can be singular or plural, B can be singular or plural, and C can be singular or plural.
[0173] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0174] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0175] The same or similar parts between the various embodiments in this application can refer to each other. In the various embodiments in this application, and the various implementation methods / implementation methods / implementation methods in each embodiment, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment can be combined to form new embodiments, implementation methods, implementation methods, or implementation methods according to their inherent logical relationships. The above-described implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0176] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims. In short, the above is only a preferred embodiment of the technical solution of the present application, and is not used to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A shooting method, applied to an electronic device, wherein the electronic device is equipped with a lens and an image sensor, wherein the image circle diameter of the lens is smaller than the diagonal length of the camera target surface of the image sensor, and the image circle on the camera target surface includes first-type pixels and second-type pixels, wherein the first-type pixels are pixels within a first photosensitive area, which is a photosensitive area within the image circle having a preset aspect ratio, and the second-type pixels are pixels within an area within the image circle other than the first photosensitive area. The method comprises: Displaying a first interface, the first interface including a preview box and a first control, the first control being used to instruct the electronic device to shoot, the preview box including a first image, the first image having a first aspect ratio that is different from the preset aspect ratio, and the first image including the first type of pixels and the second type of pixels; In response to an operation on the first control, a second interface is displayed, where the second interface includes the first image.
2. The method according to claim 1, characterized in that Before displaying the first interface, the method further includes: Determining, according to the first ratio and a first correspondence, a target group pixel set corresponding to the first ratio, wherein the first correspondence is used to indicate a correspondence between multiple frame ratios and multiple pixel sets, where one frame ratio corresponds to one pixel set, the first ratio is one of the multiple frame ratios, the target group pixel set is one of the multiple pixel sets, an area of each pixel set on the camera target surface is located within the image circle, an aspect ratio of an area of the target group pixel set on the camera target surface is the first ratio, and the target group pixel set includes the first type of pixels and the second type of pixels; Furthermore, displaying the first interface includes: Based on the target group of pixels, the first image is displayed in the preview frame.
3. The method according to claim 2, characterized in that The electronic device is an electronic device having a foldable screen, and the electronic device has multiple forms; and before determining the target pixel set corresponding to the first ratio based on the first ratio and the first corresponding relationship, the method further includes: detecting a target form of the electronic device, the target form being one of the multiple forms; Determine the first correspondence corresponding to the target form of the electronic device, where the first correspondence is one of multiple correspondences, and one correspondence among the multiple correspondences is used to indicate the correspondence between the multiple aspect ratios and the multiple pixel sets under a form of the electronic device.
4. The method according to claim 2 or 3, characterized in that The step of determining, based on the first ratio and the first corresponding relationship, a target group pixel set corresponding to the first ratio includes: Displaying a third interface, the third interface including a plurality of options, the plurality of options being used to indicate the plurality of aspect ratios in the first corresponding relationship, the plurality of options including a first option, the first option being used to indicate the first aspect ratio among the plurality of aspect ratios; In response to an operation on the first option, a target group pixel set corresponding to the first ratio is determined according to the first ratio and the first corresponding relationship.
5. The method according to any one of claims 2 to 4, characterized in that The displaying the first image in the preview frame based on the target group pixel set includes: Based on the position information of each pixel in the target group of pixels, each pixel is controlled to convert an optical signal into an electrical signal, so as to display the first image in the preview frame.
6. The method according to any one of claims 3 to 5, characterized in that The electronic device includes a hardware abstraction layer, and the multiple corresponding relationships are stored in the hardware abstraction layer.
7. The method according to any one of claims 1 to 6, characterized in that The preset ratio is 4:
3.
8. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 7.
10. A chip, characterized in that: The chip includes: a memory for storing instructions; A processor is configured to call and execute the instructions from the memory, so that an electronic device equipped with the chip executes the method according to any one of claims 1 to 7.