The instant disclosure is related to digital photography and more specifically to camera focusing using two cameras.
In general, focus adjustment in a camera system involves image sharpness analysis or phase detection and lens position mechanical control. A challenge in the sharpness analysis method, i.e. contrast AF, is the latency due to recursive lens movement and image analysis until a fine focus position is reached. To reduce this latency, a phase detection (PD) sensor is designed which can use a specialized pixel to detect a phase related to a distance. PD sensors are expensive and decrease pixel sensitivity and thus decrease the low light performance of the camera.
In one embodiment a method of focusing dual cameras includes receiving a fixed focus image from a fixed focus camera module, receiving an auto focus image from an auto focus camera module, calculating a depth of focus difference between the fixed focus image and the auto focus image, estimating an auto focus position based on the depth of focus difference and setting the auto focus position based on the estimation.
In another embodiment a method of focusing dual cameras includes receiving a fixed focus image from a fixed focus camera module, receiving an auto focus image from an auto focus camera module, calibrating a lens distortion of the auto focus camera module, calibrating a geometric relation of the auto focus camera module and the fixed focus camera module, calculating a depth of focus difference between the fixed focus image and the auto focus image, estimating an auto focus position based on the depth of focus difference and setting the auto focus position based on the estimation.
In the drawings:
The embodiments listed below are written only to illustrate the applications of this apparatus and method, not to limit the scope. The equivalent form of modifications towards this apparatus and method shall be categorized as within the scope the claims.
Certain terms are used throughout the following description and claims to refer to particular system components. As one skilled in the art will appreciate, different companies may refer to a component and/or method by different names. This document does not intend to distinguish between components and/or methods that differ in name but, not in function.
In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . .” Also, the term “couple” or “couples” is intended to mean either an indirect or direct connection. Thus, if a first device couples to a second device that connection may be through a direct connection or through an indirect connection via other devices and connections.
Electronic system 100 may include various types of computer readable media and interlaces for various other types of computer readable media. In the depicted example, electronic system 100 includes a bus 112, processor(s) 120, a system memory 114, a read-only memory (ROM) 118, a permanent storage device 110, an input device interface 122, an output device interface 116, and one or more network interfaces 124. In some implementations, electronic system 100 may include or be integrated with other computing devices or circuitry for operation of the various components and processes previously described. In one embodiment of the present disclosure the processor(s) 120 is coupled through the bus 112 to the auto focus camera module sensor 126 (main camera) and the fixed focus camera module 128 (sub camera).
Bus 112 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of electronic system 100. For instance, bus 112 communicatively connects processor(s) 120 with RUM 118, system memory 114, permanent storage device 110, auto focus camera module sensor 126 (main camera) and fixed focus camera module 128 (sub camera).
From these various memory units, processor(s) 120 retrieves instructions to execute and data to process in order to execute the processes of the subject disclosure. The processing unit(s) can be a single processor or a multi-core processor in different implementations.
ROM 118 stores static data and instructions that are needed by processor(s) 120 and other modules of the electronic system. Permanent storage device 110, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when electronic system 100 is off. Some implementations of the subject disclosure use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as permanent storage device 110.
Other implementations use a removable storage device (such as a floppy disk, flash drive, and its corresponding disk drive) as permanent storage device 110. Like permanent storage device 110, system memory 114 is a read-and-write memory device. However, unlike permanent storage device 110, system memory 114 is a volatile read-and-write memory, such a random access memory. System memory 114 stores some of the instructions and data that the processor needs at runtime. In some implementations, the processes of the subject disclosure are stored in system memory 114, permanent storage device 110, and/or ROM 118. From these various memory units, processor(s) 120 retrieves instructions to execute and data to process in order to execute the processes of some implementations.
Bus 112 also connects to input and output device interfaces 122 and 116. Input device interface 122 enables the user to communicate information and select commands to the electronic system. Input devices used with input device interface 122 include, for example, alphanumeric keyboards and pointing devices (also called “cursor control devices”). Output device interfaces 116 enables, for example, the display of images generated by the electronic system 100. Output devices used with output device interface 116 include, for example, printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD). Some implementations include devices such as a touchscreen that functions as both input and output devices.
Finally, as shown in
While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some implementations are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs). In some implementations, such integrated circuits execute instructions that are stored on the circuit itself.
As used in this specification and any claims of this application, the terms “computer”, “server”, “processor”, and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms display or displaying means displaying on an electronic device.
To provide for interaction with a user, implementations of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input.
Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), an inter-network (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client server relationship to each other. Data generated at the client device (e.g., a result of the user interaction) can be received from the client device at the server.
This fast focus camera system consists of a fixed focus camera module (sub camera) and an auto focus camera module (main camera). The fixed focus camera module may have a larger depth of field (DOF) optical element to cover a wider range of focus distances. Before the main camera reaches a correct focus position, the main camera delivers a current image. The fast focus algorithm calculates the disparity between the object/scene in the main camera current lens position image and that in the fixed focus camera image to determine the next focus position that the main camera should move to. Then the lens position mechanical control module, a voice coil motor (VCM) moves the lens to such a position and the main camera delivers the new position image for the algorithm to confirm whether it has reached the desire focus position.
A VCM is often categorized into closed loop VCMs and open loop VCMs. Closed loop VCM are less affected by the motor pose and hence are more robust to the effects of gravity. The main camera VCM in this instance is the portion that is calibrated due to the sub camera module having a fixed focused.
In a closed loop VCM, the main camera is shooting at different targets at different distances, the VCM controls the lens position step by step and the offline sharpness analysis may find the sharpest lens position for each target. A look-up table is then built into the device which maps a distance to the VCM position.
In an open loop VCM, the operation is more complex. The main camera lens position is not directly controlled by the VCM, and is also affected by gravity. The afore-mentioned look-up tables are built for different camera poses respectively.
The goal of the lens distortion calibration and correction is to reduce and or eliminate the unwanted distortion caused by the spherical lens, and correct the image to imitate that of a pinhole camera.
The purpose of geometrical calibration estimates the relative pose, relative position and relative scale between the two cameras. After applying these parameters to the images, the two images may be aligned along a baseline direction, thus simplifying the stereo matching.
Shown are images captured by the main camera module IM, the second camera module IS, with the current lens position and the focus window WM.
Before subsequent focus window matches, correction is applied to the input data, including the lens distortion correction and the geometric alignment. The image pair may be aligned and similar features will be present in the same horizontal scan-lines in the main and sub cameras. A second correction may be brightness correction, using a histogram specification, correcting the two images to have similar brightness on the same captured object.
As shown in
For the position (coordinates) of WM in the main image and those of WS in the second image, they are mapped to a rectified coordinates system, denoted as XM in the main rectified image and XS, in the second rectified image. The difference between XM and XS, or namely the disparity, conveys the depth information of the content within such focusing window.
The focal length is measured in rectified pixel intervals, baseline is the true physical distance between the optical centers of the two cameras. xM and xS are the horizontal (parallel to the baseline direction) coordinates of the contents in the two windows of the rectified images.
For each auto focus module, given the focusing distance, the best lens position may be estimated according to the current status of the module, including but not limited to camera pose and the motor calibration data. Then the lens position of the main camera will be adjusted to this new value in the next frame(s).
Other operations may be used to reduce the calibration error. The estimated new lens position may be very useful to determine the motor movement direction when the motor position is far from in focus. A large step (coarse auto focus position step) may be used to move toward the target position. When the current motor position is near the target, the motor may be moved with a smaller step (fine auto focus position step) to avoid overshoot. Alternately, a fine sharpness analysis may be employed in the final interval.
Those of skill in the art would appreciate that the various illustrative blocks, modules, elements, components, methods, and algorithms described herein may be implemented as electronic hardware, computer software, or combinations of both. To illustrate this interchangeability of hardware and software, various illustrative blocks, modules, elements, components, methods, and algorithms have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application. Various components and blocks may be arranged differently (e.g., arranged in a different order, or partitioned in a different way) all without departing from the scope of the subject technology.
It is understood that the specific order or hierarchy of steps in the processes disclosed is an illustration of example approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged. Some of the steps may be performed simultaneously. The accompanying method claims present elements of the various steps in a sample order, and are not meant to be limited to the specific order or hierarchy presented.
The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. The previous description provides various examples of the subject technology, and the subject technology is not limited to these examples. Various modifications to these aspects will be readily apparent: to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein but is to be accorded the full scope consistent with the language claims, wherein reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more.” Unless specifically stated otherwise, the term “some” refers to one or more. Pronouns in the masculine (e.g., his) include the feminine and neuter gender (e.g., her and its) and vice versa. Headings and subheadings, if any, are used for convenience only and do not limit the invention. The predicate words “configured to”, “operable to”, and “programmed to” do not imply any particular tangible or intangible modification of a subject, but, rather, are intended to be used interchangeably. For example, a processor configured to monitor and control an operation or a component may also mean the processor being programmed to monitor and control the operation or the processor being operable to monitor and control the operation. Likewise, a processor configured to execute code can be construed as a processor programmed to execute code or operable to execute code.
A phrase such as an “aspect” does not imply that such aspect is essential to the subject technology or that such aspect applies to all configurations of the subject technology. A disclosure relating to an aspect may apply to all configurations, or one or more configurations. An aspect may provide one or more examples. A phrase such as an aspect may refer to one or more aspects and vice versa. A phrase such as an “embodiment” does not imply that such embodiment is essential to the subject technology or that such embodiment applies to all configurations of the subject technology. A disclosure relating to an embodiment may apply to all embodiments, or one or more embodiments. An embodiment may provide one or more examples. A phrase such as an “embodiment” may refer to one or more embodiments and vice versa. A phrase such as a “configuration” does not imply that such configuration is essential to the subject technology or that such configuration applies to all configurations of the subject technology. A disclosure relating to a configuration may apply to all configurations, or one or more configurations. A configuration may provide one or more examples. A phrase such as a “configuration” may refer to one or more configurations and vice versa.
The word “example” is used herein to mean “serving as an example or illustration.” Any aspect or design described herein as “example” is not necessarily to be construed as preferred or advantageous over other aspects or designs.
All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims. No claim element is to be construed under the provisions of 35 U.S.C. § 112, sixth paragraph, unless the element is expressly recited using the phrase “means for” or, in the case of a method claim, the element is recited using the phrase “step for.” Furthermore, to the extent that the term “include,” “have,” or the like is used in the description or the claims, such term is intended to be inclusive in a manner similar to the term “comprise” as “comprise” is interpreted when employed as a transitional word in a claim.
References to “one embodiment,” “an embodiment,” “some embodiments,” “various embodiments”, or the like indicate that a particular element or characteristic is included in at least one embodiment of the invention. Although the phrases may appear in various places, the phrases do not necessarily refer to the same embodiment. In conjunction with the present disclosure, those skilled in the art will be able to design and incorporate any one of the variety of mechanisms suitable for accomplishing the above described functionalities.
It is to be understood that the disclosure teaches just one example of the illustrative embodiment and that many variations of the invention can easily be devised by those skilled in the art after reading this disclosure and that the scope of then present invention is to be determined by the following claims.
Number | Name | Date | Kind |
---|---|---|---|
20040061712 | Sogawa | Apr 2004 | A1 |
20080218613 | Janson | Sep 2008 | A1 |
20110268358 | Ikebe | Nov 2011 | A1 |
20130155266 | Zhou | Jun 2013 | A1 |
20140160245 | Cheng | Jun 2014 | A1 |
20140177927 | Shieh | Jun 2014 | A1 |
20150304527 | Chou | Oct 2015 | A1 |
20160182821 | Shabtay | Jun 2016 | A1 |
20160212406 | Hayasaka | Jul 2016 | A1 |
20160295097 | Shanmugavadivelu | Oct 2016 | A1 |
20170070731 | Darling | Mar 2017 | A1 |
20170150126 | Kim | May 2017 | A1 |
20170155896 | Malaescu | Jun 2017 | A1 |
20170230585 | Nash | Aug 2017 | A1 |
20170359534 | Li | Dec 2017 | A1 |
20180041689 | Cui | Feb 2018 | A1 |
20180376068 | Shimatani | Dec 2018 | A1 |
20190253644 | Zhu | Aug 2019 | A1 |
Number | Date | Country | |
---|---|---|---|
20190037128 A1 | Jan 2019 | US |
Number | Date | Country | |
---|---|---|---|
62538613 | Jul 2017 | US |