Image capturing and displaying method, device, electronic device and readable storage medium
By receiving and processing position information during shooting and viewing, and adjusting the image display direction, the problem of poor image visual effects is solved, and visual consistency and user experience are improved.
Patent Information
- Application Number
- CN202210724390.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-06-23
AI Technical Summary
Users often have poor visual effects when viewing images, especially image distortion caused by inconsistent shooting and viewing angles.
By receiving and processing the relative position information of objects and devices during image shooting, combining the relative position information of objects and devices during viewing, adjusting the display direction of the image to match the viewer's perspective, achieving flexible display of the image.
Improves the visual effect of the image when displayed, so that it is consistent with the visual effect when shooting, and improves the user's browsing experience.
Smart Images

Figure CN115118879B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to an image capturing and displaying method, device, electronic device and readable storage medium. Background Art
[0002] In recent years, the shooting function has become one of the main functions of electronic devices, and users often use the shooting function to record their daily lives.
[0003] In the related art, when users shoot images, they usually adjust the shooting angle to compose the image before shooting. However, when users view the image displayed on the display screen, there is a distortion phenomenon, that is, the visual effect is poor when viewing the image. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image capturing and displaying method, device, electronic device and readable storage medium to solve the problem of poor visual effect when viewing images.
[0005] In a first aspect, an embodiment of the present application provides an image display method, the method comprising: receiving a first input for an identification of a first image, and displaying the first image in response to the first input based on first parameters and second parameters; wherein the first parameter comprises: relative position information of the first object and the first electronic device; and the second parameter comprises: relative position information of the second object and the second electronic device.
[0006] In a second aspect, an embodiment of the present application provides an image display device, comprising: a first receiving module and a display module, wherein: the first receiving module is used to receive a first input for an identification of a first image; the display module is used to display the first image based on first parameters and second parameters in response to the first input received by the first receiving module; wherein the first parameter comprises: relative position information between the first object and the first electronic device; and the second parameter comprises: relative position information between the second object and the second electronic device.
[0007] In a third aspect, an embodiment of the present application provides an image capturing method, the method comprising: receiving a second input from a user; in response to the second input, capturing a first image through a first electronic device and obtaining a first parameter, wherein the first parameter comprises relative position information of a first object and the first electronic device; and storing the first image and the first parameter in association with each other.
[0008] In a fourth aspect, an embodiment of the present application provides an image capturing device, comprising: a second receiving module, a second acquisition module and a storage module, wherein: the second receiving module is used to receive a second input from a user; the second acquisition module is used to capture a first image through a first electronic device in response to the second input received by the second receiving module, and acquire a first parameter, wherein the first parameter includes relative position information of the first object and the first electronic device; the storage module is used to store the first image acquired by the acquisition module in association with the first parameter.
[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect or the third aspect are implemented.
[0010] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the third aspect are implemented.
[0011] In the seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect or the third aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the third aspect.
[0013] In an embodiment of the present application, an image display device receives a first input from a user for an identification of a first image, and displays the first image based on a first parameter and a second parameter, wherein the first parameter includes: relative position information between a first object and a first electronic device, and the second parameter includes: relative position information between a second object and a second electronic device. Through this method, when viewing the first image, the image display device can display the first image based on the relative position information between the second object and the second electronic device, as well as the relative position information between the first object and the first electronic device. In this way, when displaying the first image, the first image can be flexibly displayed based on the relative position information between the object and the electronic device, thereby improving the visual effect when displaying the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is one of the flowcharts of the image display method provided in the embodiment of the present application;
[0015] Figure 2 This is the second flow chart of the image display method provided in the embodiment of the present application;
[0016] Figure 3 This is the third flow chart of the image display method provided in the embodiment of the present application;
[0017] FIG. 4( a ) is one of the interface schematic diagrams of the image display method provided in an embodiment of the present application;
[0018] FIG4( b ) is a second schematic diagram of an interface of an image display method provided in an embodiment of the present application;
[0019] Figure 5 It is one of the schematic diagrams of the face direction angle of the face image provided by the embodiment of the present application;
[0020] Figure 6 This is the second schematic diagram of the face direction angle of the face image provided by the embodiment of the present application;
[0021] Figure 7 One of the flowcharts of the image capturing method provided in the embodiment of the present application;
[0022] Figure 8 A second flowchart of the image capturing method provided in an embodiment of the present application;
[0023] Fig. 9 Flow chart 3 of the image capturing method provided in the embodiment of the present application;
[0024] Fig.10 is a structural schematic diagram of an image display device provided in an embodiment of the present application;
[0025] Fig.11 is a structural schematic diagram of an image capturing device provided in an embodiment of the present application;
[0026] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0027] Fig.13 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0029] The terms "first" and "second" in the specification and claims of this application are not used to describe a specific order or precedence. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the related objects are in an "or" relationship.
[0030] The following is a detailed description of the shooting method and display method provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0031] The image display method provided in the embodiment of the present application can be applied to a scene where an electronic device displays a photo taken by a camera. The photo can be taken by the electronic device through a camera device, or by another electronic device through a camera.
[0032] In order to obtain photos of scenes that meet their needs, users usually adjust the angle of the electronic device to get a better preview effect of the scene being photographed before taking photos. Assume that user A uses the rear camera of the electronic device to take a photo of scene A. When the face of user A is facing the display screen of the electronic device (that is, the line of sight is perpendicular to the plane where the display screen is located), the viewing angle of the preview screen is the best. At this time, user A presses the shooting button to trigger the electronic device to take the image 1 of the scene A. When viewing the image 1 later, assuming that the user's face is tilted 30° to the left, the image 1 that the user visually sees will have a certain degree of tilt, resulting in a poor visual effect for the user.
[0033] The embodiments of the present application are applied to electronic devices with a single or multiple cameras. The cameras connected to the electronic devices include built-in cameras integrated inside the electronic devices, and external cameras connected during the use of the electronic devices. It should be noted that the camera types include but are not limited to color cameras, black and white cameras, infrared cameras, moonlight cameras, starlight cameras, and ordinary cameras.
[0034] Exemplary, built-in cameras integrated into electronic devices include built-in cameras in laptop computers, front cameras in mobile phones, rear cameras in mobile phones, cameras in face recognition attendance machines, infrared cameras in monitoring systems, and the like.
[0035] Exemplarily, an external camera connected during the use of an electronic device can be connected by both wired and wireless connection. The wired connection method refers to the electronic device being connected to an external camera through an interface such as a USB interface, Type-C interface, lightning interface or serial port. The wireless connection method refers to the electronic device establishing an information interaction channel with an external camera through Bluetooth, infrared or wireless LAN to achieve connection with the external camera. The connection method of the external camera is not limited in the embodiments of the present application. Regardless of the connection method used, the electronic device and the external camera include corresponding hardware components.
[0036] The present application embodiment provides an image display method. Figure 1 FIG. 1 is a flow chart showing an image display method provided by an embodiment of the present application. Figure 1 As shown, the image display method provided in the embodiment of the present application may include the following steps 201 and 202:
[0037] Step 201: an image display device receives a first input for an identification of a first image.
[0038] Optionally, in the embodiment of the present application, the first image may be an image captured by a camera of the first electronic device, or an image captured by a camera of the second electronic device. The image display device may be the first electronic device, or the second electronic device.
[0039] Optionally, in the embodiment of the present application, the identifier of the first image may be a thumbnail, an icon, a character, etc., and the embodiment of the present application does not impose any limitation on this.
[0040] Optionally, in an embodiment of the present application, the first input may be a touch input, voice input, gesture input, or other feasible input of the user's identification of the first image, which is not limited in the embodiment of the present application. Exemplarily, the first input may be a click input, a slide input, a press input, etc. of the user. Further, the click operation may be any number of click operations. The slide operation may be a slide operation in any direction, such as sliding up, sliding down, sliding to the left, or sliding to the right, etc., which is not limited in the embodiment of the present application.
[0041] Exemplarily, a plurality of thumbnails of pictures are displayed in the picture gallery, and the user clicks on the thumbnail of picture 21 to view the picture 21 .
[0042] Step 202: The image display device displays a first image based on a first parameter and a second parameter in response to a first input.
[0043] The first parameter includes: relative position information between the first object and the first electronic device; the second parameter includes: relative position information between the second object and the second electronic device.
[0044] Optionally, in this embodiment of the present application, the first object is a photographer of the first image.
[0045] Exemplarily, the first object is an object that triggers the first electronic device to capture the first image. For example, user A uses the rear camera of the electronic device to capture scene A. When the face of user A is facing the display screen of the electronic device (i.e., the line of sight is perpendicular to the plane where the display screen is located), user A presses the capture button to trigger the electronic device to capture the image 21 of scene A.
[0046] Optionally, in the embodiment of the present application, the second object is an object viewing the first image. The first object and the second object may be the same object or different objects.
[0047] Exemplarily, the second object is an object that triggers the second electronic device to display the first image. For example, user B clicks on the thumbnail of the image 21 to view the image 21.
[0048] Optionally, in an embodiment of the present application, the first electronic device is an electronic device for acquiring a first image.
[0049] Optionally, in an embodiment of the present application, the second electronic device is an electronic device that displays the first image.
[0050] Optionally, in the embodiment of the present application, the first electronic device and the second electronic device may be the same electronic device, or different electronic devices. When they are different electronic devices, they have similar or identical screen aspect ratios.
[0051] Exemplarily, when the first electronic device and the second electronic device can be different electronic devices, after taking the first image, the first electronic device sends the first image to the second electronic device, and when the second object needs to view the first image through the second electronic device, the second electronic device can display the first image.
[0052] Optionally, in an embodiment of the present application, the first parameter is the relative position information of the photographer and the first electronic device when the first electronic device captures the first image. Exemplarily, the relative position information may be the gaze angle of the first object looking at the display screen of the first electronic device. For example, the relative position information may be the angle between the photographer's line of sight and the plane where the display screen of the first electronic device is located.
[0053] It should be noted that, when users are shooting scenes, they usually look at the preview interface with both eyes to find a suitable composition in order to obtain better visual effects, that is, the user's face is facing the display screen of the electronic device. At this time, the user's line of sight is approximately perpendicular to the display screen, that is, the angle between the user's line of sight and the plane where the display screen is located can be 90° by default.
[0054] Optionally, in an embodiment of the present application, the second parameter is relative position information between the object viewing the first image and the second electronic device when the second electronic device displays the first image. Exemplarily, the relative position information may be a gaze angle of the second object viewing the display screen of the second electronic device. For example, the relative position information may be an angle between the viewer's line of sight and the plane where the display screen of the second electronic device is located.
[0055] Optionally, the photographing device may adjust the display direction of the first image based on the first parameter and the second parameter when the first image is already displayed, or the photographing device may determine the display direction of the first image and display the first image based on the first parameter and the second parameter when the first image is not displayed.
[0056] Exemplarily, when user A is viewing a landscape image captured by the rear camera, if user A's face is facing the display screen of the electronic device, at this time, the angle between user A's line of sight and the plane where the display screen of the electronic device is located is approximately 90°. Exemplarily, when user A is viewing a landscape image captured by the rear camera, if user A's face (in the horizontal direction) is tilted 30° to the left, at this time, the angle between user A's line of sight and the plane where the display screen of the electronic device is located is approximately 120°. Exemplarily, when user A is viewing a landscape image captured by the rear camera, if user A's face (in the horizontal direction) is tilted 30° to the right, at this time, the angle between user A's line of sight and the plane where the display screen of the electronic device is located is approximately 60°.
[0057] When the first object and the second object are the same object and the first electronic device and the second electronic device are the same device, the visual effect of the same object viewing an image on the same electronic device is improved. When the first object and the second object are different objects and the first electronic device and the second electronic device are the same device, the visual effect of different objects viewing an image on the same electronic device is improved. When the first object and the second object are the same object and the first electronic device and the second electronic device are different devices, the visual effect of the same object viewing an image on different electronic devices is improved.
[0058] In the image display method provided in the embodiment of the present application, the image display device receives a first input from a user for an identification of a first image, and displays the first image based on a first parameter and a second parameter, wherein the first parameter includes: relative position information between the first object and the first electronic device, and the second parameter includes: relative position information between the second object and the second electronic device. Through this method, when viewing the first image, the image display device can display the first image based on the relative position information between the second object and the second electronic device, as well as the relative position information between the first object and the first electronic device. In this way, when displaying the first image, the first image can be flexibly displayed based on the relative position information between the object and the electronic device, thereby improving the visual effect when displaying the image.
[0059] Optionally, in the embodiment of the present application, in combination with the above Figure 1 ,like Figure 2 As shown, the above step 202 may include the following steps 202a and 202b:
[0060] Step 202a: The image display device determines a target display direction based on the first parameter and the second parameter in response to the first input.
[0061] Step 202b: The image display device displays the first image according to the target display direction.
[0062] Optionally, the target display direction represents the display direction of the first image when it is displayed on the display screen of the electronic device, with the display screen as the reference plane. For example, when the display screen is in a vertical display state, the image can be displayed from top to bottom, from bottom to top, from left to right, along the diagonal direction of the display screen, or in any direction on the display screen.
[0063] Exemplarily, the target display direction may be represented by any angle value between 0° and 360°, such as 0°, 15°, 30°, 90°, 180°, 270°, and the like.
[0064] Optionally, the photographing device may determine a rotation angle of the first image based on a first gaze angle at which the target subject gazes at the display screen of the electronic device, and determine a target display direction according to the rotation angle.
[0065] For example, the camera may rotate the first image according to the rotation angle of the first image, and display the rotated first image on the first interface. For example, the first interface may include but is not limited to any one of the following: an application page of the first application, a desktop of the electronic device, a negative first screen of the electronic device, a taskbar, etc.
[0066] For example, assuming that the target subject's gaze angle when looking at the display screen of the electronic device is 120°, and the target subject's face is tilted 30° horizontally to the left, in order to maintain the consistency between the image display direction and the visual angle when viewing the image, the shooting device rotates the first image clockwise by 30° and then displays it.
[0067] For example, when user A uses the rear camera of an electronic device to shoot a landscape, it is assumed that user A's face is facing the display screen of the electronic device (that is, when shooting the landscape, the angle between user A's line of sight and the plane where the display screen is located is 90° by default). If the user clicks on the thumbnail of the captured landscape image, the face is tilted 30° to the left. At this time, the angle between user A's line of sight and the plane where the display screen of the electronic device is located is approximately 120°. The first image can be displayed by rotating 30 degrees counterclockwise.
[0068] Optionally, when displaying the first image, the photographing device may perform pixel compensation, intelligent filling, intelligent cropping, and image stereoscopic visualization processing on the first image, thereby improving the user's visual effect.
[0069] In this way, when the first image is displayed, it can be ensured that the visual effect obtained by the user when viewing the first image is consistent with the visual effect when the first image is taken, thereby improving the display effect of the first image.
[0070] In some possible implementations, the first object and the second object may be the same. For example, the first object is user A who triggers the capture of image A, and the second object is user A who subsequently browses image A. Alternatively, the first object and the second object are different. For example, the first object is user A who triggers the capture of image A, and the second object is also user B who subsequently browses image A.
[0071] For example, taking the first object and the second object both being user A as an example, the image display device may determine the display direction of image A based on the gaze angle of user A on the display screen of the electronic device when browsing image A using the electronic device and the gaze angle of user A on the display screen of the electronic device when shooting image A using the electronic device.
[0072] For example, suppose that when user A takes image A, he obtains a better preview effect when his gaze angle to the display screen is 120°. When user A subsequently browses image A, his gaze angle to the display screen is 150°. The camera can rotate image A 30° clockwise. In this way, when the user browses image A subsequently, the camera can adjust the display direction of image A based on the user's current gaze angle to the display screen, so that user A's visual experience when browsing image A is consistent with that when taking image A, thereby ensuring that the user can still obtain a better preview effect when browsing image A subsequently.
[0073] Further optionally, in the embodiment of the present application, the first parameter includes: a first face direction angle of the first object relative to the first electronic device, and the second parameter includes: a second face direction angle of the second object relative to the second electronic device;
[0074] Optionally, in combination with the above Figure 2 ,like Figure 3 As shown, the above step 202a may include the following steps 202a1:
[0075] Step 202a1: the image display device determines a target display direction based on an angle difference between a first face direction angle and a second face direction angle in response to a first input.
[0076] Exemplarily, the above-mentioned face direction angle is: the angle between the vertical direction of the face and the horizontal direction of the straight line.
[0077] Exemplarily, the first face direction angle may represent the angle at which the face of the target subject is tilted to the left or right in the horizontal direction; the second face direction angle may represent the angle at which the face of the first subject is tilted to the left or right in the horizontal direction.
[0078] Exemplarily, the first face direction angle is used to characterize the gaze angle of the target subject on the display screen of the electronic device, and the second face direction angle is used to characterize the gaze angle of the first subject on the display screen of the electronic device.
[0079] For example, the first face direction angle is the face direction angle of user A, and the second face angle is the face inclination angle of user B. As shown in FIG4(a), user A uses the rear camera of the electronic device to shoot trees 2a, 2b, and 2c in front. When user A uses the rear camera of the electronic device to shoot trees 2a, 2b, and 2c, the face direction angle of user A captured by the front camera is 105°. If user A sends the landscape image to user B, when user B browses the landscape image, the face direction angle of user B captured by the front camera is 120°, then the shooting device rotates the landscape image clockwise by 15° (i.e., 120° minus 105° is 15°) to display it, so as to keep the visual angle relationship between the sight line of user B and the image at 15° when browsing the image. FIG4(a) is a schematic diagram of the interface for displaying the landscape image rotated by 15° clockwise, and image 21 is an image of the landscape image rotated by 15° clockwise.
[0080] In combination with the above example, if the angle of the user B's face captured by the front camera is 60° when the user B is browsing the landscape image, the shooting device will rotate the landscape image counterclockwise by 45° (i.e., 60° minus 105° is negative 45°) and display it so as to keep the visual angle relationship between the user B's line of sight and the image at 15° when the user B is browsing the image.
[0081] In combination with the above example, if user B's face is tilted 15° to the left in the horizontal direction when browsing the landscape image, that is, the face direction angle is 105°, since the viewing angle of the face relative to the electronic device is consistent when browsing the landscape image and shooting the landscape image, the shooting device does not rotate the landscape image. Figure 4(b) is a schematic diagram of the interface for displaying the landscape image without rotation, and image 22 is an image of the landscape image without rotation.
[0082] In this way, by recording the relationship between the framing and the user's visual angle when taking photos, the sharing of the best viewing angle between users is achieved, so that other users can obtain better visual effects when browsing the captured images.
[0083] It should be noted that when the user's face is tilted 15° to the left in the horizontal direction, the user's gaze angle when looking at the display screen is 105° (i.e. 90° plus 15°). That is to say, when the visual angle relationship between the user and the display screen is 105°, the user's viewing angle for viewing the image is better. Therefore, when the user subsequently views the image, the visual angle relationship between the user and the image is adjusted to 105°, so that the user obtains a better visual effect.
[0084] Further optionally, before the above step 202a1, the image display method provided in the embodiment of the present application may further include the following steps A1 and A2:
[0085] Step A1: the image display device obtains a second image through a camera of a second electronic device.
[0086] The second image includes a second object.
[0087] Step A2: The image display device determines the facial direction angle of the second object according to the second image.
[0088] Exemplarily, the camera may be a front camera of the second electronic device.
[0089] Exemplarily, the image display device may acquire the second image through a camera of the second electronic device when receiving a first input from a user for identifying the first image.
[0090] For example, the first image is a landscape image 1 and the second object is user A. Assuming that user A clicks on the thumbnail of the landscape image 1, the camera captures the image containing the face of user A through the front camera when the face of user A is detected.
[0091] In an example, when the second object uses the second electronic device to view the first image, the image display device may obtain the second face direction angle of the second object relative to the second electronic device through the camera of the second electronic device.
[0092] In another example, when the second object uses the second electronic device to view the first image, the image display device can capture an image of the second object, i.e., the second image, through the camera of the second electronic device, and then determine the second face direction angle of the second object relative to the second electronic device based on the facial feature information of the second object in the image. For example, the above-mentioned face direction angle can be: the angle between a first straight line in the vertical direction of the face in the image and a second straight line where the shortest connecting line between the two sides of the image is located.
[0093] For example, Figure 5 , which is a schematic diagram of a face direction angle provided in an embodiment of the present application. Figure 5 The straight line A shown in FIG. 1 is the first straight line in the vertical direction of the face in the image. Figure 5 The straight line B shown in FIG. 1 is the second straight line where the shortest connecting line between the two side edges of the image is located, wherein the angle α between the first straight line and the second straight line is 120°, that is, the face direction angle is 120°.
[0094] For example, the facial feature information includes: the position and direction of the facial feature in the image. For example, the facial feature can be understood as a facial feature point, or a key point. For example, the facial feature (point) can include at least one of the following: left eye, right eye, nose, left corner of mouth, right corner of mouth, left ear, and right ear, etc. It should be noted that in the field of image processing, facial features are usually regarded as a point for calculation.
[0095] It should be noted that the facial feature is a feature based on the unchanged position of the user's facial image. Therefore, the degree of inclination of the user's facial image on the screen can be represented by the position of the facial feature on the screen.
[0096] Exemplarily, the facial features are features distributed horizontally in the facial image, and the target features can indicate the horizontal direction based on the facial image. For example, the tilt angle of the face in the horizontal direction (i.e. left and right) can be determined by the positions of key points such as the left eye, the right eye, the nose, the left corner of the mouth, and the right corner of the mouth.
[0097] Exemplarily, the image display device may determine a second facial direction angle of the second object relative to the second electronic device based on facial feature information of the second object in the second image.
[0098] The following is a detailed description of a process of determining a second face direction angle of the second object relative to the second electronic device according to the facial feature information of the second object in the second image (the process may include the following Step 1-Step 5):
[0099] Step 1: Detect the positions of facial feature points of the second object in the second image.
[0100] For example, the photographing device may input the second image into a deep learning network, and preliminarily detect the positions of facial feature points in the reference image through a deep learning algorithm.
[0101] For example, the deep learning network is mainly divided into three modules: feature extraction, feature fusion, and task prediction. Feature extraction includes five stages: C2, C3, C4, C5, and C6. Each stage includes pooling, convolution, batch normalization, and activation operations, which are mainly used to extract features from images. Feature fusion includes five stages: P2, P3, P4, P5, and Context Module. In addition to pooling, convolution, batch normalization, and activation, it also includes upsampling and fusion of features at different stages (including feature map addition and channel splicing). The task prediction stage includes the detection of face frames and key points of faces.
[0102] Furthermore, C2 / C3 / C4 / C5 are the Feature Maps generated by each Residual Block in ResNet, and C6 is generated by C5 through a 3*3 convolutional layer.
[0103] Step 2: Based on the positions of the facial feature points in the second image, the reference face is corrected.
[0104] For example, when it is detected that the second image includes multiple faces, the photographing device selects the face with the largest area as the target face for calculating the face direction.
[0105] For example, the camera calculates the orientation of the face based on the coordinates of the left and right eyes and the left and right corners of the mouth of the target face, and adjusts the target face to the position closest to the frontal face (i.e., making the reference face direction angle close to or equal to 0°) by rotating 90 degrees, 180 degrees, 270 degrees, and flipping horizontally according to the orientation of the face. In this way, the face direction is corrected in advance, thereby improving the accuracy of subsequent facial key point detection.
[0106] Step 3: Generate a target face image based on the face area in the target face after face correction processing.
[0107] Step 4: Adjust the image size of the target face image, and detect the positions of the key points of the target face image after the image size is adjusted.
[0108] For example, the photographing device scales the target face image after face correction, for example, scales the target face image to 48*48, and inputs the scaled target face image into a face key point detection network to obtain the key point coordinates of the adjusted face.
[0109] For example, the photographing device reversely adjusts the key point coordinates based on the correction angle during the face correction and the relative coordinate relationship between the target face image and the second image, maps them to the reference face in the second image, and then calculates the key point coordinates of the global reference face according to the coordinate position of the reference face.
[0110] It should be noted that, since it is necessary to detect the positions of the key points of the eyes, nose, and corners of the mouth in the reference image, if these five key points are obtained directly from the reference image, the accuracy will be low. Therefore, the face and the key point positions with lower accuracy can be detected first. Although the key point positions with lower accuracy will not be used as the final result, they can be used to simply determine whether the face is vertical or horizontal. If it is horizontal, the face is adjusted to be vertical, because the accuracy of key point detection using a vertical face will be higher. Then, the reference face image with adjusted direction is input into the second network to obtain the key point positions with higher accuracy.
[0111] Step 5: Calculate the face direction angle of the reference face in the second image based on the positions of the key points of the target face image.
[0112] For example, the camera can fit the coordinates of the center points of the two eyes (x1, y1), the coordinates of the center points of the two mouth corners (x2, y2), and the coordinates of the nose (x3, y3) by using the least square method, take the fitted straight line as the direction of the reference face, and take the angle between the straight line and the horizontal straight line as the angle of the face direction. Figure 6 As shown, the midpoints of the two eyes are represented by coordinate point a, the midpoints of the two mouth corners are represented by coordinate point b, the nose is represented by coordinate point c, the above-mentioned fitted straight line is straight line C, the horizontal straight line is straight line D, the angle α of the face direction is 120°, and the angle of the face tilted to the left is 30°.
[0113] In some other possible implementations, the algorithm process for calculating the face direction angle can be hardened using a chip and enter an Always on mode, that is, the chip maintains a mode of "low resolution + low frame rate + long-term output of image data".
[0114] Exemplarily, in combination with the above embodiment, when calculating the face direction angle of the second image, a larger image size (such as 640*480) can be directly input into the deep learning network algorithm for calculation, thereby improving the accuracy of the calculation.
[0115] Exemplarily, the above deep learning network can be designed as a larger network to obtain higher accuracy.
[0116] In this way, the shooting device can accurately detect the key points of the user's face in a very short time, while running in the background without interfering with the user's other behaviors, thereby being able to record the face direction angle at the moment the second image is captured in real time, thereby adjusting the display direction of the first image in real time.
[0117] It should be noted that when the user is browsing photos, the user's position and angle may change in real time. Therefore, it is necessary to trigger the calculation process of the user's facial direction angle in real time, harden the above calculation process with the chip, and enter the Always on mode, so as to maintain low power and ensure high performance and low power consumption, and run in the background without affecting the user's experience of browsing photos.
[0118] In this way, the second electronic device can take a picture of the user when the user is viewing the first image to obtain an image including the user's face, and obtain the face direction angle of the user relative to the electronic device when viewing the first image through the image. Therefore, when the first image is subsequently displayed, the first image can be displayed based on the face direction angle of the user relative to the electronic device, thereby improving the flexibility of image display.
[0119] Optionally, in the embodiment of the present application, the second image includes: at least two third objects;
[0120] Optionally, after the above step A1, the image display method provided in the embodiment of the present application further includes the following steps B1 and B2:
[0121] Step B1: the image display device obtains facial feature information of each third object in the second image.
[0122] Step B2: the image display device determines the third object that meets the preset conditions as the second object based on the facial feature information of each third object.
[0123] The above-mentioned preset conditions include any one of the following:
[0124] The face size is the largest;
[0125] The clarity of the face is greater than a first threshold;
[0126] The tilt angle of the face is within a preset angle range.
[0127] Exemplarily, when the image display device captures multiple objects (ie, the third object), when browsing the first image, the photographing device can determine the second object based on the facial information of the multiple objects in the second image.
[0128] Exemplarily, assuming that the second image includes facial information of object A, object B and object C, the face size of object A is 100*90, the face size of object B is 120*100, and the face size of object C is 110*100. Since the face size of object B is the largest, object B is determined as the target shooting object, and the display direction of the first image is determined according to the face direction angle of object B.
[0129] Exemplarily, the image display device may determine the object with the highest face clarity as the target photographing object. Exemplarily, assuming that the second image includes face information of object A, object B, and object C, and the face clarity of object A is the highest, object A is determined as the second object, and the display direction of the first image is determined according to the face direction angle of object A.
[0130] Exemplarily, the photographing device may determine the object with the largest face direction angle as the second object. Exemplarily, assuming that the second image includes face information of object A, object B, and object C, and object C has the largest face direction angle, object C is determined as the second object, and the display direction of the first image is determined according to the face direction angle of object C.
[0131] In this way, when multiple objects viewing the first image are detected, the shooting device can determine an object based on the above conditions and adjust the display direction of the first image according to the facial direction angle of the object, so that the object maintains a better viewing angle when browsing the image.
[0132] The present application embodiment provides an image capturing method. Figure 7 FIG. 2 shows a flow chart of an image capturing method provided by an embodiment of the present application. Figure 7 As shown, the image capturing method provided in the embodiment of the present application may include the following steps 701 to 703:
[0133] Step 701: The image capturing device receives a second input from a user.
[0134] Optionally, in an embodiment of the present application, the second input is used to trigger the electronic device to perform a shooting operation. Exemplarily, the second input may be: a user's touch input to the shooting preview interface, or other feasible inputs, which are not limited in the embodiment of the present application. Similarly, the input method of the camera selection input may be a touch method such as long press, tap, drag or slide, or other feasible inputs, which are not limited in the embodiment of the present application.
[0135] Step 702: In response to a second input, the image capturing device captures a first image through a first electronic device and obtains a first parameter.
[0136] The first parameter includes relative position information between the first object and the first electronic device.
[0137] Optionally, in this embodiment of the present application, the first object is a photographer of the first image.
[0138] Exemplarily, the first object is an object that triggers the first electronic device to capture the first image. For example, user A uses the rear camera of the electronic device to capture scene A. When the face of user A is facing the display screen of the electronic device (i.e., the line of sight is perpendicular to the plane where the display screen is located), user A presses the capture button to trigger the electronic device to capture the image of scene A.
[0139] Optionally, in an embodiment of the present application, the first parameter is the relative position information of the photographer and the first electronic device when the first electronic device captures the first image. Exemplarily, the relative position information may be the gaze angle of the first object looking at the display screen of the first electronic device. For example, the relative position information may be the angle between the photographer's line of sight and the plane where the display screen of the first electronic device is located.
[0140] Exemplarily, the first parameter may include: a first face direction angle of the first object relative to the first electronic device, and the first face direction angle may represent a gaze angle of the first object looking at the display screen of the first electronic device.
[0141] Optionally, in the embodiment of the present application, the image capturing device may obtain the first parameter locally or from a server.
[0142] Step 703: The image capturing device stores the first image and the first parameter in association with each other.
[0143] Optionally, in the embodiment of the present application, the image capture device may establish an association relationship between the first image and the first parameter, and then store the associated first image and the first parameter in association with each other, or the image capture device may store the first image and the first parameter and then establish an association relationship between the storage space of the first image and the storage space of the first parameter, so that the first parameter can be quickly acquired when viewing the first image. Optionally, the image capture device stores the first image and the first parameter in association with each other in response to the second input of the user.
[0144] In the image capture method provided in the embodiment of the present application, the image capture device receives the second input of the user, captures the first image through the first electronic device, obtains the first parameter, and stores the first image and the first parameter in association, where the first parameter includes the relative position information of the first object and the first electronic device. Through this method, the image capture device can obtain and store the first parameter when capturing the first image, so that when the first image is subsequently displayed, the first image can be flexibly displayed based on the first parameter.
[0145] Optionally, in the embodiment of the present application, in combination with the above Figure 7 ,like Figure 8 As shown, the above step 702 may include the following steps 702a to 702c:
[0146] Step 702a: The image capturing device captures a first image through a first camera of a first electronic device in response to a second input.
[0147] Step 702b: The image capturing device captures a third image through the second camera of the first electronic device.
[0148] The content of the third image includes the first object.
[0149] Step 702c: the image capturing device obtains a first parameter according to the first image and the third image.
[0150] Exemplarily, the first camera may be a rear camera or a front camera of the first electronic device. Exemplarily, the image capture device may be the first electronic device or the second electronic device. Exemplarily, the image capture device and the image display device may be the same electronic device or different electronic devices.
[0151] Exemplarily, the image capturing device may control the first camera to capture the target object to obtain a first image corresponding to the target object. Exemplarily, the target image may contain scenery, portraits, buildings, and still life, etc.
[0152] Exemplarily, the second camera may be a front camera of the first electronic device.
[0153] Exemplarily, the actions of the image capture device capturing the first image and the third image may be performed simultaneously or later. For example, in response to the second input, the image capture device first captures the first image through the rear camera, and then captures the third image through the front camera; or, in response to the second input, the image capture device captures the third image through the front camera while capturing the first image through the rear camera. For example, the image capture device may capture the third image through the second camera at the moment of capturing the first image.
[0154] It should be noted that the third image mentioned above can also be called a target reference image.
[0155] It should be noted that, in response to the second input, the image capturing device may store the first image and the first parameter in association with each other.
[0156] Exemplarily, the first object may be a photographer of the first image.
[0157] For example, assuming that user A is using the rear camera of an electronic device to capture an image, when user A adjusts the shooting content and shooting angle and presses the shooting button, the electronic device activates the front camera to capture user A, and obtains a third image including the facial image of user A.
[0158] Exemplarily, the image capturing device may obtain the first parameter based on facial feature information of the first object in the third image.
[0159] Exemplarily, the image capturing device may determine a first facial direction angle of the first object relative to the first electronic device based on facial feature information of the first object in the third image.
[0160] The following describes in detail a process of determining a direction angle of a first face of the first object relative to the first electronic device based on the facial feature information of the first object in the third image.
[0161] Step 1: Detect the positions of facial feature points of the first object in the third image.
[0162] For example, the image capturing device may input the third image into a deep learning network, and preliminarily detect the positions of facial feature points in the third image through a deep learning algorithm.
[0163] Step 2: Based on the positions of the facial feature points in the third image, the reference face is corrected.
[0164] It should be noted that the above-mentioned reference face is a face image of the first object.
[0165] For example, when it is detected that the third image includes multiple faces, the image capturing device selects a face with the largest area as a reference face for calculating the face direction.
[0166] For example, the image capture device calculates the orientation of the face based on the coordinates of the left and right eyes and the left and right corners of the mouth of the reference face, and adjusts the reference face to the position closest to the frontal face (i.e., making the reference face orientation angle close to or equal to 0°) by rotating 90 degrees, 180 degrees, 270 degrees, etc. and horizontally flipping the face according to the orientation of the face. In this way, the orientation of the face is corrected in advance, thereby improving the accuracy of subsequent detection of facial key points.
[0167] Step 3: Generate a reference face image based on the face area in the reference face after face correction.
[0168] Step 4: Adjust the image size of the reference face image, and detect the positions of the key points of the reference face image after the image size is adjusted.
[0169] For example, the image capturing device scales the reference face image after face correction, for example, scales the reference face image to 48*48, and inputs the scaled reference face image into a face key point detection network to obtain the key point coordinates of the adjusted face.
[0170] For example, the image capture device reversely adjusts the key point coordinates based on the correction angle during the face correction and the relative coordinate relationship between the reference face image and the third image, maps them to the reference face in the third image, and then calculates the key point coordinates of the global reference face according to the coordinate position of the reference face.
[0171] It should be noted that, since it is necessary to detect the positions of the key points of the eyes, nose, and corners of the mouth in the reference image, if these five key points are obtained directly from the third image, the accuracy will be low. Therefore, the face and the key point positions with lower accuracy can be detected first. Although the key point positions with lower accuracy will not be used as the final result, they can be used to simply determine whether the face is vertical or horizontal. If it is horizontal, the face is adjusted to be vertical, because the accuracy of key point detection using a vertical face will be higher. Then, the reference face image with adjusted direction is input into the second network to obtain the key point positions with higher accuracy.
[0172] Step 5: Calculate the face direction angle of the reference face in the third image according to the positions of the key points of the reference face image.
[0173] For example, the camera can fit the coordinates of the center points of the two eyes (x1, y1), the coordinates of the center points of the two mouth corners (x2, y2), and the coordinates of the nose (x3, y3) by using the least square method, take the fitted straight line as the direction of the reference face, and take the angle between the straight line and the horizontal straight line as the angle of the face direction. Figure 6 As shown, the midpoints of the two eyes are represented by coordinate point a, the midpoints of the two mouth corners are represented by coordinate point b, the nose is represented by coordinate point c, the above-mentioned fitted straight line is straight line C, the horizontal straight line is straight line D, the angle α of the face direction is 120°, and the angle of the face tilted to the left is 30°.
[0174] Optionally, the image capture device may start calculating the face direction information of the third image at the same time as acquiring the third image, or may calculate the face direction information of the third image at any time after acquiring the third image. The embodiment of the present application does not impose any limitation on this.
[0175] Optionally, in combination with the above embodiments, when the face direction angle of the first object in the third image is calculated, the image capturing device may use the angle information of the face direction angle as the image information of the third image, write it into the information header of the third image, and save it together with the third image to the electronic device.
[0176] Further optionally, in the embodiment of the present application, in combination with the above Figure 8 ,like Fig. 9 As shown, the content of the third image includes: at least two objects.
[0177] The above step 702b may include the following steps 702b1:
[0178] Step 702b1: the image capturing device captures a third image through the second camera of the first electronic device, and determines a first object from at least two objects based on the facial image of each object in the third image.
[0179] Exemplarily, when taking a first image, if the third image acquired by the image capture device through the front camera includes multiple objects, that is, multiple objects are taking the first image, the image capture device can determine the first object based on the facial information of the multiple objects in the third image.
[0180] Exemplarily, assuming that the third image includes facial information of object A, object B and object C, the face size of object A is 100*90, the face size of object B is 120*100, and the face size of object C is 110*100, since the face size of object B is the largest, object B is determined as the first object.
[0181] In this way, when capturing the first image, if multiple objects are detected, the image capturing device can determine one object based on the above conditions, and adjust the display direction of the first image according to the facial direction angle of the object, so that the user can maintain a better viewing angle when viewing the first image.
[0182] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.
[0183] Fig.10 It is shown that an embodiment of the present application provides an image display device 1000, which may include: a first receiving module 1001 and a display module 1002, wherein: the above-mentioned first receiving module 1001 is used to receive a first input for an identification of a first image; the above-mentioned display module is used to display the first image based on first parameters and second parameters in response to the first input received by the first receiving module 1001; wherein the above-mentioned first parameter includes: relative position information of the first object and the first electronic device; the above-mentioned second parameter includes: relative position information of the second object and the second electronic device.
[0184] Optionally, in an embodiment of the present application, the above-mentioned device also includes: a determination module; the above-mentioned determination module is used to determine the target display direction based on the first parameter and the second parameter; the above-mentioned display module is specifically used to display the first image according to the target display direction determined by the determination module.
[0185] Optionally, in an embodiment of the present application, the above-mentioned first parameter includes: a first facial direction angle of the first object relative to the first electronic device, and the above-mentioned second parameter includes: a second facial direction angle of the second object relative to the second electronic device; the above-mentioned determination module is specifically used to determine the target display direction based on the angle difference between the first facial direction angle and the second facial direction angle.
[0186] Optionally, in the embodiment of the present application, the above-mentioned device further includes: a first acquisition module;
[0187] The first acquisition module is configured to acquire a second image including a second object through a camera of a second electronic device before determining the target display direction based on the angle difference between the first face direction angle and the second face direction angle;
[0188] The above-mentioned determination module is also used to determine the face direction angle of the second object according to the second image acquired by the first acquisition module.
[0189] Optionally, in the embodiment of the present application,
[0190] The second image includes: at least two third objects;
[0191] The first acquisition module is further used to acquire facial feature information of each third object in the second image;
[0192] The above-mentioned determination module is further used to determine the third object that meets the preset condition as the second object based on the facial feature information of each third object acquired by the first acquisition module;
[0193] The above-mentioned preset conditions include any one of the following:
[0194] The face size is the largest;
[0195] The clarity of the face is greater than a first threshold;
[0196] The tilt angle of the face is within a preset angle range.
[0197] In the image display device provided in the embodiment of the present application, the image display device receives a first input from a user for an identification of a first image, and displays the first image based on a first parameter and a second parameter, wherein the first parameter includes: relative position information between the first object and the first electronic device, and the second parameter includes: relative position information between the second object and the second electronic device. Through this method, when viewing the first image, the image display device can display the first image based on the relative position information between the second object and the second electronic device, as well as the relative position information between the first object and the first electronic device. In this way, when displaying the first image, the image display device can flexibly display the first image based on the relative position information between the object and the electronic device, thereby improving the visual effect when displaying the image.
[0198] The image display device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0199] The image display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0200] The image display device provided in the embodiment of the present application can achieve Figures 1 to 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0201] Fig.11 It is shown that an embodiment of the present application provides an image capturing device 2000, which may include: a second receiving module 2001, a second acquiring module 2002 and a storage module 2003, wherein: the second receiving module 2001 is used to receive a second input from a user; the second acquiring module 2002 is used to capture a first image through a first electronic device and acquire a first parameter in response to the second input received by the second receiving module 2001, wherein the first parameter includes relative position information of the first object and the first electronic device; the storage module 2003 is used to store the first image acquired by the second acquiring module 2002 in association with the first parameter.
[0202] Optionally, in an embodiment of the present application, the above-mentioned second acquisition module is specifically used to capture a first image through a first camera of a first electronic device; capture a third image through a second camera of the first electronic device, the content of the third image includes a first object; and acquire a first parameter based on the first image and the third image.
[0203] Optionally, in the embodiment of the present application, the content of the third image includes: at least two objects;
[0204] The second acquisition module is specifically configured to capture a third image through a second camera of the first electronic device; and determine a first object from at least two objects based on the facial image of each object in the third image.
[0205] In the image capture device provided in the embodiment of the present application, the image capture device receives the second input of the user, captures the first image through the first electronic device, obtains the first parameter, and stores the first image and the first parameter in association, where the first parameter includes the relative position information of the first object and the first electronic device. Through this method, the image capture device can obtain and store the first parameter when capturing the first image, so that when the first image is subsequently displayed, the first image can be flexibly displayed based on the first parameter.
[0206] The image capture device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0207] The image capture device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0208] The image capture device provided in the embodiment of the present application can achieve Figures 7 to 9 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0209] Alternatively, if Fig.12 As shown, an embodiment of the present application further provides an electronic device 3000, including a processor 3001 and a memory 3002, wherein the memory 3002 stores programs or instructions that can be executed on the processor 3001, and when the program or instructions are executed by the processor 3001, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0210] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0211] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0212] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0213] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0214] In some possible implementations, the user input unit 107 is used to receive a first input for identifying a first image; the display unit 106 is used to display the first image based on first parameters and second parameters in response to the first input received by the user input unit 107; wherein the first parameter includes: relative position information between the first object and the first electronic device; and the second parameter includes: relative position information between the second object and the second electronic device.
[0215] Optionally, in an embodiment of the present application, the processor 110 is used to determine a target display direction based on the first parameter and the second parameter; the display unit 106 is specifically used to display the first image according to the target display direction determined by the processor 110.
[0216] Optionally, in an embodiment of the present application, the first parameter includes: a first facial direction angle of the first object relative to the first electronic device, and the second parameter includes: a second facial direction angle of the second object relative to the second electronic device; the processor 110 is specifically used to determine the target display direction based on the angle difference between the first facial direction angle and the second facial direction angle.
[0217] Optionally, in the embodiment of the present application, the processor 110 is configured to acquire a second image including a second object through a camera of a second electronic device before determining the target display direction based on the angle difference between the first face direction angle and the second face direction angle;
[0218] The processor 110 is further configured to determine a facial direction angle of the second object according to the acquired second image.
[0219] Optionally, in the embodiment of the present application,
[0220] The second image includes: at least two third objects;
[0221] The processor 110 is further configured to obtain facial feature information of each third object in the second image;
[0222] The processor 110 is further configured to determine the third object that meets a preset condition as the second object based on the acquired facial feature information of each third object;
[0223] The above-mentioned preset conditions include any one of the following:
[0224] The face size is the largest;
[0225] The clarity of the face is greater than a first threshold;
[0226] The tilt angle of the face is within a preset angle range.
[0227] In the electronic device provided in the embodiment of the present application, the electronic device receives a first input from a user for an identification of a first image, and displays the first image based on a first parameter and a second parameter, wherein the first parameter includes: relative position information between the first object and the first electronic device, and the second parameter includes: relative position information between the second object and the second electronic device. Through this method, when viewing the first image, the image display device can display the first image based on the relative position information between the second object and the second electronic device, as well as the relative position information between the first object and the first electronic device. In this way, when displaying the first image, the electronic device can flexibly display the first image based on the relative position information between the object and the electronic device, thereby improving the visual effect when displaying the image.
[0228] In some other possible implementations, the user input unit 107 is used to receive a second input from a user; the processor 110 is used to capture a first image through a first electronic device and obtain a first parameter in response to the second input received by the user input unit 107, wherein the first parameter includes relative position information of the first object and the first electronic device; and the memory 109 is used to store the obtained first image and first parameter in association with each other.
[0229] Optionally, in an embodiment of the present application, the input unit 104 is used to capture a first image through a first camera of a first electronic device; and to capture a third image through a second camera of the first electronic device, wherein the content of the third image includes a first object; and the processor 110 is specifically used to obtain a first parameter based on the first image and the third image.
[0230] Optionally, in the embodiment of the present application, the content of the third image includes: at least two objects;
[0231] The input unit 104 is specifically used to capture a third image through the second camera of the first electronic device; the processor 110 is also used to determine the first object from at least two objects based on the facial image of each object in the third image.
[0232] In the electronic device provided in the embodiment of the present application, the electronic device receives the second input of the user, captures the first image through the first electronic device, obtains the first parameter, and stores the first image and the first parameter in association, where the first parameter includes the relative position information of the first object and the first electronic device. Through this method, the electronic device can obtain and store the first parameter when capturing the first image, so that when the first image is subsequently displayed, the first image can be flexibly displayed based on the first parameter.
[0233] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0234] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0235] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0236] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0237] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0238] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0239] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0240] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned image display method or image shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0241] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0242] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0243] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image display method, characterized in that: The method comprises: receiving a first input for an identification of a first image; In response to the first input, based on a first parameter and a second parameter, displaying the first image; The displaying the first image based on the first parameter and the second parameter includes: Determining a target display direction based on the first parameter and the second parameter; Displaying the first image according to the target display direction; The first parameter includes: a first face direction angle of the first object relative to the first electronic device, and the second parameter includes: a second face direction angle of the second object relative to the second electronic device; The first object is an object that triggers the first electronic device to capture the first image, and the second object is an object that views the first image through the second electronic device; The determining the target display direction based on the first parameter and the second parameter includes: Determining the target display direction based on an angle difference between the first face direction angle and the second face direction angle; The first object and the second object are different objects, the first electronic device and the second electronic device are different electronic devices; the first electronic device is an electronic device for acquiring the first image, and the second electronic device is an electronic device for displaying the first image.
2. The method according to claim 1, characterized in that: Before determining the target display direction based on the angle difference between the first face direction angle and the second face direction angle, the method further includes: Acquire a second image through a camera of the second electronic device, where the second image includes the second object; Determine a face direction angle of the second object according to the second image.
3. The method according to claim 2, characterized in that The second image includes: at least two third objects; After acquiring the second image through the camera of the second electronic device, the method further includes: Acquire facial feature information of each of the third objects in the second image; Based on the facial feature information of each of the third objects, determining the third objects that meet the preset conditions as the second objects; Wherein, the satisfying of the preset condition includes any one of the following: The face size is the largest; The clarity of the face is greater than a first threshold; The tilt angle of the face is within a preset angle range.
4. The method according to claim 1, characterized in that: The method further comprises: receiving a second input from the user; In response to the second input, a first image is captured by a first electronic device, and a first parameter is acquired, where the first parameter also includes relative position information of a first object and the first electronic device; The first image and the first parameter are stored in association with each other.
5. The method according to claim 4, characterized in that The step of collecting the first image by using the first electronic device and obtaining the first parameter includes: Acquire a first image through a first camera of a first electronic device; Acquire a third image through a second camera of the first electronic device, wherein content of the third image includes the first object; A first parameter is acquired according to the first image and the third image.
6. The method according to claim 5, characterized in that The content of the third image includes: at least two objects; The collecting of a third image by the second camera of the first electronic device, wherein the content of the third image includes the first object, comprises: A third image is captured by a second camera of the first electronic device, and the first object is determined from the at least two objects based on a facial image of each of the objects in the third image.
7. An image display device, characterized in that: The device comprises: a determination module, a first receiving module and a display module, wherein: The first receiving module is used to receive a first input of an identifier for a first image; The display module is configured to display the first image based on a first parameter and a second parameter in response to the first input received by the first receiving module; The determination module is used to determine the target display direction based on the first parameter and the second parameter; The display module is specifically configured to display the first image according to the target display direction determined by the determination module; The first parameter includes: a first face direction angle of the first object relative to the first electronic device, and the second parameter includes: a second face direction angle of the second object relative to the second electronic device; The first object is an object that triggers the first electronic device to capture the first image, and the second object is an object that views the first image through the second electronic device; The determination module is specifically configured to determine the target display direction based on an angle difference between the first face direction angle and the second face direction angle; The first object and the second object are different objects, the first electronic device and the second electronic device are different electronic devices; the first electronic device is an electronic device for acquiring the first image, and the second electronic device is an electronic device for displaying the first image.
8. The device according to claim 7, characterized in that The device also includes: a first acquisition module; The first acquisition module is configured to acquire a second image including the second object through a camera of the second electronic device before determining the target display direction based on the angle difference between the first face direction angle and the second face direction angle; The determining module is further used to determine the face direction angle of the second object according to the second image acquired by the first acquiring module.
9. The device according to claim 8, characterized in that The second image includes: at least two third objects; The first acquisition module is further used to acquire facial feature information of each of the third objects in the second image; The determining module is further configured to determine the third object that meets a preset condition as the second object based on the facial feature information of each third object acquired by the first acquiring module; Wherein, the satisfying of the preset condition includes any one of the following: The face size is the largest; The clarity of the face is greater than a first threshold; The tilt angle of the face is within a preset angle range.
10. The device according to claim 7, characterized in that The device further includes a second receiving module, a second acquiring module and a storage module, wherein: The second receiving module is used to receive a second input from a user; The second acquisition module is used to capture a first image through a first electronic device and acquire a first parameter in response to the second input received by the second receiving module, where the first parameter also includes relative position information of the first object and the first electronic device; The storage module is used to store the first image acquired by the second acquisition module in association with the first parameter.
11. The device according to claim 10, characterized in that The second acquisition module is specifically used to capture a first image through a first camera of a first electronic device; capture a third image through a second camera of the first electronic device, wherein the content of the third image includes the first object; and acquire a first parameter based on the first image and the third image.
12. The device according to claim 11, characterized in that The content of the third image includes: at least two objects; The second acquisition module is specifically configured to capture a third image through a second camera of the first electronic device; and determine the first object from the at least two objects based on a facial image of each of the objects in the third image.
13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image display method according to any one of claims 1 to 6 are implemented.
14. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the image display method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Screen picture rotating method and system
CN102760024A
Image shooting method and device and electronic equipment
CN112702527A