Method of detecting ultraviolet ray and electronic device thereof

A method is provided for operating an electronic device. The method includes detecting an ultraviolet ray value through an ultraviolet ray detection sensor; acquiring an image including a sun object; comparing a position of the sun object within the acquired image to a position of a guide object; and correcting the detected ultraviolet ray value based on a difference between the position of the sun object and the position of the guide object.

PRIORITY

This application claims priority under 35 U.S.C. § 119(a) to Korean Patent Application Serial No. 10-2014-0107178, which was filed in the Korean Intellectual Property Office on Aug. 18, 2014, the entire content of which is incorporated herein by reference.

BACKGROUND

1. Field of the Invention

The present invention relates generally to an electronic device and method for detecting an ultraviolet ray.

2. Description of the Related Art

Because excessive exposure to ultraviolet rays can be harmful, people often want to limit their exposure to ultraviolet rays and interest in an ultraviolet index has increased. For example, a user may measure an ultraviolet ray value from the sun by using an electronic device including an ultraviolet ray detection sensor (a UV sensor). The electronic device may detect an ultraviolet ray value based on a measured quantity of light in an ultraviolet band (for example, 280 nm to 400 nm) and provide the detected ultraviolet ray value to the user.

Generally, to measure ultraviolet rays from the sun using an electronic device including a UV sensor, a user aims the electronic device toward the sun and then measures the ultraviolet rays with the electronic device. However, this type of measurement method is often inaccurate since it may be difficult to properly aim the sensor toward the sun.

Further, although some devices attempt to correct errors in an ultraviolet ray value, the corrected ultraviolet ray values are only conjectured values, based on an equation, which does not necessarily guarantee accuracy.

SUMMARY

The present invention has been made to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below.

Accordingly, an aspect of the present invention is to provide an electronic device and method for matching an incident angle of the sun and a viewing angle of an ultraviolet ray detection sensor.

Another aspect of the present invention is to provide an electronic device and method for displaying radial images on a display screen and guiding a user, such that a photographed sun image overlaps the radial images.

Another aspect of the present invention is to provide an electronic device and method for compensating an ultraviolet ray detection value according to a position of the sun image displayed on a display.

In accordance with an aspect of the present invention, a method of operating an electronic device is provided. The method includes detecting an ultraviolet ray value through an ultraviolet ray detection sensor; acquiring an image including a sun object; comparing a position of the sun object within the acquired image to a position of a guide object; and correcting the detected ultraviolet ray value based on a difference between the position of the sun object and the position of the guide object.

In accordance with an aspect of the present invention, an electronic device is provided. The electronic device includes an ultraviolet ray detection sensor for detecting an ultraviolet ray value; an image sensor for acquiring an image including a sun object; a display for displaying the image including the sun object; and a processor for comparing a position of the sun object within the acquired image to a position of a preset guide object, and correcting the detected ultraviolet ray value based on a difference between the position of the sun object and the position of the guide object.

In accordance with another aspect of the present invention, a method of operating an electronic device is provided. The method includes displaying a first object on a display; capturing a sun object; overlapping the sun object with the first object; and detecting an ultraviolet ray value through an ultraviolet ray detection sensor based on a difference between a position of the first object and a position of the sun object.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Hereinafter, various embodiments of the present invention will be described with reference to the accompanying drawings. The present invention may be modified in various forms and include various embodiments, but specific examples are illustrated in the drawings and described in the description. However, the description is not intended to limit the present invention to the specific embodiments described herein, and it shall be appreciated by a person having ordinary skill in the art that all the changes, equivalents and substitutions belonging to the idea and technical scope of the present invention are included in the present invention.

In the description of the drawings, identical or similar reference numerals are used to designate identical or similar elements.

Herein, the terms “include” or “may include” refer to the existence of a corresponding disclosed function, operation, or component that can be used in various embodiments of the present invention and does not limit one or more additional functions, operations, or components. Similarly, terms such as “include” or “have” may be construed to denote a certain characteristic, number, step, operation, constituent element, component, or a combination thereof, but may not be construed to exclude the existence of or a possibility of addition of one or more other characteristics, numbers, steps, operations, constituent elements, components, or combinations thereof.

The term “module” used herein may refer to, for example, a “unit” including one of hardware, software, and firmware, or a combination of two or more of the hardware, software, and firmware. The “module” may be interchangeably used with a term, such as unit, logic, logical block, component, or circuit. The “module” may be the smallest unit of an integrated component or a part thereof. The “module” may be the smallest unit that performs one or more functions or a part thereof. The “module” may be mechanically or electronically implemented. For example, the “module” according to various embodiments of the present invention may include at least one of an Application-Specific Integrated Circuit (ASIC) chip, a Field-Programmable Gate Arrays (FPGAs), and a programmable-logic device for performing operations which have been known or are to be developed hereafter.

The expressions “or” or “at least one of A or/and B” include any or all of combinations of words listed together. For example, the expression “A or B” or “at least A or/and B” may include A, may include B, or may include both A and B.

Herein, the expressions “1”, “2”, “first”, or “second” may modify various components of various embodiments, but does not limit the corresponding components. For example, the above expressions do not limit the sequence and/or importance of the elements but are used merely to distinguish an element from another element. For example, a first electronic device and a second electronic device indicate different electronic devices, although both of them are electronic devices. For example, without departing from the scope of the present invention, a first component element may also be referred to as a second component element. Similarly, the second component element may also be referred to as the first component element.

When an element is referred to as being “connected to” or “accessed by” other elements, it should be understood that the element may be directly connected to or accessed by the other elements, or also another element may exist between them. However, when an element is referred to as being “directly connected to” or “directly accessed by” other elements, it should be understood that there is no element therebetween.

As used herein, singular forms are intended to include the plural forms as well, unless the context clearly indicates otherwise.

Unless defined differently, all terms used herein, which include technical terminologies or scientific terminologies, have the same meanings as known to a person skilled in the art to which the present disclosure belongs. Such terms as those defined in a generally used dictionary are to be interpreted to have meanings consistent to the contextual meanings in the relevant field of art, and are not to be interpreted to have ideal or excessively formal meanings, unless clearly defined as such in the present disclosure.

An electronic device according to various embodiments of the present invention may include a device with a communication function. For example, the electronic device may be at least one of a smart phone, a tablet Personal Computer (PC), a mobile phone, a video phone, an e-book reader, a desktop PC, a laptop PC, a netbook computer, a Personal Digital Assistant (PDA), a Portable Multimedia Player (PMP), an MP3 player, a mobile medical device, a camera, a wearable device (for example, a Head-Mounted-Device (HMD) such as electronic glasses, electronic clothes, an electronic bracelet, an electronic necklace, an electronic appcessory, an electronic tattoo, and or a smart watch), etc.

The electronic device may also be a smart home appliance with a communication function, such as a television (TV), a Digital Video Disk (DVD) player, an audio player, a refrigerator, an air conditioner, a vacuum cleaner, an oven, a microwave oven, a washing machine, an air purifier, a set-top box, a TV box (e.g., Samsung HomeSync®, Apple TV®, or Google TV®), a game console, an electronic dictionary, an electronic key, a camcorder, or an electronic picture frame.

The electronic device may also be at least one of various types of medical devices, such as a Magnetic Resonance Angiography (MRA) device, Magnetic Resonance Imaging (MRI) device, Computed Tomography (CT) device, a scanning machine, ultrasonic wave device, etc.

The electronic device may also be at least one of a navigation device, a Global Positioning System (GPS) receiver, an Event Data Recorder (EDR), a Flight Data Recorder (FDR), a car infotainment device, ship electronic equipment (for example, navigation equipment for a ship, a gyro compass and the like), avionics equipment, a security device, or an industrial or home robot.

The electronic device may also be at least one of furniture or a part of a building/structure having a communication function, electronic boards, electronic signature receiving devices, projectors, or various measuring equipment (e.g., a water meter, an electricity meter, a gas meter, or a radio wave meter).

Also, the electronic device may be a flexible device.

Additionally, the electronic device may be a combination of one or more of above described various devices.

However, the electronic device is not limited to the above-described devices.

Herein, the term “user” may refer to a person who uses an electronic device or a device (for example, an artificial intelligence electronic device) that uses an electronic device.

Herein, ‘a viewing angle of an ultraviolet ray detection sensor’ is defined as a perpendicular direction from the surface of the ultraviolet ray detection sensor (or the direction that the ultraviolet ray detection sensor is aimed). ‘An incident angle of a sun’ is defined as an angle between a sun ray and the surface of an ultraviolet ray detection sensor. Accordingly, when the incident angle of the sun matches the viewing angle of the ultraviolet ray detection sensor, this scenario may be referred to as “an angle between the sun and the ultraviolet ray detection sensor is about 0 degrees”. Similarly, when the incident angle of the sun crosses the viewing angle of the ultraviolet ray detection sensor by about x degrees, this scenario may be referred to as “an angle between the sun and the ultraviolet ray detection sensor is about x degree”.

Herein, “a guide object” refers to a displayed object for visually representing a viewing angle of an ultraviolet ray detection sensor on a display (or representing the direction that the ultraviolet detection sensor is aimed). The center of the guide object corresponds to the perpendicular direction from the surface of the ultraviolet detection sensor (or the direction that the ultraviolet detection sensor is aimed). That is, when the center of the sun in the photographed image matches the center of the guide object, the incident angle of the sun matches the viewing angle of the ultraviolet ray detection sensor.

FIG. 1illustrates an electronic device according to an embodiment of the present invention.

Referring toFIG. 1, the electronic device100includes a bus110, a processor120, a memory130, an input/output interface140, a display150, a communication interface160, and an ultraviolet ray correction module170. Alternatively, the ultraviolet ray correction module170may be included in the processor120.

The bus110may be a circuit that interconnects the other components, i.e., the processor120, the memory130, the input/output interface140, the display150, the communication interface160, and the ultraviolet ray correction module170, and delivers communications (for example, a control message) between the other components.

The processor120receives a command from the other components, through the bus110, decrypts the received command, and executes an operation or data processing based on the decrypted command.

The memory130stores commands or data received from the other components, or generated by the other components.

The memory130includes programming modules, for example, a kernel131, middleware132, an Application Programming Interface (API)133, and an application134. Each of the aforementioned programming modules may be formed of software, firmware, hardware, or a combination of at least two thereof.

The kernel131may control or manage system resources, for example, the bus110, the processor120, and the memory130to execute an operation or function implemented in the other programming modules. The kernel131may also provide an interface for the middleware132, the API133, or the applications134to access an individual component of the electronic device100, e.g., for control or management.

The middleware132may operate as a relay for the API133or the applications134to exchange data with the kernel131. Also, in association with operation requests received from the applications134, the middle ware132may execute a control, for example, scheduling or load balancing, for an operation request, for example, by assigning, to at least one of the applications134, a priority of use of a system resource of the electronic device100, such as the bus110, the processor120, the memory130, etc.

The API133is an interface used by the applications134to control a function provided from the kernel131or the middleware132, and may include at least one interface or function for a file control, a window control, image processing, a character control, etc.

The applications134may include a Short Message Service (SMS)/Multimedia Message Service (MMS) application, an e-mail application, a calendar application, an alarm application, a health care application (for example, an application for measuring a work rate or blood sugar), an environment information application (for example, an application for providing atmospheric pressure, humidity, or temperature information). The applications134may also include an application for exchanging information between the electronic device100and an external electronic device (for example, an electronic device104). The application for exchanging information may include a notification relay application for transferring predetermined information to an external electronic device or a device management application for managing an external electronic device.

For example, the notification relay application may transfer, to the electronic device104, notification information generated from other applications of the electronic device100, e.g., an SMS/MMS application, an e-mail application, a health management application, an environmental information application, etc.

The notification relay application may receive notification information from an external electronic device (for example, the electronic device104), and provide the notification information to a user.

For example, the device management application may install, delete, update, etc., a function for an external electronic device (for example, the electronic device104) communicating with the electronic device100. For example, the device management application may turn on/off the electronic device104or some component thereof, or adjust luminance or a resolution of a display of the electronic device104. Further, the device management application may operate applications operating in the external electronic device, or services provided by the external electronic device (for example, a call service or a message service).

The applications134may include an application designated based on properties of an external electronic device. For example, when the electronic device104is an MP3 player, the application134may include an application related to the reproduction of music. Similarly, when the electronic device104is a mobile medical device, the application134may include an application related to health care.

The applications134may also include an application designated in the electronic device100and an application received from the external electronic device (for example, a server106or the electronic device104).

The input/output interface140transfers a command or data input by a user through an input/output device (for example, a sensor, a keyboard, a touch screen, a button, etc.) to the other components, through the bus110. For example, the input/output interface140may provide the processor120with data associated with a touch user input through a touch screen.

Further, the input/output interface140may output, for example, a command or data received through the bus110from the other components, to an input/output device (e.g., a speaker or a display). For example, the input/output interface140may output voice data processed by the processor120to the user through a speaker.

The display150may display various information, such as multimedia data, text data, etc.

The communication interface160connects the electronic device100and another device (for example, the electronic device104or the server106). For example, the communication interface160may be connected to a network162through wireless or wired communication, and may communicate with an external device through the network162. The wireless communication may include at least one of Wi-Fi, Bluetooth (BT), Near Field Communication (NFC), Global Positioning System (GPS) or and cellular communication, such as Long Term Evolution (LTE), LTE-Advanced (LTE-A), Code Division Multiple Access (CDMA), Wideband CDMA (WCDMA), Universal Mobile Telecommunications System (UMTS), Wireless Broadband (WiBro), Global System for Mobile Communications (GSM), etc. Examples of the wired communication include a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a Recommended Standard 232 (RS-232), or and a Plain Old Telephone Service (POTS).

The network162may be a communication network, such as a telecommunication network including at least one of a computer network, Internet, Internet of things, and/or a telephone network.

A protocol for communication between the electronic device100and the external device (for example, a transport lay protocol, data link layer protocol, or a physical layer protocol) may be supported by at least one of the applications134, the application programming interface133, the middleware132, the kernel131, and the communication interface160.

The ultraviolet ray correction module170detects an ultraviolet ray value from the sun, defines (or sets) a position of the sun (a sun image or a sun object, i.e., a displayed object representing the position of the sun) in a photographed image, and compares the position of the sun in the photographed image with a predetermined guide object, in order to correct an ultraviolet ray detection value. For example, the guide object may be an ultraviolet ray sensing value for correcting an ultraviolet ray value.

The ultraviolet ray correction module170may determine the position of the sun in the photographed image using x and y coordinates and determine which part of the guide object includes the determined position of the sun. Thereafter, the ultraviolet ray correction module170may correct the ultraviolet ray detection value according to the part of the guide object that includes the position of the sun.

The server106may support driving of an electronic device100by conducting operations (or functions) implemented by the electronic device100. For example, the server106includes an ultraviolet ray correction server module108that supports the ultraviolet ray correction module170implemented by the electronic device100. The ultraviolet ray correction server module108may include one or more components of the ultraviolet ray correction module170to perform (on behalf of the ultraviolet ray correction module170) at least one of the operations of the ultraviolet ray correction module170.

The ultraviolet ray correction module170may process at least some of information acquired from the other components and may provide processed information to a user in various schemes. For example, the ultraviolet ray correction module170may control at least some functions of the electronic device100by using the processor120, or independently therefrom, to control the electronic device100to interwork with other electronic devices (for example, the electronic device104or the server106).

Alternatively, the ultraviolet ray correction module170(or a portion thereof) may be included in the server106(for example, the ultraviolet ray correction server module108) and receive support for at least one operation implemented by the ultraviolet ray correction module170from the server106.

FIG. 2illustrates an ultraviolet ray correction module according to an embodiment of the present disclosure. For example, the ultraviolet ray correction module illustrated inFIG. 2may be used as ultraviolet ray correction module170inFIG. 1.

Referring toFIG. 2, the ultraviolet ray correction module includes an image processing module200and an ultraviolet ray processing module210. Alternatively, the image processing module200and the ultraviolet ray processing module210may be implemented together as a single module in the ultraviolet ray correction module.

The image processing module200photographs (or captures) the sun and displays the photographed sun image on a preview screen. The image processing module200detects a position of the sun (sun object) by analyzing image buffer (or frame buffer) information determined by an image sensor. Specifically, the image processing module200measures an angle between the sun and the electronic device using the image sensor. The image processing module200then detects whether an incident angle of the sun matches a viewing angle of an ultraviolet ray detection sensor of the electronic device or how much the two angles differ.

The image processing module200may display a radial image (guide object) in a camera photographing mode or an ultraviolet ray measuring mode. The radial image may be used for guiding a sun image to detect an ultraviolet ray. For example, the radial image may include a straight line, a curved line, a figure, and/or a character image.

FIGS. 8A, 8B, 8C, and 8Dillustrate screen configurations for detecting ultraviolet rays according to an embodiment of the present invention.

Referring toFIG. 8A, the image processing module200displays radial images820on a preview screen810. The radial images820include a plurality of circles821,823, and825that overlap each other. The circles821,823, and825may have different sizes and colors. AlthoughFIG. 8A, illustrates the radial images820as circles, the present invention is not limited thereto, and the radial images820may have various shapes.

The circles821,823, and825of the radial images820indicate angles between the sun and an ultraviolet ray detection sensor of the electronic device800. For example, when the photographed sun image (sun object) is located at the center of the first circle821, the angle between the sun and the ultraviolet ray detection sensor is about 0 degrees. In this case, when an ultraviolet ray is detected, the electronic device800acquires an accurate ultraviolet ray detection value.

However, when the photographed sun image extends over the first circle821, the angle between the sun and the ultraviolet ray detection sensor are about 10 degrees. Similarly, when the photographed sun image extends over the second circle823, the angle between the sun and the ultraviolet ray detection sensor are about 20 degrees. Basically, when the sun image gradually moves outward from the first circle821, the angle between the sun and the ultraviolet ray detection sensor gradually increases. Although the circles821,823, and825illustrated inFIG. 8Aare described as indicating the angles between the sun and the ultraviolet ray detection sensor at intervals of 10 degrees, the present invention is not limited thereto and various angle intervals may be applied.

Referring toFIG. 8B, the image processing module200may display a photographed sun object830on the preview screen810. For example, the image processing module200sets a resolution of the preview screen810to be low. The user views the sun object830through the preview screen810, and controls a position of the sun object830on the preview screen810by changing a position of the electronic device800.

By the user changing the position of the electronic device800, the ultraviolet ray processing module210may correct the ultraviolet ray detection value based on the display position of the sun object830processed by the image processing module200.

The ultraviolet ray processing module210measures an ultraviolet ray value through the ultraviolet ray detection sensor installed in a front surface or a rear surface. For example, the ultraviolet ray detection sensor may measure an amount of light in an ultraviolet band (280 nm to 400 nm), which is invisible to the naked eye. Further, the ultraviolet ray detection sensor may have a filter, which is designed to transmit only the light in the ultraviolet band. The ultraviolet ray detection sensor may be integrally implemented with an image sensor or separately therefrom.

The ultraviolet ray processing module210may guide the user to move the electronic device800until the displayed sun object830overlaps the radial image (or guide object). For example, the ultraviolet ray processing module210may guide the user to make the sun object830be positioned in the center of the radial image to detect the ultraviolet ray.

Referring toFIG. 8C, the ultraviolet ray processing module210guides the user to make the sun object830overlap the radial images820. For example, the ultraviolet ray processing module210may output a notification sound or a notice and guide the user to move the sun object830to the center of the radial images820. As another example, the ultraviolet ray processing module210may output a notification sound or a notice and guide the user to make the sun object830merely be located within the radial images820.

However, the present invention is not limited to the examples illustrated inFIGS. 8A to 8C, and the ultraviolet ray processing module210may guide the user to control a position of the sun object830through various other methods.

FIG. 3is a normalization graph illustrating a change in a quantity of light of an ultraviolet ray detection sensor based on an incident angle of the sun, according to an embodiment of the present invention.

Referring toFIG. 3, as the incident angle of the ultraviolet ray detection sensor from the sun moves closer to 0 degrees, the quantity of light of the sun becomes closer to a maximum value (for example, about 100%). However, when the incident angle of the ultraviolet ray detection sensor from the sun gradually diverts away from 0 degrees, the quantity of light of the sun gradually decreases. For example, when the angle between the sun and the ultraviolet ray detection sensor is diverted by about 15 degrees (i.e., when the incident angle of the ultraviolet ray detection sensor from the sun is about 15 degrees), the quantity of light of the sun decreases by about 10%. Based on such a method, when measuring an ultraviolet ray, the ultraviolet ray processing module210may pre-calculate an angle between the sun and the ultraviolet ray detection sensor and then correct an ultraviolet ray detection value by a reduced quantity of light of the sun based on the corresponding angle. For example, the ultraviolet ray processing module210may correct an ultraviolet ray detection value according to a display position of the sun image that overlaps the radial image.

For example, referring again toFIG. 8C, when the sun object830extends over the second circle823of the radial images820, the ultraviolet ray processing module210may determine that an angle between the ultraviolet ray detection sensor and the sun is about 20 degrees, and then perform compensation by multiplying the actual detected ultraviolet ray value by about 1.15 to correct a reduced quantity of light (for example, about 15%) due to the corresponding angle (for example, about 20 degrees). As the sun object830extends over one of the circles821,823, and825of the radial images820, the ultraviolet ray processing module210may perform different corrections based on the reduced quantity of light according to the corresponding angle.

As described above, the ultraviolet ray processing module210may output a corrected ultraviolet ray value. For example, the ultraviolet ray processing module210may output a signal or an Analog-Digital Converter (ADC) conversion value as the corrected ultraviolet ray value. The ultraviolet ray processing module210may convert the ultraviolet ray correction value into an ultraviolet index and output the converted value.

Referring toFIG. 8D, when the ultraviolet ray correction is completed, the ultraviolet ray processing module210displays ultraviolet index information840as the ultraviolet ray correction value. For example, the ultraviolet ray processing module210may output the ultraviolet index information840through a notification sound. Additionally, when the ultraviolet index is larger than a reference index, the ultraviolet ray processing module210may give the user a warning or an alarm through the notification sound or a notice.

FIG. 4is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 4, an electronic device (for example, the electronic device100) determines an ultraviolet ray value from the sun in step400. For example, the electronic device may measure an ultraviolet ray value from the sun using an ultraviolet ray detection sensor installed in a front surface or a rear surface.

In step410, the electronic device photographs an image including the sun. For example, the electronic device may photograph an image including the sun using the ultraviolet ray detection sensor. The electronic device may photograph the sun in a camera photographing mode and in an ultraviolet ray measuring mode. The ultraviolet ray measuring mode may be a mode for measuring an ultraviolet ray from the sun through the ultraviolet ray detection sensor. Preferably, the image sensor is designed to not be damaged when photographing the sun.

The electronic device may photograph the image including the sun while a preview screen is displayed.

According to an embodiment, the electronic device may capture or photograph the sun when the guide object is not displayed in a camera photographing mode or an ultraviolet ray measuring mode.

For example, the electronic device may photograph the sun image while a guide object is displayed in a camera photographing mode or an ultraviolet ray measuring mode. The guide object may be predetermined, and may be expressed as a radial image for guiding a sun object to correct an ultraviolet value. However, the present invention is not limited thereto, and the guide object may include other indications, such as at least one of a straight line and a curved line. Further, the guide object may include a figure or a character image.

FIGS. 6A, 6B, 6C, and 6Dillustrate screen configurations for detecting ultraviolet rays according to an embodiment of the present invention.

Referring toFIG. 6A, an electronic device600displays radial images620on a preview screen610. The radial images620include a plurality of circles621,623, and625. The circles621,623, and625may have different sizes and colors.

Similar to the description ofFIGS. 8A to 8Dabove, the circles621,623, and625of the radial images620indicate angle intervals between the sun and an ultraviolet ray detection sensor of the electronic device600. For example, when the photographed sun image is located at the center of the first circle621, the angle between the sun and the ultraviolet ray detection sensor is about 0 degrees. In this case, when an ultraviolet ray is detected, the electronic device600acquires an accurate ultraviolet ray detection value. However, when the photographed sun image extends over the first circle621, the angle between the sun and the ultraviolet ray detection sensor is about 10 degrees. Similarly, when the photographed sun image extends over the second circle623, the angle between the sun and the ultraviolet ray detection sensor is about 20 degrees. Again, as the sun image gradually moves outward from the first circle621, the angle between the sun and the ultraviolet ray detection sensor gradually increases.

Although the circles621,623, and625indicate the angles between the sun and the ultraviolet ray detection sensor at intervals of 10 degrees, the present invention is not limited thereto and various angle intervals may be applied.

Referring toFIG. 6B, the electronic device600displays the photographed sun object630while the radial images620are displayed on the preview screen610. The user may identify a position of the sun object630through the preview screen610, and control a position of the sun object630on the preview screen610by changing a position of the electronic device600. When the sun object630within the photographed image is identified by the user's eyes, the user may be dazzled, so that the electronic device600displays the sun object630using a metaphor method and may be replaced with an alternative image.

Referring toFIG. 6C, the electronic device600guides the user to move the electronic device600, such that the sun object630overlaps the radial images620. For example, the electronic device600may output a notification sound or a notice and guide the user to move the sun object630to the center of the radial images620or to merely be located within the radial images620.

When guiding the user to make the sun object630overlap the radial images620, if the sun object630is located within the radial images620with a predetermined overlapping rate, the electronic device600may inform the user of the overlapping rate.

According to an embodiment, an angle between the sun object630and the ultraviolet sensor may be displayed on the preview screen610. The angle may be displayed continuously or intermittently (when a predetermined event happens). When the angle is displayed intermittently, the angle may be displayed on the preview screen each time the sun object630overlaps the circles621,623, and625(for example, at 10°, 20°, and 30°).

Referring again toFIG. 4, in step420, the electronic device compares the position of the sun object within the photographed image with a position of a predetermined guide object. The electronic device may defines (or sets) the position of the sun object within the photographed image. For example, an image processor of the electronic device may determine the position of the sun using x and y coordinates, and may determine which part of the radial image includes the determined coordinate value of the sun. The electronic device may detect a distance between the center of the sun object of the photographed image and the center of the guide object.

In step430, the electronic device corrects a detected ultraviolet ray value based on a difference between the position of the sun object and the position of the guide object.

Referring again toFIG. 6C, when the sun object630extends over the second circle623of the radial images620, the electronic device600may determine that an angle between the ultraviolet ray detection sensor and the sun is about 20 degrees, and then performs a correction (or a compensation) by multiplying a detected ultraviolet ray value by about 1.15 to account for a reduced quantity of light (for example, about 15%) due to the corresponding angle (for example, about 20 degrees).

When the sun object630extends over one of the circles621,623, and625of the radial images620, the electronic device600may perform different corrections based on the reduced quantity of light according to the corresponding angle.

As described above, the electronic device may output the corrected ultraviolet ray value. For example, the electronic device may output a signal or an ADC conversion value as the corrected ultraviolet ray value. The electronic device may convert the ultraviolet ray correction value into an ultraviolet index and output the ultraviolet index. For example, the electronic device may display a user message (for example, refrain from going out) based on the converted ultraviolet index. The electronic device may display the ultraviolet ray value on the screen immediately when the ultraviolet ray value is detected by an ultraviolet ray sensor.

Referring toFIG. 6D, when the ultraviolet ray correction is completed, the electronic device600displays ultraviolet index information640as the ultraviolet ray correction value. For example, the electronic device600may output the ultraviolet index information640through a sound notification. When the ultraviolet index is larger than a reference index, the electronic device600may give the user a warning or an alarm through the notification sound or a notice. For example, when the ultraviolet index is larger than the reference index, the electronic device600may display a user message such as “refrain from going out”.

FIG. 5is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 5, an electronic device (for example, the electronic device100) determines an ultraviolet ray value from the sun in step500. For example, the electronic device may measure an ultraviolet ray value from the sun using an ultraviolet ray detection sensor installed in a front surface or a rear surface.

In step510, the electronic device photographs an image including the sun.

Notably, steps500and510ofFIG. 5are the same as steps400and410ofFIG. 4. Therefore, a redundant explanation of these steps will be omitted herein.

In step520, the electronic device defines a position of the sun in the photographed image. For example, an image processor of the electronic device may determine the position of the sun using x and y coordinates, and may determine which part of the radial image includes the determined coordinate value of the sun. The electronic device may detect a distance between the center of the sun object of the photographed image and the center of the guide object to determine the position of the sun.

In step530, the electronic device guides the user to make the sun object overlap the radial images. For example, the electronic device guides the user to move the electronic device, such that the sun object is moved to the center of the radial images to detect an ultraviolet ray. For example, as illustrated inFIG. 6C, the electronic device600may guide the user to move the electronic device600, such that the sun object630overlap the radial images620, as described above.

According to an embodiment of the present invention, an angle between the sun object630and the ultraviolet sensor may be displayed on the preview screen610. The angle may be displayed continuously or intermittently (when a predetermined event happens). When the angle is displayed intermittently, the angle may be displayed on the preview screen each time the sun object630overlaps the circles621,623, and625(for example, at 10°, 20°, and 30°).

In step540, the electronic device compares the position of the sun object within the photographed image with a position of a predetermined guide object, and in step550, the electronic device corrects a detected ultraviolet ray value based on a difference between the position of the sun object and the position of the guide object. Because steps540and550ofFIG. 5are the same as steps420and430ofFIG. 4, a redundant explanation of these steps will be omitted herein.

FIG. 7is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 7, an electronic device (for example, the electronic device100) displays radial images in step700, for example, a plurality of circles821,823, and825as illustrated inFIG. 8A, as described above.

In step710, the electronic device photographs the sun. For example, the electronic device may photograph the sun through an image sensor installed in a front surface or a rear surface.

In step720, the electronic device displays the photographed sun object830, for example, as illustrated inFIG. 8B, as described above.

In step730, the electronic device guides the user to make the sun object830overlap the radial images (or guide object)820, for example, as illustrated inFIG. 8C, as described above

In step740, the electronic device detects an ultraviolet ray value, e.g., using an ultraviolet ray detection sensor installed in a front surface or a rear surface of the electronic device.

In step750, the electronic device corrects the ultraviolet ray detection value based on a difference between a position of sun object830and a position of guide object820.

For example, the electronic device may correct the ultraviolet ray detection value according to the display position of the sun image, which overlaps the radial image.

Referring again toFIG. 8C, when the sun object830extends over the second circle823of the radial images820, the electronic device800may determine that an angle between the ultraviolet ray detection sensor and the sun is about 20 degrees, and then perform a correction (or compensation) by multiplying the detected ultraviolet ray value by about 1.15 to correct for a reduced quantity of light (for example, about 15%) due to the corresponding angle (for example, about 20 degrees).

Referring again toFIG. 7, in step760, the electronic device outputs the corrected ultraviolet ray value, for example, as illustrated inFIG. 8D, as described above.

FIG. 9is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 9, an electronic device (for example, the electronic device100) executes a camera application in operation900. For example, a user may select a camera application loaded in the electronic device.

In step910, the electronic device detects an ultraviolet ray measuring mode. For example, the electronic device enters the ultraviolet ray measuring mode for detecting an ultraviolet ray when the camera application is executed. The ultraviolet ray measuring mode may be a particular mode for photographing the sun and detecting an ultraviolet ray from the sun. As described above, the electronic device may photograph the sun through an image sensor installed in a front surface or a rear surface thereof.

FIGS. 10A, 10B, and 10Cillustrate screen configurations for detecting ultraviolet rays according to an embodiment of the present invention.

Referring toFIG. 10A, the electronic device1000enters the ultraviolet ray measuring mode for photographing the sun and detecting the ultraviolet ray. For example, the electronic device1000displays a preview screen1010showing an image photographed through an image sensor and displays a symbol1020indicating a photographing mode for ultraviolet ray measurement. The electronic device1000may set a resolution of the preview screen1010to be relatively low.

Referring again toFIG. 9, in step920, the electronic device determines whether a sun image is detected. For example, the electronic device may identify whether the sun image is detected on the screen through the image sensor.

Referring toFIG. 10B, when the electronic device1000photographs the sun, the electronic device1000displays a sun object1030received through an image sensor on a preview screen1010. The user may view the sun object1030through the preview screen1010, and control a position of the sun object1030on the preview screen1010by changing a position of the electronic device1000. The electronic device1000may display a notice1040indicating that the sun object1030is detected.

Referring again toFIG. 9, when the sun image is detected, the electronic device detects an ultraviolet ray value in step930. For example, the electronic device may measure the ultraviolet ray value through an ultraviolet ray detection sensor installed in a front surface or a rear surface thereof, as described above.

When the sun is not detected in step920, the electronic device may display an indication, e.g., as illustrated in display notice1050inFIG. 10C, until the sun is detected.

FIG. 11is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 11, an electronic device (for example, the electronic device100) detects an illumination value (for example, lux) in step1100. For example, the electronic device may measure a current illumination using an illumination sensor installed in a front surface or a rear surface thereof. The electronic device may measure illumination at a specific time, at different intervals, or in response to a user command. Further, the electronic device may measure illumination, when a preset condition is detected.

In step1110, the electronic device determines whether the detected illumination value is larger than or equal to a reference value. For example, the electronic device may determine whether to enter an ultraviolet ray measuring mode based on the detected illumination value. The reference value may be a minimum brightness value for detecting an ultraviolet ray from the sun.

When the detected illumination value is smaller than the reference value, the method returns to step1100and the electronic device may detect an illumination value again.

When the detected illumination value is greater than or equal to the reference value, the electronic device displays guide object (or radial images) in step1120. Specifically, when an illumination value greater than or equal to the reference value is detected, the electronic device may perform an ultraviolet ray measuring process, for example, as illustrated inFIG. 8A, as described above.

In step1130, the electronic device guides the user to make the sun object overlap a guide object (e.g., the radial images). For example, the electronic device may guide the user to move the electronic device such that the sun object is arranged at the center of the radial images to detect an ultraviolet ray, as illustrated inFIG. 8C, as described above.

In step1140, the electronic device detects an ultraviolet ray value. For example, the electronic device may measure the ultraviolet ray value using an ultraviolet ray detection sensor installed in a front surface or a rear surface thereof. In step1150, the electronic device corrects the ultraviolet ray detection value based on a difference between a position of sun object and a position of the guide object. For example, the electronic device may correct the ultraviolet ray detection value according to the display position of the sun object, which overlaps the guide object.

Referring again toFIG. 8C, the electronic device800may determine that an angle between the ultraviolet ray detection sensor and the sun is about 20 degrees, and then perform a correction (or a compensation) by multiplying the detected ultraviolet ray value by about 1.15 to correct for a reduced quantity of light (for example, about 15%) due to the corresponding angle (for example, about 20 degrees).

In step1160, the electronic device outputs the corrected ultraviolet ray value, for example, as illustrated inFIG. 8D, as described above.

FIG. 12is a flowchart illustrating an ultraviolet ray detection method according to an embodiment of the present invention.

Referring toFIG. 12, the electronic device (for example, the electronic device100) may detect an illumination value (for example, lux) in step1200. For example, the electronic device measures current illumination through an illumination sensor installed in a front surface or a rear surface thereof. For example, the electronic device may measure illumination at a specific time, at different intervals, or in response to a user command. Further, the electronic device may measure illumination, when a preset condition is detected.

In step1210, the electronic device determines whether the detected illumination value is greater than or equal to a reference value. For example, the electronic device may determine whether to enter an ultraviolet ray measuring mode based on the detected illumination value. The reference value may be a minimum brightness value for detecting an ultraviolet ray from the sun.

When the detected illumination value is smaller than the reference value, the method returns to step1200and the electronic device may detect an illumination value again.

When the detected illumination value is greater than or equal to the reference value, the electronic device may detect position information through a motion sensor in step1220. For example, the position information may include a motion direction, a motion angle, a motion speed, or a held state of the electronic device. The electronic device may identify a position of the electronic device, which the user holds, through the motion sensor. For example, the electronic device may determine whether the user is holding the electronic device to face the floor or the sky.

In step1230, the electronic device determines whether to measure an ultraviolet ray based on the detected position information. For example, when it is determined that the user is holding the electronic device to face the sky based on an analysis result of the detected position information, the electronic device may perform an ultraviolet ray measuring process. For example, when it is determined that the user is holding the electronic device to face the sky, the electronic device may automatically drive an ultraviolet ray measuring mode or request if the user would like to enter the ultraviolet ray measuring mode. The electronic device may measure an ultraviolet ray in real time, when the sun is detected through the image sensor.

FIG. 13illustrates an electronic device according to an embodiment of the present invention. The electronic device1301may configure, for example, all or a portion of the electronic device100illustrated inFIG. 1.

Referring toFIG. 13, the electronic device1301includes an Application Processor (AP)1310, a communication module1320, a Subscriber Identification Module (SIM) card1324, a memory1330, a sensor module1340, an input device1350, a display1360, an interface1370, an audio module1380, a camera module1391, a power management module1395, a battery1396, an indicator1397, and a motor1398.

The AP1310may control a plurality of hardware or software components connected to the AP1310by driving an operating system or an application program and perform processing of various pieces of data including multimedia data and calculations. The AP1310may, for example, be implemented by a system on chip (SoC). The AP1310may further include a Graphic Processing Unit (GPU).

The communication module1320may transmit and receive data in communication between the electronic device1301and other electronic devices connected thereto through a network. The communication module1320includes a cellular module1321, a Wi-Fi module1323, a BT module1325, a GPS module1327, an NFC module1328, and a Radio Frequency (RF) module1329.

The cellular module1321may provide a voice call, a video call, a text message service, or an Internet service through a communication network (for example, LTE, LTE-A, CDMA, WCDMA, UMTS, WiBro, or GSM). Further, the cellular module1321may perform identification and authentication of electronic devices in a communication network using, for example, a subscriber identification module (for example, the SIM card1324). The cellular module1321may perform at least some functions which the AP1310may provide. For example, the cellular module1321may perform at least some of the multimedia control functions.

The cellular module1321may include a Communication Processor (CP). Further, the cellular module1321may be implemented by, for example, an SoC. Although the components such as the cellular module1321(for example, a communication processor), the memory1330, and the power management module1395are illustrated as components separate from the AP13410inFIG. 13, the AP1310may include at least some of the aforementioned components (for example, the cellular module1321) according to one embodiment.

The AP1310or the cellular module1321(for example, the communication processor) may load a command or data received from at least one of a non-volatile memory and other components connected thereto in a volatile memory, and may process the loaded command or data. Furthermore, the AP1310or the cellular module1321may store data received from or generated by at least one of other elements in a non-volatile memory.

Each of the Wi-Fi module1323, the BT module1325, the GPS module1327, and the NFC module1328may include, for example, a processor for processing data transmitted/received through the corresponding module. Although the cellular module1321, the Wi-Fi module1323, the BT module1325, the GPS module1327, and the NFC module1328are illustrated as separate blocks inFIG. 13, at least some (for example, two or more) of the cellular module1321, the Wi-Fi module1323, the BT module1325, the GPS module1327, and the NFC module1328may be included in one Integrated Chip (IC) or one IC package in one embodiment. For example, at least some (for example, the communication processor corresponding to the cellular module1321and the Wi-Fi processor corresponding to the Wi-Fi module1323) of the processors corresponding to the cellular module1321, the Wi-Fi module13235, the BT module13257, the GPS module13278, and the NFC module13228may be implemented as one SoC.

The RF module1329may transmit/receive data, for example, an RF signal. The RF module1329may include, for example, a transceiver, a Power Amp Module (PAM), a frequency filter, a Low Noise Amplifier (LNA), etc. Further, the RF module1329may include a component for transmitting/receiving electronic waves over a free air space in wireless communication, such as a conductor, a conducting wire, etc.

Although the cellular module1321, the Wi-Fi module1323, the BT module1325, the GPS module1327, and the NFC module1328share one RF module1329inFIG. 13, at least one of the cellular module1321, the Wi-Fi module1323, the BT module1325, the GPS module1327, or and the NFC module1328may transmit/receive an RF signal through a separate RF module in one embodiment.

The SIM card1324may be inserted into a slot formed in a particular portion of the electronic device. The SIM card1324may include unique identification information (for example, an Integrated Circuit Card IDentifier (ICCID)) or subscriber information (for example, an International Mobile Subscriber Identity (IMSI)).

The memory1330includes an internal memory1332or an external memory1334. The internal memory1332may include at least one of a volatile memory (for example, a Dynamic Random Access Memory (DRAM), a Static RAM (SRAM), a Synchronous Dynamic RAM (SDRAM), and the like) and a non-volatile memory (for example, a One Time Programmable Read Only Memory (OTPROM), a Programmable ROM (PROM), an Erasable and Programmable ROM (EPROM), an Electrically Erasable and Programmable ROM (EEPROM), a mask ROM, a flash ROM, a NAND flash memory, a NOR flash memory, etc.).

The internal memory1332may be a Solid State Drive (SSD). The external memory1334may further include a flash drive, for example, a Compact Flash (CF), a Secure Digital (SD), a Micro Secure Digital (Micro-SD), a Mini Secure Digital (Mini-SD), an extreme Digital (xD), a memory stick, etc. The external memory1334may be functionally connected with the electronic device1301through various interfaces. According to an embodiment, the electronic device1301may further include a storage device (or a storage medium) such as a hard disc drive.

The sensor module1340may measure a physical quantity or detect an operation state of the electronic device1301, and may convert the measured or detected information to an electrical signal. The sensor module1340includes a gesture sensor1340A, a gyro sensor1340B, an atmospheric pressure sensor1340C, a magnetic sensor1340D, an acceleration sensor1340E, a grip sensor1340F, a proximity sensor1340G, a color sensor1340H (for example, a Red/Green/Blue (RGB) sensor), a biometric sensor1340I, a temperature/humidity sensor1340J, an illumination sensor1340K, and an Ultra Violet (UV) sensor1340M. The sensor module1340may also include at least one of an E-nose sensor, an electromyography (EMG) sensor, an electroencephalogram (EEG) sensor, an electrocardiogram (ECG) sensor, an Infrared (IR) sensor, an iris sensor, and a fingerprint sensor. The sensor module1340may further include a control circuit for controlling one or more sensors included in the sensor module.

The input device1350may include a touch panel1352, a (digital) pen sensor1354, a key1356, or an ultrasonic input device1358. The touch panel1352may recognize a touch input through at least one of a capacitive type, a resistive type, an infrared type, and an ultrasonic type. The touch panel1352may further include a control circuit. A capacitive touch panel may recognize a physical contact or proximity. The touch panel1352may further include a tactile layer. In this case, the touch panel1352may provide a tactile reaction to the user.

The (digital) pen sensor1354may be implemented, for example, using the same or similar method to receiving a user's touch input or using a separate recognition sheet. The key1356may include, for example, a physical button, an optical key, or a keypad. The ultrasonic input device1358may identify data by detecting an acoustic wave with a microphone (for example, a microphone1388) of the electronic device1301through an input unit generating an ultrasonic signal, and may perform wireless recognition. The electronic device1301may receive a user input from an external device (for example, a computer or server) connected thereto using the communication module1320.

The display1360may include a panel1362, a hologram device1364or a projector1366. The panel1362may be, for example, a Liquid Crystal Display (LCD), Active-Matrix Organic Light Emitting Diode (AM-OLED), etc. The panel1362may be implemented to be, for example, flexible, transparent, or wearable. The panel1362may be configured as one module together with the touch panel1352. The hologram device1364may show a stereoscopic image in the air by using interference of light. The projector1366may project light onto a screen to display an image. The screen may be located, for example, inside or outside the electronic device1301. The display1360may further include a control circuit for controlling the panel1362, the hologram device1364, or the projector1366.

The interface1370includes, for example, a High-Definition Multimedia Interface (HDMI)1372, a Universal Serial Bus (USB)1374, an optical interface1376, and a D-subminiature (D-sub)1378. The interface1370may include, for example, a Mobile High-definition Link (MHL) interface, a Secure Digital (SD) card/Multi-Media Card (MMC) interface, or an Infrared Data Association (IrDA) standard interface.

The audio module1380may bilaterally convert a sound and an electrical signal. The audio module1380may process sound information input or output through a speaker1382, a receiver1384, earphones1386, the microphone1388, etc.

The camera module1391is a device for capturing a still image or a video, and may include one or more image sensors (for example, a front sensor or a rear sensor), a lens, an Image Signal Processor (ISP), or a flash (for example, an LED or xenon lamp).

The power management module1395manages power of the electronic device1301. The power management module1395may include, for example, a Power Management Integrated Circuit (PMIC), a charger Integrated Circuit (IC), or a battery gauge. The PMIC may be mounted to, for example, an integrated circuit or an SoC semiconductor.

Charging methods may be classified into a wired charging method and a wireless charging method. The charger IC may charge a battery and prevent over voltage or over current from a charger. The charger IC may include a charger IC for at least one of the wired charging method or and the wireless charging method. Examples of the wireless charging may include magnetic resonance charging, magnetic induction charging, and electromagnetic charging, and an additional circuit such as a coil loop, a resonance circuit, and a rectifier may be added for the wireless charging.

The battery gauge measures, for example, a remaining quantity of the battery1396, or a voltage, a current, or a temperature during the charging. The battery1396may store or generate electricity, and may supply power to the electronic device1301using the stored or generated electricity. The battery1396may include a rechargeable battery or a solar battery.

The indicator1397may display a specific status of the electronic device1301or the part (for example, the AP1310) of electronic device1301, for example, a booting status, a message status, a charging status, etc. The motor1398may convert an electrical signal to a mechanical vibration. The electronic device1301may include a processing unit (for example, a GPU) for supporting mobile TV. The processing unit for supporting mobile TV may process media data according to a standard of Digital Multimedia Broadcasting (DMB), Digital Video Broadcasting (DVB), media flow, etc.

An ultraviolet ray detection method and an electronic device thereof according to an embodiment of the present invention, as described above, can improve the accuracy of an ultraviolet ray detection value by matching an incident angle of the sun and a viewing angle of an ultraviolet ray detection sensor.

An ultraviolet ray detection method and an electronic device thereof according to an embodiment of the present invention, as described above, allows a user to more conveniently measure an ultraviolet ray by displaying radial images on a display screen and guiding the user to move the electronic device such that a photographed sun image is made to overlap the radial images.

An ultraviolet ray detection method and an electronic device thereof according to an embodiment of the present invention, as described above, can sense an ultraviolet ray in a relatively short period of time, thereby reducing the ultraviolet ray measurement time by quickly aiming the electronic device toward the sun in an accurate direction to measure the ultraviolet rays while viewing the sun on the screen.

The above-described components of an electronic device according to the various embodiments of the present invention may be formed of one or more components, and a name of a corresponding component element may be changed based on the type of electronic device. The electronic device may include one or more of the aforementioned components or may further include other additional components, or some of the aforementioned components may be omitted. Further, some of the components of the electronic may be combined to form a single entity, and thus, may equivalently execute functions of the corresponding elements prior to the combination.

According to various embodiments, at least some of the devices (for example, modules or functions thereof) or the methods (for example, operations), as described above, may be implemented by a command stored in a computer-readable storage medium in a programming module form. When the command is executed by one or more processors (for example, the processor120), the one or more processors may execute a function corresponding to the command. The computer-readable storage medium may be, for example, the memory130. At least a part of the programming module may, for example, be implemented (e.g., executed) by the processor120. At least some of the programming modules may include, for example, a module, a program, a routine, a set of instructions, or a process for performing one or more functions.

The computer readable recoding medium may include magnetic media, such as a hard disk, a floppy disk and a magnetic tape, optical media, such as a Compact Disc Read Only Memory (CD-ROM) and a Digital Versatile Disc (DVD), magneto-optical media, such as a floptical disk, and a hardware device specially configured to store and execute a program instruction (for example, a programming module), such as a Read Only Memory (ROM), a Random Access Memory (RAM), a flash memory, etc. In addition, the program instructions may include high class language codes, which can be executed in a computer by using an interpreter, as well as machine codes made by a compiler. The aforementioned hardware device may be configured to operate as one or more software modules in order to perform the operation of various embodiments of the present disclosure, and vice versa.

A module or a programming module according to the present disclosure may include at least one of the described component elements, a few of the component elements may be omitted, or additional component elements may be included. Operations executed by a module, a programming module, or other component elements according to various embodiments of the present disclosure may be executed sequentially, in parallel, repeatedly, or in a heuristic manner. Further, some operations may be executed according to another order or may be omitted, or other operations may be added.