CN111767098A - Method and device for adjusting font size - Google Patents

Method and device for adjusting font size Download PDF

Info

Publication number
CN111767098A
CN111767098A CN201910335283.8A CN201910335283A CN111767098A CN 111767098 A CN111767098 A CN 111767098A CN 201910335283 A CN201910335283 A CN 201910335283A CN 111767098 A CN111767098 A CN 111767098A
Authority
CN
China
Prior art keywords
face
width
picture
font size
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910335283.8A
Other languages
Chinese (zh)
Inventor
李颖会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910335283.8A priority Critical patent/CN111767098A/en
Publication of CN111767098A publication Critical patent/CN111767098A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Social Psychology (AREA)
  • Psychiatry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the application discloses a method and a device for adjusting font size. One embodiment of the method comprises: acquiring a picture including a face of a user to determine a face width in the acquired picture; and in response to the ratio of the determined face width to the preset initial face width being greater than the width ratio threshold, adjusting the font size presented on the screen according to the ratio and the font size initial value. The method can dynamically adjust the font size presented by the screen by judging the change of the distance from the terminal to the face.

Description

Method and device for adjusting font size
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for adjusting font size.
Background
With the development of mobile internet and the popularization of mobile intelligent terminals, it is more and more common for people to browse news or shop by using apps (Application programs), the font setting of currently used apps is usually fixed value setting, and the requirement of dynamically setting the font size according to the distance between a face and a screen exists.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting font size.
In a first aspect, an embodiment of the present application provides a method for adjusting a font size, where the method includes: acquiring a picture including a face of a user to determine a face width in the acquired picture; and responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a width ratio threshold value, and adjusting the font size presented by the screen according to the ratio and the font size initial value.
In some embodiments, the initial face width and the initial font size value are obtained by: detecting the width of the face in the acquired picture at the current sampling time; and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
In some embodiments, the determining the width of the face in the acquired picture includes: and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
In some embodiments, the obtaining a picture including a face of the user to determine a width of the face in the obtained picture includes: the method comprises the steps of obtaining a picture including the face of a user by taking a first preset time length as a period, and determining the width of the face in the obtained picture.
In some embodiments, the obtaining a picture including a face of the user to determine a width of the face in the obtained picture includes: capturing a picture in front of the screen, and identifying whether a human face exists in the picture; in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
In a second aspect, an embodiment of the present application provides an apparatus for adjusting a font size, where the apparatus includes: an acquisition unit configured to acquire a picture including a face of a user to determine a face width in the acquired picture; and the adjusting unit is configured to respond to the fact that the ratio of the determined face width to the preset initial face width is larger than a width proportion threshold value, and adjust the font size presented by the screen according to the ratio and the font size initial value.
In some embodiments, the initial face width and the initial font size value are obtained by: detecting the width of the face in the acquired picture at the current sampling time; and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
In some embodiments, the determining the width of the face in the acquired picture includes: and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
In some embodiments, the obtaining unit is further configured to: the method comprises the steps of obtaining a picture including the face of a user by taking a first preset time length as a period, and determining the width of the face in the obtained picture.
In some embodiments, the obtaining unit is further configured to: capturing a picture in front of the screen, and identifying whether a human face exists in the picture; in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any embodiment of a method for adjusting font size.
In a fourth aspect, embodiments of the present application provide a computer-readable medium on which a computer program is stored, which when executed by a processor, implements the method as in any one of the embodiments of the method for adjusting font size.
According to the method and the device for adjusting the font size, firstly, a picture including the face of a user is obtained to determine the width of the face in the obtained picture; and then, responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a width ratio threshold value, and adjusting the font size presented by the screen according to the ratio and the font size initial value. The method for adjusting the font size can determine the change proportion 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 by the screen.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for resizing fonts, in accordance with the present application;
FIG. 2-1 is a face recognition diagram for one embodiment of a method for adjusting font size according to the present application;
FIG. 2-2 is a schematic diagram of one embodiment of a method for resizing fonts, in accordance with the present application;
FIG. 3 is a schematic diagram of an application scenario for a method for adjusting font size according to an embodiment of the present application;
FIG. 4 is a flow diagram of yet another embodiment of a method for resizing fonts, in accordance with the present application;
FIG. 5 is a schematic diagram illustrating an embodiment of an apparatus for resizing fonts, according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the method for resizing fonts or the apparatus for resizing fonts of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a user 101, a terminal device 102 for adjusting font size.
The user can browse text and the like through a screen installed on the terminal apparatus 102. Various text browsing applications, such as a browser application, a shopping application, social platform software, etc., may be installed on the terminal device 102.
The terminal device 102 may be hardware or software. When the terminal device 102 is hardware, it may be various electronic devices having a display screen and supporting picture browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal device 102 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for adjusting the font size provided in the embodiment of the present application is generally performed by the terminal device 102. Accordingly, the means for adjusting the font size is typically provided in the terminal device 102.
It should be understood that the number of terminal devices 102 in fig. 1 is merely illustrative. There may be any number of terminal devices, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for resizing fonts is shown in accordance with the present application. The method for adjusting the font size comprises the following steps:
in step 201, a picture including a face of a user is acquired to determine a face width in the acquired picture.
In the present embodiment, an execution main body (e.g., the terminal apparatus 102 shown in fig. 1) of the method for adjusting the font size can normally present information such as text through a screen mounted on the execution main body. When the user is reading the text information on the screen, the execution main body can shoot the picture of the user through a camera arranged on the execution main body, can also shoot the picture of the user through a camera in communication connection with the execution main body, and can also obtain the picture including the face of the user through other specified modes. The width of the face in the picture can be determined by means of face recognition. Specifically, the face area in the picture may be recognized first, and then the recognized face area is cut out by using a face recognition frame, and the width of the face recognition frame is determined as the width of the face in the picture, as shown in fig. 2-1.
And step 202, responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a preset width proportion threshold value, and adjusting the font size presented on the screen according to the ratio and the font size initial value.
In this embodiment, the width ratio threshold may be set according to actual needs, and specific values are not limited. The font size presented on the screen may be adjusted to the adjusted font size expected value by dividing the font initial value by the ratio.
In this embodiment, the ratio of the distance between the user and the screen and the initial distance may 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 time of the initial face width. The specific principle is as shown in the pinhole model shown in fig. 2-2, where f is the focal length of the camera, c is the optical center of the lens, light emitted by the object passes through the optical center of the camera and is then imaged on the image sensor or image plane, and if the distance between the plane where the object is located and the plane of the camera is d, the actual height of the object is H, and the height H on the sensor is then related to: and f/d is H/H, wherein/represents a division symbol. Since f and H are constant, the relationship between distance d1 and height H1 after changing position follows: d1/d is h1/h, so that the proportion p of the face moving from the screen can be calculated to be h1/h according to the proportion of the width h of the face on the terminal screen before the position is changed and the width h1 of the face on the terminal screen after the position is changed. That is, the ratio of the face width to the preset initial face width can be used to obtain the ratio of the distance change between the face and the screen, so that the font size displayed on the screen can be adjusted according to the ratio. Alternatively, if the ratio is greater than a preset threshold (e.g., 1.05), the font size is enlarged to 1.05 times of the initial value of the font size.
In some optional implementations of this embodiment, the initial face width and the initial font size value may be obtained by: and detecting the face width in the acquired picture at the current sampling time, and determining the face width in the acquired picture as the initial width in response to the fact that the change amplitude of the face width in the acquired picture in a second preset time period is smaller than a preset width change threshold value. And taking the numerical value of the font size presented by the screen at the current sampling time as an initial font size value. The second preset time period may be set according to actual needs, and the application is not limited, and may be, for example, 10 seconds. The preset width variation threshold may be set according to actual needs, and the application is not limited, and may be, for example, 0.08. For example: detecting the face width of the user in a period of 2 seconds, and detecting that the change amplitude of the face width in 10 seconds is less than 0.08, namely the change amplitude has the following relation: | x2-x1| <0.08, where x1 represents the face width before 2 seconds, x2 represents the face width after 2 seconds, | | | represents the absolute value sign, and | x2-x1| represents the variation amplitude of the face width before and after 2 seconds. This indicates that the user is in a state where the position change from the screen is small within 10 seconds, that is, the size of the characters on the screen is suitable for the current position of the user. Therefore, the detected face width may be determined as an initial width, and the numerical value of the font size presented on the screen at the current sampling time as the font size initial value. The initial width and the initial font size correspond to the state of the user when the user comfortably reads the characters on the screen.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for adjusting font size according to the present embodiment. In the application scenario of fig. 3, a screen and a camera are installed on the terminal 301 for adjusting the font size, and the screen displays text. A picture including the face of the user 302 is acquired by the camera, and the face width a is determined from the picture. And in response to the fact that the ratio of the determined face width a to the preset initial face width b is larger than the width ratio threshold value 1.05, taking the result obtained by multiplying the ratio by the font size initial value m as the target font size x, and adjusting the font size presented by the screen to the target font size x.
In the present embodiment, the initial face width b and the font size initial value m are obtained by: detecting the face width of the user by taking 2 seconds as a period, determining the detected face width as an initial width when the change amplitude of the detected face width in 10 seconds is less than 0.05, and taking the numerical value of the font size presented on the screen at the current sampling time as the initial value of the font size. The initial width and the initial font size correspond to the state of the user when the user comfortably reads the characters on the screen.
According to the method provided by the embodiment of the application, the change proportion of the distance between the face and the terminal screen is determined according to the change of the face width, so that the effect of dynamically adjusting the size of the font presented on the screen is achieved. Compare in the adjustment of usual fixed font size, when the user changes apart from the screen, the user can't see the literal content clearly, has the demand of automatic adjustment font size according to the distance among the prior art. The method provided by the embodiment of the application can automatically adjust the font size according to the distance.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for resizing fonts is illustrated. The process 400 of the method for resizing fonts includes the steps of:
step 401, acquiring a picture including the face of the user with a first preset time period as a period, so as to perform face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
In this embodiment, the first preset time period may be set according to actual needs, and the application is not limited, for example, the first preset time period may be 2 seconds. An execution body (e.g., the terminal apparatus 102 shown in fig. 1) of the method for adjusting the font size can generally present information such as text through a screen mounted on the execution body. When the user is reading the text information on the screen, the execution main body can shoot the picture of the user through a camera arranged on the execution main body, can also shoot the picture of the user through a camera in communication connection with the execution main body, and can also obtain the picture including the face of the user through other specified modes. Alternatively, the width of the face in the picture may be determined by means of face recognition. Specifically, the width of the face recognition frame may be determined as the width of the face in the picture by recognizing the face in the picture and then cutting out the recognized face through the face recognition frame. The face recognition box can be various patterns according to actual needs, such as a square (as shown in fig. 2-1).
And 402, responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a width proportion threshold value, and adjusting the font size presented on the screen according to the ratio and the font size initial value.
In this embodiment, the specific operation of step 402 is substantially the same as the operation of step 202 in the embodiment shown in fig. 2, and is not described herein again.
In some optional implementations of the embodiment, the determining the width of the face in the acquired picture includes: and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
In some optional implementations of this embodiment, the initial face width and the initial font size value are obtained by: detecting the width of the face in the acquired picture at the current sampling time; and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
In some optional implementations of the embodiment, the acquiring a picture including a face of the user to determine a width of the face in the acquired picture includes: capturing a picture in front of the screen, and identifying whether a human face exists in the picture; in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for adjusting the font size in this embodiment highlights the steps of acquiring a picture including the face of the user in a period of the first preset time period, performing face recognition on the acquired picture, and taking the width of the recognized face recognition frame as the face width of the acquired picture. The frequency of adjusting the fonts can be set more flexibly by using a certain time length as a period to detect the face width, and the negative effect of flash jump brought to a user by overhigh frequency is avoided. The method carries out face recognition, and the width of a face recognition frame is used as the face width, so that the face width can be obtained more uniformly. When the distance between the face of the user and the screen is changed, the method is favorable for improving the accuracy of face width change ratio calculation.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for adjusting font size, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
The apparatus 500 for adjusting font size of the present embodiment includes: an acquisition unit 501 and an adjustment unit 502. Wherein the obtaining unit 501 is configured to obtain a picture including a face of a user to determine a face width in the obtained picture; the adjusting unit 502 is configured to adjust the font size presented by the screen according to the ratio and the font size initial value in response to the ratio of the determined face width to the preset initial face width being greater than the width ratio threshold.
In this embodiment, the initial face width and the initial font size value are obtained by: detecting the width of the face in the acquired picture at the current sampling time; and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
In some optional implementations of the embodiment, the determining the width of the face in the acquired picture includes: and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
In some optional implementations of this embodiment, the obtaining unit is further configured to: the method comprises the steps of obtaining a picture including the face of a user by taking a first preset time length as a period, and determining the width of the face in the obtained picture.
In some optional implementations of this embodiment, the obtaining unit is further configured to: capturing a picture in front of the screen, and identifying whether a human face exists in the picture; in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a camera and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 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, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
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 two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit and an adjustment unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the acquisition unit may also be described as a "unit that acquires a picture including the face of the user".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring a picture including a face of a user to determine a face width in the acquired picture; and responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a width ratio threshold value, and adjusting the font size presented by the screen according to the ratio and the font size initial value.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for resizing a font, comprising:
acquiring a picture including a face of a user to determine a face width in the acquired picture;
and responding to the fact that the ratio of the determined face width to the preset initial face width is larger than a width ratio threshold value, and adjusting the font size presented by the screen according to the ratio and the font size initial value.
2. The method of claim 1, wherein the initial face width and the font size initial value are obtained by:
detecting the width of the face in the acquired picture at the current sampling time;
and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
3. The method of claim 1, wherein the determining a face width in the acquired picture comprises:
and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
4. The method of claim 1, wherein said obtaining a picture including a user's face to determine a face width in the obtained picture comprises:
the method comprises the steps of obtaining a picture including the face of a user by taking a first preset time length as a period, and determining the width of the face in the obtained picture.
5. The method of one of claims 1-4, wherein said obtaining a picture including a user's face to determine a face width in the obtained picture comprises:
capturing a picture in front of the screen, and identifying whether a human face exists in the picture;
in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
6. An apparatus for resizing fonts, comprising:
an acquisition unit configured to acquire a picture including a face of a user to determine a face width in the acquired picture;
an adjusting unit configured to adjust a font size presented on the screen according to a ratio of the determined face width to a preset initial face width and a font size initial value in response to the ratio being greater than a width ratio threshold.
7. The apparatus of claim 6, wherein the initial face width and the font size initial value are obtained by:
detecting the width of the face in the acquired picture at the current sampling time;
and determining the width of the face in the acquired picture as an initial width in response to detecting that the variation amplitude of the width of the face in the acquired picture in a second preset time period is smaller than a preset width variation threshold value, and taking the numerical value of the font size presented on the screen at the current sampling time as an initial font size value.
8. The apparatus of claim 7, wherein the determining a face width in the acquired picture comprises:
and performing face recognition on the acquired picture, and taking the width of a face recognition frame obtained by recognition as the face width of the acquired picture.
9. The apparatus of claim 6, wherein the obtaining unit is further configured to:
the method comprises the steps of obtaining a picture including the face of a user by taking a first preset time length as a period, and determining the width of the face in the obtained picture.
10. The apparatus according to one of claims 6-9, wherein the obtaining unit is further configured to:
capturing a picture in front of the screen, and identifying whether a human face exists in the picture;
in response to the fact that a human face exists in the picture, the picture including the human face is obtained by taking the first preset time length as a period, and the face width in the obtained picture is determined.
11. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201910335283.8A 2019-04-24 2019-04-24 Method and device for adjusting font size Pending CN111767098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910335283.8A CN111767098A (en) 2019-04-24 2019-04-24 Method and device for adjusting font size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910335283.8A CN111767098A (en) 2019-04-24 2019-04-24 Method and device for adjusting font size

Publications (1)

Publication Number Publication Date
CN111767098A true CN111767098A (en) 2020-10-13

Family

ID=72718168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910335283.8A Pending CN111767098A (en) 2019-04-24 2019-04-24 Method and device for adjusting font size

Country Status (1)

Country Link
CN (1) CN111767098A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486133A (en) * 2020-12-09 2021-03-12 安徽三达信息科技有限公司 Intelligent piece arranging and sorting system based on vertical form AGV
CN112488921A (en) * 2020-12-03 2021-03-12 安徽寒武纪信息科技有限公司 Method for adjusting font size of character string and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751209A (en) * 2008-11-28 2010-06-23 联想(北京)有限公司 Method and computer for adjusting screen display element
CN104298441A (en) * 2014-09-05 2015-01-21 中兴通讯股份有限公司 Method for dynamically adjusting screen character display of terminal and terminal
CN106873759A (en) * 2015-12-14 2017-06-20 北京奇虎科技有限公司 Reading information treating method and apparatus
CN108989571A (en) * 2018-08-15 2018-12-11 浙江大学滨海产业技术研究院 A kind of adaptive font method of adjustment and device for mobile phone word read

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751209A (en) * 2008-11-28 2010-06-23 联想(北京)有限公司 Method and computer for adjusting screen display element
CN104298441A (en) * 2014-09-05 2015-01-21 中兴通讯股份有限公司 Method for dynamically adjusting screen character display of terminal and terminal
CN106873759A (en) * 2015-12-14 2017-06-20 北京奇虎科技有限公司 Reading information treating method and apparatus
CN108989571A (en) * 2018-08-15 2018-12-11 浙江大学滨海产业技术研究院 A kind of adaptive font method of adjustment and device for mobile phone word read

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488921A (en) * 2020-12-03 2021-03-12 安徽寒武纪信息科技有限公司 Method for adjusting font size of character string and readable storage medium
CN112486133A (en) * 2020-12-09 2021-03-12 安徽三达信息科技有限公司 Intelligent piece arranging and sorting system based on vertical form AGV

Similar Documents

Publication Publication Date Title
CN108900776B (en) Method and apparatus for determining response time
US10762387B2 (en) Method and apparatus for processing image
CN107622240B (en) Face detection method and device
CN110213614B (en) Method and device for extracting key frame from video file
CN109242801B (en) Image processing method and device
CN112395038B (en) Method and device for adjusting characters during desktop sharing
CN110059623B (en) Method and apparatus for generating information
CN112306793A (en) Method and device for monitoring webpage
CN110825286B (en) Image processing method and device and electronic equipment
CN110288625B (en) Method and apparatus for processing image
CN111709414A (en) AR device, character recognition method and device thereof, and computer-readable storage medium
CN110427915B (en) Method and apparatus for outputting information
CN110908922A (en) Application program testing method and device
CN111784712A (en) Image processing method, device, equipment and computer readable medium
CN111309617A (en) Application program control method and device, storage medium and electronic equipment
CN111461968B (en) Picture processing method, device, electronic equipment and computer readable medium
CN111767098A (en) Method and device for adjusting font size
CN110851032A (en) Display style adjustment method and device for target device
CN110069186B (en) Method and equipment for displaying operation interface of application
US20220245920A1 (en) Object display method and apparatus, electronic device, and computer readable storage medium
CN111385460A (en) Image processing method and device
CN115756461A (en) Annotation template generation method, image identification method and device and electronic equipment
CN117474827A (en) Image definition detection method and device
CN109062645B (en) Method and apparatus for processing information for terminal
CN110084298B (en) Method and device for detecting image similarity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination