Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEM AND METHOD FOR DYNAMIC STEREOSCOPIC CALIBRATION
Document Type and Number:
WIPO Patent Application WO/2020/183312
Kind Code:
A1
Abstract:
Methods for stereo calibration of a dual-camera that includes a first camera and a second camera and system for performing such methods. In some embodiments, a method comprises obtaining optimized extrinsic and intrinsic parameters using initial intrinsic parameters and, optionally, initial extrinsic parameters of the cameras, estimating an infinity offset e using the optimized extrinsic and extrinsic parameters, and estimating a scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset parameter e, wherein the optimized extrinsic and extrinsic parameters, infinity offset e and scaling factor s are used together to provide stereo calibration that leads to improved depth estimation.

Inventors:
GEVA NADAV (IL)
ILAN PAZ (IL)
GIGUSHINSKI ODED (IL)
GOLDENBERG EPHRAIM (IL)
SHABTAY GAL (IL)
Application Number:
PCT/IB2020/051948
Publication Date:
September 17, 2020
Filing Date:
March 06, 2020
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
COREPHOTONICS LTD (IL)
International Classes:
H04N17/00
Domestic Patent References:
WO2000027131A22000-05-11
Foreign References:
US20150103147A12015-04-16
US20050185049A12005-08-25
US20160212418A12016-07-21
US20180300901A12018-10-18
US8717421B22014-05-06
US20170070731A12017-03-09
EP1235439A22002-08-28
US20150124059A12015-05-07
Other References:
See also references of EP 3782363A4
Attorney, Agent or Firm:
NATHAN & ASSOCIATES PATENT AGENTS LTD (IL)
Download PDF:
Claims:
WHAT IS CLAIMED IS:

1. A method for stereo calibration of a dual -camera that includes a first camera and a second camera, the method comprising:

a) obtaining optimized extrinsic and intrinsic parameters using initial intrinsic parameters and, optionally, initial extrinsic parameters;

b) estimating an infinity offset e using the optimized extrinsic and extrinsic parameters; c) estimating a scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e; and

d) using the optimized extrinsic and extrinsic parameters, infinity offset e and scaling factor s to provide stereo calibration that leads to improved depth estimation.

2. The method of claim 1, wherein the stereo calibration includes dynamic stereo calibration.

3. The method of claim 2, wherein the dynamic stereo calibration is performed in a moving vehicle that includes the dual-camera.

4. The method of claim 1, wherein the initial intrinsic parameters include nominal values of intrinsic parameters of the first and second cameras.

5. The method of claim 1, wherein the initial intrinsic parameters include factory calibrated initial intrinsic parameters of the first and second cameras.

6. The method of claim 1, wherein the initial intrinsic parameters include initial intrinsic parameters of the first and second cameras estimated independently from bundle adjustment.

7. The method of claim 1, wherein the initial intrinsic parameters include initial intrinsic parameters of the first and second cameras estimated independently from structure from motion.

8. The method of claim 1, wherein the obtaining optimized extrinsic and intrinsic parameters using initial intrinsic parameters and, optionally, initial extrinsic parameters includes obtaining with the dual -camera a set of left and right images, matching corresponding points in the left and right images to obtain matched feature points, calculating extrinsic parameters and refining the initial intrinsic parameters based on the matched feature points.

9. The method of claim 8, further comprising iterating between the calculating extrinsic parameters and the matching corresponding points in the left and right images until sufficient matched points are gathered.

10. The method of claim 8, wherein the refining the initial intrinsic parameters includes calculating a difference in image location for each matched feature point along a non-disparity axis (NDA) and wherein the obtaining optimized intrinsic parameters include fulfilling a stop condition.

11. The method of claim 9, wherein the refining the initial intrinsic parameters includes calculating a difference in image location for each matched feature point along a non-disparity axis (NDA) and wherein the obtaining optimized intrinsic parameters include fulfilling a stop condition.

12. The method of claim 1, wherein the estimating infinity offset e using the optimized extrinsic and extrinsic parameters includes obtaining dynamically at least two sets of stereo images, wherein each stereo image set includes a left image and a right image, matching corresponding points in left and right images of each set, matching corresponding points in, respectively, left images and right images of at least two sets, generating a disparity map by calculating disparity values in the two time frames for all features matched in same sets and between sets, labeling pixels with constant disparity over different time steps as respective points at infinity and estimating infinity offset e, from a respective disparity of the points at infinity.

13. The method of claim 1, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least one set of stereo images, detecting in the set at least one object of known dimensions (OKD) to obtain a detected OKD marked XQKD, matching corresponding points in XQKD, calculating a size of XOKD, calculating a disparity of XOKD, calculating a distance of XOKD from the dual-camera and estimating scaling factor s using the size, the disparity and the distance.

14. The method of claim 2, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least one set of stereo images, detecting in the set at least one object of known dimensions (OKD) to obtain a detected OKD marked XOKD, matching corresponding points in XOKD, calculating a size of XOKD, calculating a disparity of XOKD, calculating a distance of XOKD from the dual-camera and estimating scaling factor s using the size, the disparity and the distance.

15. The method of claim 3, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least one set of stereo images, detecting in the set at least one object of known dimensions (OKD) to obtain a detected OKD marked XOKD, matching corresponding points in XOKD, calculating a size of XOKD, calculating a disparity of XOKD, calculating a distance of XOKD from the dual-camera and estimating scaling factor s using the size, the disparity and the distance.

16. The method of claim 12, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least one set of stereo images, detecting in the set at least one object of known dimensions (OKD) to obtain a detected OKD marked XOKD, matching corresponding points in XOKD, calculating a size of XOKD, calculating a disparity of XOKD, calculating a distance of XOKD from the dual-camera and estimating scaling factor s using the size, the disparity and the distance.

17. The method of claim 1, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least two sets of stereo images, detecting in the sets at least one stationary object Xos, matching corresponding points in Xos to obtain a disparity, obtaining a distance driven between the obtaining of the at least two sets, and estimating scaling factor s using the disparity and the distance.

18. The method of claim 2, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least two sets of stereo images, detecting in the sets at least one stationary object Xos, matching corresponding points in Xos to obtain a disparity, obtaining a distance driven between the obtaining of the at least two sets, and estimating scaling factor s using the disparity and the distance.

19. The method of claim 3, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least two sets of stereo images, detecting in the sets at least one stationary object Xos, matching corresponding points in Xos to obtain a disparity, obtaining a distance driven between the obtaining of the at least two sets, and estimating scaling factor s using the disparity and the distance.

20. The method of claim 12, wherein the estimating scaling factor s using the optimized extrinsic and extrinsic parameters and infinity offset e includes obtaining dynamically at least two sets of stereo images, detecting in the sets at least one stationary object Xos, matching corresponding points in Xos to obtain a disparity, obtaining a distance driven between the obtaining of the at least two sets, and estimating scaling factor s using the disparity and the distance.

Description:
SYSTEM AND METHOD FOR DYNAMIC STEREOSCOPIC CALIBRATION

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority from US Provisional Patent Application No. 62/816,097 filed on March 9, 2019, which is expressly incorporated herein by reference in its entirety.

FIELD

Embodiments disclosed herein relate in general to optical instrument calibration such as in stereoscopic digital cameras, and more particularly to stereoscopic calibration in dual-aperture digital cameras (“dual-cameras”) that are configured to be incorporated in vehicles as part of a driver assistance system.

BACKGROUND

Definitions:

“Dynamic stereoscopic calibration” - estimation of "stereo parameters" of a stereo (dual) camera without a known calibration chart, while the stereo camera is in use, with or without it being moved.

“Stereo parameters”: stereo camera parameters that are required to be calibrated in order to produce a high precision depth map, comprising intrinsic parameters (for each camera) and extrinsic parameters (for each camera pair).

“Intrinsic parameters”: parameters that include focal length, optical axis in X and Y axes and lens distortion coefficients.

“Extrinsic parameters”: parameters that include three relative (between two cameras) angles (Yaw, Pitch and Roll) and three offsets (Tx, Ty and Tz).

“Disparity axis”: the axis of disparity (in our XYZ coordinate system, X if cameras are placed horizontally). “Non-disparity axis”: the axis perpendicular to the disparity axis (in our XYZ coordinate system, Y if cameras are placed horizontally).

Advanced Driver-Assistance Systems (ADASs) are known. An ADAS included in vehicles combine sensors and algorithms to understand the vehicle’s environment so that a driver of the vehicle can receive assistance or be warned of hazards. ADASs rely on computer vision, which plays a pivotal role in acquiring, processing, analyzing, and understanding the environment and surrounding objects. Often, ADASs use multi-camera systems with two or more cameras or“camera modules”.

FIG. 1A shows top views of vehicles having multi-camera systems in various arrangements. The term“vehicle” may apply to any vehicle including (but not limited) to a car, a motorcycle, a truck, a bus, an airplane, a bicycle, etc.. In (a) a dual -camera system includes two cameras 102 and 104 arranged close to each other along the X axis. Here, X the disparity axis is X and the a non-disparity axis is Y. The two cameras may share a common housing. In (b) two cameras 106 and 108 are placed along the Y axis at a greater distance from each other than in (a). In (c), two cameras 110 and 112 are arranged along the X axis as disparity axis. In (d) there are four cameras 114, 116, 118 and 120, in (e) there are three cameras 122, 124 and 126 and in (f) there are two cameras 128 and 130, arranged as shown. The cameras are not limited to a particular type of camera. In an example, the cameras may be identical. In an example, cameras may differ in one or more of the following parameters: focal length, sensor size, pixel size and/or pitch, and/or f-number (f/#). In an example, a camera may be a color camera, a black and white camera or an infrared (IR) sensitive camera. In an example, a multi -camera system may additionally include infrared projectors, fiber optics, lasers, sensors, or a combination thereof (not shown).

Accurate depth maps of the environment are necessary for the computer vision to operate properly. A depth map is an image or image channel that contains information relating to the distance of surfaces of scene objects from a viewpoint.

A common solution for creating depth maps of the environment is using a stereoscopic camera or a dual-camera (a camera comprised of two sub-cameras) for imaging and estimating the distance of objects from the camera. Using a dual-camera for depth map creation depends on calculating disparity of the pixels of various objects in the field of view (FOV). In order to accurately translate disparity values in pixels to real-world depth in meters, there is a need for accurate camera stereo calibration.

Calibration of a stereo (or dual) camera system includes analyzing acquired data to assess the accuracy of the intrinsic and extrinsic parameters and adjusting accordingly.

Assuming all intrinsic and extrinsic parameters are known, an object's distance (or “depth) Z within the FOV of a vehicle dual-camera system can be calculated and/or estimated using equation 1 : where f is focal length, B is baseline, D is disparity in pixels, and“ps” is pixel size.

However, in practice, factory and dynamic calibration procedures suffer from estimation errors in intrinsic and/or extrinsic parameters that can be expressed in a revised equation 1 where“s” is an unknown scaling factor, an accumulative error in focal length estimation and translation along a disparity axis (i.e. Tx), and“e” represents a“infinity disparity error” or “infinity offset” that encapsulates the estimation error in optical axis location for both left (“L) and right (“R”) cameras (intrinsic parameters) as well as estimation errors in the rotation along the "non-disparity axis". extrinsic parameters).

FIG. IB shows an example of the possible discrepancies in depth estimation for two exemplary errors in e. Assume e is estimated with 0.5 pixels error or 1 pixels error. The figure shows a graph for a stereo system with f = 6mm, ps = 0.0042mm and B = 120mm (see Eq. G). The graph depicts diverging error percentages based on distance comparing a 0.5 -pixel error to a 1 -pixel error (“e” in equation G). The effect of even half a pixel error on the depth estimation is dramatic especially in high distances.

Manual stereo calibrations before installation of stereo or dual-cameras in a host vehicle are difficult. Maintaining a pre-installation stereo calibration is difficult, due to changes during camera lifecycle. Such changes may include (but are not limited to) heat expansions, vibrations and mechanical hits, which cause some of the calibration parameters to change over time. Calibrating a stereo (or dual) camera mounted behind a windshield is further complicated since the windshield may affect some of the calibration parameters of the stereo camera, e.g. by distorting the perspective or viewing angles of the camera. Therefore, the calibration may be performed only after installing the cameras in the host vehicle.

There have been a number of attempts to solve the stereoscopic camera calibration issue, however, none have been able to devise a solution that meets the needs of industry. Some of these solutions attempt to run structure from motion (SFM) algorithms. SFM uses complicated algorithms that track moving features in successive images to determine its structural information, then the image frames are processed to compute a depth map. This solution fails to meet the needs of industry because running these processes is inordinately difficult and computationally demanding for the cameras mounted in a moving car.

There is therefore a need for, and it would be advantageous to have dynamic stereoscopic calibration systems and methods that overcome the deficiencies in existing systems and methods that use SFM technology.

SUMMARY

In various embodiments, there are provided methods for dynamic stereoscopic calibration of a stereo digital camera including a first camera and a second camera, each camera having intrinsic parameters and extrinsic parameters, the method comprising: obtaining optimized extrinsic and intrinsic parameters based on input intrinsic parameters, and, optionally, input extrinsic parameters; estimating an offset parameter e using the optimized extrinsic and extrinsic parameters; estimating a scaling factor s using the optimized extrinsic and extrinsic parameters and estimated offset parameter e; and using the optimized extrinsic and extrinsic parameters, infinity offset e and scaling factor s to provide stereo calibration that leads to improved depth estimation.

In certain embodiments, a method for dynamic stereoscopic calibration disclosed herein may include selecting initial values for the intrinsic and/or extrinsic parameters of the first camera and initial values for the intrinsic parameters of the second camera. The initial values may be derived for example from the design of the camera (“nominal” values), from factory settings if calibration for each camera was done or from previous usage of the camera, etc.. The calibration of the intrinsic and/or extrinsic parameters may include capturing at least one image from the first camera and at least one image from the second camera, matching corresponding points on the at least one image from the first camera to corresponding points on the at least one image from the second camera, and calculating optimized intrinsic and extrinsic parameters of the first camera and the second camera using epipolar geometry. This provides an initial calibration of the first camera and of the second camera with aligned epipolar lines. The various selections, calculations, processes etc. may be performed using a processor, and data/results of the processing may be stored in a memory.

Further actions to estimate offset parameter e and scaling factor s may include obtaining, at least two image pairs based upon images received from the first camera and the second camera, wherein the at least two image pairs are images sequentially taken via the first camera and the second camera, and wherein each pair of images (one from each camera) needs to be taken simultaneously; matching corresponding points on the at least two image pairs; and generating a disparity map, wherein the disparity map includes pixels matched from the corresponding points on the at least two image pairs, wherein pixels with constant disparity are identified as pixels at infinity distance.

In certain embodiments, the method includes storing the at least two image pairs in a memory.

In certain embodiments, the number of at least two image pairs captured from the first camera and the at least two image pairs captured from the second camera is determined by a processor.

In certain embodiments, the processor stops receiving at least two image pairs from the first camera and the second camera once a full FOV is captured.

In certain embodiments, the stereo digital camera is installed in a vehicle.

In certain embodiments, the stereo digital camera is configured to be incorporated in a vehicle as part of a driver assistance system. In certain embodiments, the step of setting the initial intrinsic parameters of the first camera and the initial intrinsic parameters of the second camera includes a processor performing an initial guess for the intrinsic parameters for said stereo digital camera.

In certain embodiments, the step of selecting initial intrinsic parameters include factory calibration.

In certain embodiments, the selecting initial intrinsic parameters includes independent estimation from bundle adjustment.

In certain embodiments, selecting initial intrinsic parameters includes independent estimation from structure from motion (SFM).

In certain embodiments, the at least one image from the first camera and at least one image from the second camera are stored in memory.

In certain embodiments, the corresponding points on the at least one image from the first camera and the second camera are stored in memory.

In certain embodiments, the disparity map is stored in memory.

In certain embodiments, the steps for calibrating external and internal parameters are repeated to obtain a full FOV.

In certain embodiments, the steps for calibrating depth are repeated to obtain a full FOV.

In certain embodiments, the intrinsic parameters are selected from a group consisting of focal length, image distortion and optical axis.

In certain embodiments, the extrinsic parameters describe the translation and rotation of the one camera relative to the other.

In certain embodiments, the method includes using infinity disparity to compensate for estimation errors.

In certain embodiments, the method includes identifying moving objects in the at least two image pairs.

In certain embodiments, the method includes removing said moving objects from the disparity map.

In certain embodiments, the moving objects are identified using computer vision.

In certain embodiments, the moving objects are identified using high disparity values. In certain embodiments, the method includes repeating the steps of the above referenced steps multiple times and averaging the results.

In an embodiment there is provided a method for dynamic stereo camera calibration, comprising obtaining at least two image pairs from a dual-camera, performing local registration of the at least two image pairs and obtaining a registration map, finding a minimal disparity in the registration map, calculating a minimum disparity value, defining a global minimal disparity value, and calibrating the dual -camera using the global minimal disparity value.

BRIEF DESCRIPTION OF THE DRAWINGS

Some embodiments herein described, by way of example only, with reference to the accompanying drawings. With specific reference now to the drawings in detail, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of embodiments of the application. In this regard, the description taken with the drawings makes apparent to those skilled in the art how embodiments of the application may be practiced. In the drawings:

FIG. 1A shows top views of vehicles having multi -camera systems in various arrangements;

FIG. IB shows an example of possible discrepancies in depth estimation due to infinity disparity errors;

FIG. 2A shows a flowchart describing an exemplary embodiment for calibrating stereo parameters;

FIG. 2B shows a flowchart describing an exemplary embodiment for calibrating stereo parameters;

FIG. 3 A shows a flowchart describing an exemplary embodiment for infinity correction in a method disclosed herein;

FIG. 3B shows a flowchart describing an exemplary embodiment for infinity correction in a method disclosed herein;

FIG. 4A shows a flowchart describing an exemplary embodiment of a method for estimating object scale in a method disclosed herein; FIG. 4B shows a flowchart describing another exemplary embodiment of a method for estimating object scale in a method disclosed herein;

FIG 5 describes a system installed in a vehicle and used for performing a method disclosed herein.

DETAILED DESCRIPTION

Embodiments disclosed herein describe methods of dynamic stereo calibration of the intrinsic and extrinsic parameters that include estimation of the "additional" parameters of equation 1', scaling factor s and disparity error e. While all the parameters in the equation may be estimated in a factory (where the dual-camera is assembled and/or where the vehicle is assembled), the parameters may change during the life cycle of the camera due to a number of factors, including (but not limited to) shift between sub-cameras, tilt between sub-cameras, shift in each sub-camera between its lens and the sensor, change in the camera focal length, etc..

The present application efficiently calibrates the camera parameters to ensure that the camera is viewing its surroundings properly and is able to effectively calculate distance.

FIG. 2A shows a flowchart describing an embodiment of an exemplary method for calibrating a stereo camera's intrinsic and extrinsic parameters. In step 202, initial extrinsic and/or intrinsic parameters are selected for both cameras. An initial calibration parameter can be estimated from factory settings (all the nominal values known for the stereo camera - focal length, lens distortion, optical axis, base line, etc.), through independent estimation from bundle adjustment, structure from motion, previous calibration parameters, etc.. Intrinsic and (optionally) extrinsic parameters are calibrated in step 204. The calibration includes obtaining a first set of R-L images in sub-step 208 and matching corresponding points in sub-step 210, using a feature extraction method on L and R images separately and finding the corresponding feature of L image in the right image. A minimum of four pairs of points are needed, but normally a few hundred pairs of points are used. The calibration continues with calculating extrinsic parameters in sub-step 212, using for example, Essential Metrix estimation and decomposition, estimating the 3 angles (Yaw, Pitch, Roll) and the translation up to unknown scale (three offsets) Tx, Ty, Tz. The intrinsic parameters are then refined in sub-step 214 using an optimization technique (i.e. gradient standard) to minimize the non-disparity axis error over selected intrinsic parameters. The refinement includes calculating the difference in image location for each matched feature point along the non-disparity axis (NDA). The goal of the optimization is to minimize the sum of absolute NDA over all matched features from all the images. In a perfectly calibrated stereo system, the sum of absolute NDA will converge to zero. For practical cases and for example, one can set a stop condition that the minimized average absolute NDA be within a “delta” value from zero. For example, the delta value may be 0.1 pixels. Using another stop condition and example, the stop condition may be a maximum absolute NDA smaller than 0.25 pixels.

The output of step 204 is optimized stereo calibration (i.e. intrinsic and extrinsic) parameters 206, i.e. a calibrated dual-camera output that allows rectifying the camera system's output into a pair of images having parallel epipolar fines. The optimized stereo calibration parameters are then used in estimating infinity offset e and scaling factor s.

This optimization problem can be solved with a number of optimization techniques such as gradient decent. Intrinsic parameters refined in this sub-step include focal length ratio between left and right cameras, lens distortion coefficients and "non-disparity" optical axis differences.

FIG. 2B shows a flowchart describing another embodiment of an exemplary method for calibrating a stereo camera's intrinsic and extrinsic parameters. This embodiment is similar to that of FIG. 2A, with the following changes:

1. Iterate steps 208 and 210 until sufficient matched points are gathered: this is an iterative process performed in step 211 until the matched features are evenly spread across the camera's FOV and distance from the camera, for example by having 5 corresponding points in a 3D box of N° x N° x FOV_P disp (N ~ 1/20 FOV P ~ 1/10 disparity range measured by pixels).

2. Iterate steps 212 and 214 until a stable state is reached: this is an iterative process performed in step 213. After intrinsic parameters were refined in step 214 recalculate extrinsic parameters in step 212 and refine until steady state is reached either in the parameter value or in the sum of absolute NDA.

FIG. 3 A shows a flowchart describing an exemplary embodiment of a method for infinity correction (i.e. for estimating infinity offset e in equation G). The method is implemented using a dual-camera in a dynamic environment (e.g. while driving in a given vehicle). At least two sets of stereo images (i.e. four images, 2L and 2R) are obtained while in motion in step 302. Corresponding points in each set of L and R images are matched in step 304. Corresponding points between images in the two sets are matched in step 306. In contrast with the matching of left vs. right (L-R) features performed with a single set of images, in step 306 the match is left vs. left (L-L) and/or right vs. right (R-R) in various car positions (i.e. of a same point in different sets of stereo images obtained in step 304). A disparity map of corresponding points is generated in step 308. The generation of the disparity map includes calculating the disparity value in the two time frames for all features matched in both 304 and 306. This step must be done on rectified points, either by rectifying the input images (before step 302) or just rectifying the corresponding feature (before step 308). Rectification parameters (i.e. stereo parameters) are then obtained (estimated) in output 206. In certain embodiments, when“disparity” is mentioned, it is assumed either rectified images or rectified image coordinates are used. In step 310 pixels with constant disparity over different time steps (while the vehicle was in motion) are labeled as "infinity" distance. The infinity offset e, defined as the disparity of points at infinity is then estimated in step 312. In certain embodiments, this is done by averaging the disparity of all infinity labeled pixels. In certain embodiments, just one infinity labeled pixel is enough, although in practice a few dozen will be used.

Optionally, a step 314 of filtering stationary objects may be performed before estimating infinity offset e step 312. Objects that are stationary to the dual-camera and/or the given vehicle (e.g., another vehicle moving with the same velocity and in the same direction as the given vehicle) will have constant disparity (same as infinity pixels) and therefore should be filtered from the infinity offset estimation. The filtering may include for example thresholding pixels with large enough disparity (infinite disparity will be close to zero) or detecting cars/motorcycle/bikes by machine learning.

FIG. 3B shows a flowchart describing an exemplary embodiment of another method for infinity correction. This embodiments is similar to the one in FIG. 3A, except for an added loop (iteration) step 316, which iterates steps 302 to 308 to ensure that estimating infinity offset step 312 has a sufficient number of infinity pixels (in general more infinity labeled pixels are desired).; i.e. reaches a steady state of infinity offset estimation. FIG. 4A shows a flowchart describing an exemplary embodiment of a method for estimating scale (estimating scaling factor s in equation G). As in the estimation of e, the method is implemented using a dual-camera in a dynamic environment (e.g. while driving in a given vehicle). At least one set of stereo images is obtained in step 402 while in motion. Objects of known dimensions (OKDs) are detected in step 404 using a detection algorithms, by finding an OKD in one of the acquired images. We define a“detected OKD” as XOKD. XOKD may be for example a license plate length, a traffic speed sign diameter, or any other objects that are identical to each other and/or have constant dimensions in a given place (city, state, country, continent, etc.). The corresponding points of each XOKD are matched in the corresponding stereo image in step 406 and the size of known objects in pixels is calculated in step 408. The size calculation may include using a segmentation algorithm to find all pixels associated with the object and to calculate its dimensions POKD (e.g. license plate length or traffic speed sign diameter). The disparity of the known dimension object is calculated in step 410 using (as in step 308) rectified images or rectified image coordinates. The distance of the XOKD from the dual camera is calculated in step 412 using for example camera focal length and object pixel size as Distance = focal_length*Xo KD / POKD· Scaling factor s is then estimated in step 414 using equation G and the value of e from step 312.

In some embodiments, one set of images is needed since object dimensions may be known. In other embodiments, many sets of images can be obtained, preferably a thousand image sets, however fewer can be utilized effectively as well. A plurality of output estimations for s may be averages over many measurements.

FIG. 4B shows a flowchart describing another exemplary embodiment of a method for estimating scaling factor s. At least two sets of stereo (L and R) images are obtained while in motion in step 420. Stationary objects relative to the ground are found (detected) (e.g. by a detection algorithm for traffic sign / traffic lights, buildings, and/or cross- roads) in step 422. Corresponding points in each set are matched in step 424 in a manner similar to that in step 304. Corresponding points between images in the two sets are matched in step 426 in a manner similar to that in step 306. A disparity map of corresponding points is generated in step 428 in a manner similar to that in step 308. A distance DZ driven by the vehicle between the taking of each pair of sets of images is obtained (measured) in step 430, e.g. using the vehicle’s velocity meter / GPS / external inertial measurement unit. The disparity of the stationary objects disparity and the driven distance are then used to estimate scaling factor s in step 432, using equation G and equation 2 below (after e has been estimated in step 312).

Furthermore, s can be easily extracted and averaged across many samples.

In an alternate embodiment, a dual-camera system obtains a set of two images from the dual-camera. The system performs local registration of the set of two images and obtains a registration map. The system proceeds by finding the minimal disparity in the registration map, calculating the minimum of minimum disparity value, defining a global minimum disparity value, and calibrating the dual -camera using the global minimum disparity.

Image registration is the process of transforming different sets of data into one coordinate system. The data may be multiple photographs, data from different sensors, times, depths, or viewpoints.

FIG. 5 shows schematically an embodiment of an electronic device numbered 500 including a dual-aperture camera (as a particular example of a multi -aperture camera that can have more than two camera modules). Electronic device 500 comprises a first camera module 502 that includes a first lens module 504 that forms a first image recorded by a first image sensor 506 and a second camera module 510 that includes a second lens module 512 that forms an image recorded by a second image sensor 514. The two camera modules may be identical on different. For example, the two cameras may have similar or different FOVs. The cameras may be of different type, for example having image sensors sensitive to the visible (VIS) wavelength range or to the infrared (IR) or other wavelength range, time of flight (TOF) cameras, etc. Electronic device 500 may further comprise a processing unit or application processor (AP) 520. In some embodiments, initial or previous calibration data may be stored in memory 524 of the electronic device 500.

In use, a processing unit such as AP 520 may receive respective first and second image data (or 1 st and 2 nd images) from camera modules 502 and 510 and may supply camera control signals to camera modules 502 and 510 to ensure that both images are acquired simultaneously. After receiving at least one image from each camera, AP 520 will execute the processes described in FIGS. 2A, 2B, 3A, 3B and 4A, 4B. The final outcome will be updated stereo calibration parameters that may be stored in the memory unit 524, for further use.

It should be understood that where the claims or specification refer to "a" or "an" element, such reference is not to be construed as there being only one of that element.

Methods described herein can be implemented to calibrate camera parameters as often as every time a user turns on a car or multiple times per use or scheduled calibration periods preset by the manufacturer or user prompt, to a single calibration upon leaving the factory, or a combination thereof. The present application does not require network or cloud access however can benefit from having such access for storing or processing data, for example storage of images, accessing dimension data, remote processing, etc.

The disclosed embodiments are capable of processing sets of image pairs independently, providing better results than the standard techniques. The disclosed methods can be done without a strict sequential requirement, unlike SFM, which requires a sequence of 20-100 image pairs. Further, they are unique when compared with other known processes and solutions in that they

(1) reduce the computational demand on the system, and (2) reduce the number of images needed to calibrate the parameters.

Unless otherwise defined, all technical or/and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application pertains.

While this disclosure describes a limited number of embodiments, it will be appreciated that many variations, modifications and other applications of such embodiments may be made. In general, the disclosure is to be understood as not limited by the specific embodiments described herein, but only by the scope of the appended claims.