Patent Description:
Embodiments disclosed herein relate in general to digital cameras and in particular to correction of images obtained with folded digital cameras.

Compact digital cameras having folded optics, also referred to as "folded cameras" or "folded camera modules" are known, see e.g. co-owned international patent application <CIT>. <FIG> shows schematically a folded Tele camera disclosed therein and numbered <NUM> from a first perspective view. <FIG> shows camera <NUM> from a second perspective view. Camera <NUM> includes a lens <NUM> with a lens optical axis <NUM>, an optical path folding element (OPFE) <NUM> and an image sensor <NUM>. OPFE <NUM> folds a first optical path which defines the point of view (POV) <NUM> of camera <NUM> and which is substantially parallel to the X axis from an object, scene or panoramic view section <NUM> into a second optical path along an axis <NUM> substantially parallel to the Z axis. Image sensor <NUM> has a plane normal aligned with (parallel to) axis <NUM> and outputs an output image that may be processed by an image signal processor (ISP - not shown). In some embodiments, the ISP may be part of image sensor <NUM>.

Camera <NUM> is designed to rotate OPFE <NUM> around axis <NUM> (the Z axis) relative to the image sensor, a rotation indicated by an arrow <NUM>. That is, camera <NUM> is a "scanning" Tele camera ("STC"). OPFE <NUM> can rotate in an angle range as required by optical requirements (see below), in some cases by up to <NUM> degrees and in other cases by up to <NUM> degrees. Camera <NUM> can scan a scene with its "native" Tele field of view ("N-FOVT"), so that it effectively covers a FOV of a scene which is larger than N-FOVT and which we call scanning Tele FOV ("S-FOVT"). S-FOVT is the FOV that includes all scene segments that can be captured with the STC in a plurality of STC images. For scanning a scene in <NUM> dimensions, OPFE <NUM> must be rotated around two rotation axes. For example, N-FOVT = <NUM> - <NUM> deg and S-FOVT = <NUM> - <NUM> deg.

<FIG> shows OPFE <NUM> after rotation by <NUM> degrees and <FIG> shows OPFE <NUM> after rotation by <NUM> degrees from the zero position. The <NUM> and <NUM> degree rotated positions are exemplary of a range of many rotation positions.

Images are acquired from a certain point of view (POV) of the camera. The POV is the direction defined by the unit vector of the vector that has the location of the camera aperture as starting point and an object point at the center of N-FOVT as end point. As an example, in spherical coordinates (r, θ, ϕ) defined according to ISO convention, the POV for a camera at r = <NUM> is defined by (<NUM>, θ, ϕ), with the polar angle θ and azimuthal angle ϕ defining the location of the object point at C-N-FOVT. In <FIG>, the OPFE is in a zero rotation position ("zero position"). With the OPFE in a zero position, an image acquired with the sensor (i.e. "produced" by camera <NUM>) has no POV aberrations. In spherical coordinates defined as see above, the zero rotation position is given by (<NUM>, <NUM>, <NUM>). When the POV changes, the image acquired by the sensor undergoes POV aberrations. Specifically, an image may be tilted (stretched to a trapeze shape) and/or rotated and/or scaled, see e.g. <FIG> and <FIG>.

<CIT> discloses a tele folded camera with a mirror that is rotated in order to take panoramic images, <CIT> shows a camera with a path folding element and is dealing with the correction of structures which are supposed to be upright but are not due to image distortions.

There is a need for and it would be advantageous to have a STC image without POV aberrations regardless of the POV.

Considering the OPFE position, a method suggested herein uses a digital algorithm to correct the POV aberration to obtain an image without POV aberrations. After acquiring (capturing) an image and correcting it, it is suggested herein to crop a rectangular area from the corrected image, to display a cropped rectangular image on the screen or save the cropped rectangular image to a file. For each OPFE position, a pre-calculated geometric transformation (i.e. homography transform) is applied on the acquired image, resulting in a POV aberration-corrected image.

Depending on the OPFE position after correcting the POV aberration, the original (uncorrected) image center will not coincide with the corrected image center. There may be for example five different cropping options (A, B, C, D, E), see <FIG>.

The outcome of the cropping is a rectangular image with the same aspect ratio AR (i.e. height / width = <NUM>/<NUM>) as the zero position, but with a smaller image area than for the zero-position image area. The size of the image area depends on the OPFE position. The corrected and cropped image is scaled to fit the display size or the saved image size.

All images may be further cropped to have the same crop size (image area) for all OPFE positions. The maximal crop size that fits all OPFE positions can be calculated as the minimal size from the set of maximum sizes for every OPFE position.

In various embodiments there are provided methods, comprising: providing a Tele folded camera that includes an OPFE and an image sensor; tilting the OPFE in one or more directions to direct the Tele folded camera towards a POV; capturing a Tele image or a stream of Tele images from the POV, the Tele image having a POV aberration; and digitally correcting the POV aberration.

Is some embodiments, the POV may have a plurality of aberrations and the above and below apply to the correction of one, some, or all of the plurality of aberrations.

In some embodiments, the correcting the POV aberration includes applying a geometric transformation to the captured Tele image to obtain a respective aberration-corrected image. In some exemplary embodiments, the geometric transformation uses calibration information captured during a camera calibration process.

In some embodiments, a method further comprises cropping the aberration-corrected image to obtain an aberration-corrected cropped (ACC) image that has an ACC image center, an ACC image size and an ACC image width/height ratio.

In some embodiments, a method further comprises scaling the ACC image to obtain an aberration-corrected cropped and scaled output image that has an output image center (OIC), an output image size and an output image width/height ratio. In some embodiments, the tilting of the OPFE and the capturing of a Tele image from the POV are repeated to obtain a plurality of Tele images captured at a plurality of POVs, and the OIC is selected such that a plurality of Tele images captured for all possible POVs cover a maximum rectangular area within a scene. In some embodiments, the tilting of the OPFE and the capturing of a Tele image from the POV are repeated to obtain a plurality of Tele images captured at a plurality of POVs, and the OIC is selected such that a plurality of Tele images captured for a particular plurality of POVs cover a maximum rectangular area within a scene.

In various embodiments there are provided systems, comprising: a Wide camera with a Wide field of view FOVw; a Tele folded camera with a Tele field of view FOVT < FOVw and which includes an OPFE and an image sensor, the Tele camera having a scanning capability enabled by OPFE tilt in one or more directions to direct the Tele folded camera towards a POV of a scene and used to capture a Tele image or a stream of Tele images from the POV, the Tele image or stream of Tele images having a POV aberration; and a processor configured to digitally correct the POV aberration.

In some embodiments, the POV aberration may be corrected using calibration data.

In some embodiments, the calibration data may be stored in a non-volatile memory.

In some embodiments, the calibration data include data on calibration between tilt positions of the OPFE in one or two directions and corresponding POVs.

In some embodiments, the calibration data may include data on calibration between a Tele image and a Wide image.

In some embodiments, the calibration data may include data on calibration between tilt positions of the OPFE in one or two directions and the position of FOVT within FOVw.

In some embodiments, the processor configuration to digitally correct the POV aberration may include applying a configuration to apply a geometric transformation to the captured Tele image or stream of Tele images to obtain an aberration-corrected image.

In some embodiments, the geometric transformation may be a homography transformation.

In some embodiments, the geometric transformation may include a homography motion-based calculation using a stream of frames from the Wide camera.

In some embodiments, the homography motion-based calculation may further use inertial measurement unit information.

In some embodiments, the geometric transformation may be a non-affine transformation.

In some embodiments, the image sensor has an image sensor center, an active sensor width and an active sensor height, and the OIC coincides with the image sensor center.

In some embodiments, the OIC may be selected such that a largest possible rectangular crop image size for a particular output image width/height ratio is achieved.

In some embodiments, the OIC may be located less than a distance of <NUM> x pixel size away from an ideal OIC.

In some embodiments, the OIC may be located less than a distance of <NUM>% of the active sensor width away from an ideal OIC.

In some embodiments, the OIC may be located less than a distance of <NUM>% of the active sensor height away from an ideal OIC.

In some embodiments, the OIC may be selected such that an object-image magnification M of an object across different POVs does vary from a constant value by less than <NUM>%.

In some embodiments, the OIC may be selected such that the output image covers a maximum area within a scene.

In some embodiments, the OIC may be selected such that a plurality of Tele images captured for all possible POVs cover a maximum rectangular area within the scene.

In some embodiments, the OIC may be selected such that a plurality of Tele images captured for a particular plurality of POVs cover a maximum rectangular area within the scene.

In some embodiments, the OIC may be selected such that the output image shows a region of interest or object of interest in a visually appealing fashion.

In various embodiments there are provided methods, comprising: providing a Tele folded camera that includes an OPFE and an image sensor; tilting the OPFE in one or more directions to direct the Tele folded camera towards a POVs of a calibration chart, each POV associated with a respective OPFE position; capturing a respective Tele image of the calibration chart at each POV, each Tele image having a respective POV aberration; analyzing the Tele image data for deriving calibration data between each POV with its respective POV aberration and the respective OPFE position; and using the calibration data to digitally correct the POV aberration.

In some embodiments, the calibration chart may include location identifiers that allow to determine the POV for the given OPFE position from the respective Tele image.

In some embodiments, the calibration chart may include angular identifiers that allow to determine the POV aberration for the given OPFE position from each Tele image.

In some embodiments, the calibration chart may be a checkerboard chart.

In some embodiments, the calibration data chart may represented by a bi-directional function that translates any OPFE position to a Tele POV and/or its respective POV aberrations and vice versa.

In some embodiments, the bi-directional function chart may a polynomial.

In some embodiments, the calibration data chart may represented by a bi-directional Look-Up-Table that translates any OPFE position to a Tele POV and/or its respective POV aberrations and vice versa.

In some embodiments, the calibration data chart may represented by a Look-Up-Table comprising a plurality of OPFE positions with associated values for Tele POVs and/or its respective POV aberrations.

In some embodiments, the plurality of OPFE positions may include more than five OPFE positions, more than <NUM> OPFE positions, or even more than <NUM> OPFE positions.

In some embodiments, a method may further comprise providing a Wide camera with a field of view FOVw larger than a field of view FOVT of the Tele folded camera.

In some embodiments, between the analyzing of the Tele image and the using of the calibration data, a method may further comprise: in a first additional step, with a Tele image POV positioned within a respective Wide image FOV at a respective OPFE position associated with the Tele image POV, capturing an additional Tele image of the calibration chart along with capturing a Wide image of the calibration chart, and in a second additional step, using the Tele and Wide image data for deriving calibration data between the respective OPFE position, the Tele POV within the respective Wide FOV and the Tele image's POV aberration with respect to the Wide image. In some such embodiments, the first and second additional steps may be performed simultaneously. In some such embodiments, all the steps may be performed by a same operator. In some such embodiments, the first four steps may be performed by a first operator, and the first and second additional steps may be performed by a second operator. In some such embodiments, the first four steps may be performed in a time frame of less than <NUM>, and the first and second additional steps are performed in a time frame of less than <NUM>. In some such embodiments, the first four steps may performed in a time frame of less than <NUM> and the first and second additional steps are performed in a time frame of less than <NUM>. In some such embodiments, the first additional step does not include any additional image capture, and the analysis and the deriving of the calibration data may include receiving external calibration data between the Tele folded camera and the Wide camera.

Non-limiting examples of embodiments disclosed herein are described below with reference to figures attached hereto that are listed following this paragraph. The drawings and descriptions are meant to illuminate and clarify embodiments disclosed herein, and should not be considered limiting in any way. Like elements in different drawings may be indicated like numerals.

<FIG> shows different OPFE positions and their respective N-FOVTs in an "object domain". <FIG> shows acquired images, corrected images and cropped images of respective objects at the three different (<NUM>, <NUM> and <NUM>) OPFE positions shown in <FIG>. The object domain is defined as the appearance of a scene that is captured by an ideal camera having a sufficiently large FOV and not having any aberrations and distortions. That is, the object domain corresponds to the appearance of the scene as it may appear to a human observer. The object domain is differentiated from an "image domain", which is defined as the appearance of the scene as captured by a STC such as camera <NUM>.

In <FIG>, <NUM>-i (i = <NUM>, <NUM>, <NUM>) represent S-FOVTs, <NUM>-i represent objects, <NUM>-i represent image frames, <NUM>-i represent images of objects <NUM>-i, <NUM>-i represent image data boundaries and <NUM>-i represent rectangular crops of image frames.

Box <NUM> represents the smallest rectangular FOV that includes S-FOVT, i.e. all the image data from all POVs that can be reached with a STC in the object domain. The N-FOVTs for three different OPFE positions (<NUM>, <NUM> and <NUM>) are represented by <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM>. Each OPFE position corresponds to a different POV. The N-FOVT for an OPFE "zero position" <NUM>-<NUM> is defined as an N-FOVT that produces an image of an object or scene without POV aberrations, i.e. (besides a scaling factor and assuming no camera aberrations and distortions) at zero position an object in the object domain is identical to the object image in the image domain. As shown, the N-FOVT at any other position (e.g. <NUM>-<NUM> and <NUM>-<NUM>) is not a horizontal rectangle (with respect to <NUM>-<NUM>), but an arbitrary tetragon. The same rectangular object is represented by <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> in, respectively, N-FOVTs <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM>.

In an example, the OPFE is positioned at a scanning position <NUM> (<FIG>) with N-FOVT <NUM>-<NUM> that includes object <NUM>-<NUM> and represents a POV of the STC. An image frame <NUM>-<NUM> (<FIG>) is captured (acquired) at position <NUM>. In the captured image, object <NUM>-<NUM> is represented by captured object image <NUM>-<NUM> (<FIG>). A geometric transformation is applied on frame <NUM>-<NUM> to obtain a corrected image frame <NUM>'-<NUM>. The geometric transformation is related to the rotation angle of the OPFE under which the respective image was captured. Inside corrected image frame <NUM>'-<NUM>, one can see the corrected image <NUM>'-<NUM> of image <NUM>-<NUM>. <NUM>'-<NUM> marks the boundary of image data present in corrected image frame <NUM>'-<NUM>, and <NUM>-<NUM> is a possible rectangular crop comprising an image segment of <NUM>'-<NUM>. Rectangular crop <NUM>-<NUM> may have the same aspect ratio AR (i.e. a ratio of horizontal width and vertical height) as AR of image sensor <NUM>. In other examples, rectangular crop <NUM>-<NUM> may have a same aspect ratio as the aspect ratio used for outputting a zero position image such as <NUM>"-<NUM>. Corrected image <NUM>'-<NUM> is then cropped to obtain a corrected cropped image <NUM>"-<NUM>.

In <FIG> in the acquired image row, <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> are original raw image captures (frames) acquired at, respectively, OPFE positions <NUM>, <NUM> and <NUM>. <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> are captured images of, respectively, objects <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM>. In the corrected image row, <NUM>'-<NUM>, <NUM>'-<NUM> and <NUM>'-<NUM> represent corrected (also referred to as "rectified" or "aberration-corrected") image frames that underwent image rectification. <NUM>'-<NUM>, <NUM>'-<NUM> and <NUM>'-<NUM> represent captured object images <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> of objects <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> after image rectification, i.e. they represent "corrected images" (or "rectified images") of the objects. The image data present in corrected image <NUM>'-<NUM> has a boundary <NUM>'-<NUM> and the image data in corrected image <NUM>'-<NUM> has a boundary <NUM>'-<NUM>. The dotted area between <NUM>'-<NUM> and <NUM>'-<NUM>, and between <NUM>'-<NUM> and <NUM>'-<NUM> has no valid image data to be shown on screen or saved to disk (i.e. the area includes only empty pixels). <NUM>-<NUM> and <NUM>-<NUM> are possible rectangular crops comprising image segments of <NUM>'-<NUM> and <NUM>'-<NUM> respectively. <NUM>-<NUM> and <NUM>-<NUM> may have a specific AR. In the cropped image row, <NUM>"-<NUM>, <NUM>"-<NUM> and <NUM>"-<NUM> are aberration-corrected cropped ("ACC") images comprising image data of <NUM>'-<NUM>, <NUM>'-<NUM> and <NUM>'-<NUM>, i.e. they comprise corrected image data of <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM>. In some embodiments, after cropping the images are scaled. In images <NUM>"-<NUM>, <NUM>"-<NUM> and <NUM>"-<NUM>, areas <NUM>"-<NUM>, <NUM>"-<NUM> and <NUM>"-<NUM> represent the image data of objects <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> which underwent rectification, cropping and scaling. The images <NUM>"-<NUM> and <NUM>"-<NUM> are generated by cropping images <NUM>'-<NUM> and <NUM>'-<NUM> along the boundaries <NUM>-<NUM> and <NUM>-<NUM> respectively. Image <NUM>"-<NUM> did not undergo cropping, i.e. all image data of <NUM>'-<NUM> is present also in <NUM>"-<NUM>. Note that since position '<NUM>' was defined as having no POV aberrations, the correction algorithm will have no effect on the acquired image (i.e. <NUM>-<NUM>, <NUM>'-<NUM> and <NUM>"-<NUM> will be identical). In other examples, <NUM>-<NUM>, <NUM>'-<NUM> and <NUM>"-<NUM> may not be of equal size, but <NUM>'-<NUM> and/or <NUM>"-<NUM> may differ in size from <NUM>-<NUM> by a certain crop factor. The same applies for object images <NUM>-<NUM>, <NUM>'-<NUM> and <NUM>"-<NUM>.

<FIG> shows schematically an exemplary method for generating a Tele output image disclosed herein. In a first step <NUM>, a command triggered by a human user or a program directs N-FOVT to a region of interest (ROI) within a scene by scanning. The scanning may be performed by rotating an OPFE. The FOV scanning by OPFE rotation is not performed instantaneously, but requires some settling time, which may be for example about <NUM>-<NUM> for scanning <NUM>-<NUM> degrees and about <NUM>-<NUM> for scanning <NUM>-<NUM> degrees. After the settling time, an STC image (such as images <NUM>-<NUM>, <NUM>-<NUM> and <NUM>-<NUM> in <FIG>) is captured in step <NUM>. In step <NUM>, the STC image is rectified. In a first rectification sub-step (called "geometrical transformation sub-step"), a geometric transformation (such as a homography transformation, an affine transformation or a non-affine transformation) is performed, with results as shown in <FIG>. In the following and as an example, "homography transformation" is used to represent any meaningful geometric transformation. The homography transformation corrects for the aberrations associated with any particular POV and is thus a function of the POV. A second rectification sub-step ("interpolation sub-step") may be performed, which is detailed below.

A corrected (or rectified, or aberration-corrected) image is thus obtained. Calibration data between an OPFE position and the corresponding POV may be used to select the homography transformation corresponding to the particular POV. In some embodiments, the geometric transformation may include corrections known in the art such as e.g. distortion correction and color correction. In step <NUM>, the corrected image is cropped as depicted in <FIG>. In step <NUM>, the cropped image is scaled. A cropped and scaled output image is output in step <NUM>. The output image may be displayed on an electronic device such as device <NUM> (<FIG>) and/or stored in a memory such as memory <NUM> (<FIG>) or any other memory of the device.

The cropping in step <NUM> may be done according to different crop selection criteria. Some crop selection criteria may aim for a particular size of the cropped image. Other crop selection criteria may enable a particular input image coordinate to be transferred to a particular image coordinate of the cropped image. In the following, "crop selection" criteria may be referred to simply as "crop criteria".

Crop criteria that aim for a particular size of cropped images may be as follows: in one criterion (crop criterion <NUM>), the image may be cropped so that a resulting image is a rectangular image. In another criterion (crop criterion <NUM>), the resulting image may be a square. Here and in the following, the image size and shape are defined by the number and distribution of the image pixels, so that size and shape do not depend on the actual mode the image is displayed. As an example, a rectangular image has m rows (image height), wherein each row includes n values (image width). A square image has m rows with m values each. A first rectangular image having m<NUM> rows with n<NUM> values each is larger than a second rectangular image having m<NUM> rows and n<NUM> values if m<NUM> x n<NUM> > m<NUM> x n<NUM> is satisfied.

In yet another criterion (crop criterion <NUM>), the image is cropped so that a largest rectangular image having a particular AR for the particular POV is obtained. Examples for this criterion are the crop options "D" and "E" shown in <FIG>. The AR refers to the width/height ratio of an image. An AR may e.g. be <NUM>:<NUM>, <NUM>:<NUM> or <NUM>:<NUM>. In yet another criterion (crop criterion <NUM>), the image captured at a first POV is cropped so that the resulting image has the same AR and size as an image captured at a second POV. The second POV is the POV that leads to the smallest image obtained by cropping a largest rectangular image having a particular AR for the second POV. Crop criterion <NUM> ensures that cropped images at all possible POVs have identical AR and shape. In yet another criterion (crop criterion <NUM>), the image is cropped so that all output images generated from STC images captured in step <NUM> from the entire S-FOVT cover a largest area of a rectangular FOV in the object domain. This cropping criterion ensures that the area of a rectangular FOV in the object domain such as <NUM> is covered maximally by S-FOVT. In yet another criterion (crop criterion <NUM>), the image is cropped rectangularly so that an identical object-to-image magnification is obtained for the entire S-FOVT. In general, the object images of images captured in step <NUM> are smaller for larger POVs. In some embodiments, the condition of "identical magnification" may be satisfied if the magnifications obtained for all POVs vary from a constant value by < <NUM>%. In other examples, the condition of "identical magnification" may be satisfied if the magnifications obtained for all POVs vary by < <NUM>% or by <<NUM>%.

Crop criteria that map particular input image coordinates to particular image coordinates of the cropped image are presented next. In general, and by applying a particular crop selection criterion, any arbitrary object image point of the image captured in step <NUM> (the "input image") can be defined as the image center of the image output in step <NUM>. In a crop criterion <NUM>, the image may be cropped rectangularly so that the image center of the cropped image contains image data identical with that of the input image center for a particular POV. An image center may be defined as the center pixel and the surrounding pixels that lie within a radius of e.g. <NUM> times the pixel size. In some embodiments, the image center may be defined as the center pixel plus surrounding pixels that lie within a radius of e.g. <NUM> or <NUM> times the pixel size.

In a crop criterion <NUM>, the image may be cropped rectangularly so that the cropped image center contains image data identical with that of an input image center, with the cropped image additionally fulfilling the condition that any two images that are captured at arbitrary first and second POVs are cropped so that the resulting images have the same AR and size. In yet other examples, crop criterion <NUM> may additionally fulfill the condition that the cropped images are of maximal size (crop criterion <NUM>). In yet other examples, an image may be cropped so that a ROI or an object of interest (OOI) is displayed on the image output in step <NUM> in a visually appealing fashion (crop criterion <NUM>). This criterion may support aesthetic image cropping, e.g. as described by <NPL>. Applications of aesthetic image cropping are also described in the co-owned PCT Patent Application No. <CIT>. In yet other examples, an image may be cropped according to the needs of further processing steps, e.g. the image may be cropped so that only a particular segment of the FOV in the object domain is included (crop criterion <NUM>). A possible further processing may e.g. be the generation of a super image, i.e. of an output image that is composed of the image data of a plurality of input images. The generation of a super-image is described in co-owned PCT Patent Application No. <CIT>. Another possible further processing may be the generation of a panorama image as known in the art.

The scaling in step <NUM> may be performed according to different scaling selection criteria. In some embodiments, scaling may be performed so that images captured under different POVs in step <NUM> and output in step <NUM> (the "output image") have identical size and AR (scale criterion <NUM>). In other examples, scaling may be performed so that the pixel density per object image area in the output image is identical with the pixel density per area in the object domain present in the image captured in step <NUM> (scale criterion <NUM>). In yet other examples, scaling may be performed so that the image size fits the requirements of a program that performs further processing on the image data (scale criterion <NUM>).

Steps <NUM>-<NUM> outlined above may be performed sequentially, i.e. one after the other.

In some STC image rectification embodiments, step <NUM> may be performed as follows: let (xini, yinj) be the values of some arbitrary image coordinates (i, j) of an input image (captured in step <NUM>) and let (xoutm, youtn) be the values of some arbitrary image coordinates (m, n) of an output image (of step <NUM>). In the geometrical transformation sub-step, a homography transformation may be (xout, yout) = fH(xin, yin) with H being a 3x3 homography transformation matrix known in the art. The homography transformation can be inversed by using fH-<NUM> = fH-<NUM>. A crop transformation (xout, yout) = Crop(xin, yin) may be (xoutm, youtn) = (xmi - crop-start_xi, yinj - crop-start_yj) for assigning each coordinate of the input image a coordinate in the output image wherein only coordinates with values > <NUM> are used for the output image. Vector (crop-start_xi, crop-start_yj) defines size and shape of the cropped image. An inverse crop transformation Crop-<NUM> is defined by (xinm, yinn) = (xout, + crop-start_xi, youtj - crop-start_yj). A scale transformation (xout, yout) = Scale(xin, yin) may be (xout, yout) = (sx·xin, sy·yin) with scaling factors sx and sy in x and y direction respectively. An inverse scale transformation Scale-<NUM> is defined by (xin, yin) = (sx-<NUM>·xout, sy-<NUM>·yout). A transfer function T is defined by applying homography, crop and scale sequentially, i.e. T is defined by (xout, yout) = Scale(Crop(fH(xin, yin))) and (xout, yout) = T(xin, yin).

In the interpolation sub-step, one may sequentially interpolate all values of output image (xout, yout) directly from the input image via transfer function T. For example, one may start with calculating values (xoutm, youtn) at an arbitrary starting point having coordinates (m, n) of the output image. For this, one calculates coordinates (m', n') of input image (xin, yin) that are to be included for calculating values (xoutm, youtn) at the particular coordinates (m, n) of the output image. Coordinates (m', n') in the input image may be obtained by applying an inverse transfer function T-<NUM> to all output coordinates (m, n), i.e. T-<NUM>(xoutm, youtn) or fH-<NUM>(crop-<NUM>(scale-<NUM>(xoutm, youtn))) for all (m, n). In general, T-<NUM> may not map each coordinate (m, n) on one coordinate (m', n'), but map each coordinate on a segment of neighboring coordinates (m', n'). For calculating the values (xoutm, youtn), the entire segment or parts of the segment of neighboring coordinates (m', n') may be taken into account. For obtaining values (xoutm, youtn) of the output image at coordinates (m, n), in a first step a re-sampling function R as known in the art may be evaluated for all neighboring coordinates (m', n') according to T(xout'm, yout'n) = Resample (Tin,xinm', yin n'). The re-sampling may be performed by methods known in the art such as nearest neighbor, bi-linear, or bi-cubic.

After values (xoutm, youtn) are determined, one may perform the steps above for calculating the values (xouto, youtp) at additional coordinates (o, p), etc. This is repeated until all values (xout, yout) of the output image are obtained. In various embodiments, the calculation as described above is performed for a plurality of output coordinates or even for all output coordinates in parallel. In some STC image rectification embodiments, the calculations described here may be performed by a CPU (Central Processing Unit). In other STC image rectification embodiments and for faster image processing, the calculations described here may be performed by a GPU (Graphics Processing Unit). The STC image rectification may be performed in different color domains, e.g. RGB, YUV, YUV420 and further color domains known in the art.

<FIG> shows S-FOVT <NUM> in the object domain. <NUM> represents a N-FOVT corresponding to a particular OPFE position within <NUM>. <NUM> represents the object point in the scene whose image point is located at the center of the image sensor. <NUM> represents an arbitrary selected particular object point in the scene that is included in N-FOVT <NUM>.

<FIG> shows an acquired Tele image <NUM> having a center <NUM>' and including an image point <NUM>' of object point <NUM>. <FIG> shows a corrected image <NUM> generated by applying the geometric transformation described above to image <NUM>. <NUM> is the boundary of the image data in the corrected image, i.e. outside of the boundary (dotted area) there is no image data available. <NUM>" and <NUM>" are the locations of image points <NUM>' and <NUM>' respectively in the corrected image.

<FIG> shows exemplarily different options for rectangularly cropping corrected image <NUM> shown in <FIG> and generating an output image as described herein. One can see that the image data that is located at the output image center (OIC) depends on the selected cropping criteria. In the examples marked "D" and "C", crop selection criteria are selected so that particular image point <NUM>' is located at the OIC. Cropping option "D" is selected so that two criteria are fulfilled: (i) "particular image point <NUM>' is located at the OIC" and (ii) "the largest rectangular image for the given POV is achieved". Cropping option "C" is selected so that the criterion "particular image point <NUM>' is located at the OIC" is fulfilled. Additional crop selection criteria are depicted in the examples marked "A", "B" and "E". Cropping option "A" is selected so that the criterion "image center <NUM>' is located at the OIC" is fulfilled. Cropping option "B" is selected so that two criteria are fulfilled: (i) "image center <NUM>' is located at the OIC" and (ii) "the largest rectangular image for the given POV is achieved". Cropping option "E" is selected so that for the output image the criterion "the largest rectangular image for the given POV is achieved" is fulfilled. In other examples (not shown), a cropping option may be selected so that two criteria are fulfilled: (i) "image center <NUM>' is located at the OIC" and (ii) "the largest rectangular image for all possible POVs is achieved". It may not always be possible or beneficial to locate the OIC exactly at a particular image position ("ideal OIC") such as e.g. the image center, but in proximity of the ideal OIC. Proximity of the ideal OIC may be expressed as a percentage of the image sensor size (e.g. OIC may be located < <NUM>% of image sensor width from the ideal OIC) or as a distance in pixels (e.g. OIC may be located less than a distance of <NUM> x pixel size away from the ideal OIC).

In yet other examples (not shown), a cropping option may be selected so that that the criterion "the largest rectangular image for all possible POVs is achieved" is fulfilled. In yet other examples (not shown), a cropping option may be selected so that that the criterion "the largest rectangular image for a particular plurality of POVs is achieved" is fulfilled. The particular plurality of POVs may cover all possible POVs or a subset thereof.

<FIG> shows schematically an embodiment of a mobile electronic device ("electronic device") numbered <NUM> and including multi-aperture cameras with at least one STC. Electronic device <NUM> may e.g. be a smartphone, a tablet, a laptop, etc.. Electronic device <NUM> comprises a first STC module <NUM> that includes an OPFE <NUM> for FOV scanning, and a Tele lens module <NUM> that forms a Tele image recorded by a first image sensor <NUM>. Image sensor <NUM> has an active sensor area defined by an active sensor width and an active sensor height which performs the actual light harvesting, and an inactive area that does not perform light harvesting. A Tele lens actuator <NUM> may move lens module <NUM> for focusing and/or optical image stabilization (OIS). Electronic device <NUM> may further comprise an application processor (AP) <NUM> that includes a FOV scanner <NUM>, a motion estimator <NUM> and an image generator <NUM>. STC <NUM> may have an effective focal length ("EFL") of EFL=<NUM>-<NUM>. A sensor diagonal ("SD") of image sensor <NUM> may be SD=<NUM>-<NUM>.

Calibration data may be stored in a first memory <NUM>, e.g. in an EEPROM (electrically erasable programmable read only memory), in a second memory <NUM>, or in a third memory <NUM>, e.g. in a NVM (non-volatile memory). Calibration data may include STC calibration data and DC calibration data. Electronic device <NUM> further comprises a Wide ("W") (or Ultra-Wide, "UW") camera module <NUM> with a FOVW, FOVUW> N-FOVT that includes a second lens module <NUM> that forms an image recorded by a second image sensor <NUM>. A second lens actuator <NUM> may move lens module <NUM> for focusing and/or OIS.

In use, a processing unit such as AP <NUM> may receive respective first and second image data from camera modules <NUM> and <NUM> and supply camera control signals to camera modules <NUM> and <NUM>. FOV scanner <NUM> may receive commands from a human user or a program for directing the N-FOVT to particular POVs in a scene. In some embodiments, the commands may include a single request for directing N-FOVT to one particular POV. In other examples, the commands may include a series of requests e.g. for serially directing N-FOVT to a plurality of particular POVs. FOV scanner <NUM> may be configured to calculate a scanning order given the requested particular POVs. FOV scanner <NUM> may be configured to supply control signals to OPFE actuator <NUM>, which may, in response to the control signals, rotate OPFE <NUM> for scanning N-FOVT. In some embodiments, FOV scanner <NUM> may additionally supply control signals to OPFE actuator <NUM> for actuating OPFE <NUM> for OIS.

Electronic device <NUM> further comprises an inertial measurement unit (IMU, or "Gyro") <NUM> that may supply information on the motion of <NUM>. Motion estimator <NUM> may use data from IMU <NUM>, e.g. for estimating hand motion caused by a human user. In some embodiments, motion estimator <NUM> may use additional data. For example, image data from camera <NUM> and/or from camera <NUM> may be used to estimate an "optical flow" from a plurality of images as known in the art. Motion estimator <NUM> may use data from IMU <NUM> and may use as well optical flow data for estimating motion of <NUM> with higher accuracy. The information on motion of <NUM> may be used for OIS or for the homography transformation described above. In other embodiments, only optical flow data estimated from image data of camera <NUM> and/or camera <NUM> may be used for estimating motion of <NUM>. Image generator <NUM> may be configured to generate images and image streams respectively as e.g. described in <FIG>. In some embodiments, image generator <NUM> may be configured to use only first image data from camera <NUM>. In other embodiments, image generator <NUM> may use image data from camera <NUM> and/or camera <NUM>.

<FIG> shows a method for a STC calibration process described herein. The calibration process allows to derive calibration data for a single scanning Tele camera ("STC calibration") or for a dual-camera ("DC") including a STC and a Wide camera having a FOVW>N-FOVT ("DC calibration"). Goal of the calibration process is to connect between three parameters for all possible POVs: a specific OPFE position which is defined by a position sensor value pair, the POV associated with this specific OPFE position as well as the POV aberrations associated with this specific POV.

In a first example (calibration example <NUM> or "CE1"), the calibration process refers to a STC that scans in <NUM> dimensions by rotating an OPFE along two axes, wherein the amplitude of the rotation is measured by two or more position sensors (e.g. Hall sensors), a first and a second position sensor P1 and P2 respectively. The STC's POV is measured by the value pair p1 and p2 of P1 and P2 respectively. In a first step <NUM>, a calibration chart ("CC") is provided. A suitable CC includes location identifiers (such as location identifiers <NUM> and <NUM>, see <FIG>) which allow to determine the location on the chart. When capturing a suitable CC at a given distance with a STC, at least one location identifier is present in N-FOVT for all POVs in S-FOVT. By means of the location identifier, the STC's POV with respect to the CC can be determined. The location identifiers may e.g. be symbols encoding location information, spread in sufficiently high frequency all over the checkerboard. Additionally, a suitable CC includes angular identifiers that allow to determine the relative angular tilt and rotation between the CC and a STC's image of the CC. The angular identifiers may e.g. be lines present in a checkerboard. An example of a suitable CC is shown in <FIG>. The size of the CC and the distance between the STC and the CC is to be selected so that the entire S-FOVT is included in the FOV covered by the CC.

In CE1, a list of N specific value pairs (p1, p2) may be defined for a specific STC design. In some embodiments, the list may include N=<NUM> value pairs (p1, p2)<NUM>,. , (p1, p2)<NUM>. In other embodiments, the list may include N=<NUM> - <NUM> or even more value pairs. According to a first criterion for value pair selection, the value pairs may be selected so that the STC must capture a minimum number of different POVs in the calibration process (or, in other words, a minimum number of repetitions of steps <NUM> and <NUM> is desired).

For a second example ("CE2") for DC calibration, in step <NUM> another CC may be required, wherein the CC may or may not be a checkerboard. The STC of CE2 fulfills the same attributes as for CE1. Also in CE2, a list of N specific position sensor value pairs (p1, p2), each value pair associated with a specific OPFE position, may be defined for a specific STC design. In some embodiments, the list may include N=<NUM> value pairs (p1, p2)<NUM>,. , (p1, p2)<NUM>. In other embodiments, the list may include N=<NUM> - <NUM> or even more value pairs.

By tilting the OPFE to a specific OPFE position, in CE1 and CE2 e.g. defined by (p1, p2)<NUM>, in step <NUM> the STC is directed to a (yet unknown) POV on the CC.

In step <NUM>, one or more STC images are captured. For DC calibration and for CE2, a second sub-step of step <NUM> is required, where STC images are captured along W images captured by the Wide camera. Capturing STC images along W images means here that the images are captured at a same dual-camera position and orientation. In general, the capture may be simultaneous, but this is not mandatory.

In some embodiments, the capturing of the STC images along the Wide images may be performed together and in one single step, e.g. by a same operator.

In other examples, the two steps may be performed separately and e.g. by different operators. For example and for calibrating a STC with respect to a first CC, a first operator may capture one or more STC images at a specific OPFE position. The STC which is calibrated with respect to the first CC may be included by a second operator into a dual-camera which is used for capturing a second CC (which may be or may be not identical to the first CC) with the STC at a specific OPFE position along with one or more W images for calibrating the STC with respect to the W camera of the dual-camera. Steps <NUM> and <NUM> are performed repeatedly according to the number N of value pairs, so that one or more STC images are captured at each of the N OPFE positions (or value pairs). The repetition of steps <NUM> and <NUM> for the plurality of OPFE positions may be performed for example in a predetermined timeframe. The predetermined timeframe may e.g. be <NUM> or <NUM>. For example, the first operator may be a camera module manufacturer that manufactures the STC and the second operator may be a phone manufacturer that includes the STC into a dual-camera and the dual-camera into a mobile device. In some embodiments, the second sub-step of step <NUM> does not include capturing additional STC and W images, but includes receiving external calibration data between the STC and the Wide camera.

In step <NUM>, the STC images are analyzed. Aim is to assign a POV and a respective POV aberration to the specific OPFE (or value pairs) position of step <NUM>. The analysis includes to use the CC's location identifiers that appear in a STC image to determine the POV from which it was captured, as well as to use the CC's angular identifiers along with GT images to determine the POV aberrations.

For CE1, the analysis includes to use the CC's location identifiers that appear in a STC image to determine the POV from which it was captured, as well as to use the CC's angular identifiers along with ground truth images to determine the POV aberrations.

In a first sub-step of CE1, a specific POVi is assigned to the value pair (p1, p2)i.

In a second sub-step of CE1, the STC image is compared to a ground truth image of the CC at the respective POV. In this comparison it is determined which image transformation parameters transform the STC image into the CC's ground truth image. In some embodiments, three image transformation parameters may be used. For DC and CE2, POVs and respective POV aberrations are determined by comparing the STC images and the Wide images captured in step <NUM>.

In step <NUM> of CE1, the first and the second sub-step are performed for all value pairs (p1,p2)<NUM>,. , (p1,p2)N, so that to each value pair (p1,p2)i a specific POVi and image transformation parameters are assigned.

In step <NUM>, from the analysis in step <NUM>, calibration data is derived. In some embodiments, the calibration data is represented by a bi-directional data polynomial. In other examples, the calibration data is represented by a bi-directional Look-Up-Table (LUT) polynomial. In all examples, STC calibration data includes a function that can be used to translate any OPFE position to a STC image's POV aberrations with respect to a checkerboard and/or STC's POV. DC calibration data can be used to translate any OPFE position to a STC image's POV aberrations with respect to the W camera and/or STC's POV within FOVw. Vice versa, any POV aberration of an STC image with respect to a W camera's image can be translated into a STC POV within FOVw and/or to an OPFE position (thus "bi-directional"). In yet other examples, STC calibration data is represented by a LUT which comprises a multitude of OPFE positions with associated values for STC images' POV aberrations with respect to the CC and/or STC's POVs. DC calibration data is represented by a LUT which comprises a multitude of OPFE positions with associated values for STC images' rotation angles with respect to the Wide camera's images and/or Tele POVs within FOVw. For CE1, a function is determined which approximates the relation between all the value pairs (p1, p2)<NUM>,. , (p1,p2)N and their assigned specific POVs, POV<NUM>,. , POVN, as well as their assigned image transformation parameters. This function is generalized, meaning that it is used for bi-directionally translating between all possible OPFE position value pairs, their POVs and image transformation parameters for image rectification. According to a second criterion for value pair selection, the value pairs may be selected so that the generalization of the function leads to a minimum aggregated error ("AE"). "AE", which is to be minimized, refers here to an error function that depends on the deviation of the STC images that underwent the POV correction from their respective ground truth images for all possible POVs (or a number of POVs that is sufficiently large to approximate statistically all possible POVs). In some embodiments, some compromise between fulfilling the first or the second criterion for value pair selection is made.

For CE2, the calibration data derived is included in a LUT. The LUT includes the N OPFE positions (value pairs), the POV associated with each value pair as well as its respective POV aberration. This implies that not for all possible OPFE positions there is explicit calibration data. So for rectifying a STC image with CE2 at an OPFE position which is not included in the LUT, one may approximate a POV and its POV aberrations. In some embodiments for approximation, one may use the calibration values which are associated with one OPFE position which is, from all the N OPFE positions, located closest to the current OPFE position. Closest may be defined here by a distance metrics known in the art, e.g. a quadratic distance of the respective value pairs (sqrt((p1-p1c)<NUM>+(p2-p2c)<NUM>)) may be smallest, where p1, p2 is the current OPFE position, and p1c, p2c are values included in the LUT. In other examples for approximation, one may use a weighted average of a plurality of calibration values which are associated with a plurality of OPFE positions which are, from all the N OPFE positions, located closest to the current OPFE position.

In step <NUM>, the calibration data are applied to the STC images for correcting POV aberrations.

<FIG> shows an exemplarily CC <NUM> that may be used for the calibration method described in <FIG>. CC <NUM> includes <NUM> location identifiers, which are distributed in rows of <NUM> (oriented parallel x) and <NUM> columns (oriented parallel y). Exemplarily, the two first location identifiers of the first row are marked <NUM> and <NUM> respectively. A location identifier is located at a defined distance from a CC reference point, e.g. the upper left corner of CC. For calibrating with CC <NUM> at different camera-CC distances, one may adapt the size of CC <NUM> so that at least one location identifier is present in N-FOVT for all POVs in S-FOVT. CC <NUM> includes additionally angular identifiers, which in this example are represented by the vertical and horizontal lines of the checkerboard.

While this disclosure has been described in terms of certain embodiments and generally associated methods, alterations and permutations of the embodiments and methods will be apparent to those skilled in the art. The disclosure is to be understood as not limited by the specific embodiments described herein, but only by the scope of the appended claims.

Claim 1:
A method comprising:
a) providing a Tele folded camera (<NUM>) that includes an optical path folding element (OPFE) (<NUM>) and an image sensor (<NUM>);
characterized in further comprising
b) tilting the OPFE (<NUM>) in one or more directions to perform optical image stabilization (OIS);
c) while performing OIS, capturing a stream of Tele images, wherein each Tele image has a respective point of view (POV) aberration; and
d) digitally correcting the respective POV aberration.