Image display method and device for a front camera
By displaying the front-facing camera feed with a translucent black overlay on a locked screen when the user's face is near, the method addresses the inconvenience and security issues of using a front-facing camera as a mirror, enhancing convenience and security.
Patent Information
- Application Number
- CN202211160830.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-09-22
AI Technical Summary
When users use the front camera of electronic devices as mirrors, they need to operate multiple steps and there is a risk of private information leakage, resulting in poor convenience and security.
When the electronic device is turned off, the distance between the user and the screen is obtained through the front camera. When the distance is less than or equal to the threshold, the shooting screen is directly displayed and the black mask with adjustable transparency is covered, simplifying operation and protecting privacy.
Improve the convenience and security of the front-facing camera function, reduce user operation time and reduce the risk of private information leakage.
Smart Images

Figure CN115529405B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image display, and particularly relates to an image display method and device for a front camera. Background Art
[0002] When going out, since it is inconvenient to carry a mirror with you, users can turn on the front camera of the electronic device to act as a mirror. That is, the user unlocks the electronic device, clicks to start the camera application, and adjusts the camera application to the front shooting mode, so as to use the picture displayed in the front shooting mode as a mirror.
[0003] However, in the above method, when the user uses the front camera as a mirror, the user needs to perform multiple operations to trigger the electronic device to display the picture in the front shooting mode, so as to use this picture as a mirror. Moreover, when the user uses the front camera as a mirror, other users can see the picture displayed on the electronic device. Therefore, there is a risk of leakage of the user's privacy information; thus, the convenience and security of the user using the front camera function of the electronic device are relatively poor. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide an image display method and device for a front camera, which can solve the problem of relatively poor convenience and security of the user using the front camera function of the electronic device.
[0005] In a first aspect, the embodiments of this application provide an image display method for a front camera. The image display method for the front camera includes: when the electronic device is in the screen-off state, if the information obtained through the camera of the electronic device meets the first preset condition, display the shooting picture of the front camera on the screen, and cover a black mask layer with a target transparency on the shooting picture.
[0006] In a second aspect, the embodiments of this application provide an image display device for a front camera. The image display device for the front camera includes: a display module. The display module is used to, when the electronic device is in the screen-off state, if the information obtained through the camera of the electronic device meets the first preset condition, display the shooting picture of the front camera on the screen, and cover a black mask layer with a target transparency on the shooting picture.
[0007] In a third aspect, the embodiments of this application provide an electronic device. The electronic device includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] Fourthly, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] Fifthly, an embodiment of the present application provides a chip, which includes a processor and a communication interface. 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.
[0010] Sixthly, 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.
[0011] In the embodiment of the present application, when the electronic device is in the screen-off state, the distance between the user's face and the screen of the electronic device can be obtained through the front camera. Thus, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device can display the captured image of the front camera in the screen-off state, and a black mask layer with a target transparency is covered on the captured image of the front camera. In this solution, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device determines / considers that the user needs to use the front camera function of the electronic device, for example, to view the user's image through the front camera. At this time, the electronic device can directly display the captured image of the front camera, so that the user can clearly view the captured image of the front camera, reducing the operations that the user needs to perform and the time consumed by the user's operations; covering a black mask layer with a target transparency on the captured image of the front camera reduces the risk of leakage of the user's privacy information while allowing the user to clearly view the captured image; thus improving the convenience and security of the user using the front camera function of the electronic device. Description of the Drawings
[0012] Figure 1 is one of the flowcharts of an image display method of a front camera provided by an embodiment of the present application;
[0013] Figure 2 is the second flowchart of an image display method of a front camera provided by an embodiment of the present application;
[0014] Figure 3 is an example schematic diagram of the display effect of an image in the screen-off mirror mode provided by an embodiment of the present application;
[0015] Figure 4 is the third flowchart of an image display method of a front camera provided by an embodiment of the present application;
[0016] Figure 5 It is the fourth flowchart of an image display method for a front camera provided by an embodiment of the present application;
[0017] Figure 6 It is a schematic diagram of an example for adjusting the transparency of a black mask layer based on the touch area provided by an embodiment of the present application;
[0018] Figure 7 It is a schematic diagram of an example for adjusting the transparency of a black mask layer based on the touch force provided by an embodiment of the present application;
[0019] Figure 8 It is a schematic diagram of an example for adjusting the transparency of a black mask layer based on the dragging input of a user to a target marker provided by an embodiment of the present application;
[0020] Figure 9 It is a schematic structural diagram of an image display device for a front camera provided by an embodiment of the present application;
[0021] Figure 10 It is one of the schematic hardware structures of an electronic device provided by an embodiment of the present application;
[0022] Figure 11 It is the second schematic hardware structure of an electronic device provided by an embodiment of the present application. Specific Embodiments
[0023] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0024] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order different from those illustrated or described herein, and the objects distinguished by "first", "second", etc. generally belong to the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0025] Next, in conjunction with the accompanying drawings, the image display method for a front camera provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0026] When going out, since it is inconvenient to carry a mirror with you, when the user needs to use a mirror, the user can unlock the electronic device, start an application with a shooting function in the electronic device (such as a camera application), and adjust the camera application to the front shooting mode, so as to display the current facial state of the user in real time through the shooting preview interface captured by the front camera, thus acting as a mirror for use.
[0027] However, in the existing solutions, when the user uses the front camera to act as a mirror, the user needs to perform multiple operations on the electronic device to trigger the electronic device to display the shooting preview interface captured by the front camera, which makes the steps that the user needs to operate rather cumbersome, and the electronic device needs to consume more time to respond to the multiple operations of the user, resulting in poor convenience when the user uses the front camera function of the electronic device.
[0028] In the embodiments of the present application, when the electronic device is in the screen-off state, the electronic device can obtain the distance between the user's face and the screen of the electronic device through the front camera. Thus, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device can display the shooting screen of the front camera in the screen-off state, and cover a black mask layer with a target transparency on the shooting screen captured by the front camera. In this solution, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device determines / considers that the user needs to use the front camera function of the electronic device, for example, to view the user's image through the front camera. At this time, the electronic device can directly display the shooting screen of the front camera, enabling the user to clearly view the shooting screen of the front camera, reducing the operations that the user needs to perform, and reducing the time consumed by the user's operations; covering a black mask layer with a target transparency on the shooting screen captured by the front camera reduces the risk of leakage of the user's privacy information while enabling the user to clearly view the shooting screen; thereby improving the convenience and security of the user when using the front camera function of the electronic device.
[0029] The embodiments of the present application provide a method for displaying an image of a front camera. Figure 1 The flowchart of a method for displaying an image of a front camera provided by the embodiments of the present application is shown. As Figure 1 shown, the method for displaying an image of a front camera provided by the embodiments of the present application may include the following steps 201 and 202.
[0030] Step 201: When the electronic device is in the screen-off state, the electronic device obtains information through the camera of the electronic device.
[0031] Optionally, in a scenario of an embodiment of the present application, when the electronic device is in the screen-off state, the electronic device can turn on the front camera and run the front camera function in the background to collect / capture images in real time through the front camera, so as to obtain the captured images of the front camera.
[0032] Optionally, in another scenario of an embodiment of the present application, when the electronic device is in the screen-off state, the electronic device can turn on the front camera and the rear camera, and run the front camera function and the rear camera function in the background to collect / capture images in real time through the front camera, so as to obtain the captured images of the front camera, and collect / capture images through the rear camera, so as to obtain the captured images of the rear camera.
[0033] Optionally, in an embodiment of the present application, when the electronic device is in the screen-off state and before the electronic device obtains information through the camera of the electronic device, the user can input to the screen-off mirror control in the settings application, or the user can input to the physical button / physical button combination of the electronic device to trigger the electronic device to turn on the screen-off mirror mode. In the screen-off mirror mode, if the electronic device detects that the electronic device is in the screen-off state, then the electronic device can turn on the camera of the electronic device to obtain information through the camera of the electronic device.
[0034] Step 202: If the information obtained by the electronic device through the camera of the electronic device meets the first preset condition, then display the captured image of the front camera on the screen, and overlay a black mask layer with a target transparency on the captured image.
[0035] In an embodiment of the present application, the above first preset condition is that the distance between the user's face captured by the front camera and the screen of the electronic device is less than or equal to a threshold.
[0036] Optionally, in an implementation manner of an embodiment of the present application, when the distance is less than or equal to the first threshold, the electronic device can display the captured image of the front camera on the screen in the screen-off state, and overlay a black mask layer with a target transparency on the captured image. Specifically, the electronic device can first overlay a first layer on the screen in the screen-off state, that is, the layer for displaying the captured image of the front camera, and then overlay a second layer on this layer, that is, the black mask layer with the target transparency.
[0037] Optionally, in another implementation manner of the embodiments of the present application, when the distance is less than or equal to the first threshold, the electronic device may display the captured image of the front camera on the screen in the lit screen state, and overlay a black mask with a target transparency on the captured image. Specifically, the electronic device may run the front camera in the foreground, that is, display / jump to the shooting interface of the front camera, so as to display the captured image of the front camera in the shooting interface, and overlay a black mask with a target transparency on the entire shooting interface.
[0038] Optionally, in the embodiments of the present application, the above-mentioned target transparency may be any one of the following: the transparency preset by the user, the default transparency of the electronic device system, and the transparency determined according to the number of users detected by the cameras (front and rear cameras) of the electronic device (the more users, the lower the transparency).
[0039] Optionally, in the embodiments of the present application, after the electronic device overlays a black mask with a target transparency on the captured image, the color information (such as color saturation, color brightness, etc.) of the captured image displayed on the screen may be suppressed, so that while displaying the captured image of the front camera, the off-screen state of the electronic device can be simulated.
[0040] Optionally, in an implementation manner of the embodiments of the present application, in combination with Figure 1 , as Figure 2 shown, the above step 202 may be specifically implemented by the following steps 202a and 202b.
[0041] Step 202a: The electronic device obtains the distance between the user's face and the screen of the electronic device through the front camera of the electronic device.
[0042] Optionally, in the embodiments of the present application, the electronic device may detect whether the captured image of the front camera contains a user face image. When the captured image of the front camera contains a user face image, the electronic device may obtain the distance between the user's face and the screen of the electronic device through the front camera.
[0043] Optionally, in the embodiments of the present application, the electronic device may match the user face image included in the captured image of the front camera with a preset face image. When the two face images match, the electronic device may obtain the distance between the user's face and the screen of the electronic device through the front camera.
[0044] Optionally, in the embodiments of the present application, the electronic device may, according to the real-time captured image of the front camera, establish a spatial coordinate system through 3D measurement technology, respectively obtain the spatial coordinate positions of the user's face and the screen of the electronic device in the space, and calculate the distance between the user's face and the screen of the electronic device in the space according to the two spatial coordinate positions.
[0045] Step 202b: When the distance is less than or equal to the first threshold, the electronic device displays the captured image of the front camera on the screen, and covers the captured image with a black mask layer having a target transparency.
[0046] In the embodiment of the present application, the above-mentioned target transparency is a preset transparency.
[0047] Optionally, in the embodiment of the present application, while the electronic device displays the captured image of the front camera on the screen, it can generate a black mask layer having the same size as the screen and the target transparency, and cover it on the displayed captured image, so that the finally displayed image on the screen is the captured image covered with the black mask layer, thereby enabling the image displayed by the electronic device in the off-screen mirror mode to simulate the image displayed by the electronic device in the ordinary off-screen state in terms of color. It should be noted that the image displayed in the off-screen mirror mode refers to the image captured by the front camera of the electronic device in real time, and the image displayed in the ordinary off-screen state refers to the image shown by using the off-screen as a mirror, so the former has better clarity than the latter.
[0048] Exemplarily, taking the electronic device as a mobile phone as an example. As Figure 3 shown in (a) of, when the mobile phone detects that the distance between the user's face and the mobile phone screen is less than or equal to the first threshold, the mobile phone can display the real-time captured image of the front camera on the screen, and simultaneously generate a black mask layer with a target transparency of 50%, and cover it on the real-time captured image displayed on the screen, to obtain the image shown in (b) of Figure 3 , that is, the finally displayed image on the screen is the captured image covered with the black mask layer. It can be understood that the covered black mask layer of the mobile phone does not affect the clarity of the real-time captured image of the front camera displayed on the mobile phone screen, but reduces the brightness of the real-time captured image, so that while the user can clearly view the captured image of the front camera displayed on the mobile phone screen, the user's privacy is protected from being leaked.
[0049] Optionally, in another implementation manner of the embodiment of the present application, in combination with Figure 1 , as Figure 4 shown, the above-mentioned step 202 can be specifically implemented by the following step 202c and step 202d.
[0050] Step 202c: The electronic device obtains the distance between the user's face and the screen of the electronic device through the front camera of the electronic device, and obtains the number of target users within the first range through the front camera and the rear camera of the electronic device.
[0051] In the embodiment of the present application, the above-mentioned first range is the shooting range of the front camera and the rear camera.
[0052] It can be understood that the number of users in the above first range is the sum of the number of users in the captured image of the front camera and the number of users in the captured image of the rear camera.
[0053] Optionally, in the embodiment of the present application, the electronic device obtains the captured image of the front camera through the front camera, so that the number of users in the captured image of the front camera can be obtained through face recognition technology according to the captured image of the front camera.
[0054] Optionally, in the embodiment of the present application, the electronic device obtains the captured image of the rear camera through the rear camera, so that the number of users in the captured image of the rear camera can be obtained through people counting technology according to the captured image of the rear camera.
[0055] Optionally, in the embodiment of the present application, after "obtaining the number of target users in the first range through the front camera and the rear camera of the electronic device" in the above step 202c, the image display method of the front camera provided by the embodiment of the present application further includes the following step 301.
[0056] Step 301: When the distance is less than or equal to the first threshold and the number of target users is less than or equal to the second threshold, if the orientation of the target user relative to the electronic device meets the second preset condition, the electronic device displays the captured image of the front camera on the screen.
[0057] In the embodiment of the present application, the above second preset condition includes at least one of the following: the included angle value between the position where the target user is located and the screen of the electronic device is outside the target included angle range, and the distance between the target user and the electronic device is greater than or equal to the third threshold; the target included angle range is the visual angle range of the user with respect to the screen.
[0058] It can be understood that when the number of users is less than or equal to the second threshold, the electronic device determines that the current environment where the user is located is an environment with very few people, that is, there are very few users around the user. At this time, if the orientation of the target user relative to the electronic device meets the second preset condition, that is, due to the influence of the included angle or the distance between the position where the target user is located and the electronic device, the target user cannot directly view the screen of the electronic device, the electronic device can directly display the captured image of the front camera on the screen, without covering the black layer with the target transparency on the captured image, so that the user can clearly view the captured image of the front camera, and at the same time, there is no need to worry about other users viewing the captured image of the front camera, thereby reducing the risk of user privacy leakage.
[0059] Step 202d: When the distance is less than or equal to the first threshold and the number of target users is greater than the second threshold, the electronic device displays the captured image of the front camera on the screen and covers a black mask with a target transparency on the captured image.
[0060] In the embodiment of the present application, the above-mentioned target transparency is positively correlated with the number of target users.
[0061] Optionally, in the embodiment of the present application, the relationship between the above-mentioned target transparency and the number of users is as shown in Formula 1, that is, the electronic device calculates the target transparency of the black mask based on the number of users in the first range using Formula 1.
[0062] y1 = k1n + b1 Formula 1
[0063] Where y1 is the transparency of the black mask (i.e., the target transparency), n is the number of users, k1 is a fixed constant less than 0, and b1 is a preset fixed constant.
[0064] It should be noted that as the number of users obtained by the electronic device increases, the target transparency of the black mask decreases based on b1. That is, when the number of users is greater than the second threshold, the more users there are, the lower the transparency of the black mask displayed by the electronic device on the captured image of the front camera. When the target transparency is equal to a threshold value (for example, the target transparency is 20%), the value of the target transparency no longer decreases with the increase in the number of users to ensure the clarity of the captured image displayed by the electronic device for the user to view.
[0065] It should be noted that for the specific solution of the electronic device to display the captured image of the front camera on the screen and cover a black mask with a target transparency on the captured image, reference can be made to the description in the above embodiment, and details will not be elaborated here.
[0066] In the embodiment of the present application, the electronic device obtains the number of users in the first range through the front camera and the rear camera, and obtains the target transparency of the black mask based on the number of users. That is, the electronic device judges the current environment where the user is located by the number of users obtained. Thus, when the environment where the user is located is an environment with a large number of people, the electronic device can set the target transparency of the black mask to a lower value to reduce the detailed display of the captured image of the front camera, making it difficult for other users except the user to clearly view the captured image of the front camera, thereby protecting the user's privacy and enabling the user to better use the front camera function in different places.
[0067] In an embodiment of the present application, when the distance is less than or equal to the first threshold, if the number of users is greater than the second threshold, the embodiment of the present application may execute the above steps 202c and 202d. If the number of users is less than or equal to the second threshold, the embodiment of the present application may execute the above steps 202c and 301.
[0068] An embodiment of the present application provides an image display method for a front camera. When the electronic device is in the screen-off state, it can obtain the distance between the user's face and the screen of the electronic device through the front camera. Thus, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device can display the captured image of the front camera in the screen-off state, and cover a black mask with a target transparency on the captured image of the front camera. In this solution, when the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device determines / considers that the user needs to use the front camera function of the electronic device, such as viewing the user's image through the front camera. At this time, the electronic device can directly display the captured image of the front camera, enabling the user to clearly view the captured image of the front camera, reducing the operations that the user needs to perform, and reducing the time consumed by the user's operations; covering a black mask with a target transparency on the captured image of the front camera reduces the risk of leakage of the user's privacy information while enabling the user to clearly view the captured image; thereby improving the convenience and security of the user using the front camera function of the electronic device.
[0069] Optionally, in an embodiment of the present application, in combination with Figure 1 , as Figure 5 shown, after the above step 202, the image display method for the front camera provided by the embodiment of the present application further includes the following steps 401 and 402.
[0070] Step 401: When detecting a touch input on the first area of the screen by the user, the electronic device obtains the touch area and touch force of the first area.
[0071] Optionally, in an embodiment of the present application, the above touch input is any possible form of input such as a click input, a slide input, or a long press input by the user on the first area.
[0072] It should be noted that the above touch area is the area touched by the user's finger or other objects that can be sensed by the capacitive screen on the screen. The above touch force is the force applied by the user when performing a touch input on the screen of the electronic device.
[0073] Step 402: When the touch area of the first area is the first area, the electronic device adjusts the transparency of the second area in the black mask from the target transparency to the first transparency according to the touch force.
[0074] In the embodiment of the present application, the second area is the area in the black mask layer corresponding to the first area and having a positive correlation with the touch area of the first area; the first transparency is greater than the target transparency and has a positive correlation with the touch force.
[0075] In the embodiment of the present application, the area of the black mask layer whose transparency is to be adjusted corresponds to the first area touched by the user. The size of the touch area determines the size of the area of the black mask layer whose transparency is to be adjusted, and the size of the touch force determines the transparency of the area of the black mask layer whose transparency is to be adjusted. Among them, the touch area has a positive correlation with the area of the black mask layer whose transparency is to be adjusted, that is, the larger the touch area, the larger the area of the black mask layer whose transparency is to be adjusted; the touch force has a positive correlation with the transparency of the area of the black mask layer whose transparency is to be adjusted, that is, the larger the touch force, the greater the transparency of the area of the black mask layer whose transparency is to be adjusted.
[0076] Optionally, in the embodiment of the present application, the electronic device may use Formula 2 to calculate the area of the area of the black mask layer whose transparency is to be adjusted according to the touch area, so as to adjust the transparency of the area of this size (i.e., the second area) in the black mask layer.
[0077] y2 = k2x2 + b2 Formula 2
[0078] Wherein, y2 is the area of the area of the black mask layer whose transparency is to be adjusted, x2 is the touch area of the first area, k2 is a fixed constant greater than 0, and b2 is a fixed constant.
[0079] Exemplarily, in combination with Figure 3 in (b), as shown in Figure 6 in (a), when the touch area of the user on the first area is the second area, the area of the area of the black mask layer whose transparency is to be adjusted corresponding to the touch area is smaller. As shown in Figure 6 in (b), when the touch area of the user on the first area is the third area, the area of the area of the black mask layer whose transparency is to be adjusted corresponding to the touch area is larger, where the second area is smaller than the third area.
[0080] Optionally, in the embodiment of the present application, the user can perform a left swipe input or a right swipe input on the screen of the electronic device, so that the electronic device adjusts the transparency of the black mask layer covering the captured image, so that the electronic device can better display the captured image of the front camera to meet the user's brightness requirement for viewing the captured image.
[0081] Optionally, in the embodiments of the present application, the electronic device may use Equation 3 to calculate the first transparency of the second area according to the touch force, so that the transparency of the second area is adjusted from the target transparency to the first transparency.
[0082] y3 = k3x3 + b3 Equation 3
[0083] Wherein, y3 is the first transparency of the second area, x3 is the touch force of the user on the first area, k3 is a fixed constant greater than 0, and b3 is the target transparency of the second area.
[0084] Exemplarily, in combination with Figure 3 in (b), as shown in Figure 7 in (a), when the touch force of the user on the first area is the first force value, the mobile phone can make a small adjustment (for example, 10%) on the basis of the target transparency; as shown in Figure 7 in (b), when the touch force of the user on the first area is the second force value, the mobile phone can make a large adjustment (for example, 30%) on the basis of the target transparency, wherein the first force value is less than the second force value.
[0085] In the embodiments of the present application, the electronic device may determine the area of the area where the transparency of the black mask layer is to be adjusted according to the touch area of the touch input of the user on the first area, and determine the transparency size of the area where the transparency of the black mask layer is to be adjusted according to the touch force, so as to accurately and quickly adjust the transparency of the area in the black mask layer, thereby improving the convenience and flexibility of the electronic device in adjusting the transparency, and at the same time making the display screen of the electronic device have diversity.
[0086] Optionally, in the embodiments of the present application, after the above step 402, the image display method of the front camera provided by the embodiments of the present application further includes the following steps 403 to 405.
[0087] Step 403: The electronic device displays a target mark in the second area.
[0088] In the embodiments of the present application, the above target mark is used to mark the second area with the first transparency in the black mask layer.
[0089] Optionally, in the embodiments of the present application, the electronic device may display the target mark in a preset shape, or display the target mark according to the shape of the second area. Wherein, the shape of the target mark may include, but is not limited to, at least one of the following shapes: circle, triangle, rhombus, and irregular shape.
[0090] Optionally, in the embodiments of the present application, after the electronic device adjusts the transparency of the second area, the user can input to the second area (such as click input or long - press input) so that the electronic device can display a target mark on the second area.
[0091] Step 404: The electronic device receives the first input from the user.
[0092] In the embodiments of the present application, the above - mentioned first input is an input for the user to drag the target mark from the second area to the third area in the black mask layer.
[0093] Step 405: In response to the first input, the electronic device adjusts the transparency of the third area from the target transparency to the first transparency.
[0094] It should be noted that the area of the above - mentioned third area is the same as the area of the second area.
[0095] Exemplarily, in combination with Figure 7 (b) in Figure 8 As shown, when the user moves the target mark from the second area (such as the mouth area) to the third area (such as the eye area), the mobile phone can use the position where the target mark moves as the center of the circle, and determine the area with the same area as the second area as the third area, so as to adjust the transparency of the third area to the first transparency of the second area.
[0096] In the embodiments of the present application, the user can move the target mark in the second area to the third area, so that the electronic device directly adjusts the transparency of the third area with the transparency of the second area (i.e., the first transparency), without the user having to perform a touch input on the third area again to enable the electronic device to calculate the transparency of the third area again, improving the convenience and flexibility of the electronic device to adjust the transparency of the area.
[0097] It should be noted that for the image display method of the front - facing camera provided in the embodiments of the present application, the execution subject can be an image display device of the front - facing camera, or an electronic device, or also a functional module or entity in the electronic device. In the embodiments of the present application, taking the electronic device as an example to execute the image display method of the front - facing camera, the image display device of the front - facing camera provided in the embodiments of the present application is described.
[0098] Figure 9 Shows a possible structural schematic diagram of the image display device of the front - facing camera involved in the embodiments of the present application. As Figure 9 shown, the image display device 70 of the front - facing camera may include: a display module 71.
[0099] Among them, the display module 71 is used to display the captured image of the front camera on the screen and overlay a black mask with a target transparency on the captured image when the information obtained through the camera of the electronic device meets the first preset condition when the electronic device is in the screen-off state.
[0100] An embodiment of the present application provides an image display device for a front camera. When the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device determines / considers that the user needs to use the front camera function of the electronic device, such as viewing the user's image through the front camera. At this time, the electronic device can directly display the captured image of the front camera, enabling the user to clearly view the captured image of the front camera, reducing the operations that the user needs to perform, and reducing the time consumed by the user's operations; overlaying a black mask with a target transparency on the captured image of the front camera reduces the risk of leakage of the user's privacy information while enabling the user to clearly view the captured image; thus improving the convenience and security of the user using the front camera function of the electronic device.
[0101] In a possible implementation manner, the above display module 71 is specifically configured to obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device; and when the distance is less than or equal to the first threshold, display the captured image of the front camera on the screen and overlay a black mask with a target transparency on the captured image, and the target transparency is a preset transparency.
[0102] In a possible implementation manner, the above display module 71 is specifically configured to obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device, and obtain the number of target users within a first range through the front camera and the rear camera of the electronic device, where the first range is the shooting range of the front camera and the rear camera; and when the distance is less than or equal to the first threshold and the number of target users is greater than the second threshold, display the captured image of the front camera on the screen and overlay a black mask with a target transparency on the captured image, and the target transparency is positively correlated with the number of target users.
[0103] In a possible implementation, the above display module 71 is further configured to, after obtaining the number of target users within a first range through the front camera and the rear camera of the electronic device, when the distance is less than or equal to a first threshold and the number of target users is less than or equal to a second threshold, if the orientation of the target user relative to the electronic device satisfies a second preset condition, then display the captured image of the front camera on the screen; the second preset condition includes at least one of the following: the included angle value between the position where the target user is located and the screen of the electronic device is outside the target included angle range, and the distance of the target user relative to the electronic device is greater than or equal to a third threshold; the target included angle range is the visual angle range of the user with respect to the screen.
[0104] In a possible implementation, the above image display device of the front camera further includes: an acquisition module and an adjustment module. Among them, the above acquisition module is configured to, after the display module 71 covers a black mask with a target transparency on the captured image, when detecting a touch input on a first area of the screen, acquire the touch area and the touch force of the first area. The above adjustment module is configured to, when the touch area of the first area acquired by the acquisition module is a first area, adjust the transparency of a second area in the black mask from the target transparency to a first transparency according to the touch force acquired by the acquisition module. Among them, the second area is the area in the black mask corresponding to the first area and whose area is positively correlated with the touch area of the first area; the first transparency is greater than the target transparency and is positively correlated with the touch force.
[0105] In a possible implementation, the above image display device of the front camera further includes: a receiving module. The above display module 71 is further configured to, after adjusting the transparency of the second area in the black mask from the target transparency to the first transparency according to the touch force, display a target mark in the second area. The above receiving module is configured to receive a first input from the user, and the first input is an input for the user to drag the target mark from the second area to a third area in the black mask. The above adjustment module is further configured to, in response to the first input, adjust the transparency of the third area from the target transparency to the first transparency.
[0106] The image display device of the front camera in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than terminals. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0107] The image display device of the front camera in the embodiments of the present application can be a device with an operating system. The operating system can be the Android operating system, the iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0108] The image display device of the front camera provided in the embodiments of the present application can implement each process implemented in the above method embodiments. To avoid repetition, it will not be elaborated here.
[0109] Optionally, as Figure 10 shown, the embodiments of the present application further provide an electronic device 90, including a processor 91 and a memory 92. A program or instruction that can run on the processor 91 is stored on the memory 92. When the program or instruction is executed by the processor 91, it implements each step of the above method embodiment of the image display method of the front camera and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0110] It should be noted that the electronic device in the embodiments of the present application includes the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0111] Figure 11 Schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.
[0112] 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, etc.
[0113] Those skilled in the art can understand that the electronic device 100 may further include a power source (such as a battery) for supplying power to each component. The power source can be logically connected to the processor 110 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 11 The structure of the electronic device shown does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0114] Among them, the display unit 106 is used to, when the electronic device is in the screen-off state, if the information obtained through the camera of the electronic device meets the first preset condition, display the captured image of the front camera on the screen and cover a black mask with a target transparency on the captured image.
[0115] The embodiment of the present application provides an electronic device. When the distance between the user's face and the screen of the electronic device is less than or equal to the first threshold, the electronic device determines / considers that the user needs to use the front camera function of the electronic device. For example, by viewing the user's image through the front camera. At this time, the electronic device can directly display the captured image of the front camera, so that the user can clearly view the captured image of the front camera, reducing the operations that the user needs to perform and the time consumed by the user's operations; covering a black mask with a target transparency on the captured image of the front camera reduces the risk of leakage of the user's privacy information while allowing the user to clearly view the captured image; thereby improving the convenience and security of the user using the front camera function of the electronic device.
[0116] Optionally, the processor 110 is specifically configured to obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device. The display unit 106 is specifically configured to, when the distance is less than or equal to the first threshold, display the captured image of the front camera on the screen and cover a black mask with a target transparency on the captured image, and the target transparency is a preset transparency.
[0117] Optionally, the processor 110 is specifically configured to obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device, and obtain the number of target users within a first range through the front camera and the rear camera of the electronic device. The first range is the shooting range of the front camera and the rear camera. The display unit 106 is specifically configured to, when the distance is less than or equal to a first threshold and the number of target users is greater than a second threshold, display the shooting screen of the front camera on the screen, and overlay a black mask with a target transparency on the shooting screen. The target transparency is positively correlated with the number of target users.
[0118] Optionally, the display unit 106 is further configured to, after the processor 110 obtains the number of target users within the first range through the front camera and the rear camera of the electronic device, when the distance is less than or equal to the first threshold and the number of target users is less than or equal to the second threshold, if the orientation of the target user relative to the electronic device meets a second preset condition, then display the shooting screen of the front camera on the screen; the second preset condition includes at least one of the following: the included angle value between the position where the target user is located and the screen of the electronic device is outside the target included angle range, and the distance of the target user relative to the electronic device is greater than or equal to a third threshold; the target included angle range is the visual angle range of the user with respect to the screen.
[0119] Optionally, after overlaying a black mask with a target transparency on the shooting screen, the processor 110 is further configured to, when detecting a touch input on a first area of the screen, obtain the touch area and touch force of the first area; and when the touch area of the first area is a first area, adjust the transparency of a second area in the black mask from the target transparency to a first transparency according to the touch force. Wherein, the second area is the area in the black mask corresponding to the first area and whose area is positively correlated with the touch area of the first area; the first transparency is greater than the target transparency and is positively correlated with the touch force.
[0120] Optionally, after adjusting the transparency of the second area in the black mask from the target transparency to the first transparency according to the touch force, the processor 110 is further configured to display a target mark in the second area. The user input unit 107 is further configured to receive a first input from the user. The first input is an input for the user to drag the target mark from the second area to a third area in the black mask. The processor 110 is further configured to, in response to the first input, adjust the transparency of the third area from the target transparency to the first transparency.
[0121] The electronic device provided in the embodiments of the present application can implement each process implemented by the above method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0122] For the beneficial effects of various implementation manners in this embodiment, reference may be specifically made to the beneficial effects of the corresponding implementation manners in the foregoing method embodiment. To avoid repetition, they will not be elaborated herein.
[0123] It should be understood that, in the embodiment of the present application, the input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes the image data of static pictures or videos obtained by an image capturing 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, for example, a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. The 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 elaborated herein.
[0124] 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. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both a volatile memory and a non-volatile memory. 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 (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0125] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor 110 either.
[0126] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0127] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0128] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above method embodiment and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0129] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-on-chip, system chip, chip system, or system-on-chip.
[0130] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above method embodiment and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0131] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including that 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. It may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described method can be executed in a different order than described, and various steps can be added, omitted, or combined. Additionally, features described with reference to certain examples can be combined in other examples.
[0132] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0133] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. An image display method, characterized in that, The method includes: When the electronic device is in the screen-off state, obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device, and obtain the number of target users within a first range through the front camera and the rear camera of the electronic device, where the first range is the shooting range of the front camera and the rear camera; When the distance is less than or equal to a first threshold and the number of target users is greater than a second threshold, display the shooting screen of the front camera on the screen, and overlay a black mask with a target transparency on the shooting screen, where the target transparency is positively correlated with the number of target users.
2. The method according to claim 1, wherein After obtaining the number of target users within a first range through the front camera and the rear camera of the electronic device, the method further includes: When the distance is less than or equal to a first threshold and the number of target users is less than or equal to a second threshold, if the orientation of the target user relative to the electronic device satisfies a second preset condition, display the shooting screen of the front camera on the screen; the second preset condition includes at least one of the following: the included angle value between the position where the target user is located and the screen of the electronic device is outside a target included angle range, the distance of the target user relative to the electronic device is greater than or equal to a third threshold; the target included angle range is the visual angle range of the user with respect to the screen.
3. The method according to any one of claims 1 to 2, characterized in that After overlaying a black mask with a target transparency on the shooting screen, the method further includes: When a touch input to a first area of the screen is detected, obtain the touch area and touch force of the first area; When the touch area of the first area is a first area, adjust the transparency of a second area in the black mask from the target transparency to a first transparency according to the touch force; Wherein, the second area is the area in the black mask corresponding to the first area and whose area is positively correlated with the touch area of the first area; the first transparency is greater than the target transparency and is positively correlated with the touch force.
4. The method according to claim 3, wherein After adjusting the transparency of the second area in the black mask from the target transparency to a first transparency according to the touch force, the method further includes: Display a target mark in the second area; Receive a first input from the user, where the first input is an input for the user to drag the target mark from the second area to a third area in the black mask; In response to the first input, adjust the transparency of the third area from the target transparency to the first transparency.
5. An image display device for a front camera, applied to an electronic device, characterized in that, The device includes: a display module; The display module is configured to obtain the distance between the user's face and the screen of the electronic device through the front camera of the electronic device, and obtain the number of target users within a first range through the front camera and the rear camera of the electronic device, where the first range is the shooting range of the front camera and the rear camera; and when the distance is less than or equal to a first threshold and the number of target users is greater than a second threshold, display the shooting screen of the front camera on the screen, and overlay a black mask with a target transparency on the shooting screen, where the target transparency is positively correlated with the number of target users.
6. The device according to claim 5, characterized in that, The display module is further configured to, after obtaining the number of target users within a first range through the front camera and the rear camera of the electronic device, when the distance is less than or equal to a first threshold and the number of target users is less than or equal to a second threshold, if the orientation of the target user relative to the electronic device meets a second preset condition, display the shooting screen of the front camera on the screen. The second preset condition includes at least one of the following: the included angle value between the position where the target user is located and the screen of the electronic device is outside a target angle range, and the distance of the target user relative to the electronic device is greater than or equal to a third threshold; the target angle range is the visible angle range of the user with respect to the screen.
7. The device according to any one of claims 5 to 6, characterized in that, The device further includes: an acquisition module and an adjustment module. The acquisition module is configured to, after the display module overlays a black mask with a target transparency on the shooting screen, when a touch input to a first area of the screen is detected, obtain the touch area and touch force of the first area. The adjustment module is configured to, when the touch area of the first area obtained by the acquisition module is a first area, adjust the transparency of a second area in the black mask from the target transparency to a first transparency according to the touch force obtained by the acquisition module. Wherein, the second area is the area in the black mask corresponding to the first area and whose area is positively correlated with the touch area of the first area; the first transparency is greater than the target transparency and is positively correlated with the touch force.
8. The device according to claim 7, wherein, The device further includes: a receiving module. The display module is further configured to, after adjusting the transparency of the second area in the black mask from the target transparency to a first transparency according to the touch force, display a target mark in the second area. The receiving module is configured to receive a first input from the user, where the first input is an input for the user to drag the target mark from the second area to a third area in the black mask. The adjustment module is further configured to, in response to the first input, adjust the transparency of the third area from the target transparency to the first transparency.
Citation Information
Patent Citations
Method and device for controlling terminal, terminal equipment and computer readable storage medium
CN107168620A
Unlocking control method and device and storage medium
CN113672109A