A method for combining images includes capturing a first image including a subject from a first camera. A second image is captured from a second camera and the second image includes the subject. first pre-processing functions are applied on the first image to produce a first processed image. The first pre-processing functions include applying a distortion component of a rotation matrix to the first image. The rotation matrix defines a corrected relationship between the first and the second image. second pre-processing functions are applied on the second image to produces a second processed image. The second pre-processing functions include applying the rotation matrix to the second image. The first processed image and the second processed image are blended in a processing unit to form a composite image.
|
17. An imaging system comprising:
a first camera and a second camera, wherein the first camera and the second camera have substantially identical image sensors and optics;
a processing unit including communications interface to communicate with the first and the second camera; and
a non-transitory machine-accessible storage medium that provides instructions that, when executed by the imaging system, will cause the imaging system to perform operations comprising:
receiving a first image including a subject captured from the first camera;
receiving a second image including the subject captured from the second camera;
storing the first image and the second image to a memory;
performing, with the processing unit, first pre-processing functions on the first image to produce a first processed image, the first pre-processing functions including applying a distortion component of a rotation matrix to the first image, wherein the rotation matrix defines a corrected relationship between the first and the second image;
performing, with the processing unit, second pre-processing functions on the second image to produce a second processed image, the second pre-processing functions including applying the rotation matrix to the second image, wherein the rotation matrix is a product of the distortion component and a rotation component, and wherein the rotation component is not applied to the first image; and
blending, in the processing unit, the first processed image and the second processed image to form a composite image;
wherein the optics of the first camera and the second camera include a wide-angle lens, and wherein the distortion component corrects for the wide-angle lens; and
wherein during calibration the rotation component is kept fixed while an optimized distortion component is determined and the optimized distortion component is kept fixed and used to determine an optimized rotation component.
1. A method for combining images, the method comprising:
capturing a first image including a subject from a first camera;
capturing a second image including the subject from a second camera;
applying first pre-processing functions on the first image to produce a first processed image, the first pre-processing functions including applying a distortion component of a rotation matrix to the first image, wherein the rotation matrix defines a corrected relationship between the first and the second image;
applying second pre-processing functions on the second image to produce a second processed image, the second pre-processing functions including applying the rotation matrix to the second image; and
blending, in a processing unit, the first processed image and the second processed image to form a composite image different from the first and second images captured by the first and second cameras;
wherein the distortion component and the rotation matrix are pre-determined before capturing the first image and the second image by:
capturing a first calibration image including a calibration subject from the first camera before capturing the first image and the second image;
capturing a second calibration image including the calibration subject from the second camera before capturing the first image and the second image;
identifying corresponding pixel sets, each corresponding pixel set including a first pixel in the first calibration image that corresponds with a second pixel in the second calibration image, wherein the first pixel and the second pixel mark the same point on the calibration subject; and
determining the distortion component and a rotation component of the rotation matrix by minimizing a distance between the first pixel in the first calibration image and the second pixel in the second calibration image in each of the corresponding pixel sets, wherein the distortion component and the rotation component are determined in an iterative loop until the distance is converged, and wherein the rotation matrix is the product of the distortion component and the rotation component;
wherein the first camera and the second camera have substantially identical image sensors and optics and are positioned at a known rotation angle, wherein the optics of the first camera and the second camera include a wide-angle lens, and wherein the distortion component corrects for the wide-angle lens; and
wherein during calibration the rotation component is kept fixed while an optimized distortion component is determined and the optimized distortion component is kept fixed and used to determine an optimized rotation component.
10. A non-transitory machine-accessible storage medium that provides instructions that, when executed by a computer, will cause the computer to perform operations comprising:
receiving a first image including a subject captured from a first camera;
receiving a second image including the subject captured from a second camera;
applying first pre-processing functions on the first image to produce a first processed image, the first pre-processing functions including applying a distortion component of a rotation matrix to the first image, wherein the rotation matrix defines a corrected relationship between the first and the second image;
applying second pre-processing functions on the second image to produce a second processed image, the second pre-processing functions including applying the rotation matrix to the second image; and
blending, in a processing unit, the first processed image and the second processed image to form a composite image;
wherein the distortion component and the rotation matrix are pre-determined before capturing the first image and the second image by:
capturing a first calibration image including a calibration subject from the first camera before capturing the first image and the second image;
capturing a second calibration image including the calibration subject from the second camera before capturing the first image and the second image;
identifying corresponding pixel sets, each corresponding pixel set including a first pixel in the first calibration image that corresponds with a second pixel in the second calibration image, wherein the first pixel and the second pixel mark the same point on the calibration subject; and
determining the distortion component and the rotation component of the rotation matrix by minimizing a distance between the first pixel in the first calibration image and the second pixel in the second calibration image in each of the corresponding pixel sets, wherein the distortion component and the rotation component are determined in an iterative loop until the distance is converged, and wherein the rotation matrix is the product of the distortion component and the rotation component;
wherein the first camera and the second camera have substantially identical image sensors and optics and are positioned at a known rotation angle, wherein the optics of the first camera and the second camera include a wide-angle lens, and wherein the distortion component corrects for the wide-angle lens; and
wherein during calibration the rotation component is kept fixed while an optimized distortion component is determined and the optimized distortion component is kept fixed and used to determine an optimized rotation component.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
11. The non-transitory machine-accessible storage medium of
12. The non-transitory machine-accessible storage medium of
13. The non-transitory machine-accessible storage medium of
14. The non-transitory machine-accessible storage medium of
15. The non-transitory machine-accessible storage medium of
16. The non-transitory machine-accessible storage medium of
18. The imaging system of
a mount, common to the first camera and the second camera, wherein the mount contains user-selectable positions for the first camera and the second camera, the user-selectable positions having known rotation angles between the first camera and the second camera.
19. The imaging system of
20. The imaging system of
21. The imaging system of
22. The imaging system of
23. The imaging system of
|
This disclosure relates generally to image processing, and in particular but not exclusively, relates to combining images.
The use of camera systems is increasing due to the decreasing price of camera systems and the relative availability of processing power and data storage. Image sensors in cameras and camera systems are used in a variety of applications including automotive, medical, mobile, and security and surveillance. Often times, these applications include the need for more than one camera and to combine the images from the cameras, which may be presented to a user.
In some cases, there is a need to produce panoramic images or even 360 degree images. Panoramic or 360 degree images may be obtained by incorporating many cameras and combining images from the many cameras. However, each camera increases the cost of a camera system and combining many images from many cameras increases the processing time to generate a panoramic or 360 degree image. Delayed processing of many images may be particularly problematic when the desired processing is real-time. One solution for decreasing the number of cameras needed to produce panoramic or 360 degree images is to use wide-angle cameras. However, image distortion from the wide-angle lenses complicates matching and blending images, especially in real-time. As a result, an efficient method for combining images with lens distortion is desirable.
Non-limiting and non-exhaustive embodiments of the invention are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
Embodiments of a system and method for combining images are described herein. In the following description, numerous specific details are set forth to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the techniques described herein can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring certain aspects.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
First camera 130, second camera 140, and third camera 150 may capture images and transmit the captured images to processing unit 110. Processing unit 110 may contain a memory to store images and store values for processing purposes. Processing unit 110 may have an output coupled to transmit images from the cameras to a display device such as an LCD monitor. The processing unit contains a processor capable of blending images from different cameras to produce a composite image. The composite image may be transmitted to a display device for a user to view.
A first image 210 illustrates an image captured by first camera 130 and a second image 220 illustrates an image captured by second camera 140. The checkerboard pattern of subject 240 is illustrated differently in first image 210 than in second image 220. However, the checkerboard illustrations in first image 210 and second image 220 are not meant to be accurate depictions of images captured by first camera 130 and second camera 140; the checkerboard illustrations are simply meant to show that first camera 130 and second camera 140 are at different angles and capture subject 240 from different perspectives.
In process block 305, two images (Image 1 and Image 2) are captured from two different cameras. First image 210 from first camera 130, and second image 220 from second camera 140 are examples of two imaged that may be used in process block 305. The captured images may be stored in a memory for processing. In process block 310, Image 1 (e.g. first image 210) is corrected in preparation of blending Image 1 and Image 2. One of the corrections applied to Image 1 is a distortion component (Rself) of a rotation matrix (R) between the first and second image. The rotation matrix (R) is defined by multiplying the distortion component and a rotation component (R=Rself*Rpure). The distortion component (Rself) corrects for lens distortions. For example, Rself may correct the lens distortion from a wide-angle lens. A rotation component (Rpure) corrects for the angle or rotation between the two images. Image 1 is a reference image so a rotation component (Rpure) of the rotation matrix does not need to be applied, but Rself needs to be applied to Image 1 to correct for lens distortion. The application of Rself to Image 1 (process block 310) may include multiplying each pixel of Image 1 by Rself.
In process block 315, Image 2 (e.g. second image 220) is corrected in preparation of blending Image 1 and Image 2. One of the corrections applied to Image 1 is the rotation matrix (R). The application of rotation matrix (R) in process block 315 may include multiplying each pixel of Image 2 by the rotation matrix (R). Corrected Image 1 and corrected Image 2 are blended together to form a composite image in process block 320. The processing associated with forming the composite image may be done by processing unit 110. The composite image is stored and rendered to a viewing device in process block 325. The viewing device may be a computer monitor such as an LCD.
One of the efficiencies of process 300 is the ability to correct for both image distortion (Rself) and camera rotation (Rpure) in one step. For example, process block 315 applies image distortion correction (Rself) and rotation correction (Rpure) in one step by simply applying the product (R) of Rpure and Rself to Image 2. To decrease processing time even further, the distortion component (Rself) and the rotation component (Rpure) may be calibrated previously. Then, the process of combining two images will not have to include calculating a rotation mapping location of each pixel of a proceeding image. Therefore, applying correction values in one step and having previously calibrated values for Rself, Rpure, and R allows for streamlined processing of the images for combination.
Rself, Rpure, and R are examples of values associated with combining images. In process block 405, a first calibration image and a second calibration image are captured from two different cameras. First image 210 and second image 220 are examples of images that may be used as calibration images. The first calibration image and the second calibration image share a common subject (e.g. subject 240), or at least a portion of a common subject. The subject may be specifically designed for a calibration procedure. In process block 410, pixels are identified in the first calibration image and the second calibration image that correspond to the same points on the common subject.
In process block 415, a distortion component (Rself) and a rotation component (Rpure) are determined between Image 1 and Image 2 by minimizing the distance between the identified corresponding pixels of Image 1 and Image 2. The rotation matrix (R) is then calculated by multiplying Rself by Rpure. One or more of values Rself, Rpure, and R may be stored in a memory accessible to a processing unit (e.g. processing unit 110) for future processing associated with combining images from the two cameras that the images came from.
In some cases, the calibrated value for Rself can be used in processing or correcting images from different cameras than the two cameras that generated the calibration images. For example, if the first calibration image and the second calibration image came from first camera 130 and first camera 140, then Rself would be calculated based on those two cameras. Yet, because Rself corrects for lens distortion, Rself may be used to correct for lens distortion in other cameras with the same lenses and image sensors. Therefore, Rself may be applied to images from third camera 150 if the imaging capturing components (e.g. image sensor and lenses) of third camera 150 are substantially identical to first camera 130 and second camera 140. Additionally, Rself may be applied to images taken from second camera 140 in order to combine those images with images taken from third camera 150 (assuming second camera 140 and third camera 150 have the same lenses and images sensors).
Points 11, 21, 31, and 41 and corresponding Points 12, 22, 32, and 42 may be identified by imaging software known in the art. To make the calibration procedure more accurate, it may be helpful for the common subject to have easily identifiable corresponding points. Hence, a calibration pattern may be used as the common subject. More complicated patterns that identify more corresponding points between the two images may be used to increase the accuracy of the calibration.
In process block 605, pixel locations of corresponding points (e.g. Point 11 and Point 12) between first calibration image 510 and second calibration image 520 are loaded into a distance minimizing equation. The distance minimizing equation is shown as:
D=Σ(I1(xi,yi)−I2(xi,yi)*Rpure*Rself)
In the distance minimizing equation, I1 (xi,yi) represents the pixel location of a point in first calibration image 510 (e.g. Point 11) that corresponds with the same point (e.g. Point 12) in second calibration image 520. I2(xi,yi) represents the pixel location of the corresponding point (e.g. Point 12) in second calibration image 520. The summation nature of the distance minimizing equation allows all of the pixel locations in corresponding sets 550 to be loaded into the distance minimizing equation to be summed together. The D in the distance minimizing equation represents the distance between the corresponding pixels. Rpure represents a rotation component of a rotation matrix between the cameras that generated first calibration image 510 and second calibration image 520. And, Rself represents a distortion component of the rotation matrix.
In process block 610, an initialized 3×3 Rpure matrix is loaded into the distance minimizing equation. The α in the initialized 3×3 Rpure matrix represents a known angle between the cameras that generated the images used to identify the corresponding points. The given initialized 3×3 Rpure matrix is:
After the corresponding points and the initialized Rpure matrix is added to the distance minimizing equation, the optimal Rself is calculated at process block 615. Keeping Rpure fixed, the optimal Rself is calculated using the Nelder-Mead Simplex Method. The Nelder-Mead Simplex Method is described in “Lagarias, J. C., J. A. Reeds, M. H. Wright, and P. E. Wright, “Convergence Properties of the Nelder-Mead Simplex Method in Low Dimensions,” SIAM Journal of Optimization, Vol. 9 Number 1, pp. 112-147, 1998.”
When the optimal Rself (RselfO) is found, RselfO is loaded into the distance minimizing equation to become the new Rself, which replaces the previous Rself (process block 620). At process block 625, the new Rself is fixed and the optimal Rpure is calculated by using the Nelder-Mead Simplex Method. When the optimal Rpure (RpureO) is found, RpureO is loaded into the distance minimizing equation to become the new Rpure, which replaces the previous Rpure (process block 630). At process block 635, if the Distance (D) is sufficiently converged, then the current Rpure and Rself values become the Final Optimized Rpure and Rself values. Then the rotation matrix (R) is calculated by multiplying Rpure by Rself. Some or all of these values may then be saved to a memory for future use in processing. If the Distance (D) is not sufficiently converged, then the distance minimizing equation goes through another iteration. The next iteration will start at process block 615 and take the distance minimizing equation through process blocks 620, 625, and 630 again, until the equation reaches process block 635 again.
All or portions of processes 400, 500, and 600 may be calibration procedures performed at a manufacturing facility. Alternatively, processes 400, 500, and 600 could be done at an installation location of camera system 100. Camera system 100 may include a camera mount that contains user-selectable positions for first camera 130 and second camera 140. The mount may also contain user-selectable positions for three or more cameras (e.g. third camera 150). In one embodiment, the cameras are able to report back to processing unit 110 (via communication interfaces 120) as to which user-selectable position the camera occupies. Since the user-selectable positions in the camera mount will be at known angles (e.g. 15°, 25°, 35°), the processing unit may have pre-calibrated values for Rself, Rpure, and R, associated with the known angles, already stored in a memory of the processing unit. The Rself, Rpure, and R values associated with the different known angles, would then be used in processes (e.g. process 300) that combine images captured by two cameras.
In process block 715, distortion correction is applied to captured image 705 by multiplying captured image 705 by the distortion component (Rself) of the rotation matrix (R). This multiplication may be done on the pixel level to adjust pixel locations in captured image 705. I1′ represents the result of the multiplication. In process block 720, I1′ is projected on a cylindrical coordinate system. The formula for projecting I1′ on a cylindrical coordinate system is:
xcyn_i=arctan(xi/f)
ycyn_i=f*(yi/√{square root over (xi2+f2)})
The xi variable represents the row coordinate for each pixel in I1′ and the yi variable represents the column coordinate for each pixel in I1′. The f variable is the focal length of the camera. Since the first camera and the second camera are identical, their focal length is the same. The result of the calculations yield cylindrical coordinate system values xcyn_i and ycyn_i for each pixel of I1′. The cylindrical coordinate projection transforms I1′ into processed image 725.
In process block 730, a rotation component (Rpure) and a distortion correction (Rself) are applied to captured image 710. However, both components are applied in one step, by simply multiplying captured image 710 by the rotation matrix (R), which is already calculated. I2′ represents the result of the multiplication. In process block 735, I2′ is projected on a cylindrical coordinate system using the same formulas used in process block 720. The cylindrical coordinate projection transforms I2′ into processed image 740. The altered checkerboard images in processed image 725 and 740 are meant to illustrate that some change has taken place in captured image 705 and captured image 710, but are not meant to represent an accurate depiction of the transformation that has taken place on captured image 705 and captured image 710.
In process block 745, processed image 740 is shifted over and merged with processed image 725 to form composite image 750. This shifting may include shifting all the pixels in processed image 740 a defined distance, causing a portion of the pixels in processed image 740 to overlap pixels of processed image 725. In one embodiment, the pixel values for a portion of the pixels in processed image 740 overwrite (in a memory) a portion of the pixel values of processed image 725 to form composite image 750.
The processes explained above are described in terms of computer software and hardware. The techniques described may constitute machine-executable instructions embodied within a tangible or non-transitory machine (e.g., computer) readable storage medium, that when executed by a machine will cause the machine to perform the operations described. Additionally, the processes may be embodied within hardware, such as an application specific integrated circuit (“ASIC”) or otherwise.
A tangible machine-readable storage medium includes any mechanism that provides (i.e., stores) information in a form accessible by a machine (e.g., a computer, network device, personal digital assistant, manufacturing tool, any device with a set of one or more processors, etc.). For example, a machine-readable storage medium includes recordable/non-recordable media (e.g., read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash memory devices, etc.).
The above description of illustrated embodiments of the invention, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to the precise forms disclosed. While specific embodiments of, and examples for, the invention are described herein for illustrative purposes, various modifications are possible within the scope of the invention, as those skilled in the relevant art will recognize.
These modifications can be made to the invention in light of the above detailed description. The terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification. Rather, the scope of the invention is to be determined entirely by the following claims, which are to be construed in accordance with established doctrines of claim interpretation.
Shan, Jizhang, Xiong, Weihua, Wu, Donghui
Patent | Priority | Assignee | Title |
10187567, | May 29 2012 | Leica Geosystems AG | Method and handheld distance measurement device for indirect distance measurement by means of image-assisted angle determination function |
10873708, | Jan 12 2017 | GoPro, Inc.; GOPRO, INC | Phased camera array system for generation of high quality images and video |
11448768, | Sep 07 2017 | Robert Bosch GmbH | Method for operating a laser distance measuring device |
Patent | Priority | Assignee | Title |
6002430, | May 13 1991 | Sony Corporation | Method and apparatus for simultaneous capture of a spherical image |
6133943, | Sep 30 1996 | Intel Corporation | Method and apparatus for producing a composite image |
6157747, | Aug 01 1997 | Microsoft Technology Licensing, LLC | 3-dimensional image rotation method and apparatus for producing image mosaics |
7103236, | Aug 28 2001 | Adobe Inc | Methods and apparatus for shifting perspective in a composite image |
7268803, | Aug 26 1999 | Ricoh Company, LTD | Image processing method and apparatus, digital camera, image processing system and computer readable medium |
7307655, | Jul 31 1998 | MATSUSHITA ELECTRIC INDUSTRIAL CO , LTD | Method and apparatus for displaying a synthesized image viewed from a virtual point of view |
7471489, | Sep 20 2004 | LaserResearch (S) Pte Ltd | Head/arm subassembly and head stack assembly for media servowriter |
7821679, | Oct 06 2004 | ACUANT, INC | System and method for electronically combining images taken by two or more adjacent image sensors |
8224121, | Jun 15 2007 | The Boeing Company; Boeing Company, the | System and method for assembling substantially distortion-free images |
20030133019, | |||
20050007483, | |||
20070236595, | |||
20070291895, | |||
20080056612, | |||
20080143748, | |||
20080211956, | |||
20090058991, | |||
20100097444, | |||
20110164783, | |||
20120154548, | |||
20120176515, | |||
TW201140494, | |||
TW373507, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 08 2012 | XIONG, WEIHUA | OmniVision Technologies, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 027693 | /0501 | |
Feb 08 2012 | SHAN, JIZHANG | OmniVision Technologies, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 027693 | /0501 | |
Feb 08 2012 | WU, DONGHUI | OmniVision Technologies, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 027693 | /0501 | |
Feb 13 2012 | OmniVision Technologies, Inc. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Aug 13 2020 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Aug 08 2024 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
Mar 21 2020 | 4 years fee payment window open |
Sep 21 2020 | 6 months grace period start (w surcharge) |
Mar 21 2021 | patent expiry (for year 4) |
Mar 21 2023 | 2 years to revive unintentionally abandoned end. (for year 4) |
Mar 21 2024 | 8 years fee payment window open |
Sep 21 2024 | 6 months grace period start (w surcharge) |
Mar 21 2025 | patent expiry (for year 8) |
Mar 21 2027 | 2 years to revive unintentionally abandoned end. (for year 8) |
Mar 21 2028 | 12 years fee payment window open |
Sep 21 2028 | 6 months grace period start (w surcharge) |
Mar 21 2029 | patent expiry (for year 12) |
Mar 21 2031 | 2 years to revive unintentionally abandoned end. (for year 12) |