This application claims priority to Chinese Patent Application No. 201410736184.8 filed on Dec. 5, 2014, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to ergonomics and health protection technology, and particularly to an electronic device and an eye-damage reduction method of the electronic device.
With the popularity of electronic devices (e.g., smart phones), users spend more and more time watching screens of the electronic devices, which may result in eye strain and even decreased vision.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented.
The term “module” refers to logic embodied in computing 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 computing 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 media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
The eye-damage reduction system 10 can include a plurality of function modules (shown in
The image capturing device 11 is configured to capture images of an object in front of the display screen 12. The image capturing device 11 can be a front-facing camera of the electronic device 1, or a camera device at the front of the electronic device 1.
The storage device 13 can include some type(s) of non-transitory computer-readable storage medium such as, for example, a hard disk drive, a compact disc, a digital video disc, or a tape drive. The storage device 13 stores the computerized codes of the function modules of the eye-damage reduction system 10.
The control device 14 can be a processor, an application-specific integrated circuit (ASIC), or a field programmable gate array (FPGA), for example. The control device 14 can execute computerized codes of the function modules of the eye-damage reduction system 10 to realize the functions of the electronic device 1.
The setup module 200 is configured to set a start time of eye exposure to a display screen. For example, the setup module 200 sets the start time of eye exposure as a startup time of the electronic device 1.
The capturing module 210 is configured to control the image capturing device 11 to capture at least one image of an object in front of the display screen 12. In one embodiment, the capturing module 210 captures images at a predetermined frequency. For example, the capturing module 210 can capture a specified number of images each time of capture.
The detection module 220 is configured to detect whether there is a face region and an eye region of a person in the image. In one embodiment, the detection module 220 detects the face region from the image using a face detection algorithm based on skin color, and detects the eye region from the face region.
In one embodiment, the image captured by the image capturing device 11 is an RGB (red, green, blue) image. The detection module 220 obtains an HSV (hue, saturation, value) image corresponding to the RGB image using the following formulas:
where H, S, and V are respectively hue, saturation, and value of the HSV image.
The detection module 220 determines the face region in the image as follows:
R>G&&|R−G|≧11,
340≦H≦359∥0≦H≦50,
0.12≦S≦0.7 & &0.3≦V≦1.0.
A ratio of width to height of a human face is between about 0.8 and 1.4. Accordingly, the detection module 220 can determine a boundary of the face region as follows:
where h and w are respectively a height and a width of the face region.
The detection module 220 can determine an eye detection region containing the eye region from the face region, and detect the eye region from the eye detection region.
The detection module 220 can detect boundaries of an eye from the eye detection region using a Sobel operator. The Sobel operator can be represented as follows:
Original boundary values of the eye boundaries can be obtained by following steps:
(1) setting gray values of pixels at edges of the eye detection region as 0,
(2) calculating a horizontal edge value and a vertical edge value of each pixel in the eye detection region as follows:
(3) comparing an absolute value of Bx(i,j) and an absolute value of By(i,j), if |Bx(i,j)|>=|By(i,j)|, B*(i,j)=|Bx(i,j)|, otherwise B*(i,j)=|By(i,j)|.
The detection module 220 can determine the eye region as follows:
where B*(i,j)=1 denotes pixels in the eye region, and B*(i,j)=0 denotes pixels out of the eye region. T is a preset threshold.
The determination module 230 is configured to calculate a period of time that the person continuously views the display screen 12 if there is the face region and the eye region in the image. The determination module 230 is configured to determine whether the period of time exceeds a preset time (e.g., 40 minutes).
The alert module 240 is configured to issue an alert to remind the person to take a break if the period of time exceeds the preset time. The alert module 240 can issue a text message or a voice message. The text message can be displayed on the display screen 12, and the voice message can be output by an audio device (e.g., a speaker or an earphone) of the electronic device 1.
The control module 250 is configured to control the electronic device 1 to enter a standby state if there is no face region or eye region in the image. The control module 250 can be further configured to record a standby start time when the electronic device 1 enters the standby state and a wakening time when the electronic device 1 is woken up, calculate a difference between the wakening time and the standby start time, and determine whether or not the difference is less than a specified time for rest (e.g., 5 minutes).
Referring to
At block 301, a setup module sets a start time of eye exposure to a display screen. For example, the setup module sets the start time of eye exposure as a startup time of the electronic device.
At block 302, a capturing module controls the image capturing device to capture at least one image of an object in front of the display screen. In one embodiment, the capturing module captures images at a predetermined frequency. For example, the capturing module can capture a specified number of images each time of capture.
At block 303, a detection module detects whether there is a face region and an eye region of a person in the image. In one embodiment, the detection module detects the face region from the image using a face detection algorithm based on skin color, and detects the eye region from the face region.
If there is the face region and the eye region in the image, at block 304, a determination module calculates a period of time that the person continuously views the display screen, and determines whether the period of time exceeds a preset time (e.g., 40 minutes). If the period of time does not exceed the preset time, the flow returns to block 302.
If the period of time exceeds the preset time, at block 305, an alert module issue an alert to remind the person to take a break. The alert module can issue a text message or a voice message.
If there is no face region or eye region in the image, at block 306, a control module controls the electronic device to enter a standby state, and records a standby start time (denoted as “T1”) when the electronic device enters the standby state.
At block 307, the control module records a wakening time (denoted as “T2”) when the electronic device is woken up.
At block 308, the control module calculates a difference between the wakening time and the standby start time, and determines whether the difference is less than a specified time for rest (e.g., 5 minutes), denoted as T2−T1<C in block 308 of
If the difference is not less than the specified time for rest, at block 309, the control module determines whether to end the eye-damage reduction process. If the eye-damage reduction process is not to be ended, the flow returns to block 301 and the setup module resets the start time of eye exposure. Otherwise, the flow ends.
In another embodiment, the flow ends if there is no face region or eye region in the image.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, including in particular the matters of shape, size, and arrangement of parts within the principles of the present disclosure, up to and including the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201410736184.8 | Dec 2014 | CN | national |