Prompting method, prompting device and storage medium
Through the combination of image acquisition and inertial sensors of the terminal device, the distance between the user and the terminal is determined and prompt information is output, which solves the problem of poor accuracy and applicability of eye protection prompts in the existing technology and achieves efficient eye protection effects.
Patent Information
- Application Number
- CN202310257308.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, terminal equipment has poor accuracy and poor applicability when used for eye protection prompts, and cannot effectively correct users' bad eye habits, resulting in visual impairment.
Obtain the physical size and calibrated physical size of the target object through the image acquisition device of the terminal, determine the distance between the target object and the terminal, and output prompt information when the distance is less than the threshold, use the inertial sensor to monitor the movement of the terminal, and adjust the prompt method to improve accuracy and applicability.
It achieves high-precision and highly adaptable eye protection, reduces the risk of visual damage to users, and improves user experience.
Smart Images

Figure CN118631932A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of intelligent terminals, and in particular to a prompting method, a prompting device and a storage medium. Background Art
[0002] At present, there are many types of terminals, and the time users spend using terminals such as mobile phones, computers, and tablets is also increasing, which makes it very easy to cause eye fatigue. Especially for some underage users, when using terminals, incorrect eye habits will have a serious impact on their vision.
[0003] In the related art, it is considered to provide eye protection prompts to users through terminals, so as to promptly correct bad eye habits such as sitting forward and looking too close. However, the eye protection prompt solutions provided in the related art often have problems such as poor accuracy and poor applicability, and cannot provide users with better eye protection prompt services. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a prompting method, a prompting device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a prompting method is provided, including:
[0006] Acquire a first image based on an image acquisition device of the terminal, wherein the first image includes a target object;
[0007] determining a first physical size of the target object in the first image;
[0008] Acquire a calibrated physical size of the target object in the first image, and determine a distance between the target object and the terminal based on the calibrated physical size of the target object and the first physical size;
[0009] In response to the distance being less than a first distance threshold, outputting prompt information.
[0010] In one embodiment, the calibrated physical size of the target object is predetermined by:
[0011] Acquire, based on the image acquisition device of the terminal, a second image of the target object when it is at a first distance from the terminal;
[0012] The calibrated physical size of the target object is determined based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance.
[0013] In one embodiment, the calibrated physical size of the target object is predetermined by:
[0014] Acquire a third image based on the image acquisition device of the terminal, wherein the third image includes the target object and a standard object, the standard object has a certain actual physical size, and the standard object and the target object are at the same distance from the terminal;
[0015] determining a second physical size of the target object and a third physical size of the standard object in the third image;
[0016] Based on the actual physical size of the standard object, the second physical size and the third physical size, the calibrated physical size of the target object is obtained.
[0017] In one embodiment, determining the calibrated physical size of the target object based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance includes:
[0018] Determine the product of the tangent value of half the second field of view angle and the first distance as the actual physical size of the second image;
[0019] A calibrated physical size of the target object is determined based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image.
[0020] In one implementation, obtaining the calibrated physical size of the target object based on the actual physical size of the standard object, the second physical size, and the third physical size includes:
[0021] A first ratio of the actual physical size of the standard object to the third physical size is obtained, and a product of the first ratio and the second physical size is determined as the calibrated physical size of the target object.
[0022] In one embodiment, the physical size of the target object includes:
[0023] The global physical size of the target object; or
[0024] a physical size of at least one feature in the target object, the feature being a feature occupying one or more pixels in an image of the target object;
[0025] The calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
[0026] In one implementation, determining the distance between the target object and the terminal based on the calibrated physical size of the target object and the first physical size includes:
[0027] Acquire an image calibration physical size corresponding to the calibrated physical size of the target object, wherein the image calibration physical size is a physical size of an image captured when acquiring the calibrated physical size of the target object;
[0028] Acquire a second ratio of the first physical size to the calibrated physical size of the target object, and determine that the second ratio and the image calibrated physical size of the first image are the actual physical size of the first image;
[0029] Determining a first field of view angle of an image acquisition device when acquiring the first image;
[0030] The product of the arctangent value of half of the first field of view angle and the actual physical size of the first image is determined as the distance between the target object and the terminal.
[0031] In one embodiment, the method further comprises:
[0032] In response to outputting the prompt information, the distance moved by the terminal is monitored by the inertial sensor of the terminal until the distance moved by the terminal is greater than a second distance threshold, and the step of acquiring the first image and determining the distance between the target object and the terminal is performed again.
[0033] In one embodiment, the method further comprises:
[0034] In response to the distance being less than a first distance threshold, determining a type of the target object;
[0035] In response to determining that the target object is of the first type, outputting first prompt information;
[0036] In response to determining that the second target object type is present, second prompt information is output.
[0037] In one implementation, the target object is a face of a terminal user, the first target object type is a child user, and the second target object type is a regular user;
[0038] Outputting the first prompt information includes: continuously outputting the first prompt information through a pop-up window or a sound prompt until the distance moved by the terminal is greater than a second distance threshold;
[0039] Outputting the second prompt information includes: intermittently outputting the second prompt information through light spots or sound prompts, or continuously outputting the second prompt information by displaying prompts in the edge display area of the terminal screen until the terminal moves a distance greater than a second distance threshold.
[0040] According to a second aspect of an embodiment of the present disclosure, there is provided a prompting device, including:
[0041] An acquisition unit, the acquisition unit being configured to acquire a first image based on an image acquisition device of the terminal, the first image including a target object; and acquire a calibrated physical size of the target object in the first image;
[0042] a determining unit, the determining unit being configured to determine a first physical size of the target object in the first image; and determine a distance between the target object and the terminal based on a calibrated physical size of the target object and the first physical size;
[0043] A processing unit is configured to output a prompt message in response to the distance being less than a first distance threshold.
[0044] In one embodiment, the calibrated physical size of the target object is predetermined by:
[0045] Acquire, based on the image acquisition device of the terminal, a second image of the target object when it is at a first distance from the terminal;
[0046] The calibrated physical size of the target object is determined based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance.
[0047] In one embodiment, the calibrated physical size of the target object is predetermined by:
[0048] Acquire a third image based on the image acquisition device of the terminal, wherein the third image includes the target object and a standard object, the standard object has a certain actual physical size, and the standard object and the target object are at the same distance from the terminal;
[0049] determining a second physical size of the target object and a third physical size of the standard object in the third image;
[0050] Based on the actual physical size of the standard object, the second physical size and the third physical size, the calibrated physical size of the target object is obtained.
[0051] In one embodiment, determining the calibrated physical size of the target object based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance includes:
[0052] Determine the product of the tangent value of half the second field of view angle and the first distance as the actual physical size of the second image;
[0053] A calibrated physical size of the target object is determined based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image.
[0054] In one implementation, obtaining the calibrated physical size of the target object based on the actual physical size of the standard object, the second physical size, and the third physical size includes:
[0055] A first ratio of the actual physical size of the standard object to the third physical size is obtained, and a product of the first ratio and the second physical size is determined as the calibrated physical size of the target object.
[0056] In one embodiment, the physical size of the target object includes:
[0057] The global physical size of the target object; or
[0058] a physical size of at least one feature in the target object, the feature being a feature occupying one or more pixels in an image of the target object;
[0059] The calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
[0060] In one implementation, determining the distance between the target object and the terminal based on the calibrated physical size of the target object and the first physical size includes:
[0061] Acquire an image calibration physical size corresponding to the calibrated physical size of the target object, wherein the image calibration physical size is a physical size of an image captured when acquiring the calibrated physical size of the target object;
[0062] Acquire a second ratio of the first physical size to the calibrated physical size of the target object, and determine that the second ratio and the image calibrated physical size of the first image are the actual physical size of the first image;
[0063] Determining a first field of view angle of an image acquisition device when acquiring the first image;
[0064] The product of the arctangent value of half of the first field of view angle and the actual physical size of the first image is determined as the distance between the target object and the terminal.
[0065] In one embodiment, the device further comprises:
[0066] A monitoring unit, wherein the monitoring unit is configured to monitor the distance moved by the terminal through the inertial sensor of the terminal in response to outputting the prompt information, until the distance moved by the terminal is greater than a second distance threshold, and then execute the step of acquiring the first image again to determine the distance between the target object and the terminal.
[0067] In one implementation, the processing unit is further configured to:
[0068] In response to the distance being less than a first distance threshold, determining a type of the target object;
[0069] In response to determining that the target object is of the first type, outputting first prompt information;
[0070] In response to determining that the second target object type is present, second prompt information is output.
[0071] In one implementation, the target object is a face of a terminal user, the first target object type is a child user, and the second target object type is a regular user;
[0072] Outputting the first prompt information includes: continuously outputting the first prompt information through a pop-up window or a sound prompt until the distance moved by the terminal is greater than a second distance threshold;
[0073] Outputting the second prompt information includes: intermittently outputting the second prompt information through light spots or sound prompts, or continuously outputting the second prompt information by displaying prompts in the edge display area of the terminal screen until the terminal moves a distance greater than a second distance threshold.
[0074] According to a third aspect of an embodiment of the present disclosure, there is provided a prompting device, including:
[0075] a processor; a memory for storing instructions executable by the processor;
[0076] The processor is configured to: execute the prompt method described in the first aspect or any one of the implementations of the first aspect.
[0077] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the prompt method described in the first aspect or any one of the embodiments of the first aspect.
[0078] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the distance between the target object and the terminal is determined by the first physical size of the target object in the captured first image and the calibrated physical size of the target object, so that when the distance between the target object and the terminal is less than the first distance threshold, a prompt message can be output, thereby achieving eye protection.
[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0081] Figure 1 The figure is a flowchart of a prompting method according to an exemplary embodiment.
[0082] Figure 2 The invention is a flowchart showing a method for determining a calibrated physical size of a target object according to an exemplary embodiment.
[0083] Figure 3 is a side view of a terminal and a target object when acquiring a second image according to an exemplary embodiment.
[0084] Figure 4 The diagram is a top view of a terminal and a target object when acquiring a second image according to an exemplary embodiment.
[0085] Figure 5 The invention is a flowchart showing a method for determining a calibrated physical size of a target object according to an exemplary embodiment.
[0086] Figure 6 The figure is a schematic diagram of camera imaging when calibrating a target object in combination with a standard object according to an exemplary embodiment.
[0087] Figure 7 The present invention is a flowchart showing a method for determining a distance between a target object and a terminal based on a calibrated physical size and a first physical size of the target object according to an exemplary embodiment.
[0088] Figure 8 The figure is a schematic diagram of camera imaging when acquiring a first image according to an exemplary embodiment.
[0089] Fig. 9 It is a side view of a terminal and a target object when acquiring a first image according to an exemplary embodiment.
[0090] Fig.10 The diagram is a top view of a terminal and a target object when acquiring a first image according to an exemplary embodiment.
[0091] Fig.11 The figure is a flowchart of a prompting method according to an exemplary embodiment.
[0092] Fig.12 The figure is a flowchart of a prompting method according to an exemplary embodiment.
[0093] Fig.13 The figure is a block diagram of a prompting device according to an exemplary embodiment.
[0094] Fig.14 The invention is a block diagram showing a device for prompting according to an exemplary embodiment. DETAILED DESCRIPTION
[0095] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0096] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0097] The prompt method provided by the embodiment of the present disclosure can be applied to the scenario where the operator uses the terminal. For example, it can be applied to the scenario where the terminal provides information prompts to the operator. Among them, the terminal can be, for example, a laptop, a tablet computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra mobile personal computer (Ultra Mobile Personal Computer, UMPC), a netbook, a mobile terminal or a personal digital assistant (Personal Digital Assistant, PDA) and other mobile electronic devices, or it can be a non-mobile electronic device such as a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, which is not specifically limited in the embodiment of the present disclosure.
[0098] At present, there are many types of terminals, and the time users spend using terminals every day is also increasing, which makes it very easy to cause eye fatigue. Especially for some underage users, when using terminals, incorrect eye habits will have a serious impact on their vision.
[0099] In the related art, it is considered to provide eye protection prompts to users through the terminal, so as to promptly correct bad eye habits for users, such as sitting forward, looking too close, etc.
[0100] In an eye protection prompt scheme in the related art, an image containing both eyes of the operator can be obtained during the operator's use of the terminal, and the number of pixels between the eyes in the image can be determined. Then, by judging whether the number of pixels between the two eyes exceeds the preset pixel number threshold, it is judged whether to remind the user to increase the distance from the screen. Due to the influence of relevant factors such as age and facial distribution, the eye distances of different operators are often quite different. Therefore, when different operators are at the same distance from the terminal, the number of pixels corresponding to the two eyes is often different, and this method has the problem of poor universality. In another eye protection prompt scheme in the related art, periodic eye protection prompts can be provided to the operator during the operator's use of the terminal. For example, when the timer reaches the specified interval time, the protection screen is started, and the operator consciously controls the eye distance through visual perception of the protection screen. Since this method does not prompt in the precise scenario where the user's eyes are too close, there are problems of low prompt accuracy and frequent prompts resulting in poor operator experience. In addition, in another eye protection prompt scheme in the related art, it is considered to detect and prompt the eye distance through the front sensor of the terminal. However, since the operator's eye distance is often far (for example, greater than 40 cm), and the front sensor is usually used in the scene of answering a call to prevent accidental touches, the detection distance is set very close (for example, within 20 cm). Therefore, the front sensor of the terminal often does not have the conditions to detect the operator's eye distance.
[0101] In summary, the eye protection prompt solutions proposed in the relevant technologies often have problems such as poor accuracy and poor applicability, and are unable to provide users with better eye protection prompt services.
[0102] In view of this, the present disclosure provides a prompt method, which can determine the distance between the target object and the terminal through the first physical size of the target object in the captured first image and the calibrated physical size of the target object, so that when the distance between the target object and the terminal is less than the first distance threshold, prompt information can be output to achieve high-precision and high-adaptation eye protection.
[0103] Figure 1 is a flowchart of a prompting method according to an exemplary embodiment. Figure 1 As shown, the prompt method is applied to a terminal, and includes the following steps S11 to S14.
[0104] In step S11, an image acquisition device based on a terminal acquires a first image.
[0105] The first image includes a target object.
[0106] In step S12, a first physical size of the target object in the first image is determined.
[0107] In step S13, the calibrated physical size of the target object in the first image is obtained, and the distance between the target object and the terminal is determined based on the calibrated physical size of the target object and the first physical size.
[0108] In step S14, in response to the distance being less than the first distance threshold, a prompt message is output.
[0109] In the disclosed embodiment, a first image may be acquired based on an image acquisition device of a terminal. The image acquisition device of the terminal may be a front camera, a rear camera, or other image acquisition device of the terminal, which is not limited here. The first image acquired by the terminal includes a target object. The target object may be an object whose real-time distance from the terminal needs to be detected. The distance between the target object and the terminal may change in real time. The terminal acquires the first image, determines the first physical size of the target object in the first image, and acquires the calibrated physical size of the target object that is pre-calibrated. Based on the first physical size and the calibrated physical size of the target object, the distance between the target object and the terminal may be determined, and a prompt message is output when the distance is less than a first distance threshold.
[0110] In the disclosed embodiment, the physical size may be the length, width, height, radius, diameter, etc. of the object or object. Determining the first physical size of the target object in the first image may be achieved by measuring the physical size of the target object in the first image. Furthermore, the terminal may calibrate the target object in advance to obtain the calibrated physical size of the target object. Based on the first physical size and the calibrated physical size, the distance between the target object and the terminal may be determined. Among them, the value of the first distance threshold may be set according to actual needs. For example, when the target object is the user's face, the first distance threshold may be used to characterize the eye health threshold, which may be set to 40 cm.
[0111] By adopting the technical solution of the embodiment of the present disclosure, the distance between the target object and the terminal is determined by the first physical size of the target object in the captured first image and the calibrated physical size of the target object, so that when the distance between the target object and the terminal is less than the first distance threshold, a prompt message can be output to achieve high-precision and highly adaptable eye protection.
[0112] Figure 2 is a flow chart showing a method for determining a calibrated physical size of a target object according to an exemplary embodiment. Figure 2 As shown, the method includes the following steps.
[0113] In step S21, the terminal-based image acquisition device acquires a second image of the target object when the target object is at a first distance from the terminal.
[0114] In step S22, based on the second field of view angle of the image acquisition device when acquiring the second image and the first distance, the calibrated physical size of the target object is determined.
[0115] In the disclosed embodiment, the size of the target object can be calibrated at a determined distance using the field of view angle (also referred to as the field of view, FOV) of the image acquisition device of the terminal, that is, the distance between the target object and the terminal can be determined by the imaging information of the target object of the front camera. Further, the second image of the target object when it is at a first distance from the terminal can be acquired based on the image acquisition device of the terminal, and the field of view angle when the terminal acquires the second image can be acquired, so as to determine the calibrated physical size of the target object based on the second field of view angle and the first distance. Further, the actual physical size of the second image can be first calculated based on the second field of view angle and the first distance using the imaging principle. Then, the calibrated physical size of the target object is determined based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image. Among them, the actual physical size of the second image calculated based on the second field of view angle and the first distance using the imaging principle can be that the product of the tangent value of half of the second field of view angle and the first distance is determined as the actual physical size of the second image.
[0116] In the embodiment of the present disclosure, the target object may be the face of a terminal user, and the terminal user may be a user who is currently operating the terminal, or a user of an image acquisition device who is not operating the terminal but whose face is facing the terminal. Further, the target object may include at least one feature. Taking the target object being the face of the terminal user as an example, the distance between the user's eyes, the length of the user's nose, etc. may all be features of the target object.
[0117] In the embodiment of the present disclosure, the first distance can be selected according to actual needs. It can be understood that when the target object and the second image have the same physical size, the calculated actual physical size of the second image can be used as the calibrated size of the target object, without further determining the calibrated physical size of the target object based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image. Therefore, the image acquisition distance at which the acquired second image just includes the complete target object can be selected as the first distance. Among them, the second image just including the complete target object can be that the target object has the same number of pixels as the second image in the horizontal coordinate axis and / or vertical coordinate axis direction of the second image.
[0118] The following takes the case where the target object is the face of the terminal user and the first distance is that the acquired second image just includes complete user face information as an example, and describes in detail how to obtain the calibrated physical size of the user face.
[0119] Figure 3 FIG. 1 is a side view of a terminal and a target object when acquiring a second image according to an exemplary embodiment. Figure 3 As shown, at this time, since the second image just includes the complete user face information, the length L of the second image obtained is the calibrated length L of the user face. At this time, the first distance between the terminal and the user face is d, and the vertical field of view angle of the terminal's image acquisition device (such as the front camera) is θ, and the vertical field of view angle θ can be determined by the terminal. At this time, based on the imaging principle, the actual length of the face in the camera imaging part can be calculated by the formula L=d*tan(θ / 2), that is, the calibrated length L of the user face.
[0120] Figure 4 It is a top view of the terminal and the target object when acquiring the second image according to an exemplary embodiment. The principle is the same as that of acquiring the calibrated length L of the user's face. When the horizontal field of view angle of the terminal camera is α, the actual width of the face in the camera imaging part can be calculated based on the imaging principle by the formula W=d*tan(α / 2), that is, the calibrated width W of the user's face.
[0121] Furthermore, after obtaining the calibrated length L and calibrated width W of the user's face, image recognition technology can be used to perform feature extraction to obtain the calibrated physical dimensions of other features in the face, such as the actual physical dimensions of the eyes, nose and / or mouth, the calibrated physical dimensions of the distance between the eyes, etc.
[0122] Figure 5 is a flow chart showing a method for determining a calibrated physical size of a target object according to an exemplary embodiment. Figure 5 As shown, the method includes the following steps.
[0123] In step S31, the terminal-based image acquisition device acquires a third image, where the third image includes a target object and a standard object.
[0124] The standard object has a certain actual physical size, and the standard object and the target object are at the same distance from the terminal.
[0125] In step S32, a second physical size of the target object and a third physical size of the standard object in the third image are determined.
[0126] In step S33, based on the actual physical size of the standard object, the second physical size and the third physical size, the calibrated physical size of the target object is obtained.
[0127] In the disclosed embodiment, the physical size of the target object can also be calibrated by the similarity principle in combination with a standard object. A standard object refers to an object with a certain actual physical size, and its actual physical size is usually a standard size, that is, the same type of standard objects have the same actual physical size, such as a coke bottle, a banknote, a mobile phone box, etc. First, a third image including a target object and a standard object can be acquired based on the image acquisition device of the terminal, wherein the standard object and the target object are located on the same horizontal plane, that is, the distance between the standard object and the target object and the terminal is the same. Since the actual physical size of the standard object is determined, based on the actual physical size of the standard object, and the second physical size of the target object obtained from the third image and the third physical size of the standard object, the calibrated physical size of the target object can be determined by the similarity principle. Further, the first ratio of the actual physical size of the standard object to the third physical size can be first obtained, and then the product of the first ratio and the second physical size can be determined to be the calibrated physical size of the target object.
[0128] The following still takes the target object as the end user's face as an example to explain in detail how to obtain the calibrated physical size of the user's face in combination with the standard object.
[0129] Figure 6 FIG. 1 is a schematic diagram of camera imaging when calibrating a target object in combination with a standard object according to an exemplary embodiment. Figure 6 As shown, the unfilled rectangular frame represents the complete third image, the oblique line filled part represents the user's face, and the black filled part represents the standard object. If the length of the standard object is Length, it occupies a pixels in the third image, and the width is Width, it occupies b elements in the third image; in addition, the user's face occupies c pixels in the length direction of the standard object, and the user's face occupies d pixels in the width direction of the standard object, then the calibrated length Le and calibrated width Wi of the user's face can be calculated according to the following formulas: Le = Length*c / a; Wi = Width*d / b.
[0130] Similar to the scheme of calibrating the physical size of the target object using the imaging principle, after obtaining the calibrated length Le and calibrated width Wi of the user's face, it is also possible to combine image recognition technology to perform feature extraction, and then obtain the calibrated physical size of other features in the face, such as the actual physical size of the eyes, nose and / or mouth, the calibrated physical size of the distance between the eyes, etc.
[0131] By adopting the technical solution of the embodiment of the present disclosure, the physical size of the target object is calibrated in advance through the imaging principle or a similar principle, so that the distance between the target object and the terminal can be determined based on the first physical size of the target object acquired in real time and the calibrated physical size of the target object, thereby realizing distance-based prompts, which has low computational complexity, low cost, easy implementation, wide applicability, high detection accuracy, and can effectively help users protect their eyesight.
[0132] In the disclosed embodiment, the physical size of the target object includes: the global physical size of the target object; or the physical size of at least one feature in the target object, where the feature occupies one or more pixels in the image of the target object; wherein the calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
[0133] That is to say, when calibrating the target object, the global physical size of the target object can be calibrated, or the physical size of at least one feature in the target object can be calibrated. When the global physical size of the target object is calibrated, the first physical size and the second physical size obtained during the calibration process and the distance determination process should also be the global physical size of the target object. Similarly, when the physical size of at least one feature in the target object is calibrated, the first physical size and the second physical size obtained during the calibration process and the distance determination process should also be the physical size of the same feature in the target object.
[0134] In the disclosed embodiment, when the terminal-based image acquisition device acquires the second image containing the user's face, the terminal's built-in front distance sensor (also called proximity sensor) can be used to acquire the first distance, fix the user's face within the detection range of the distance sensor, acquire the first distance at this time, and then calibrate the physical size of the user's face. It is understandable that when acquiring the second image containing the user's face, the second image may only contain partial features of the face, such as partial facial features, without including the entire face. At this time, the physical size of one or more of the facial features can be calibrated.
[0135] Figure 7 is a flowchart of a method for determining a distance between a target object and a terminal based on a calibrated physical size and a first physical size of the target object according to an exemplary embodiment. Figure 7 As shown, the method includes the following steps.
[0136] In step S41, the image calibrated physical size corresponding to the calibrated physical size of the target object is obtained.
[0137] The image calibration physical size is the physical size of the image captured when obtaining the calibrated physical size of the target object.
[0138] In step S42, a second ratio of the first physical size to the calibrated physical size of the target object is obtained, and the second ratio and the image calibrated physical size of the first image are determined to be the actual physical size of the first image.
[0139] In step S43, a first field of view angle of the image acquisition device when acquiring the first image is determined.
[0140] In step S44, the arc tangent value of half the first field of view angle is determined, and the product of the arc tangent value and the actual physical size of the first image is the distance between the target object and the terminal.
[0141] In the embodiment of the present disclosure, after obtaining the calibrated physical size and the first physical size of the target object, the actual physical size of the first image can be first determined based on the similarity principle, and then the distance between the target object and the terminal can be calculated based on the imaging principle using the actual physical size of the first image.
[0142] Wherein, determining the actual physical size of the first image based on the similarity principle may be, firstly, obtaining the image calibration physical size corresponding to the calibrated physical size of the target object, the image calibration physical size being the physical size of the image acquired when obtaining the calibrated physical size of the target object. Then, obtaining a second ratio of the first physical size to the calibrated physical size of the target object, and determining the second ratio and the image calibration physical size of the first image as the actual physical size of the first image.
[0143] Furthermore, determining the distance between the target object and the terminal based on the imaging principle can be by determining a first field of view angle of the image acquisition device when acquiring the first image, and determining the arc tangent value of half of the first field of view angle, and the product of the arc tangent value and the actual physical size of the first image as the distance between the target object and the terminal.
[0144] The following still takes the target object as the face of the terminal user as an example to explain in detail how to determine the distance between the target object and the terminal based on the calibrated physical size of the target object and the first physical size.
[0145] Figure 8 FIG. 1 is a schematic diagram of camera imaging when acquiring a first image according to an exemplary embodiment. Figure 8As shown, the unfilled rectangular frame represents the complete first image, and the oblique line filled portion represents the user's face. If the calibrated length of the user's face is L1, the calibrated width is W1, the length of the user's face in the first image is L2, the width of the user's face in the first image is W2, the calibrated length of the image is L3, and the calibrated width of the image is W3, then the actual length of the first image Len=L1*L3 / L2 and the actual width of the first image Wid=W1*W3 / W2 can be calculated based on the similarity principle.
[0146] Fig. 9 is a side view of a terminal and a target object when acquiring a first image according to an exemplary embodiment, Fig.10 FIG. 1 is a top view of a terminal and a target object when acquiring a first image according to an exemplary embodiment. Fig. 9 and Fig.10 As shown in FIG. 1 , when acquiring the first image, the vertical field of view angle of the terminal is θ1, the horizontal field of view angle is α1, the actual length of the first image is Len, and the actual width of the first image is Wid. Then, the distance D between the first image and the terminal can be calculated by the following formula: Len*arctan(θ1 / 2)=Wid*arctan(α1 / 2). At this time, since the target object is included in the first image, the distance D between the first image and the terminal is the distance between the target object and the terminal.
[0147] Fig.11 is a flowchart of a prompting method according to an exemplary embodiment, wherein steps S51 to S54 are Figure 1 Steps S11 to S14 in the illustrated embodiment are the same and will not be described in detail herein. Fig.11 As shown, the method also includes the following steps.
[0148] In step S55, in response to outputting the prompt information, the distance moved by the terminal is monitored by the inertial sensor of the terminal until the distance moved by the terminal is greater than the second distance threshold, and the step of acquiring the first image and determining the distance between the target object and the terminal is executed again.
[0149] In the embodiment of the present disclosure, after the terminal outputs the prompt information, if the target object or the terminal moves, and the distance between the target object after the movement and the terminal is no longer less than the first distance threshold, the terminal can stop outputting the prompt information. In one example, the distance between the target object and the terminal can still be determined by acquiring the first image. However, since the acquisition of the first image requires calling the image acquisition device of the terminal, such as the front camera, the implementation method of monitoring the distance between the target object and the terminal by continuously acquiring the first image requires continuous calling of the front camera, which will greatly increase the power consumption of the front camera. Therefore, the terminal posture and terminal motion detection can be performed by the posture sensor of the terminal (such as A+G inertial sensor). In one example, the movement in the direction of the terminal screen can be taken as positive, and the acceleration integration is performed to calculate the moving distance of the terminal. When the moving distance of the terminal is greater than the second distance threshold, it can be considered that the distance between the current target object and the terminal no longer meets the condition of being less than the first distance threshold, and the terminal will execute the step of acquiring the first image again to determine the distance between the target object and the terminal. It can be understood that the value of the second distance threshold can be less than or equal to the first distance threshold.
[0150] By adopting the technical solution of the embodiment of the present disclosure, the movement of the terminal is monitored by the inertial sensor of the terminal, and there is no need to frequently call the front camera of the terminal to determine the distance between the terminal and the target object, which saves the power consumption of the terminal and improves the user experience.
[0151] Fig.12 is a flowchart of a prompting method according to an exemplary embodiment, wherein steps S61 to S64 are Figure 1 Steps S11 to S14 in the illustrated embodiment are the same and will not be described in detail herein. Fig.12 As shown, the method also includes the following steps.
[0152] In step S65 , in response to the distance being less than the first distance threshold, the type of the target object is determined.
[0153] In step S66, in response to determining that the target object is of the first type, first prompt information is output.
[0154] In step S67, in response to determining that the target object is of the second type, second prompt information is output.
[0155] In the disclosed embodiments, different prompt information can be output according to the types of different target objects. Still taking the target object as the face of the terminal user as an example, when the first target object type is a child user and the second target object type is a regular user, the first prompt information can be output for the child user, and the second prompt information can be output for the regular user. Among them, the output of the first prompt information for the child user can be to continuously output the first prompt information through a pop-up window or sound prompt until the distance moved by the terminal is greater than the second distance threshold, and the screen of the terminal resumes normal display. The implementation method of outputting the second prompt information for regular users can be gentler, for example, it can be by flashing a certain point on the screen, or displaying the second prompt information in the edge display area of the screen (such as the model, power display area), until the distance moved by the terminal is greater than the second distance threshold.
[0156] By adopting the technical solution of the embodiment of the present disclosure, different types of target objects are distinguished and different prompt information is output, thereby further improving the user experience while ensuring eye health.
[0157] The terminal in the embodiment of the present disclosure may be a mobile phone, and the target object may be a user's face. The facial information of the user's face may be calibrated in advance to obtain the calibrated physical size of the face, and the size information of the features in the face, i.e., the calibrated physical size. Among them, the features in the face may be the user's eyes. When the user uses the mobile phone, an image containing the user's face during use may be obtained based on the front camera of the mobile phone, and the distance x between the current user's eyes and the mobile phone may be calculated. When it is determined that the distance x is less than the eye health threshold, for example, 40cm, the mobile phone outputs a prompt message to remind the user that the distance between the eyes and the screen needs to be adjusted. At the same time, the mobile phone uses the posture of the mobile phone and the position of the mobile phone at the distance x as the starting information, and uses the A+G inertial sensor to detect the posture of the mobile phone and the movement of the mobile phone to obtain the cumulative movement distance y of the mobile phone. When it is determined that the cumulative movement distance y exceeds the second distance threshold, the front camera of the mobile phone is called again to obtain an image containing the user's face, and the distance x between the current user's eyes and the mobile phone is calculated again to be less than 40cm. In this way, accurate eye health distance monitoring and reminders can be provided for each user, thereby improving the user experience.
[0158] Based on the same concept, an embodiment of the present disclosure also provides a prompting device.
[0159] It is understandable that the prompt device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0160] Fig.13 is a block diagram of a prompting device according to an exemplary embodiment. Fig.13 The device 100 includes an acquisition unit 110, a determination unit 120 and a processing unit 130.
[0161] The acquisition unit 110 is configured to acquire a first image based on an image acquisition device of the terminal, where the first image includes a target object; and acquire a calibrated physical size of the target object in the first image.
[0162] The determining unit 120 is configured to determine a first physical size of the target object in the first image; and determine a distance between the target object and the terminal based on a calibrated physical size and the first physical size of the target object.
[0163] The processing unit 130 is configured to output prompt information in response to the distance being less than the first distance threshold.
[0164] In one embodiment, the calibrated physical size of the target object is predetermined by: acquiring a second image of the target object when it is at a first distance from the terminal based on an image acquisition device of the terminal; determining the calibrated physical size of the target object based on a second field of view angle of the image acquisition device when acquiring the second image, and the first distance.
[0165] In one embodiment, the calibrated physical size of the target object is predetermined by: acquiring a third image based on an image acquisition device of the terminal, the third image including the target object and a standard object, the standard object having a determined actual physical size, and the standard object and the target object are at the same distance from the terminal; determining the second physical size of the target object and the third physical size of the standard object in the third image; and obtaining the calibrated physical size of the target object based on the actual physical size of the standard object, as well as the second physical size and the third physical size.
[0166] In one embodiment, based on a second field of view angle of an image acquisition device when acquiring a second image, and a first distance, determining a calibrated physical size of a target object includes: determining the product of a tangent value of half the second field of view angle and the first distance as the actual physical size of the second image; and determining the calibrated physical size of the target object based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image.
[0167] In one embodiment, based on the actual physical size of the standard object, as well as the second physical size and the third physical size, the calibrated physical size of the target object is obtained, including: obtaining a first ratio of the actual physical size of the standard object to the third physical size, and determining the product of the first ratio and the second physical size as the calibrated physical size of the target object.
[0168] In one embodiment, the physical size of the target object includes: a global physical size of the target object; or a physical size of at least one feature in the target object, where the feature occupies one or more pixels in the image of the target object; wherein the calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
[0169] In one embodiment, determining the distance between the target object and the terminal based on the calibrated physical size and the first physical size of the target object includes: obtaining an image calibrated physical size corresponding to the calibrated physical size of the target object, the image calibrated physical size being the physical size of the image captured when obtaining the calibrated physical size of the target object; obtaining a second ratio of the first physical size to the calibrated physical size of the target object, and determining the second ratio and the image calibrated physical size of the first image as the actual physical size of the first image; determining a first field of view angle of the image acquisition device when acquiring the first image; and determining an inverse tangent value of half of the first field of view angle, and the product of the inverse tangent value and the actual physical size of the first image is the distance between the target object and the terminal.
[0170] In one embodiment, the device also includes: a monitoring unit, which is configured to monitor the distance moved by the terminal through an inertial sensor of the terminal in response to outputting a prompt message, until the distance moved by the terminal is greater than a second distance threshold, and then execute the step of acquiring the first image again to determine the distance between the target object and the terminal.
[0171] In one embodiment, the processing unit is further configured to: in response to the distance being less than a first distance threshold, determine the type of the target object; in response to determining it to be the first target object type, output first prompt information; in response to determining it to be the second target object type, output second prompt information.
[0172] In one embodiment, the target object is the face of a terminal user, the first target object type is a child user, and the second target object type is a regular user; outputting the first prompt information includes: continuously outputting the first prompt information through a pop-up window or a sound prompt until the distance the terminal moves is greater than a second distance threshold; outputting the second prompt information includes: intermittently outputting the second prompt information through a light spot or a sound prompt, or continuously outputting the second prompt information by displaying a prompt in the edge display area of the terminal screen until the distance the terminal moves is greater than the second distance threshold.
[0173] By adopting the technical solution of the embodiment of the present disclosure, the distance between the target object and the terminal is determined by the first physical size of the target object in the captured first image and the calibrated physical size of the target object, so that when the distance between the target object and the terminal is less than the first distance threshold, a prompt message can be output to achieve high-precision and highly adaptable eye protection.
[0174] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0175] Fig.14 2 is a block diagram of a device 200 for prompting according to an exemplary embodiment. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0176] Reference Fig.14 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0177] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0178] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 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 memory, flash memory, magnetic disk or optical disk.
[0179] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0180] The multimedia component 208 includes a screen that provides an output interface between the device 200 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0181] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0182] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0183] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0184] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0185] In an exemplary embodiment, the apparatus 200 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 above method.
[0186] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0187] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0188] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0189] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0190] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0191] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following scope of rights.
[0192] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A prompting method, characterized in that: Applied to a terminal, the method comprises: Acquire a first image based on an image acquisition device of the terminal, wherein the first image includes a target object; determining a first physical size of the target object in the first image; Acquire a calibrated physical size of the target object in the first image, and determine a distance between the target object and the terminal based on the calibrated physical size of the target object and the first physical size; In response to the distance being less than a first distance threshold, outputting prompt information.
2. The prompting method according to claim 1, characterized in that: The nominal physical dimensions of the target object are predetermined by: Acquire, based on the image acquisition device of the terminal, a second image of the target object when it is at a first distance from the terminal; The calibrated physical size of the target object is determined based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance.
3. The prompting method according to claim 1, characterized in that: The nominal physical dimensions of the target object are predetermined by: Acquire a third image based on the image acquisition device of the terminal, wherein the third image includes the target object and a standard object, the standard object has a certain actual physical size, and the standard object and the target object are at the same distance from the terminal; determining a second physical size of the target object and a third physical size of the standard object in the third image; Based on the actual physical size of the standard object, the second physical size and the third physical size, the calibrated physical size of the target object is obtained.
4. The prompting method according to claim 2, characterized in that: The determining the calibrated physical size of the target object based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance includes: Determine the product of the tangent value of half the second field of view angle and the first distance as the actual physical size of the second image; A calibrated physical size of the target object is determined based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image.
5. The prompting method according to claim 3, characterized in that: The obtaining the calibrated physical size of the target object based on the actual physical size of the standard object, the second physical size and the third physical size includes: A first ratio of the actual physical size of the standard object to the third physical size is obtained, and a product of the first ratio and the second physical size is determined as the calibrated physical size of the target object.
6. The prompting method according to any one of claims 1 to 5, characterized in that: The physical dimensions of the target object include: The global physical size of the target object; or a physical size of at least one feature in the target object, the feature being a feature occupying one or more pixels in an image of the target object; The calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
7. The prompting method according to claim 1, characterized in that: The determining, based on the calibrated physical size of the target object and the first physical size, the distance between the target object and the terminal includes: Acquire an image calibration physical size corresponding to the calibrated physical size of the target object, wherein the image calibration physical size is a physical size of an image captured when acquiring the calibrated physical size of the target object; Acquire a second ratio of the first physical size to the calibrated physical size of the target object, and determine that the second ratio and the image calibrated physical size of the first image are the actual physical size of the first image; Determining a first field of view angle of an image acquisition device when acquiring the first image; The product of the arctangent value of half of the first field of view angle and the actual physical size of the first image is determined as the distance between the target object and the terminal.
8. The prompting method according to claim 1, characterized in that: The method further comprises: In response to outputting the prompt information, the distance moved by the terminal is monitored by the inertial sensor of the terminal until the distance moved by the terminal is greater than a second distance threshold, and the step of acquiring the first image and determining the distance between the target object and the terminal is performed again.
9. The prompting method according to claim 1, characterized in that: The method further comprises: In response to the distance being less than a first distance threshold, determining a type of the target object; In response to determining that the target object is of the first type, outputting first prompt information; In response to determining that the second target object type is present, second prompt information is output.
10. The prompting method according to claim 9, characterized in that: The target object is a face of a terminal user, the first target object type is a child user, and the second target object type is a regular user; Outputting the first prompt information includes: continuously outputting the first prompt information through a pop-up window or a sound prompt until the distance moved by the terminal is greater than a second distance threshold; Outputting the second prompt information includes: intermittently outputting the second prompt information through light spots or sound prompts, or continuously outputting the second prompt information by displaying prompts in the edge display area of the terminal screen until the terminal moves a distance greater than a second distance threshold.
11. A prompting device, characterized in that: The device comprises: An acquisition unit, the acquisition unit being configured to acquire a first image based on an image acquisition device of the terminal, the first image including a target object; and acquire a calibrated physical size of the target object in the first image; a determining unit, the determining unit being configured to determine a first physical size of the target object in the first image; and determine a distance between the target object and the terminal based on a calibrated physical size of the target object and the first physical size; A processing unit is configured to output prompt information in response to the distance being less than a first distance threshold.
12. The prompting device according to claim 11, characterized in that: The nominal physical dimensions of the target object are predetermined by: Acquire, based on the image acquisition device of the terminal, a second image of the target object when it is at a first distance from the terminal; The calibrated physical size of the target object is determined based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance.
13. The prompting device according to claim 11, characterized in that: The nominal physical dimensions of the target object are predetermined by: Acquire a third image based on the image acquisition device of the terminal, wherein the third image includes the target object and a standard object, the standard object has a certain actual physical size, and the standard object and the target object are at the same distance from the terminal; determining a second physical size of the target object and a third physical size of the standard object in the third image; Based on the actual physical size of the standard object, the second physical size and the third physical size, the calibrated physical size of the target object is obtained.
14. The prompting device according to claim 12, characterized in that: The determining the calibrated physical size of the target object based on a second field of view angle of the image acquisition device when acquiring the second image and the first distance includes: Determine the product of the tangent value of half the second field of view angle and the first distance as the actual physical size of the second image; A calibrated physical size of the target object is determined based on the number of pixels occupied by the target object in the second image and the total number of pixels in the second image.
15. The prompting device according to claim 13, characterized in that: The obtaining the calibrated physical size of the target object based on the actual physical size of the standard object, the second physical size and the third physical size includes: A first ratio of the actual physical size of the standard object to the third physical size is obtained, and a product of the first ratio and the second physical size is determined as the calibrated physical size of the target object.
16. The prompting device according to any one of claims 11 to 15, characterized in that: The physical dimensions of the target object include: The global physical size of the target object; or a physical size of at least one feature in the target object, the feature being a feature occupying one or more pixels in an image of the target object; The calibrated physical size, the first physical size, and the second physical size of the target object are all global physical sizes of the target object, or are all physical sizes of the same feature in the target object.
17. The prompting device according to claim 11, characterized in that: The determining, based on the calibrated physical size of the target object and the first physical size, the distance between the target object and the terminal includes: Acquire an image calibration physical size corresponding to the calibrated physical size of the target object, wherein the image calibration physical size is a physical size of an image captured when acquiring the calibrated physical size of the target object; Acquire a second ratio of the first physical size to the calibrated physical size of the target object, and determine that the second ratio and the image calibrated physical size of the first image are the actual physical size of the first image; Determining a first field of view angle of an image acquisition device when acquiring the first image; The product of the arctangent value of half of the first field of view angle and the actual physical size of the first image is determined as the distance between the target object and the terminal.
18. The prompting device according to claim 11, characterized in that: The device also includes: A monitoring unit, wherein the monitoring unit is configured to monitor the distance moved by the terminal through the inertial sensor of the terminal in response to outputting the prompt information, until the distance moved by the terminal is greater than a second distance threshold, and then execute the step of acquiring the first image again to determine the distance between the target object and the terminal.
19. The prompting device according to claim 11, characterized in that: The processing unit is further configured to: In response to the distance being less than a first distance threshold, determining a type of the target object; In response to determining that the target object is of the first type, outputting first prompt information; In response to determining that the second target object type is present, second prompt information is output.
20. The prompting device according to claim 19, characterized in that: The target object is a face of a terminal user, the first target object type is a child user, and the second target object type is a regular user; Outputting the first prompt information includes: continuously outputting the first prompt information through a pop-up window or a sound prompt until the distance moved by the terminal is greater than a second distance threshold; Outputting the second prompt information includes: intermittently outputting the second prompt information through light spots or sound prompts, or continuously outputting the second prompt information by displaying prompts in the edge display area of the terminal screen until the terminal moves a distance greater than a second distance threshold.
21. A prompting device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the prompt method described in any one of claims 1 to 10.
22. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor, the processor is enabled to execute the prompt method described in any one of claims 1 to 10.
