Method and apparatus for adjusting font size
By obtaining the user's face pictures and adjusting the font size according to the face width, the problem that fixed font size cannot be dynamically adjusted in the existing technology is solved, and the effect of automatically adjusting the font size according to the change of the face distance and screen distance is realized, which improves the user's Reading experience.
Patent Information
- Application Number
- CN201910335283.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2039-04-24
AI Technical Summary
The font of the existing app is set to a fixed value, and the font size cannot be dynamically set according to the distance between the face and the screen, resulting in the inability to automatically adjust the font size when the user changes from the screen, affecting the reading experience.
By obtaining pictures of the user's face, determining the face width, and adjusting the font size on the screen according to the ratio of the face width to the initial face width, realizing dynamic adjustment.
Dynamically adjusting the font size according to changes in face width, solving the problem that the font size cannot be automatically adjusted when the user changes from the screen, and improving the reading experience.
Smart Images

Figure CN111767098B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and device for adjusting font size. Background Art
[0002] With the development of mobile Internet and the popularization of mobile smart terminals, it is becoming more and more common for people to use apps (Applications) to browse news or shop. The font settings of currently used apps are usually fixed value settings, and there is a demand to dynamically set the font size according to the distance between the face and the screen. Summary of the invention
[0003] The embodiments of the present application provide a method and device for adjusting font size.
[0004] In a first aspect, an embodiment of the present application provides a method for adjusting font size, the method comprising: obtaining a picture including a user's face to determine the width of the face in the obtained picture; in response to a ratio of the determined face width to a preset initial face width being greater than a width ratio threshold, adjusting the font size presented on the screen according to the above ratio and the initial value of the font size.
[0005] In some embodiments, the above-mentioned initial face width and the above-mentioned initial value of the font size are obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within a second preset time length is less than a preset width change threshold, determining the face width in the acquired picture as the initial width, and using the numerical value of the font size presented on the above-mentioned screen at the above-mentioned current sampling moment as the initial value of the font size.
[0006] In some embodiments, the above-mentioned determining the face width in the acquired picture includes: performing face recognition on the acquired picture, and using the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
[0007] In some embodiments, the above-mentioned acquiring a picture including the user's face to determine the face width in the acquired picture includes: acquiring a picture including the user's face at a first preset time period to determine the face width in the acquired picture.
[0008] In some embodiments, the above-mentioned acquisition includes a picture of the user's face to determine the face width in the acquired picture, including: capturing the picture in front of the above-mentioned screen, and identifying whether there is a human face in the picture; in response to identifying that there is a human face in the picture, acquiring a picture including the face with a first preset time length as a period to determine the face width in the acquired picture.
[0009] In a second aspect, an embodiment of the present application provides a device for adjusting font size, the device comprising: an acquisition unit, configured to acquire a picture including a user's face to determine the face width in the acquired picture; an adjustment unit, configured to adjust the font size presented on the screen according to the above ratio and the initial value of the font size in response to a ratio of the determined face width to a preset initial face width being greater than a width ratio threshold.
[0010] In some embodiments, the above-mentioned initial face width and the above-mentioned initial value of the font size are obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within a second preset time length is less than a preset width change threshold, determining the face width in the acquired picture as the initial width, and using the numerical value of the font size presented on the above-mentioned screen at the above-mentioned current sampling moment as the initial value of the font size.
[0011] In some embodiments, the above-mentioned determining the face width in the acquired picture includes: performing face recognition on the acquired picture, and using the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
[0012] In some embodiments, the acquisition unit is further configured to: acquire a picture including the user's face at a first preset time period to determine the face width in the acquired picture.
[0013] In some embodiments, the acquisition unit is further configured to: capture the picture in front of the above-mentioned screen, and identify whether there is a human face in the picture; in response to identifying a human face in the picture, acquire a picture including the face with a first preset time period as a period to determine the width of the face in the acquired picture.
[0014] In a third aspect, an embodiment of the present application provides a server, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement a method such as any embodiment of the method for adjusting font size.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements a method such as any one of the embodiments of the method for adjusting font size.
[0016] The method and device for adjusting font size provided in the embodiment of the present application first obtain a picture including the user's face to determine the width of the face in the obtained picture; then, in response to the ratio of the determined face width to the preset initial face width being greater than the width ratio threshold, the font size presented on the screen is adjusted according to the ratio and the initial value of the font size. The method for adjusting font size can determine the change ratio of the distance between the face and the terminal screen according to the change of the face width, thereby achieving the effect of dynamically adjusting the font size presented on the screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0018] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
[0019] Figure 2 is a flow chart of an embodiment of a method for adjusting font size according to the present application;
[0020] Figure 2-1 is a face recognition diagram according to an embodiment of the method for adjusting font size of the present application;
[0021] Figure 2-2 is a schematic diagram of an embodiment of a method for adjusting font size according to the present application;
[0022] Figure 3 is a schematic diagram of an application scenario of a method for adjusting font size according to an embodiment of the present application;
[0023] Figure 4 is a flow chart of another embodiment of a method for adjusting font size according to the present application;
[0024] Figure 5 is a structural schematic diagram of an embodiment of a device for adjusting font size according to the present application;
[0025] Figure 6 It is a structural diagram of a computer system suitable for implementing a server of an embodiment of the present application. DETAILED DESCRIPTION
[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] Figure 1 An exemplary system architecture 100 is shown to which the method for adjusting font size or the apparatus for adjusting font size of the present application can be applied.
[0029] like Figure 1 As shown, the system architecture 100 may include a user 101 and a terminal device 102 for adjusting the font size.
[0030] The user can browse texts and the like through a screen installed on the terminal device 102. Various text browsing applications can be installed on the terminal device 102, such as browser applications, shopping applications, social platform software, and the like.
[0031] The terminal device 102 can be hardware or software. When the terminal device 102 is hardware, it can be various electronic devices with a display screen and supporting image browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers. When the terminal device 102 is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0032] It should be noted that the method for adjusting the font size provided in the embodiment of the present application is usually executed by the terminal device 102. Accordingly, the device for adjusting the font size is usually arranged in the terminal device 102.
[0033] It should be understood that Figure 1 The number of terminal devices 102 in FIG. 1 is only illustrative. Any number of terminal devices may be provided according to implementation requirements.
[0034] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for adjusting font size according to the present application. The method for adjusting font size comprises the following steps:
[0035] Step 201: obtain a picture including a user's face to determine the width of the face in the obtained picture.
[0036] In this embodiment, the execution body of the method for adjusting the font size (eg Figure 1The terminal device 102 shown in the figure can usually present text and other information through a screen installed on the execution body. When the user is reading the text information on the above screen, the above execution body can take a picture of the user through a camera installed on the execution body, or can take a picture of the user through a camera that is connected to the execution body for communication, or can obtain a picture including the user's face through other specified methods. The width of the face in the above picture can be determined by face recognition. Specifically, the face area in the picture can be identified first, and then the identified face area can be cut out using a face recognition frame, and the width of the face recognition frame can be determined as the face width in the above picture, such as Figure 2-1 .
[0037] Step 202: In response to a ratio of the determined face width to a preset initial face width being greater than a preset width ratio threshold, adjusting the font size presented on the screen according to the ratio and an initial value of the font size.
[0038] In this embodiment, the width ratio threshold can be set according to actual needs, and the specific value is not limited. The adjusted font size expected value can be obtained by dividing the initial font value by the ratio, and the font size presented on the screen can be adjusted to the above font size expected value.
[0039] In this embodiment, the ratio of the distance between the user and the screen to the initial distance can be determined by the ratio of the face width to the preset initial face width, where the initial distance refers to the distance between the user and the screen at the moment of the initial face width. Figure 2-2 In the pinhole model shown, f is the focal length of the camera, c is the optical center of the lens, and the light emitted by the object passes through the optical center of the camera and is then imaged on the image sensor or the image plane. Assuming that the distance between the plane where the object is located and the camera plane is d, the actual height of the object is H, and the height on the sensor is h, then there is such a relationship: f / d=h / H, where / represents the division symbol. Since f and H are unchanged, the relationship between the distance d1 and the height h1 after the position change is in accordance with: d1 / d=h1 / h, so the ratio of the face distance from the screen can be calculated based on the ratio of the width h of the face on the terminal screen before the position change and the width h1 of the face on the terminal screen after the position change, p=h1 / h. That is, the ratio of the distance change between the face and the screen can be obtained by the ratio of the face width to the preset initial face width, so that the font size displayed on the screen can be adjusted according to the above ratio. Optionally, if the above ratio is greater than a preset threshold (for example, 1.05), the font size is enlarged to 1.05 times the initial value of the font size.
[0040] In some optional implementations of this embodiment, the initial face width and the initial value of the font size can be obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment, and in response to detecting that the change amplitude of the face width in the acquired picture within the second preset time length is less than the preset width change threshold, determining the face width in the acquired picture as the initial width. The value of the font size presented on the screen at the current sampling moment is used as the initial value of the font size. The second preset time length can be set according to actual needs, and this application is not limited to it. For example, it can be 10 seconds. The preset width change threshold can be set according to actual needs, and this application is not limited to it. For example, it can be 0.08. For example: the face width of the user is detected with a period of 2 seconds, and the change amplitude of the face width within 10 seconds is detected to be less than 0.08, that is, the change amplitude has the following relationship: |x2-x1|<0.08, where x1 represents the face width 2 seconds ago, x2 represents the face width after 2 seconds, || represents the absolute value symbol, and |x2-x1| represents the change amplitude of the face width before and after 2 seconds. This means that the user's position from the screen has changed very little within 10 seconds, which means that the text size on the screen is suitable for the current position of the user. Therefore, the detected face width can be determined as the initial width, and the value of the font size displayed on the screen at the current sampling time is used as the initial value of the font size. The initial width and the initial value of the font size correspond to the state in which the user is in a relatively comfortable state when reading the text on the screen.
[0041] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for adjusting font size according to this embodiment. Figure 3 In an application scenario, a terminal 301 for adjusting font size is installed with a screen and a camera, and text is displayed on the screen. A face picture of a user 302 is obtained through the camera, and a face width a is determined from the picture. In response to the ratio of the determined face width a to the preset initial face width b being greater than a width ratio threshold of 1.05, a result obtained by multiplying the above ratio and the initial value of the font size m is used as a target font size x, and the font size presented on the screen is adjusted to the target font size x.
[0042] In this embodiment, the initial face width b and the initial value of the font size m are obtained by the following steps: the face width of the user is detected at a period of 2 seconds, and the change amplitude of the face width detected within 10 seconds is less than 0.05, the detected face width is determined as the initial width, and the value of the font size presented on the screen at the current sampling time is used as the initial value of the font size. The initial width and the initial value of the font size correspond to the state in which the user is in a relatively comfortable state when reading the text on the screen.
[0043] The method provided by the above embodiment of the present application determines the change ratio of the distance between the face and the terminal screen according to the change of the face width, thereby achieving the effect of dynamically adjusting the font size presented on the screen. Compared with the usual fixed font size adjustment, when the user's distance from the screen changes, the user cannot see the text content clearly. There is a demand in the prior art to automatically adjust the font size according to the distance. The method provided by the above embodiment of the present application can automatically adjust the font size according to the distance.
[0044] Further references Figure 4 , which shows a process 400 of another embodiment of a method for adjusting font size. The process 400 of the method for adjusting font size includes the following steps:
[0045] Step 401, obtaining a picture including the user's face at a first preset time period, performing face recognition on the obtained picture, and using the width of the face recognition frame obtained by recognition as the face width of the obtained picture.
[0046] In this embodiment, the first preset time length can be set according to actual needs, and this application does not limit it. For example, the first preset time length can be 2 seconds. Figure 1 The terminal device 102 shown in the figure can usually present text and other information through a screen installed on the execution body. When the user is reading the text information on the above screen, the above execution body can take a picture of the user through a camera installed on the execution body, or can take a picture of the user through a camera that is communicatively connected to the execution body, or can obtain a picture including the user's face through other specified methods. Optionally, the width of the face in the above picture can be determined by face recognition. Specifically, the face in the picture can be recognized, and then the recognized face can be cut out through a face recognition frame, and the width of the face recognition frame is determined as the width of the face in the above picture. The above face recognition frame can be various graphics according to actual needs, such as a square (such as Figure 2-1 ).
[0047] Step 402: In response to a ratio of the determined face width to a preset initial face width being greater than a width ratio threshold, adjusting the font size presented on the screen according to the ratio and an initial value of the font size.
[0048] In this embodiment, the specific operation of step 402 is the same as Figure 2 The operation of step 202 in the illustrated embodiment is substantially the same and will not be described in detail herein.
[0049] In some optional implementations of this embodiment, the above-mentioned determining the face width in the acquired picture includes: performing face recognition on the acquired picture, and using the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
[0050] In some optional implementations of the present embodiment, the above-mentioned initial face width and the above-mentioned initial value of the font size are obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within a second preset time length is less than a preset width change threshold, determining the face width in the acquired picture as the initial width, and using the numerical value of the font size presented on the above-mentioned screen at the above-mentioned current sampling moment as the initial value of the font size.
[0051] In some optional implementations of the present embodiment, the above-mentioned acquisition of a picture including the user's face to determine the face width in the acquired picture includes: capturing the picture in front of the above-mentioned screen to identify whether there is a face in the picture; in response to identifying a face in the picture, acquiring a picture including the face with a first preset time period as a period to determine the face width in the acquired picture.
[0052] from Figure 4 It can be seen that Figure 2 Compared with the corresponding embodiment, the process 400 of the method for adjusting the font size in this embodiment highlights the steps of acquiring a picture including the user's face with a first preset time period as a cycle, performing facial recognition on the acquired picture, and using the width of the facial recognition frame obtained by recognition as the facial width of the acquired picture. Detecting the width of the face with a certain time period as a cycle can more flexibly set the frequency of adjusting the font, avoiding the negative effect of flickering on the user due to too high a frequency. The method performs facial recognition and uses the width of the facial recognition frame as the facial width, so that the facial width can be obtained more uniformly. When the distance between the user's face and the screen changes, it helps to improve the accuracy of the calculation of the facial width change ratio.
[0053] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for adjusting font size. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0054] The device 500 for adjusting font size of this embodiment includes: an acquisition unit 501 and an adjustment unit 502. The acquisition unit 501 is configured to acquire a picture including a user's face to determine the face width in the acquired picture; the adjustment unit 502 is configured to adjust the font size presented on the screen according to the ratio and the initial value of the font size in response to the ratio of the determined face width to the preset initial face width being greater than a width ratio threshold.
[0055] In this embodiment, the above-mentioned initial face width and the above-mentioned initial value of the font size are obtained through the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within the second preset time length is less than the preset width change threshold, determining the face width in the acquired picture as the initial width, and using the numerical value of the font size presented on the above-mentioned screen at the above-mentioned current sampling moment as the initial value of the font size.
[0056] In some optional implementations of this embodiment, the above-mentioned determining the face width in the acquired picture includes: performing face recognition on the acquired picture, and using the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
[0057] In some optional implementations of this embodiment, the acquisition unit is further configured to: acquire a picture including the user's face at a first preset time period to determine the face width in the acquired picture.
[0058] In some optional implementations of this embodiment, the acquisition unit is further configured to: capture the picture in front of the screen and identify whether there is a face in the picture; in response to identifying a face in the picture, acquire a picture including the face at a first preset time period to determine the width of the face in the acquired picture.
[0059] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present application. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0060] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0061] The following components are connected to the I / O interface 605: an input section 606 including a camera, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0062] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are executed.
[0063] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0064] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0065] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0066] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit and an adjustment unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a picture including a user's face".
[0067] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device: obtains a picture including the user's face to determine the face width in the obtained picture; in response to the ratio of the determined face width to the preset initial face width being greater than a width ratio threshold, adjusts the font size presented on the screen according to the above ratio and the initial value of the font size.
[0068] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for adjusting font size, comprising: Obtaining a picture including a user's face to determine a width of the face in the obtained picture; In response to a ratio of the determined face width to a preset initial face width being greater than a width ratio threshold, adjusting the font size presented on the screen according to the ratio and an initial value of the font size, wherein the font size presented on the screen is adjusted to the expected font size value by obtaining an adjusted expected font size value by dividing the initial value of the font size by the ratio; The initial face width and the initial value of the font size are obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within a second preset time length is less than a preset width change threshold, determining the face width in the acquired picture as the initial width, and taking the numerical value of the font size presented on the screen at the current sampling moment as the initial value of the font size, and the initial face width and the initial value of the font size correspond to the state of the user when reading the text on the screen.
2. The method according to claim 1, wherein: The determining of the width of the face in the acquired picture includes: Perform face recognition on the acquired picture, and use the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
3. The method according to claim 1, wherein: The acquiring of a picture including the user's face to determine the width of the face in the acquired picture includes: A picture including the user's face is acquired at a first preset time period to determine a face width in the acquired picture.
4. The method according to any one of claims 1 to 3, wherein: The acquiring of a picture including the user's face to determine the width of the face in the acquired picture includes: Capturing the image in front of the screen and identifying whether there is a face in the image; In response to recognizing that a human face is present in the picture, a picture including the human face is acquired at a first preset time period to determine a face width in the acquired picture.
5. A device for adjusting font size, comprising: an acquisition unit configured to acquire a picture including a user's face to determine a face width in the acquired picture; an adjusting unit, configured to, in response to a ratio of the determined face width to a preset initial face width being greater than a width ratio threshold, adjust the font size presented on the screen according to the ratio and an initial value of the font size, wherein the font size presented on the screen is adjusted to the expected font size value by obtaining an adjusted expected font size value by dividing the initial value of the font size by the ratio; The initial face width and the initial value of the font size are obtained by the following steps: detecting the face width in the acquired picture at the current sampling moment; in response to detecting that the change amplitude of the face width in the acquired picture within a second preset time length is less than a preset width change threshold, determining the face width in the acquired picture as the initial width, and taking the numerical value of the font size presented on the screen at the current sampling moment as the initial value of the font size, and the initial face width and the initial value of the font size correspond to the state of the user when reading the text on the screen.
6. The device according to claim 5, wherein: The determining of the width of the face in the acquired picture includes: Perform face recognition on the acquired picture, and use the width of the face recognition frame obtained by recognition as the face width of the acquired picture.
7. The device according to claim 5, wherein: The acquisition unit is further configured to: A picture including the user's face is acquired at a first preset time period to determine a face width in the acquired picture.
8. The device according to any one of claims 5 to 7, wherein: The acquisition unit is further configured to: Capturing the image in front of the screen and identifying whether there is a face in the image; In response to recognizing that a human face is present in the picture, a picture including the human face is acquired at a first preset time period to determine a face width in the acquired picture.
9. A server, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method for dynamically adjusting screen character display of terminal and terminal
CN104298441A