Image pickup program control method and apparatus, electronic device, and storage medium

CN116027914BActive Publication Date: 2026-09-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111243021.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2026-09-29
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

但是为了满足人们快速启动摄像程序进行拍照或摄像的需求,锁屏界面会设置一个摄像程序启动按键,当用户对该按键进行触控时,可以越过解锁步骤直接进入到摄像程序,然而这也导致在锁屏状态下,该按键容易被误触而错误的进入到摄像程序内,甚至进一步的误拍摄图像或误录制视频

Benefits of technology

[0069]本公开在终端设备由锁屏状态进入摄像程序时,获取至少一个运动传感器采集的运动参数,并根据所述至少一个运动传感器采集的运动参数确定所述终端设备的运动状态,在运动状态为移动状态时,获取终端设备显示屏的误触率,在误触率大于预设的第一比例阈值时,退出摄像程序。由于移动状态过程中的终端设备被使用的概率极低,而且较高的误触率用于表征触控操作为异常触控操作,即非用户正常使用过程中的触控操作,因此在终端设备由锁屏状态该进入摄像程序后,结合上述两个方面的判断,能够准确的确定进入摄像程序的操作为正常操作还是误操作,而且在确定为误操作时推出摄像程序,从而解决了锁屏状态下误触锁屏界面内的摄像程序启动按键而错误进入摄像程序的问题,避免了错误进入摄像程序后拍摄照片或录制视频,从而极大的改善了用户体验,提高了锁屏状态的使用安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116027914B_ABST
    Figure CN116027914B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a camera program control method and device, electronic equipment and storage medium. The method is applied to a terminal device, and includes: in response to the terminal device entering a camera program from a lock screen state, acquiring motion parameters collected by at least one motion sensor, and determining a motion state of the terminal device according to the motion parameters collected by the at least one motion sensor; in response to the motion state of the terminal device being a moving state, acquiring a mis-touch rate of a display screen of the terminal device, wherein the mis-touch rate includes a ratio of a mis-touch number of the display screen to a touch number of the display screen, a case where a control within a picture of the display screen is touched is normal touch, and a case where an area outside the control within the picture of the display screen is touched is mis-touch; and in response to the mis-touch rate being greater than a preset first proportion threshold, exiting the camera program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of camera technology, specifically to a camera program control method, apparatus, electronic device, and storage medium. Background Technology

[0002] Smartphones and other mobile devices have become an indispensable part of people's lives, and people seem unable to live without them in various situations. When not using the device, especially when carrying it on the go, people usually lock the screen to avoid accidental touches. However, to meet the need for quick access to camera apps for taking photos or videos, the lock screen includes a camera app launch button. Touching this button allows users to bypass the unlocking process and directly enter the camera app. However, this also makes it easy for this button to be accidentally pressed while the screen is locked, leading to unintended access to the camera app and potentially resulting in accidental photos or videos being taken or recorded. Summary of the Invention

[0003] To overcome the problems existing in the related technologies, this disclosure provides a camera program control method, apparatus, electronic device, and storage medium to solve the defects in the related technologies.

[0004] According to a first aspect of the present disclosure, a camera program control method is provided, applied to a terminal device, comprising:

[0005] In response to the terminal device entering the camera program from the locked screen state, the motion parameters collected by at least one motion sensor are acquired, and the motion state of the terminal device is determined based on the motion parameters collected by the at least one motion sensor.

[0006] In response to the terminal device being in a moving state, the false touch rate of the terminal device's display screen is obtained, wherein the false touch rate includes the ratio of the number of false touches to the number of touches on the display screen, and the situation where the controls within the screen are touched is considered a normal touch, while the situation where the area outside the controls within the screen is touched is considered a false touch.

[0007] If the false touch rate exceeds a preset first proportional threshold, the camera program is exited.

[0008] In one embodiment, acquiring motion parameters collected by at least one motion sensor and determining the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor includes:

[0009] Obtain the angle value of the terminal device collected by the gyroscope;

[0010] In response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

[0011] In one embodiment, the step of continuously changing the angle value of the terminal device within a preset angle range in response to the angle value of the terminal device, and the change process including two opposite directions, to determine that the terminal device is in the moving state, includes:

[0012] In response to the angle value of the terminal device, the angle continuously changes within a preset angle range, and the change process includes two opposite directions, thereby acquiring the acceleration value of the terminal device collected by the acceleration sensor;

[0013] The horizontal movement speed of the terminal device is determined based on the acceleration value;

[0014] In response to the horizontal movement speed of the terminal device being within a predetermined speed range, it is determined that the operating state of the terminal device is in the moving state.

[0015] In one embodiment, it also includes:

[0016] The angle values ​​of the terminal device acquired by the gyroscope are low-pass filtered; and / or,

[0017] The acceleration values ​​of the terminal device collected by the acceleration sensor are subjected to low-pass filtering.

[0018] In one embodiment, obtaining the accidental touch rate of the terminal device's display screen includes:

[0019] Obtain the accidental touch rate of the terminal device's display screen within a preset time period; and / or,

[0020] In response to the number of touches on the display screen reaching a preset threshold, the false touch rate of the terminal device display screen is obtained.

[0021] In one embodiment, prior to exiting the camera program, the method further includes:

[0022] Obtain the pixel value of each pixel within the viewfinder of the display screen;

[0023] Based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels;

[0024] Exiting the camera program includes:

[0025] If the black screen ratio is greater than a preset second ratio threshold, the camera program will exit.

[0026] In one embodiment, prior to exiting the camera program, the method further includes:

[0027] A prompt window is generated, wherein the prompt window is used to notify the user that the camera program is about to exit;

[0028] In response to receiving a cancellation instruction, the camera recording program is maintained, wherein the cancellation instruction indicates that the camera recording program is maintained;

[0029] Exiting the camera program includes:

[0030] In response to receiving a confirmation instruction and / or the duration of the generated prompt window exceeding a preset duration threshold, the camera program exits, wherein the confirmation instruction is used to indicate that the camera program is exiting.

[0031] In one embodiment, after exiting the camera program, the method further includes:

[0032] The device is restored to the locked screen state, and the images and videos captured after the terminal device enters the camera program from the locked screen state are deleted.

[0033] In one embodiment, after exiting the camera program, the method further includes:

[0034] Return to the lock screen state and disable the camera app launch button on the lock screen interface.

[0035] According to a second aspect of the present disclosure, a camera program control device is provided, applied to a terminal device, comprising:

[0036] A motion state module is used to respond to the terminal device entering the camera program from the locked screen state, acquire motion parameters collected by at least one motion sensor, and determine the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor.

[0037] The accidental touch statistics module is used to obtain the accidental touch rate of the terminal device's display screen in response to the terminal device's motion state being a moving state. The accidental touch rate includes the ratio of the number of accidental touches on the display screen to the number of touches on the display screen. Touching the controls within the display screen is considered a normal touch, while touching the area outside the controls within the display screen is considered an accidental touch.

[0038] The program control module is used to exit the camera program in response to the false touch rate being greater than a preset first proportional threshold.

[0039] In one embodiment, the motion state module is configured to:

[0040] Obtain the angle value of the terminal device collected by the gyroscope;

[0041] In response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

[0042] In one embodiment, the motion state module is configured to respond to the angle value of the terminal device, continuously changing within a preset angle range, and the change process includes two opposite directions. When determining that the terminal device is in the moving state, it is specifically used for:

[0043] In response to the angle value of the terminal device, the angle continuously changes within a preset angle range, and the change process includes two opposite directions, thereby acquiring the acceleration value of the terminal device collected by the acceleration sensor;

[0044] The horizontal movement speed of the terminal device is determined based on the acceleration value;

[0045] In response to the horizontal movement speed of the terminal device being within a predetermined speed range, it is determined that the operating state of the terminal device is in the moving state.

[0046] In one embodiment, the motion state module is further configured to:

[0047] The angle values ​​of the terminal device acquired by the gyroscope are low-pass filtered; and / or,

[0048] The acceleration values ​​of the terminal device collected by the acceleration sensor are subjected to low-pass filtering.

[0049] In one embodiment, the accidental touch statistics module is specifically used for:

[0050] Obtain the accidental touch rate of the terminal device's display screen within a preset time period; and / or,

[0051] In response to the number of touches on the display screen reaching a preset threshold, the false touch rate of the terminal device display screen is obtained.

[0052] In one embodiment, a pixel determination module is further included, used for:

[0053] Before exiting the camera program, obtain the pixel value of each pixel within the viewfinder on the display screen;

[0054] Based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels;

[0055] The program control module is specifically used for:

[0056] If the black screen ratio is greater than a preset second ratio threshold, the camera program will exit.

[0057] In one embodiment, a prompting module is also included, for:

[0058] Before exiting the camera program, a prompt window is generated, wherein the prompt window is used to inform the user that the camera program is about to exit;

[0059] In response to receiving a cancellation instruction, the camera recording program is maintained, wherein the cancellation instruction indicates that the camera recording program is maintained;

[0060] The program control module is specifically used for:

[0061] In response to receiving a confirmation instruction and / or the duration of the generated prompt window exceeding a preset duration threshold, the camera program exits, wherein the confirmation instruction is used to indicate that the camera program is exiting.

[0062] In one embodiment, the program control module is further configured to:

[0063] The device is restored to the locked screen state, and the images and videos captured after the terminal device enters the camera program from the locked screen state are deleted.

[0064] In one embodiment, the program control module is further configured to:

[0065] Return to the lock screen state and disable the camera app launch button on the lock screen interface.

[0066] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device including a memory and a processor, the memory being used to store computer instructions executable on the processor, and the processor being used to execute the computer instructions based on the camera program control method described in the first aspect.

[0067] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0068] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0069] This disclosure involves acquiring motion parameters from at least one motion sensor when a terminal device enters a camera application from a locked screen state. The motion state of the terminal device is determined based on these parameters. If the motion state is a moving state, the false touch rate of the terminal device's display screen is acquired. If the false touch rate exceeds a preset first threshold, the camera application is exited. Since the probability of a terminal device being used during a moving state is extremely low, and a high false touch rate indicates an abnormal touch operation (i.e., a touch operation outside of normal user operation), by combining the above two criteria after the terminal device enters the camera application from a locked screen state, it is possible to accurately determine whether the operation entering the camera application is a normal operation or a mistake. Furthermore, if it is determined to be a mistake, the camera application is exited. This solves the problem of accidentally entering the camera application due to accidental touch of the camera application start button on the lock screen interface, preventing the taking of photos or recording of videos after accidental entry into the camera application. This greatly improves the user experience and enhances the security of using the camera application while the screen is locked. Attached Figure Description

[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0071] Figure 1 This is a flowchart illustrating a camera program control method according to an exemplary embodiment of the present disclosure;

[0072] Figure 2 This is a flowchart illustrating a method for determining the motion state of a terminal device according to an exemplary embodiment of this disclosure;

[0073] Figure 3 This is a process diagram illustrating a camera program control method according to an exemplary embodiment of this disclosure;

[0074] Figure 4 This is a schematic diagram of the structure of a camera program control device shown in an exemplary embodiment of the present disclosure;

[0075] Figure 5 This is a block diagram of an electronic device illustrated in an exemplary embodiment of the present disclosure. Detailed Implementation

[0076] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0077] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0078] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0079] Smartphones and other mobile devices have become an indispensable part of people's lives, and people seem unable to live without them in various situations. When not using the device, especially when carrying it on the go, people usually lock the screen to avoid accidental touches. However, to meet the need for quick access to camera apps for taking photos or videos, the lock screen includes a camera app launch button. Touching this button allows users to bypass the unlocking process and directly enter the camera app. However, this also leads to accidental presses of this button while the screen is locked, incorrectly launching the camera app and potentially resulting in unintended photos or videos being taken or recorded.

[0080] In a specific scenario, a user locks their smartphone and places it in their pocket while walking, running, or cycling. The smartphone's display is in lock screen mode. During the user's movement, the lock screen may come into contact with the skin through the clothing. While other parts of the lock screen do not trigger any operation when in contact with the skin, the camera app launch button on the lock screen may be accidentally touched, thus launching the camera app. Furthermore, buttons in the camera app's viewfinder may also be accidentally touched, resulting in unintended photos or videos being taken or recorded. This not only consumes the phone's memory but also infringes on the user's privacy, significantly reducing the user experience.

[0081] Based on this, in a first aspect, at least one embodiment of this disclosure provides a camera program control method, please refer to the appendix. Figure 1 The diagram illustrates the process of the method, including steps S101 and S103.

[0082] The camera control method can be executed by electronic devices such as terminal devices or servers. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA) handheld device, computing device, vehicle device, wearable device, etc. The method can be implemented by the processor calling computer-readable instructions stored in the memory.

[0083] In step S101, in response to the terminal device entering the camera program from the locked screen state, motion parameters collected by at least one motion sensor are acquired, and the motion state of the terminal device is determined based on the motion parameters collected by the at least one motion sensor.

[0084] When the device is locked, the screen can display the lock screen interface, or the screen will be off (black). If the lock screen button or other buttons are pressed, the screen will light up and display the lock screen interface. The lock screen interface includes a camera app launch button, which is a shortcut key; touching this button allows the user to skip the unlocking process and directly enter the camera app.

[0085] There are at least two scenarios where a terminal device enters the camera app from the lock screen state. First, the user needs to take a photo or record video and directly launches the camera app using the camera app launch button on the lock screen. Second, while the user is moving the terminal device in lock screen mode, the camera app launch button on the lock screen is accidentally pressed, thus inadvertently launching the camera app.

[0086] Once the camera program is activated, a viewfinder interface will appear, which includes a viewfinder frame and various shooting control buttons, such as shooting mode control buttons, flash control buttons, and the confirm shooting button (commonly known as the shutter button). The viewfinder frame displays the image captured by the terminal device's camera in real time. Touching any of the buttons will trigger the corresponding operation. For example, when the confirm shooting button is touched, the terminal device will take a picture.

[0087] In one example, the motion sensor can be at least one of a gyroscope and an accelerometer. The gyroscope can detect the attitude angle of the terminal device, and the accelerometer can detect the acceleration of the terminal device. Using at least one of these sensors, the motion state of the terminal device can be determined, such as whether the terminal device is stationary or in motion.

[0088] In step S102, in response to the terminal device being in a moving state, the false touch rate of the terminal device display screen is obtained. The false touch rate includes the ratio of the number of false touches to the number of touches on the display screen. Touching controls within the display screen is considered normal touch, while touching areas outside the controls within the display screen is considered false touch.

[0089] When a user touches the display screen of a terminal device, the hardware within the screen picks up the user's touch location, that is, its position on the screen's surface, such as coordinates. The screen's surface contains controls and a background; controls are buttons used to trigger operations, and the background is a region where operations cannot be triggered.

[0090] When users normally use a terminal device, they generally interact with the controls on the screen. This is because user actions are intended to trigger a specific operation, not simply to touch the screen. However, users inevitably interact with the background as well, which may be accidental or unintentional touches. Based on these user habits, the accidental touch rate can be used to characterize whether touch operations on the screen are normal user actions or unintentional accidental touches (such as skin contact inside a clothing pocket). Because when the screen is unintentionally touched, it doesn't distinguish between buttons and the background, and the background area is much larger than the button area, the probability of the background being touched is greater than the probability of the buttons being touched.

[0091] In one example, the accidental touch rate of the terminal device's display screen can be obtained within a preset time period, such as within 30 seconds.

[0092] In another example, the false touch rate of the terminal device's display screen can be obtained when the number of touches on the display screen reaches a preset threshold, for example, when the number of touches reaches 10.

[0093] In step S103, in response to the false touch rate being greater than a preset first proportional threshold, the camera program is exited.

[0094] As can be seen from the analysis in step S102, the false touch rate can be used to characterize whether the touch operation is a normal operation of the user. Therefore, a first proportional threshold can be preset based on experience. When the false touch rate is below the first proportional threshold (including the first proportional threshold), the touch operation is considered to be a normal operation of the user. When the false touch rate is above the first proportional threshold, the touch operation is considered to be an abnormal operation of the user, such as a touch operation caused by the user's skin touching the user in the pocket.

[0095] Therefore, if the accidental touch rate is greater than the preset first proportional threshold, it is considered that the entry into the camera program from the lock screen state was caused by an accidental touch of the camera program launch button on the lock screen interface, that is, the user did not launch the camera program, so the camera program is exited.

[0096] In one example, exiting the camera app restores the device to the lock screen state and deletes images and videos captured after the device entered the camera app from the lock screen state. This could be due to the screen being on when it was locked or off. Deleting accidentally captured images and videos avoids excessive memory usage on the device.

[0097] In another example, after exiting the camera app, the device returns to the lock screen and disables the camera app's launch button on the lock screen, thus preventing accidental activation. When the device unlocks and re-enters the lock screen, the camera app's launch button on the lock screen can be reactivated.

[0098] This disclosure involves acquiring motion parameters from at least one motion sensor when a terminal device enters a camera application from a locked screen state. The motion state of the terminal device is determined based on these parameters. If the motion state is a moving state, the false touch rate of the terminal device's display screen is acquired. If the false touch rate exceeds a preset first threshold, the camera application is exited. Since the probability of a terminal device being used during a moving state is extremely low, and a high false touch rate indicates an abnormal touch operation (i.e., a touch operation outside of normal user operation), by combining the above two criteria after the terminal device enters the camera application from a locked screen state, it is possible to accurately determine whether the operation entering the camera application is a normal operation or a mistake. Furthermore, if it is determined to be a mistake, the camera application is exited. This solves the problem of accidentally entering the camera application due to accidental touch of the camera application start button on the lock screen interface, preventing the taking of photos or recording of videos after accidental entry into the camera application. This greatly improves the user experience and enhances the security of using the camera application while the screen is locked.

[0099] In some embodiments of this disclosure, it can be carried out as follows Figure 2 The method shown acquires motion parameters collected by at least one motion sensor and determines the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor, including steps S201 to S202.

[0100] In step S201, the angle value of the terminal device collected by the gyroscope is obtained.

[0101] A gyroscope can acquire the angle values ​​of a terminal device in real time or at a certain frequency, thus providing the angle values ​​collected by the gyroscope. The angle values ​​of the terminal device can characterize its attitude. For example, the terminal device can be defined as being in a vertical state when it is at 0°, with the angle tilted towards the display screen being a positive angle and the angle tilted towards the opposite direction of the display screen being a negative angle.

[0102] In one example, after obtaining the angle value of the terminal device collected by the gyroscope, the angle value of the terminal device collected by the gyroscope can be low-pass filtered to eliminate the influence of some incorrect angles on the judgment result of motion state.

[0103] In step S202, in response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

[0104] The continuous change within a preset angle range, including two opposite directions, allows the terminal device to exhibit regular movement within a certain angle range, which can be considered as the terminal device being in a moving state. For example, when the terminal device moves with the user inside the user's pocket (e.g., when the user is walking, running, etc.), according to the angle defined in step S101, the terminal device can reciprocate within the range of -10° to +10°.

[0105] It is important to note that when the reciprocating motion angle range of the terminal device is small, it may be due to minor vibrations in the scene causing slight movements. For example, the terminal device may slightly reciprocate due to engine vibrations during vehicle operation. According to the angle defined in step S101, the terminal device can reciprocate within a range of -1° to +1°. Therefore, when determining the preset angle range, this range needs to be greater than a certain angle threshold to eliminate misjudgments of motion state caused by slight movements.

[0106] Alternatively, if the angle value of the terminal device continuously changes within a preset angle range, and the change process includes two opposite directions, instead of directly determining that the terminal device is in the moving state, the motion state of the terminal device can be further determined using the acceleration value collected by the accelerometer in the following manner: First, acquire the acceleration value of the terminal device collected by the accelerometer; next, determine the horizontal motion speed of the terminal device based on the acceleration value; finally, in response to the horizontal motion speed of the terminal device being within a preset speed range, determine that the terminal device is in the moving state.

[0107] In addition, after acquiring the acceleration value of the terminal device collected by the accelerometer, the acceleration value of the terminal device collected by the accelerometer can also be low-pass filtered to eliminate the influence of some erroneous acceleration values ​​on the judgment result of motion state.

[0108] The horizontal speed of the terminal device can be obtained by integrating the acceleration value. Since the horizontal speed of the terminal device will be within a certain range when it is moving, it can be determined whether the terminal device is moving by presetting a speed range and further judging the relationship between the horizontal speed and the preset speed range. The preset speed range can be set from 0.1 m / s to 50 m / s.

[0109] In this embodiment, by further judging the acceleration value of the accelerometer, the accuracy of determining the motion state of the terminal device can be improved. The gyroscope and the accelerometer cooperate with each other and correct each other, avoiding misjudgment of the motion state of the terminal device.

[0110] In some embodiments of this disclosure, before exiting the camera program, it can be further determined whether entering the camera program was caused by a user's accidental touch in the following manner: First, the pixel value of each pixel within the viewfinder in the display screen is obtained; next, based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels. Based on this, when exiting the camera program, it can exit the camera program in response to the black screen ratio being greater than a preset second ratio threshold.

[0111] The viewfinder shows the preview image from the device's camera, i.e., the environment the camera is facing. If the device is in an enclosed space such as a user's pocket, the camera is blocked, resulting in a completely black or dimly lit preview (e.g., when a small amount of light shines through the pocket). Since users typically don't operate the device when it's in an enclosed space, and switching to the camera app is unlikely to result in a completely black or dimly lit image, the fact that the preview is black or dimly lit confirms that the camera app was accidentally activated by the user on the lock screen.

[0112] When obtaining the pixel value of each pixel in the viewfinder, the R (red), G (green), and B (blue) values ​​of the pixel can be obtained separately. When comparing the pixel value with the pixel threshold, the R value, G value, and B value can be compared with the pixel threshold, respectively. When the R value, G value, and B value are all less than the pixel threshold, it is determined that the pixel value is less than the pixel threshold.

[0113] The pixel threshold can be preset based on experience. Pixels with values ​​below the pixel threshold are considered black pixels or pixels with low brightness. If the black screen ratio is greater than the second ratio threshold, the image within the viewfinder is considered to be a black image or an image with low brightness. The second ratio threshold can be set to 95%, etc.

[0114] In this embodiment, by determining the black screen ratio of the image within the viewfinder, it is possible to determine whether the camera program was started by accidental touch of the camera program start button on the lock screen when the terminal device is in a closed space such as a clothing pocket. Therefore, the accuracy of determining accidental touch of the camera program start button can be further improved.

[0115] In some embodiments of this disclosure, a prompt window is generated before exiting the camera program, wherein the prompt window is used to prompt the user that the camera program is about to exit; in response to receiving a cancellation instruction, the camera program is maintained, wherein the cancellation instruction indicates that the camera program is maintained. Based on this, when exiting the camera program, the exit can be initiated in response to receiving a confirmation instruction and / or the duration of the prompt window exceeding a preset duration threshold, wherein the confirmation instruction indicates that the camera program is definitely exiting.

[0116] The prompt window may display a message such as "Exit camera app?", and includes "OK" and "Cancel" buttons. Clicking the "OK" button generates a confirmation command, and clicking the "Cancel" button generates a cancellation command. If the user does not interact with any buttons for a duration exceeding a preset threshold, it can be determined that the user is not using the device. Therefore, it can be further confirmed that the user accidentally pressed the camera app launch button on the lock screen, thus exiting the camera app.

[0117] In other words, after determining that the entry into the camera program was caused by the user accidentally touching the camera program launch button on the lock screen, the system can further obtain the user's operation through a prompt window, and then exit or keep the camera program based on the user's operation, thereby further improving the accuracy of exiting the camera program.

[0118] Please refer to the appendix. Figure 3The figure exemplifies the entire process of camera program control provided in an embodiment of this disclosure. As can be seen from the figure, after the terminal device enters the camera program from the lock screen state, it first determines whether the terminal device is in a moving state. If it is not in a moving state, the camera program control method is exited. If it is in a moving state, it further determines whether the screen mis-touch rate is greater than 80%. If it is not greater than 80%, the camera program control method is exited. If it is greater than 80%, it further determines whether the black screen ratio of the image in the viewfinder is greater than 95%. If it is not greater than 95%, the camera program control method is exited. If it is greater than 95%, it is determined that the camera program start button in the lock screen interface was accidentally touched, resulting in this entry into the camera program. Therefore, a prompt window is generated, and the user's operation command is obtained. If the user does not operate within 5 seconds, the lock screen state is entered. If the user generates a cancel command through the cancel button, the camera program control method is exited. If the user generates a confirm button through the confirm button, the lock screen state is entered, the camera program start button in the lock screen interface is turned off, and the accidentally captured photos (and videos) are deleted.

[0119] According to a second aspect of the present disclosure, a camera program control device is provided, applied to a terminal device. Please refer to the attached document. Figure 4 It shows the structure of the device, including:

[0120] The motion state module 401 is used to respond to the terminal device entering the camera program from the locked screen state, acquire motion parameters collected by at least one motion sensor, and determine the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor.

[0121] The accidental touch statistics module 402 is used to obtain the accidental touch rate of the terminal device display screen in response to the terminal device's motion state being a moving state. The accidental touch rate includes the ratio of the number of accidental touches on the display screen to the number of touches on the display screen. Touching the controls within the screen is considered normal touch, while touching the area outside the controls within the screen is considered accidental touch.

[0122] The program control module 403 is used to exit the camera program in response to the false touch rate being greater than a preset first proportional threshold.

[0123] In some embodiments of this disclosure, the motion state module is used for:

[0124] Obtain the angle value of the terminal device collected by the gyroscope;

[0125] In response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

[0126] In some embodiments of this disclosure, the motion state module is used to respond to the angle value of the terminal device, continuously changing within a preset angle range, and the change process includes two opposite directions. When it is determined that the operating state of the terminal device is in the moving state, it is specifically used for:

[0127] In response to the angle value of the terminal device, the angle continuously changes within a preset angle range, and the change process includes two opposite directions, thereby acquiring the acceleration value of the terminal device collected by the acceleration sensor;

[0128] The horizontal movement speed of the terminal device is determined based on the acceleration value;

[0129] In response to the horizontal movement speed of the terminal device being within a predetermined speed range, it is determined that the operating state of the terminal device is in the moving state.

[0130] In some embodiments of this disclosure, the motion state module is further configured to:

[0131] The angle values ​​of the terminal device acquired by the gyroscope are low-pass filtered; and / or,

[0132] The acceleration values ​​of the terminal device collected by the acceleration sensor are subjected to low-pass filtering.

[0133] In some embodiments of this disclosure, the accidental touch statistics module is specifically used for:

[0134] Obtain the accidental touch rate of the terminal device's display screen within a preset time period; and / or,

[0135] In response to the number of touches on the display screen reaching a preset threshold, the false touch rate of the terminal device display screen is obtained.

[0136] In some embodiments of this disclosure, a pixel determination module is also included, used for:

[0137] Before exiting the camera program, obtain the pixel value of each pixel within the viewfinder on the display screen;

[0138] Based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels;

[0139] The program control module is specifically used for:

[0140] If the black screen ratio is greater than a preset second ratio threshold, the camera program will exit.

[0141] In some embodiments of this disclosure, a prompting module is also included, for:

[0142] Before exiting the camera program, a prompt window is generated, wherein the prompt window is used to inform the user that the camera program is about to exit;

[0143] In response to receiving a cancellation instruction, the camera program is maintained, wherein the confirmation instruction indicates a decision to exit the camera program;

[0144] The program control module is specifically used for:

[0145] In response to receiving a confirmation instruction and / or the duration of the generated prompt window exceeding a preset duration threshold, the camera program exits, wherein the cancellation instruction is used to indicate that the camera program is kept running.

[0146] In some embodiments of this disclosure, the program control module is further configured to:

[0147] The device is restored to the locked screen state, and the images and videos captured after the terminal device enters the camera program from the locked screen state are deleted.

[0148] In some embodiments of this disclosure, the program control module is further configured to:

[0149] Return to the lock screen state and disable the camera app launch button on the lock screen interface.

[0150] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the method in the first aspect, and will not be elaborated upon here.

[0151] According to a third aspect of the embodiments of this disclosure, please refer to the appendix. Figure 5 The diagram illustrates, for example, a block diagram of an electronic device. For instance, device 500 could be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0152] Reference Figure 5 The device 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.

[0153] Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.

[0154] Memory 504 is configured to store various types of data to support the operation of device 500. Examples of this data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0155] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 500.

[0156] Multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0157] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.

[0158] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0159] Sensor assembly 514 includes one or more sensors for providing status assessments of various aspects of device 500. For example, sensor assembly 514 may detect the on / off state of device 500, the relative positioning of components such as the display and keypad of device 500, changes in position of device 500 or a component of device 500, the presence or absence of user contact with device 500, orientation or acceleration / deceleration of device 500, and temperature changes of device 500. Sensor assembly 514 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0160] Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices. Device 500 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0161] In an exemplary embodiment, the device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the power supply method of the aforementioned electronic device.

[0162] Fourthly, in exemplary embodiments, this disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 504 including instructions, which can be executed by a processor 520 of the device 500 to complete the power supply method of the electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0164] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A camera program control method, characterized in that, Applied to terminal devices, including: In response to the terminal device entering the camera program from the lock screen state due to the camera program start button in the lock screen interface being touched, the motion parameters collected by at least one motion sensor are acquired, and the motion state of the terminal device is determined based on the motion parameters collected by the at least one motion sensor. In response to the terminal device being in a moving state, the false touch rate of the terminal device's display screen is obtained, wherein the false touch rate includes the ratio of the number of false touches to the number of touches on the display screen, and the situation where the controls within the screen are touched is considered a normal touch, while the situation where the area outside the controls within the screen is touched is considered a false touch. If the false touch rate exceeds a preset first proportional threshold, the camera program is exited. Before exiting the camera program, the following is also included: Obtain the pixel value of each pixel in the viewfinder frame of the display screen; Based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels; Exiting the camera program includes: If the black screen ratio is greater than a preset second ratio threshold, the camera program will exit.

2. The camera program control method according to claim 1, characterized in that, The step of acquiring motion parameters collected by at least one motion sensor and determining the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor includes: Obtain the angle value of the terminal device collected by the gyroscope; In response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

3. The camera program control method according to claim 2, characterized in that, The response to the angle value of the terminal device, which continuously changes within a preset angle range, and the change process includes two opposite directions, determines that the terminal device is in the moving state, including: In response to the angle value of the terminal device, the angle continuously changes within a preset angle range, and the change process includes two opposite directions, thereby acquiring the acceleration value of the terminal device collected by the acceleration sensor; The horizontal movement speed of the terminal device is determined based on the acceleration value; In response to the horizontal movement speed of the terminal device being within a predetermined speed range, it is determined that the operating state of the terminal device is in the moving state.

4. The camera program control method according to claim 3, characterized in that, Also includes: The angle values ​​of the terminal device acquired by the gyroscope are low-pass filtered; And / or, The acceleration values ​​of the terminal device collected by the acceleration sensor are subjected to low-pass filtering.

5. The camera program control method according to any one of claims 1 to 4, characterized in that, The acquisition of the accidental touch rate of the terminal device's display screen includes: Obtain the accidental touch rate of the terminal device's display screen within a preset time period; and / or, In response to the number of touches on the display screen reaching a preset threshold, the false touch rate of the terminal device display screen is obtained.

6. The camera program control method according to claim 1, characterized in that, Before exiting the camera program, the following is also included: A prompt window is generated, wherein the prompt window is used to notify the user that the camera program is about to exit; In response to receiving a cancellation instruction, the camera recording program is maintained, wherein the cancellation instruction indicates that the camera recording program is maintained; Exiting the camera program includes: In response to receiving a confirmation instruction and / or the duration of the generated prompt window exceeding a preset duration threshold, the camera program exits, wherein the confirmation instruction is used to indicate that the camera program is exiting.

7. The camera program control method according to claim 1, characterized in that, After exiting the camera program, the following is also included: The device is restored to the locked screen state, and the images and videos captured after the terminal device enters the camera program from the locked screen state are deleted.

8. The camera program control method according to claim 1, characterized in that, After exiting the camera program, the following is also included: Return to the lock screen state and disable the camera app launch button on the lock screen interface.

9. A camera program control device, characterized in that, Applied to terminal devices, including: The motion state module is used to respond to the terminal device entering the camera program from the lock screen state due to the camera program start button in the lock screen interface being touched, to acquire motion parameters collected by at least one motion sensor, and to determine the motion state of the terminal device based on the motion parameters collected by the at least one motion sensor. The accidental touch statistics module is used to obtain the accidental touch rate of the terminal device's display screen in response to the terminal device's motion state being a moving state. The accidental touch rate includes the ratio of the number of accidental touches on the display screen to the number of touches on the display screen. Touching the controls within the display screen is considered a normal touch, while touching the area outside the controls within the display screen is considered an accidental touch. The program control module is used to exit the camera program in response to the false touch rate being greater than a preset first proportional threshold. It also includes a pixel determination module, used for: Before exiting the camera program, obtain the pixel value of each pixel within the viewfinder on the display screen; Based on the pixel value of each pixel in the viewfinder, the black screen ratio of the viewfinder is determined, wherein the black screen ratio is the ratio of the number of pixels with pixel values ​​lower than a preset pixel threshold to the total number of pixels; The program control module is specifically used for: If the black screen ratio is greater than a preset second ratio threshold, the camera program will exit.

10. The camera program control device according to claim 9, characterized in that, The motion state module is used for: Obtain the angle value of the terminal device collected by the gyroscope; In response to the angle value of the terminal device, the angle value continuously changes within a preset angle range, and the change process includes two opposite directions, thereby determining that the operating state of the terminal device is in the moving state.

11. The camera program control device according to claim 10, characterized in that, The motion state module is used to respond to the angle value of the terminal device, continuously changing within a preset angle range, and the change process includes two opposite directions. When the terminal device is determined to be in the moving state, it is specifically used for: In response to the angle value of the terminal device, the angle continuously changes within a preset angle range, and the change process includes two opposite directions, thereby acquiring the acceleration value of the terminal device collected by the acceleration sensor; The horizontal movement speed of the terminal device is determined based on the acceleration value; In response to the horizontal movement speed of the terminal device being within a predetermined speed range, it is determined that the operating state of the terminal device is in the moving state.

12. The camera program control device according to claim 11, characterized in that, The motion state module is also used for: The angle values ​​of the terminal device acquired by the gyroscope are low-pass filtered; and / or, The acceleration values ​​of the terminal device collected by the acceleration sensor are subjected to low-pass filtering.

13. The camera program control device according to any one of claims 9 to 12, characterized in that, The accidental touch statistics module is specifically used for: Obtain the accidental touch rate of the terminal device's display screen within a preset time period; and / or, In response to the number of touches on the display screen reaching a preset threshold, the false touch rate of the terminal device display screen is obtained.

14. The camera program control device according to claim 9, characterized in that, It also includes a prompt module for: Before exiting the camera program, a prompt window is generated, wherein the prompt window is used to inform the user that the camera program is about to exit; In response to receiving a cancellation instruction, the camera recording program is maintained, wherein the cancellation instruction indicates that the camera recording program is maintained; The program control module is specifically used for: In response to receiving a confirmation instruction and / or the duration of the generated prompt window exceeding a preset duration threshold, the camera program exits, wherein the confirmation instruction is used to indicate that the camera program is exiting.

15. The camera program control device according to claim 9, characterized in that, The program control module is also used for: The device is restored to the locked screen state, and the images and videos captured after the terminal device enters the camera program from the locked screen state are deleted.

16. The camera program control device according to claim 9, characterized in that, The program control module is also used for: Return to the lock screen state and disable the camera app launch button on the lock screen interface.

17. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory is used to store computer instructions that can be executed on the processor. The processor is used to execute the computer instructions based on the camera program control method according to any one of claims 1 to 8.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Imaging device, imaging method

    CN103002219A

  • Method and terminal for avoiding error touch in case of calling

    CN103248765A

  • Self-adaptive terminal screen locking method and device

    CN103677599A

  • Method and terminal for preventing misoperation

    CN106354300A

  • Adjustment method for camera triggering mode on screen locking interface and terminal

    CN108762849A