1. Technical Field
Embodiments of the present disclosure relate to electronic devices, and particularly to a font size adjustment method of an electronic device.
2. Description of Related Art
Many people like to read news and novels on the internet using electronic devices (e.g., mobile phones, portable computers, and mobile internet devices). Visually impaired users require a larger font size, if the font size setting of an electronic device is not appropriate, they may need to get very close to the electronic device to see the texts displayed on a screen of the electronic device, which may be harmful to the vision of the users. In addition, the font size of the electronic device may be manually adjusted to achieve a good viewing experience. However, this method may take the user several tries to get satisfactory viewing, which is time consuming and inconvenient. Therefore, there is room for improvement in the art.
The disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable medium include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In step S01 the setting module 101 sets a reference image having facial features of the user. The reference image may be pre-captured by the user using the image capturing device 14 when the user views the display 13 at an appropriate distance from the display 13. At this viewing distance, the user may have a clear view of the texts displayed on the display 13.
In step S02, the eye recognition module 102 locates an eye portion from the reference image, calculates a first smallest rectangle framing the eye portion of the reference image and a first ratio of a length to a width of the first smallest rectangle, and determines a value range according to the calculated first ratio. For example, if the calculated first ratio is R, the value range may be [R−2%, R+2%].
In the embodiment, the eye recognition module 102 may locate the eye portion from the reference image using a template matching method, a neural network training method, or other known eye recognition technologies. In one example, a reference image M1 is shown in
In step S03, the image capturing module 103 controls the image capturing device 14 to capture images of a user in front of the display 13 at regular intervals, such as every two or three seconds.
In step S04, the eye recognition module 102 locates an eye portion from a current image captured by the image capturing device 14, and calculates a second smallest rectangle framing the eye portion of the current image and a second ratio of a length to a width of the second smallest rectangle.
In step S05, the font size adjustment module 104 determines whether the second ratio is within the value range. If the second ratio is within the second value range, the procedure goes to step S08. Otherwise, if the second ration is outside of the value range, the procedure goes to step S06.
In step S06, the font size adjustment module 104 determines whether a current font size of the electronic device 1 is greater than or equal to a predetermined threshold value, if yes, the procedure goes to step S09. If the current font size of the electronic device 1 is less than the predetermined threshold value, the procedure goes to step S07. In the embodiment, the threshold value may be the maximum font size supported by the electronic device 1.
In step S07, the font size adjustment module 104 enlarges the font size of the electronic device 1 with a predetermined percentage (e.g., 10%), the procedure goes back to step S04.
In step S08, the font size adjustment module 104 determines whether the calculated second ratio using the current image captured by the image capturing device 14 is maintained within the value range for a predetermined time period (e.g., three or five seconds). If the calculated second ratio using the current image captured by the image capturing device 14 has been maintained within the value range for the predetermined time period, the procedure goes to step S09. Otherwise, the procedure goes back to step S04.
In step S09, the font size adjustment module 104 controls the image capturing device 14 to stop capturing images, and terminates the font size adjustment process of the electronic device 1.
In step S10, when the electronic device 1 is restarted or the display 13 is powered/turned off, the font size adjustment modules 104 recovers the font size of the electronic device 1 to a preset default size.
Although certain embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201210125618.1 | Apr 2012 | CN | national |