1. Field of the Invention
The present invention relates to image adjustment, and in particular, relates to an electronic device and an automatic image refocusing method capable of illustrating a photo slideshow by automatically refocusing on objects at different depth distances.
2. Description of the Related Art
Currently, electronic devices, such as smart phones and tablet PCs, have become more and more popular. When viewing a picture comprising several people in a scene, each of the people may be located at different depth distances within the scene (or distance from the lens of the camera). However, a conventional electronic device can not use the depth information in the picture to focus and refocus on different people in the picture, and thus user experience for viewing a picture cannot be enhanced from a conventional image.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
In an exemplary embodiment, an automatic image adjusting method for use in an electronic device is provided. The electronic device comprises a processor and a display screen. The automatic image adjusting method comprises the following steps of: analyzing an image to determine multiple target objects in the image; estimating corresponding depth distances of the target objects in the image; and displaying the image on the display screen by switching focus between the target objects according to the corresponding depth distances in a display order.
In another exemplary embodiment, an electronic device is provided. The electronic device comprises: a display screen configured to display an image; and a processor configured to analyze an image to determine multiple target objects in the image, estimate corresponding depth distances of the target object in the image, and switch focus of the image between the target objects according to the corresponding depth distances in a display order.
The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
In addition, the RF circuitry 130 may be coupled to one or more antennas 135 and may allow communications with one or more additional devices, computers and/or servers via a wireless network. The electronic device 100 may support various communications protocols, such as the code division multiple access (CDMA), Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), High-Speed Downlink Packet Access (HSDPA), Wi-Fi (such as IEEE 802.11a/b/g/n), Bluetooth, and Wi-MAX communication protocol, and a protocol for emails, instant messaging (IM), and/or a short message services (SMS), but the invention is not limited thereto.
When the display screen 140 is implemented as a touch-sensitive screen, it may detect contact and any movement or break thereof by using any of a plurality of touch sensitivity technologies now known or to be later developed, including, but not limited to, capacitive, resistive, infrared, and surface acoustic wave touch sensitivity technologies, as well as other proximity sensor arrays or other elements for determining one or more points of contact with the touch-sensitive screen. However, the touch-sensitive screen may also display visual output of the electronic device 100. In some other embodiments, the electronic device 100 may include circuitry (not shown in
The image capture unit 150 may be one or more optical sensors configured to capture images. For example, the image capture unit 150 may be one or more CCD or CMOS sensors, but the invention is not limited thereto.
The memory unit 120 may comprise one or more types of computer readable medium. The memory unit 120 may be high-speed random access memory (e.g. SRAM or DRAM) and/or non-volatile memory, such as flash memory (for example embedded multi-media card). The memory unit 120 may store program codes of an operating system 122, such as LINUX, UNIX, OS X, Android, iOS or WINDOWS operating system, or an embedded operating system such as VxWorks therein. The operating system 122 may executes procedures for handling basic system services and for performing hardware dependent tasks. The memory unit 120 may also store communication programs 124 for executing communication procedures. The communication procedures may be used for communicating with one or more additional devices, one or more computers and/or one or more servers. The memory unit 120 may comprise display programs 125, contact/motion programs 126 to determine one or more points of contact and/or their movement, and a graphics processing programs 128. The graphics processing programs 128 may support widgets, i.e., modules or applications with embedded graphics. The widgets may be implemented using JavaScript, HTML, Adobe Flash, or other suitable computer programming languages and technologies.
The memory unit 120 may also comprise one or more application programs 130. For example, application programs stored in the memory unit 120 may be telephone applications, email applications, text messaging or instant messaging applications, memo pad applications, address books or contact lists, calendars, picture taking and management applications, and music playback and management applications. The application programs 130 may comprise a web browser (not shown in
It should be noted that each of the above identified programs and applications correspond to a set of instructions for performing one or more of the functions described above. These programs (i.e., sets of instructions) need not be implemented as separate software programs, procedures or modules. The various programs and sub- programs may be rearranged and/or combined. Various functions of the electronic device 100 may be implemented in software and/or in hardware, including one or more signal processing and/or application specific integrated circuits.
After determining corresponding depth distances, the processor 110 may calculate a ranking based on the estimated depth distances of the target objects, and automatically focus each of the target objects in a specific display order associated with the calculated ranking of the estimated depth distances of the target objects to alter the focus on different target objects. For example, given that the human faces 215, 225 and 235 have corresponding first depth distance d1, second depth distance d2, and third depth distance d3, and the ranking of the depth distances can be expressed as: d1>d2>d3, where the largest value of the depth distance (e.g. with a smallest grey level in the depth image) indicates that the corresponding target object is located at the farthest place of the scene, and the smallest value of the depth distance (e.g. with a largest grey level in the depth image) indicates that the corresponding target object is located at the nearest place of the scene. Accordingly, the processor 110 may focus on the human face 215 first, as illustrated in
In another embodiment, the electronic device 100 may further comprise a motion detection unit (not shown in
In yet another embodiment, the display screen 140 may comprise a touch-sensitive module capable of detecting user inputs (e.g. swiping touch actions) on the display screen 140, and the focused target object can be altered manually. For example, a user may use his/her finger or a stylus to swipe or tap the display screen 140, and thus the display screen 140 may detect one or more swiping touch actions. Then, the processor 110 may switch to the next target object in display order (i.e. in the rotation) and focus on the switched target object in response to detecting a user input. In the aforementioned embodiments, assuming the resolution of the image 200 is larger than that of the display screen 140, the processor 110 may further adjust the position of display area within the image 200, so that the focused target object is located at the center of the display screen 140. In addition, during the transition from one to another focused target object, the image can be blurred until the focused target object is moved to the center of the display screen. For one having ordinary skill in the art, it is appreciated that various image effects can be illustrated during the transition, and the invention is not limited to the aforementioned image effects.
The methods, or certain aspects or portions thereof, may take the form of a program code embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable (e.g., computer-readable) storage medium, or computer program products without limitation in external shape or form thereof, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine thereby becomes an apparatus for practicing the methods. The methods may also be embodied in the form of a program code transmitted over some transmission medium, such as an electrical wire or a cable, or through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the disclosed methods. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to application specific logic circuits.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.