WO2017075788A1 - Anti-jitter photographing method and apparatus, and camera device - Google Patents

Anti-jitter photographing method and apparatus, and camera device Download PDF

Info

Publication number
WO2017075788A1
WO2017075788A1 PCT/CN2015/093923 CN2015093923W WO2017075788A1 WO 2017075788 A1 WO2017075788 A1 WO 2017075788A1 CN 2015093923 W CN2015093923 W CN 2015093923W WO 2017075788 A1 WO2017075788 A1 WO 2017075788A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
frame image
image
images
frames
Prior art date
Application number
PCT/CN2015/093923
Other languages
French (fr)
Chinese (zh)
Inventor
李付生
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/093923 priority Critical patent/WO2017075788A1/en
Priority to CN201580050507.0A priority patent/CN107079085B/en
Publication of WO2017075788A1 publication Critical patent/WO2017075788A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C19/00Gyroscopes; Turn-sensitive devices using vibrating masses; Turn-sensitive devices without moving masses; Measuring angular rate using gyroscopic effects
    • G01C19/58Turn-sensitive devices without moving masses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to an anti-shake photographing method, apparatus, and camera device.
  • the embodiment of the invention provides an anti-shake photographing method, a device and a camera device, which can effectively suppress image blur caused by shaking and improve the user's photographing experience.
  • An embodiment of the present invention provides an anti-shake photographing method, including: acquiring an output signal of at least one inertial sensor corresponding to each frame image in an N-frame image, N ⁇ 2; according to each of the N-frame images And calculating, by the output signal of the at least one inertial sensor corresponding to the frame image, a jitter amplitude value of each frame image in the N frame image; and selecting a K frame target image according to the jitter amplitude value of each frame image in the N frame image, 2 ⁇ K ⁇ N; calculating a mutual positional shift of the K-frame target image; aligning the K-frame target image according to mutual positional shift of the K-frame target image and synthesizing the aligned K-frame target image to Generate the final image.
  • Another embodiment of the present invention provides an apparatus for anti-shake photographing, comprising: an acquiring unit, configured to acquire an output signal of at least one inertial sensor corresponding to each frame image in an N-frame image, N ⁇ 2; a calculating unit, configured to calculate, according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image, a jitter amplitude value of each frame image in the N frame image; a target image selecting unit, configured to: Selecting a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2 ⁇ K ⁇ N; a mutual position offset calculation unit, configured to calculate a phase of the K frame target image
  • the mutual image offset unit is configured to align the K frame target image according to the mutual positional offset of the K frame target image and synthesize the aligned K frame target image to generate a final image.
  • a camera device including: at least one inertial sensor for detecting jitter of the camera device corresponding to each frame image in an N frame image, N ⁇ 2; a processor for Calculating a jitter amplitude value of each frame image in the N frame image according to an output signal of the at least one inertial sensor; selecting a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2 ⁇ K ⁇ N; calculating a mutual positional shift of the K-frame target image; aligning the K-frame target image according to a mutual positional shift of the K-frame target image and synthesizing the aligned K-frame target image to generate The final image.
  • the method, the device, and the camera device of the embodiments of the present invention can effectively suppress image blur caused by jitter and improve the user's photographing experience.
  • FIG. 2 is a flowchart of a method for acquiring angle jitter according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for acquiring shift jitter according to an embodiment of the present invention
  • FIG. 4 is a flow chart of a method for controlling an exposure start time according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of an apparatus for anti-shake photographing according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a camera device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of an anti-shake photographing method according to an embodiment of the present invention.
  • the method provided in this embodiment can be applied to a digital camera, a digital image recorder, a smart phone, a monitor, and other electronic functions with camera functions.
  • the embodiments of the present invention are not limited in the product. Please refer to Figure 1, including the following steps:
  • Step 101 Acquire an output signal of at least one inertial sensor corresponding to each frame image in the N frame image.
  • the above camera device usually has an inertial sensor built in to measure acceleration or angular velocity.
  • Inertial sensors include accelerometers and angular velocity sensors (such as gyroscopes) and their single, dual, and triaxial combination IMUs (Inertial Measurement Units).
  • Synthesizing the multi-frame image data can reduce the mutual positional shift of the multi-frame images displayed by each of the multi-frame image data obtained by time-division photography.
  • a K frame image with a small jitter amplitude is selected and a relatively clear image is synthesized, wherein N ⁇ 2, 2 ⁇ K ⁇ N.
  • the at least one inertial sensor comprises at least one of an angular velocity sensor and an acceleration sensor.
  • Step 102 Calculate a jitter amplitude value of each frame image in the N frame image.
  • the output signal of the at least one inertial sensor is Converted to a digital signal by an A/D converter.
  • Inertial sensor itself carrier motion, external interference, installation process and many other factors will bring zero drift error to the output signal of the inertial sensor. Due to various reasons, this zero drift is often unavoidable.
  • the output of the A/D converter is processed by a digital high pass filter to reduce errors due to zero drift.
  • the output of the A/D converter is subjected to processing operations of the Kalman filter to reduce errors due to zero drift.
  • the filtered signal is then subjected to an integral processing operation to calculate angular jitter or shift jitter.
  • the output signal of the inertial sensor is an angular velocity signal
  • the process of acquiring the angle jitter performed in the present embodiment is explained in conjunction with the flowchart shown in FIG. 2.
  • step 201 the output signal of the angular velocity sensor is A/D converted, and the result of the A/D conversion is taken as ANG_VEL.
  • step 202 a high-pass filtering operation (HPF) is performed on the calculation result of step 201 to reduce the error caused by the zero-point drift, and the filtered result is taken as ANG_VEL_HPF.
  • HPF high-pass filtering operation
  • step 203 an integration operation is performed on the calculation result of step 202, the integration result is DEG, and DEG is the first jitter angle displacement signal.
  • the method further includes before step 202.
  • the interpolation result is performed on the calculation result of the step 201.
  • the interpolation operation may be performed by a method such as a linear interpolation or a polynomial interpolation, which is not limited in the embodiment of the present invention.
  • the output signal of the inertial sensor is an acceleration signal, and the process of acquiring the shift jitter performed in the present embodiment is explained in conjunction with the flowchart shown in FIG.
  • step 301 the output signal of the accelerometer is A/D converted, and the result of the A/D conversion is taken as ACC.
  • step 302 a high-pass filtering operation is performed on the calculation result of step 301 to reduce the error caused by the zero point drift.
  • step 303 an integration operation is performed on the calculation result of step 302, and the integration result is a signal indicating the speed V of the shift jitter.
  • step 304 a high pass filtering operation is performed on the signal of the velocity V as the input shift jitter to reduce the error caused by the zero point drift.
  • step 305 an integration operation is performed on the calculation result of step 304, and the integration result is DIS, and DIS is the first jitter shift signal.
  • the method further includes before step 302.
  • the interpolation operation is performed on the calculation result of the step 301, and the interpolation operation may be performed by a method such as linear interpolation or polynomial interpolation, which is not limited in the embodiment of the present invention.
  • the first jitter when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, the first jitter may be according to a relationship between the angle jitter, the shift jitter, and the object distance X.
  • each of the N frames of images may be calculated according to the filtering processing and the integrated processed signals (eg, DIS, DEG described above)
  • the jitter amplitude value of the frame image may be calculated according to the filtering processing and the integrated processed signals (eg, DIS, DEG described above).
  • the jitter amplitude value of each frame image in the N frame image may be generated according to a difference between the maximum value and the minimum value of the filtering process and the integrated processed signal.
  • the average value of the absolute value of the ratio of the difference between the signal value of the adjacent sample point and the time interval of the adjacent sample point after the filtering process and the integration process may be generated.
  • i represents the frame number
  • ⁇ i represents the number of sampling points of the ith frame
  • t i, j represents the jth sampling time of the ith frame
  • x i, j represents the ith frame j sample point signal values.
  • sequence H i may be generated according to the filtering process and the integrated processed signal:
  • characteristic parameters of the sequence H i the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
  • sequence A i is generated according to the filtering process and the integrated processed signal:
  • A(x i,j ) represents an integral value of the ith ANG_VEL_HPF signal from t i,1 to t i,j in the i-th frame.
  • the ANG_VEL_HPF signal sample point signal value x i,j and the initial sample point signal value x i , 1 is used to eliminate the influence of the initial point on the result, and the integral value is calculated by the trapezoidal integral method.
  • the position of the record peak is L h , ⁇ h ⁇ 1, and the jitter amplitude value of each frame image in the N frame image is generated according to the difference between the peak point and the adjacent valley point. ;
  • the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal
  • calculating a jitter amplitude of each frame image in the N frame image according to the first target rotation signal DEG_TARGET The method of the value is the same as the above-described method of calculating the jitter amplitude value of each frame image in the N frame image based on the filtering process and the integrated processed signal (for example, DIS, DEG).
  • Step 103 Select K according to the jitter amplitude value of each frame image in the N frame image. Frame target image.
  • the jitter amplitude values of each frame image in the N frame image are sorted, and the first K corresponding K frame images are taken as the target image in order from small to large. N ⁇ K ⁇ 2.
  • the absolute value of the difference between the jitter amplitude value and the average value of each frame image in the N frame image is calculated, and then the absolute values of the difference values obtained above are sorted.
  • the first K corresponding K frame images are taken as the target image in order from small to large, where N ⁇ K ⁇ 2.
  • Step 104 Calculate a mutual position offset of the K frame target image.
  • the subject may have a positional shift between the frames of the frame.
  • a motion vector indicating a mutual positional offset of the K-frame target image may be calculated according to an output signal of the at least one inertial sensor.
  • the motion vector includes a plurality of components, each component being a time varying function or a time series for representing a component of translation and/or rotation of the image.
  • a first frame image of the N frame image may be selected as a reference frame image, and an output signal of the at least one inertial sensor corresponding to each frame image in the K frame target image and a reference frame image are corresponding.
  • the output signal of the at least one inertial sensor calculates a positional offset of each frame image in the K frame target image with respect to the reference frame image, thereby obtaining a mutual positional offset of the K frame target image.
  • any one of the filtered K frame target images may be selected as a reference frame image, and the output of the at least one inertial sensor corresponding to each frame image in the K frame target image is selected. And outputting, by the signal, the output signal of the at least one inertial sensor corresponding to the reference frame image, calculating a position offset of each frame image in the K frame target image with respect to the reference frame image, thereby obtaining a mutual position of the K frame target image Offset.
  • feature points may be extracted from the K-frame target image by using an image detection algorithm (eg, a Harris corner detection algorithm, a minimum equivalence segmentation absorption kernel (SUSAN) algorithm, etc.) Calculating a mutual positional offset of the feature points in the K-frame target image, the feature points in the K-frame target image
  • the mutual positional offset is the mutual positional offset of the K-frame target image.
  • Step 105 Align the K frame target image according to mutual positional offset of the K frame target image and synthesize the aligned K frame target image to generate a final image.
  • the mutual position of the K frame target image is obtained according to the positional offset of each frame image in the K frame target image acquired in step 104 with respect to the reference frame image. Offset, resetting the position of each frame image in the K frame target image to align the K frame target image.
  • the K-frame target image is reset according to the motion vector indicating the mutual positional deviation of the feature points in the K-frame target image acquired in step 104. The position of the feature point in each frame image is overlapped with each pixel point of the feature point in each frame image in the K frame target image to align the K frame target image.
  • the K frame target image after performing the alignment operation may be synthesized according to a weighted average method, that is, performing an alignment operation
  • the corresponding pixel values in the K-frame target image are summed and averaged to generate a final image, for example, the color value and the luminance value of each pixel of the K-frame target image after the alignment operation is performed may be summed
  • the average is taken to generate the final image, and the color values include the color values of the red, green, and blue channels of the pixel.
  • a control flow of the exposure start time of each frame of the N frame images is further included to minimize the jitter of the camera device during each frame image exposure.
  • the exposure start time control flow executed in the present embodiment will now be explained in conjunction with the flowchart shown in FIG.
  • step 401 an output signal of at least one inertial sensor within a preset period of time before the start of exposure corresponding to each frame image of the N frame image is detected.
  • the preset time period before the start of the exposure may include the time of framing, focusing, and clicking the shutter.
  • it may be set to two seconds before the start of the exposure, which is not limited in this embodiment.
  • step 402 a jitter prediction signal is generated.
  • At least one inertial sensor output signal and each frequency component are detected for a period of time before the start of each frame image in the N frame image obtained in step 401.
  • the weight and the exposure duration of each frame image in the N-frame image generate a jitter prediction signal for each of the N-frame images.
  • the inertial sensor includes at least one of an angular velocity sensor and an acceleration sensor, and in step 401, detecting a preset time period before the start of exposure corresponding to each frame image in the N frame image
  • the processing flow of steps 201 to 203 is performed to obtain a second shake angle displacement signal DEG_DAT
  • step 401 the acceleration in the preset time period before the start of exposure corresponding to each frame image in the N frame image is detected.
  • the processing flow of steps 301 to 305 is performed to obtain the second jitter shift signal DIS_DAT.
  • the second jitter shift signal DIS_DAT may be converted into a relationship according to the angle jitter, the shift jitter, and the object distance X.
  • the frequency of the jitter ranges from 0 Hz to 15 Hz. Therefore, in the present embodiment, the jitter angular displacement signal DEG_DAT and the jitter shift signal DIS_DAT are filtered by a band pass filter, optionally, in the present embodiment, band pass filtering
  • the frequency range of the device is 0Hz to 15Hz.
  • angular jitter DEG_DAT
  • shift jitter DIS_DAT
  • second target rotation signal DEG_TARGET_DAT
  • assigning weight means that when a plurality of components are combined to generate a combined value, each component is multiplied by a certain coefficient according to a predetermined criterion, that is, the frequency and the exposure time are fixed, before the calculation is performed,
  • the table finds the weights corresponding to the respective frequency components, and generates a jitter prediction signal by using a weighted sum.
  • the evaluation of the degree of influence of imaging is performed based on at least one of the angular velocity sensor output and the acceleration sensor output.
  • the weight is a function of the exposure duration ⁇ t and the period T, expressed as ⁇ ( ⁇ t, T).
  • f(t) represents the angular range width of the rotation in the exposure period, t ⁇ [0, T].
  • f(t) is related to the exposure time ⁇ t. From the definition of the trigonometric function and the definition of f(t), f(t) is Is a periodic function of the period, so only need to calculate f(t) at The value above, the value of other intervals can be calculated periodically according to the function.
  • N discrete points may be uniformly selected on [0, T], the width of the angular range of each point in the exposure period is calculated, and the average is obtained to obtain weights:
  • step 403 the exposure start time is controlled based on the jitter prediction signal and the exposure duration.
  • adjusting the N frame image according to a jitter prediction signal of each frame image in the N frame image and an exposure duration of each frame image in the N frame image Exposure start time of each frame of image such that the jitter prediction signal of each frame image of the N frame images is at a maximum value and a minimum value within an exposure time period of each frame image of the N frame images The difference is the smallest.
  • the jitter prediction signal according to each frame image in the N frame image, the exposure duration of each frame image in the N frame image, and the hardware extension of the camera device Adjusting the exposure of each frame image in the N frame image a light start time such that a difference between a maximum value and a minimum value of a jitter prediction signal of each of the N frames of images in an exposure time of each of the N frames of images is minimized, wherein
  • the hardware delay of the camera device is the difference between the time at which the sensor detects the value and the time at which the processor calculates the completion.
  • Hardware delays vary depending on the device's specifications, including the time required for sensor detection, the time required to report to the processor, and the processor's computation time.
  • the method provided by the embodiment of the present invention can filter out the target image according to the output of the inertial sensor, align the target image based on the mutual position offset of the target image, and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused by The image is blurred to enhance the user's photo experience.
  • FIG. 5 is a structural block diagram of an apparatus for anti-shake photographing according to an embodiment of the present invention.
  • the apparatus includes:
  • the acquiring unit 51 is configured to acquire an output signal of at least one inertial sensor corresponding to each frame image in the N frame image, N ⁇ 2;
  • the jitter amplitude value calculation unit 52 is configured to calculate, according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image acquired by the acquiring unit 51, a jitter amplitude of each frame image in the N frame image. value;
  • the target image selecting unit 53 is configured to select a K frame target image according to the jitter amplitude value of each frame image in the N frame image calculated by the jitter amplitude value calculating unit 52, 2 ⁇ K ⁇ N;
  • a mutual position offset calculating unit 54 configured to calculate a mutual position offset of the K frame target image
  • the final image generating unit 55 is configured to align the K-frame target image according to the mutual positional offset of the K-frame target image calculated by the mutual position offset calculating unit 54 and synthesize the aligned K-frame target image to generate The final image.
  • the jitter amplitude value calculation unit 52 may specifically include: a filter processing module 61, an integration processing module 62, and a calculation module 63, where the filter processing module 61 is used to acquire the acquisition unit 51.
  • the output signal of the at least one inertial sensor corresponding to each frame image in the N frame image is subjected to filtering processing;
  • the integration processing module 62 is configured to perform an integration process on the output signal of the filter processing module 61;
  • the calculation module 63 is configured to calculate a jitter amplitude value of each frame image in the N frame image according to an output signal of the integration processing module 62.
  • the calculating module 63 may specifically generate the jitter of each frame image in the N frame image according to the difference between the maximum value and the minimum value of the output signal of the integration processing module 62. Amplitude value.
  • the calculating module 63 may specifically determine an absolute value of a ratio of a difference between adjacent sample point signal values and a time interval of adjacent sampling points according to an output signal of the integration processing module 62.
  • the average value of the jitter amplitude value F i of each of the N frames of images is generated:
  • i represents the frame number
  • ⁇ i represents the number of sampling points of the ith frame
  • t i, j represents the jth sampling time of the ith frame
  • x i, j represents the ith frame j sample point signal values.
  • the calculating module 63 may specifically generate the sequence H i according to the output signal of the integration processing module 62:
  • characteristic parameters of the sequence H i the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
  • the calculating module 63 may specifically generate the sequence A i according to the output signal of the integration processing module 62:
  • the peaks and troughs of the search sequence A i are generated, and the jitter amplitude values of each of the N frames of images are generated based on the difference between the peak points and the adjacent valley points.
  • i represents the frame number
  • ⁇ i represents the number of sampling points of the ith frame
  • t i,j represents the jth sampling time of the ith frame
  • x i,j Indicates the value of the jth sample point signal of the ith frame.
  • the target image selecting unit 53 may specifically sort the jitter amplitude values of each frame image in the N frame image, and take the first K corresponding sequences in order from small to large.
  • the K frame image is used as the K frame target image.
  • the mutual position offset calculating unit 54 is specifically configured to calculate the K frame target image according to an output signal of at least one inertial sensor corresponding to each frame image in the N frame image acquired by the acquiring unit 51.
  • Mutual positional offset or, an image detection algorithm is used to extract feature points from the K-frame target image, and mutual positional offsets of the feature points in the K-frame target image are calculated.
  • the at least one inertial sensor includes at least one of an angular velocity sensor and an acceleration sensor.
  • the anti-shake photographing device further includes an exposure start time control unit 71 for controlling an exposure start time of each frame image in the N-frame image.
  • the exposure start time control unit 71 includes a detection module 81, a generation module 82, and a control module 83.
  • the detecting module 81 is configured to detect an output signal of at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image of the N frame image; and the generating module 82 is configured to detect according to the detecting module.
  • Each of the N frames of images corresponds to an exposure before the start of the exposure
  • the output signal of the at least one inertial sensor within the preset time period generates a jitter prediction signal of each frame image in the N frame image
  • the control module 83 is configured to use each frame in the N frame image generated by the generation module
  • the exposure timing of the image of the jitter prediction signal of the image and each of the N frames of images controls the exposure start time of each of the N frames of images.
  • the generating module 82 is specifically configured to: output according to at least one inertial sensor in a preset period before the start of exposure corresponding to each frame image in the N frame image a signal, a weight of each frequency component, and an exposure duration of each of the N frames of images to generate a jitter prediction signal for each of the N frames of images, the weights of the respective frequency components being used to evaluate each The degree to which the output signal of the inertial sensor of the frequency component affects the imaging.
  • control module 83 is specifically configured to: according to the jitter prediction signal of each frame image in the N frame image and each frame image in the N frame image.
  • the exposure duration adjusts an exposure start time of each of the N frames of images such that an exposure prediction signal of each of the N frames of images is exposed in each of the N frames of images
  • the difference between the maximum and minimum values in the duration is minimum.
  • the device provided by the embodiment of the present invention may filter out a target image according to an output of the inertial sensor, and align the target image based on mutual position offset of the target image and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused by The image is blurred to enhance the user's photo experience.
  • FIG. 6 is a schematic structural diagram of a camera device according to an embodiment of the present invention.
  • the camera device may be a digital camera, a digital camera, a mobile phone with a built-in camera, and a personal digital assistant with a built-in camera (Personal) Digital Assistant, PDA for short.
  • PDA Personal Digital Assistant
  • it generally includes at least one processor (e.g., a CPU) and at least one inertial sensor.
  • the structure of the photographic apparatus shown in FIG. 6 does not constitute a limitation on an electronic apparatus, and the photographic apparatus may include more or less components than those illustrated, or may combine some components, or Different parts are arranged.
  • the camera device comprises:
  • At least one inertial sensor 601 is configured to detect jitter of the camera device corresponding to each frame image in the N frame image, N ⁇ 2;
  • the processor 602 is configured to calculate, according to an output signal of the at least one inertial sensor 601, a jitter amplitude value of each frame image in the N frame image; and a jitter amplitude value according to each frame image in the N frame image. Selecting a K-frame target image, 2 ⁇ K ⁇ N; calculating a mutual positional offset of the K-frame target image; aligning the K-frame target image according to the mutual positional offset of the K-frame target image and synthesizing the aligned objects The K frame target image is described to generate a final image.
  • Communication bus 603 is used to implement connection communication between processor 602 and at least one inertial sensor 601.
  • the processor 602 is specifically configured to:
  • a jitter amplitude value of each of the N frames of images is calculated based on the filtering process and the integrated processed signal.
  • the processor 602 is further configured to:
  • a jitter amplitude value of each of the N frames of images is generated based on a difference between a maximum value and a minimum value of the filter processed and integrated processed signals.
  • the processor 602 is further configured to:
  • i represents the frame number
  • ⁇ i represents the number of sampling points of the ith frame
  • t i, j represents the jth sampling time of the ith frame
  • x i, j represents the ith frame j sample point signal values.
  • the processor 602 is further configured to:
  • characteristic parameters of the sequence H i the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
  • the processor 602 is further configured to:
  • the peaks and troughs of the search sequence A i are generated, and the jitter amplitude values of each of the N frames of images are generated based on the difference between the peak points and the adjacent valley points.
  • i represents the frame number
  • ⁇ i represents the number of sampling points of the ith frame
  • t i,j represents the jth sampling time of the ith frame
  • x i,j Indicates the value of the jth sample point signal of the ith frame.
  • the processor 602 is specifically configured to: sort the jitter amplitude values of each frame image in the N frame image, and take the first K corresponding K frame images in order from small to large.
  • the K frame target image is specifically configured to: sort the jitter amplitude values of each frame image in the N frame image, and take the first K corresponding K frame images in order from small to large. The K frame target image.
  • the at least one inertial sensor comprises an angular velocity sensor and At least one of the speed sensors.
  • the processor 602 is specifically configured to: calculate a mutual position offset of the K frame target image according to an output signal of the at least one inertial sensor 601 corresponding to each frame image in the N frame image; Alternatively, feature points are extracted from the K-frame target image using an image detection algorithm, and mutual positional offsets of the feature points in the K-frame target image are calculated.
  • the processor 602 is further configured to: acquire at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image in the N frame image Outputting a signal; generating, according to an output signal of the at least one inertial sensor in a preset period before the start of exposure corresponding to each frame image in the N frame image, a jitter prediction signal of each frame image in the N frame image; And an exposure start time of each of the N frames of images is controlled according to a jitter prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images.
  • the processor 602 is specifically configured to: according to at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image in the N frame image
  • the output signal, the weight of each frequency component, and the exposure duration of each of the N frames of images generate a jitter prediction signal for each of the N frames of images.
  • the weight of each frequency component is used to evaluate the degree of influence of the output signal of the inertial sensor of each frequency component on imaging.
  • the processor 602 is further configured to: according to the jitter prediction signal of each frame image in the N frame image and each frame image in the N frame image
  • the exposure duration adjusts an exposure start time of each of the N frames of images such that a jitter prediction signal of each of the N frames of images is in each of the N frames of images
  • the difference between the maximum and minimum values within the exposure duration is minimal.
  • the camera device provided by the embodiment of the present invention can filter out the target image according to the output of the inertial sensor, align the target image based on the mutual positional offset of the target image, and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused.
  • the image is blurred to enhance the user's photo experience.
  • the above program can be stored in a computer readable storage medium, and when executed, the program can include the flow of an embodiment of each method as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

Embodiments of the present invention provide an anti-jitter photographing method and apparatus, and a camera device. The method comprises: obtaining an output signal of at least one inertial sensor corresponding to each of N frame images, wherein N≥2; calculating a jitter amplitude value of each of the N frame images according to the output signal of the at least one inertial sensor corresponding to each of the N frame images; selecting K frame target images according to the jitter amplitude value of each of the N frame images, wherein 2≤K≤N; calculating position offsets of the K frame target images relative to each other; aligning the K frame target images according to the position offsets of the K frame target images relative to each other, and combining the aligned K frame target images to generate a final image. The method, apparatus, and camera device of the embodiments of the present invention can effectively suppress image blurring caused by jitter, thereby improving the photographing experience of users.

Description

一种防抖拍照方法、装置及照相设备Anti-shake photographing method, device and camera device 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种防抖拍照方法、装置及照相设备。The present invention relates to the field of communications technologies, and in particular, to an anti-shake photographing method, apparatus, and camera device.
背景技术Background technique
随着卡片机、单反相机、微单相机,以及带摄像功能的智能手机、平板电脑等的普及,越来越多的人享受到了拍照的乐趣。对于大多数非专业摄影爱好者而言,在拍照时,经常因为按下快门时手的抖动,而导致成像模糊,这给对照片清晰度有一定要求的用户带来了困扰。With the popularity of card machines, SLR cameras, micro-cameras, and smartphones and tablets with camera functions, more and more people are enjoying the fun of taking pictures. For most non-professional photographers, when shooting, often the image is blurred due to the shaking of the hand when the shutter is pressed, which causes problems for users who have certain requirements on the clarity of the photo.
发明内容Summary of the invention
本发明实施例提供一种防抖拍照方法、装置及照相设备,能够有效抑制抖动造成的图像模糊,提升用户拍照体验。The embodiment of the invention provides an anti-shake photographing method, a device and a camera device, which can effectively suppress image blur caused by shaking and improve the user's photographing experience.
本发明一个实施例提供了一种防抖拍照方法,包括:获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号,N≥2;根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;计算所述K帧目标图像的相互位置偏移;根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。An embodiment of the present invention provides an anti-shake photographing method, including: acquiring an output signal of at least one inertial sensor corresponding to each frame image in an N-frame image, N≥2; according to each of the N-frame images And calculating, by the output signal of the at least one inertial sensor corresponding to the frame image, a jitter amplitude value of each frame image in the N frame image; and selecting a K frame target image according to the jitter amplitude value of each frame image in the N frame image, 2≤K≤N; calculating a mutual positional shift of the K-frame target image; aligning the K-frame target image according to mutual positional shift of the K-frame target image and synthesizing the aligned K-frame target image to Generate the final image.
本发明另一个实施例提供了一种防抖拍照的装置,包括:获取单元,用于获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号,N≥2;抖动幅度值计算单元,用于根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;目标图像选取单元,用于根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;相互位置偏移计算单元,用于计算所述K帧目标图像的相 互位置偏移;最终图像生成单元,用于根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。Another embodiment of the present invention provides an apparatus for anti-shake photographing, comprising: an acquiring unit, configured to acquire an output signal of at least one inertial sensor corresponding to each frame image in an N-frame image, N≥2; a calculating unit, configured to calculate, according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image, a jitter amplitude value of each frame image in the N frame image; a target image selecting unit, configured to: Selecting a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2≤K≤N; a mutual position offset calculation unit, configured to calculate a phase of the K frame target image The mutual image offset unit is configured to align the K frame target image according to the mutual positional offset of the K frame target image and synthesize the aligned K frame target image to generate a final image.
本发明另一个实施例提供了一种照相设备,包括:至少一个惯性传感器,用于检测N帧图像中的每一帧图像对应的所述照相设备的抖动,N≥2;处理器,用于根据所述至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;计算所述K帧目标图像的相互位置偏移;根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。Another embodiment of the present invention provides a camera device, including: at least one inertial sensor for detecting jitter of the camera device corresponding to each frame image in an N frame image, N≥2; a processor for Calculating a jitter amplitude value of each frame image in the N frame image according to an output signal of the at least one inertial sensor; selecting a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2 ≤ K ≤ N; calculating a mutual positional shift of the K-frame target image; aligning the K-frame target image according to a mutual positional shift of the K-frame target image and synthesizing the aligned K-frame target image to generate The final image.
从本发明实施例提供的以上技术方案可以看出,本发明实施例的方法、装置和照相设备可以有效抑制抖动造成的图像模糊,提升用户拍照体验。It can be seen from the above technical solutions provided by the embodiments of the present invention that the method, the device, and the camera device of the embodiments of the present invention can effectively suppress image blur caused by jitter and improve the user's photographing experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1是本发明一个实施例提供的一种防抖拍照方法的流程图;1 is a flowchart of an anti-shake photographing method according to an embodiment of the present invention;
图2是本发明一个实施例提供的一种获取角度抖动的方法流程图;2 is a flowchart of a method for acquiring angle jitter according to an embodiment of the present invention;
图3是本发明一个实施例提供的一种获取移位抖动的方法流程图;FIG. 3 is a flowchart of a method for acquiring shift jitter according to an embodiment of the present invention; FIG.
图4是本发明本发明一个实施例提供的一种控制曝光开始时间的方法流程图;4 is a flow chart of a method for controlling an exposure start time according to an embodiment of the present invention;
图5是本发明本发明一个实施例提供的一种防抖拍照的装置的组成框图; FIG. 5 is a structural block diagram of an apparatus for anti-shake photographing according to an embodiment of the present invention; FIG.
图6是本发明本发明一个实施例提供的一种照相设备的结构示意图;6 is a schematic structural diagram of a camera device according to an embodiment of the present invention;
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1为本发明一个实施例提供的一种防抖拍照方法的流程图,本实施例提供的方法可以应用于数字相机、数字影像记录器、智能型手机、监视器及其它具有照相功能的电子产品中,本发明实施例不做限定。请参照图1,包括如下步骤:FIG. 1 is a flowchart of an anti-shake photographing method according to an embodiment of the present invention. The method provided in this embodiment can be applied to a digital camera, a digital image recorder, a smart phone, a monitor, and other electronic functions with camera functions. The embodiments of the present invention are not limited in the product. Please refer to Figure 1, including the following steps:
步骤101:获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号。Step 101: Acquire an output signal of at least one inertial sensor corresponding to each frame image in the N frame image.
目前,具有拍照功能的照相设备有很多种,例如:数字照相机、数字摄像机、具有内置照相机的手机以及具有内置照相机的个人数字助理(Personal Digital Assistant,简称PDA)等等。上述照相设备通常内置惯性传感器,用于测量加速度或角速度。惯性传感器包括加速度计和角速度传感器(例如陀螺仪)以及它们的单、双、三轴组合IMU(Inertial Measurement Unit,惯性测量单元)等。At present, there are many kinds of camera devices having a photographing function, such as a digital camera, a digital video camera, a mobile phone with a built-in camera, and a Personal Digital Assistant (PDA) having a built-in camera. The above camera device usually has an inertial sensor built in to measure acceleration or angular velocity. Inertial sensors include accelerometers and angular velocity sensors (such as gyroscopes) and their single, dual, and triaxial combination IMUs (Inertial Measurement Units).
对多帧图像数据进行合成可以减少由通过时分摄影获得的多帧图像数据中的每一个显示的多帧图像的相互位置偏移。本实施例中通过获取N帧图像中的每一帧图像对应的抖动幅度值,从中筛选出抖动幅度较小的K帧图像合成一张相对清晰的图像,其中,N≥2,2≤K≤N。Synthesizing the multi-frame image data can reduce the mutual positional shift of the multi-frame images displayed by each of the multi-frame image data obtained by time-division photography. In this embodiment, by acquiring the jitter amplitude value corresponding to each frame image in the N frame image, a K frame image with a small jitter amplitude is selected and a relatively clear image is synthesized, wherein N≥2, 2≤K≤ N.
可选地,在本实施例中,所述至少一个惯性传感器包括角速度传感器和加速度传感器中的至少一个。Optionally, in the embodiment, the at least one inertial sensor comprises at least one of an angular velocity sensor and an acceleration sensor.
步骤102:计算N帧图像中的每一帧图像的抖动幅度值。Step 102: Calculate a jitter amplitude value of each frame image in the N frame image.
可选地,在本实施例中,所述至少一个惯性传感器的输出信号通 过A/D转换器转换成数字信号。Optionally, in this embodiment, the output signal of the at least one inertial sensor is Converted to a digital signal by an A/D converter.
惯性传感器自身、载体运动、外界干扰、安装工艺等诸多因素都会给惯性传感器的输出信号带来零点漂移误差,由于各种原因的限制,这种零点漂移往往是不可避免的。Inertial sensor itself, carrier motion, external interference, installation process and many other factors will bring zero drift error to the output signal of the inertial sensor. Due to various reasons, this zero drift is often unavoidable.
在本实施例的一个可选实施方式中,A/D转换器的输出通过数字高通滤波器的处理操作来降低零点漂移带来的误差。In an alternative embodiment of the present embodiment, the output of the A/D converter is processed by a digital high pass filter to reduce errors due to zero drift.
在本实施例的另一个可选实施方式中,A/D转换器的输出通过卡尔曼滤波器的处理操作来降低零点漂移带来的误差。经过滤波处理后的信号再通过积分处理操作计算角度抖动或移位抖动。In another alternative embodiment of the present embodiment, the output of the A/D converter is subjected to processing operations of the Kalman filter to reduce errors due to zero drift. The filtered signal is then subjected to an integral processing operation to calculate angular jitter or shift jitter.
若惯性传感器为角速度传感器,则惯性传感器的输出信号为角速度信号,结合图2所示的流程图解释本实施例中执行的获取角度抖动的处理过程。If the inertial sensor is an angular velocity sensor, the output signal of the inertial sensor is an angular velocity signal, and the process of acquiring the angle jitter performed in the present embodiment is explained in conjunction with the flowchart shown in FIG. 2.
在步骤201中,对角速度传感器的输出信号进行A/D转换,并且A/D转换后的结果作为ANG_VEL。In step 201, the output signal of the angular velocity sensor is A/D converted, and the result of the A/D conversion is taken as ANG_VEL.
在步骤202中,对步骤201的计算结果执行高通滤波运算(HPF),以降低零点漂移带来的误差,滤波后的结果作为ANG_VEL_HPF。In step 202, a high-pass filtering operation (HPF) is performed on the calculation result of step 201 to reduce the error caused by the zero-point drift, and the filtered result is taken as ANG_VEL_HPF.
在步骤203中,对步骤202的计算结果执行积分运算,积分结果作为DEG,DEG是第一抖动角位移信号。In step 203, an integration operation is performed on the calculation result of step 202, the integration result is DEG, and DEG is the first jitter angle displacement signal.
可选地,在本实施例中,当所述至少一个惯性传感器的输出信号包括角速度信号和加速度信号两种时,如果角速度信号和加速度信号数据采集时间间隔不均匀,则在步骤202之前还包括对步骤201的计算结果执行插值运算,插值运算可以采用线性插值或多项式插值等方法,本发明实施例不做限定。Optionally, in this embodiment, when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, if the angular velocity signal and the acceleration signal data acquisition time interval are not uniform, the method further includes before step 202. The interpolation result is performed on the calculation result of the step 201. The interpolation operation may be performed by a method such as a linear interpolation or a polynomial interpolation, which is not limited in the embodiment of the present invention.
若惯性传感器为加速度计,则惯性传感器的输出信号为加速度信号,结合图3所示的流程图解释本实施例中执行的获取移位抖动的处理过程。If the inertial sensor is an accelerometer, the output signal of the inertial sensor is an acceleration signal, and the process of acquiring the shift jitter performed in the present embodiment is explained in conjunction with the flowchart shown in FIG.
在步骤301中,对加速度计的输出信号进行A/D转换,并且A/D转换后的结果作为ACC。In step 301, the output signal of the accelerometer is A/D converted, and the result of the A/D conversion is taken as ACC.
在步骤302中,对步骤301的计算结果执行高通滤波运算,以降低零点漂移带来的误差。 In step 302, a high-pass filtering operation is performed on the calculation result of step 301 to reduce the error caused by the zero point drift.
在步骤303中,对步骤302的计算结果执行积分运算,积分结果是表示移位抖动的速度V的信号。In step 303, an integration operation is performed on the calculation result of step 302, and the integration result is a signal indicating the speed V of the shift jitter.
在步骤304中,对作为输入的移位抖动的速度V的信号执行高通滤波运算,以降低零点漂移带来的误差。In step 304, a high pass filtering operation is performed on the signal of the velocity V as the input shift jitter to reduce the error caused by the zero point drift.
在步骤305中,对步骤304的计算结果执行积分运算,积分结果作为DIS,DIS是第一抖动移位信号。In step 305, an integration operation is performed on the calculation result of step 304, and the integration result is DIS, and DIS is the first jitter shift signal.
可选地,在本实施例中,当所述至少一个惯性传感器的输出信号包括角速度信号和加速度信号两种时,如果角速度信号和加速度信号数据采集时间间隔不均匀,则在步骤302之前还包括对步骤301的计算结果执行插值运算,插值运算可以采用线性插值或多项式插值等方法,本发明实施例不做限定。Optionally, in this embodiment, when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, if the angular velocity signal and the acceleration signal data acquisition time interval are not uniform, the method further includes before step 302. The interpolation operation is performed on the calculation result of the step 301, and the interpolation operation may be performed by a method such as linear interpolation or polynomial interpolation, which is not limited in the embodiment of the present invention.
可选地,在本实施例中,当所述至少一个惯性传感器的输出信号包括角速度信号和加速度信号两种时,可以根据角度抖动、移位抖动和物距X之间的关系将第一抖动移位信号DIS转换为第一转动信号ROT(其中,ROT=arcsin(DIS/X)),再将第一转动信号ROT与第一抖动角位移信号DEG进行矢量合成,得到第一目标旋转信号DEG_TARGET,根据第一目标旋转信号DEG_TARGET计算N帧图像中的每一帧图像的抖动幅度值。Optionally, in this embodiment, when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, the first jitter may be according to a relationship between the angle jitter, the shift jitter, and the object distance X. The shift signal DIS is converted into a first rotation signal ROT (where ROT=arcsin(DIS/X)), and then the first rotation signal ROT is vector-combined with the first dither angular displacement signal DEG to obtain a first target rotation signal DEG_TARGET And calculating a jitter amplitude value of each frame image in the N frame image according to the first target rotation signal DEG_TARGET.
对所述至少一个惯性传感器的输出信号进行A/D转换、滤波处理和积分处理之后,可以根据滤波处理和积分处理后的信号(例如,上述的DIS、DEG)计算N帧图像中的每一帧图像的抖动幅度值。After performing A/D conversion, filtering processing, and integration processing on the output signals of the at least one inertial sensor, each of the N frames of images may be calculated according to the filtering processing and the integrated processed signals (eg, DIS, DEG described above) The jitter amplitude value of the frame image.
在本实施例的一个可选实施方式中,可以根据滤波处理和积分处理后的信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。In an optional implementation manner of this embodiment, the jitter amplitude value of each frame image in the N frame image may be generated according to a difference between the maximum value and the minimum value of the filtering process and the integrated processed signal.
在本实施例的另一个可选实施方式中,可以根据滤波处理和积分处理后的信号相邻采样点信号值的差值与相邻采样点的时间间隔之比的绝对值的平均值生成所述N帧图像中的每一帧图像的抖动幅度值FiIn another optional implementation manner of this embodiment, the average value of the absolute value of the ratio of the difference between the signal value of the adjacent sample point and the time interval of the adjacent sample point after the filtering process and the integration process may be generated. The jitter amplitude value F i of each frame image in the N frame image:
Figure PCTCN2015093923-appb-000001
Figure PCTCN2015093923-appb-000001
其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
在本实施例的另一个可选实施方式中,可以根据滤波处理和积分处理后的信号生成序列HiIn another optional implementation manner of this embodiment, the sequence H i may be generated according to the filtering process and the integrated processed signal:
Figure PCTCN2015093923-appb-000002
Figure PCTCN2015093923-appb-000002
计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度值;Using the feature parameter as a jitter amplitude value of each frame image in the N frame image;
其中,among them,
Figure PCTCN2015093923-appb-000003
Figure PCTCN2015093923-appb-000003
i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
在本实施例的另一个可选实施方式中,根据滤波处理和积分处理后的信号生成序列AiIn another optional embodiment of the embodiment, the sequence A i is generated according to the filtering process and the integrated processed signal:
Figure PCTCN2015093923-appb-000004
Figure PCTCN2015093923-appb-000004
其中,among them,
Figure PCTCN2015093923-appb-000005
Figure PCTCN2015093923-appb-000005
x′i,j=xi,j-xi,1 x' i,j =x i,j -x i,1
其中,i代表帧序号,1≤i≤N,2≤k≤j,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值,x′i,j表示xi,j与初始采样点信号值xi,1的差值,以此消除初始 点对结果的影响。Where i represents the frame number, 1≤i≤N, 2≤k≤j, η i represents the number of sampling points of the ith frame, and t i,j represents the jth sampling time of the ith frame, x i,j Indicates the jth sample point signal value of the ith frame, x' i,j represents the difference between x i,j and the initial sample point signal value x i,1 , thereby eliminating the effect of the initial point on the result.
A(xi,j)表示第i帧ANG_VEL_HPF信号从ti,1到ti,j的积分值,本实施例中,ANG_VEL_HPF信号采样点信号值xi,j与初始采样点信号值xi,1作差以消除初始点对结果的影响,积分值采用梯形积分方法计算。A(x i,j ) represents an integral value of the ith ANG_VEL_HPF signal from t i,1 to t i,j in the i-th frame. In this embodiment, the ANG_VEL_HPF signal sample point signal value x i,j and the initial sample point signal value x i , 1 is used to eliminate the influence of the initial point on the result, and the integral value is calculated by the trapezoidal integral method.
搜索序列Ai的波峰和波谷,假设序列A(xi,j)的波峰个数为μ:Search for the peaks and troughs of the sequence A i , assuming that the number of peaks in the sequence A(x i,j ) is μ:
当μ=0时,F(xi)=max(A(xi,j))-min(A(xi,j));When μ=0, F(x i )=max(A(x i,j ))-min(A(x i,j ));
其中,max(A(xi,j))表示A(xi,j)的最大值,min(A(xi,j))表示A(xi,j)的最小值。Where max(A(x i,j )) represents the maximum value of A(x i,j ), and min(A(x i,j )) represents the minimum value of A(x i,j ).
当μ≥1时,记波峰所在位置为Lh,μ≥h≥1,根据波峰点和相邻的波谷点之间的差值生成所述N帧图像中的每一帧图像的抖动幅度值;When μ≥1, the position of the record peak is L h , μ≥h≥1, and the jitter amplitude value of each frame image in the N frame image is generated according to the difference between the peak point and the adjacent valley point. ;
当μ=1时,
Figure PCTCN2015093923-appb-000006
When μ=1,
Figure PCTCN2015093923-appb-000006
当μ≥2时,计算第k个波峰与相邻两个波谷的差值
Figure PCTCN2015093923-appb-000007
When μ≥2, calculate the difference between the kth peak and the adjacent two troughs
Figure PCTCN2015093923-appb-000007
Figure PCTCN2015093923-appb-000008
Figure PCTCN2015093923-appb-000008
第i帧的抖动幅度值
Figure PCTCN2015093923-appb-000009
Jitter amplitude value of the ith frame
Figure PCTCN2015093923-appb-000009
可选地,在本实施例中,当所述至少一个惯性传感器的输出信号包括角速度信号和加速度信号两种时,根据第一目标旋转信号DEG_TARGET计算N帧图像中的每一帧图像的抖动幅度值的方法与上述的根据滤波处理和积分处理后的信号(例如,DIS、DEG)计算N帧图像中的每一帧图像的抖动幅度值的方法相同。Optionally, in this embodiment, when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, calculating a jitter amplitude of each frame image in the N frame image according to the first target rotation signal DEG_TARGET The method of the value is the same as the above-described method of calculating the jitter amplitude value of each frame image in the N frame image based on the filtering process and the integrated processed signal (for example, DIS, DEG).
步骤103:根据N帧图像中的每一帧图像的抖动幅度值选取K 帧目标图像。Step 103: Select K according to the jitter amplitude value of each frame image in the N frame image. Frame target image.
在本实施例的一个可选实施方式中,将N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像为目标图像,其中,N≥K≥2。In an optional implementation manner of this embodiment, the jitter amplitude values of each frame image in the N frame image are sorted, and the first K corresponding K frame images are taken as the target image in order from small to large. N≥K≥2.
在本实施例的另一个可选实施方式中,计算N帧图像中的每一帧图像的抖动幅度值与平均值的差值的绝对值,然后,对以上得到的差值的绝对值进行排序,按从小到大的顺序取前K个对应的K帧图像为目标图像,其中,N≥K≥2。In another optional implementation manner of this embodiment, the absolute value of the difference between the jitter amplitude value and the average value of each frame image in the N frame image is calculated, and then the absolute values of the difference values obtained above are sorted. The first K corresponding K frame images are taken as the target image in order from small to large, where N≥K≥2.
步骤104:计算所述K帧目标图像的相互位置偏移。Step 104: Calculate a mutual position offset of the K frame target image.
连续摄影中,由于人手的抖动,即使各帧的间隔时间较短,其间被摄体在各帧图像间也可能产生位置偏移。In continuous shooting, due to the shaking of the human hand, even if the interval time of each frame is short, the subject may have a positional shift between the frames of the frame.
在本实施例的一个可选实施方式中,可以根据所述至少一个惯性传感器的输出信号计算表示所述K帧目标图像的相互位置偏移的运动矢量。该运动矢量包括多个分量,每个分量是时间变化函数或时间数列,用于表示图像的平移和/或旋转的分量。例如,可以选取所述N帧图像中的第一帧图像作为基准帧图像,根据所述K帧目标图像中的每一帧图像对应的所述至少一个惯性传感器的输出信号和基准帧图像对应的所述至少一个惯性传感器的输出信号计算所述K帧目标图像中的每一帧图像相对于基准帧图像的位置偏移,进而得到所述K帧目标图像的相互位置偏移。In an optional implementation manner of this embodiment, a motion vector indicating a mutual positional offset of the K-frame target image may be calculated according to an output signal of the at least one inertial sensor. The motion vector includes a plurality of components, each component being a time varying function or a time series for representing a component of translation and/or rotation of the image. For example, a first frame image of the N frame image may be selected as a reference frame image, and an output signal of the at least one inertial sensor corresponding to each frame image in the K frame target image and a reference frame image are corresponding. The output signal of the at least one inertial sensor calculates a positional offset of each frame image in the K frame target image with respect to the reference frame image, thereby obtaining a mutual positional offset of the K frame target image.
可选地,还可以选取所述筛选出来的K帧目标图像中的任一帧图像作为基准帧图像,根据所述K帧目标图像中的每一帧图像对应的所述至少一个惯性传感器的输出信号和基准帧图像对应的所述至少一个惯性传感器的输出信号计算所述K帧目标图像中的每一帧图像相对于基准帧图像的位置偏移,进而得到所述K帧目标图像的相互位置偏移。Optionally, any one of the filtered K frame target images may be selected as a reference frame image, and the output of the at least one inertial sensor corresponding to each frame image in the K frame target image is selected. And outputting, by the signal, the output signal of the at least one inertial sensor corresponding to the reference frame image, calculating a position offset of each frame image in the K frame target image with respect to the reference frame image, thereby obtaining a mutual position of the K frame target image Offset.
在本实施例的另一个可选实施方式中,可通过使用图像检测算法(例如,Harris角点检测算法、最小同值分割吸收核(SUSAN)算法等)从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移,将所述K帧目标图像中的所述特征点 的相互位置偏移作为所述K帧目标图像的相互位置偏移。In another alternative embodiment of this embodiment, feature points may be extracted from the K-frame target image by using an image detection algorithm (eg, a Harris corner detection algorithm, a minimum equivalence segmentation absorption kernel (SUSAN) algorithm, etc.) Calculating a mutual positional offset of the feature points in the K-frame target image, the feature points in the K-frame target image The mutual positional offset is the mutual positional offset of the K-frame target image.
步骤105:根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。Step 105: Align the K frame target image according to mutual positional offset of the K frame target image and synthesize the aligned K frame target image to generate a final image.
在本实施例的一个可选实施方式中,根据步骤104中获取的所述K帧目标图像中的每一帧图像相对于基准帧图像的位置偏移,得到所述K帧目标图像的相互位置偏移,重新设置所述K帧目标图像中的每一帧图像的位置以对齐所述K帧目标图像。在本实施例的另一个可选实施方式中,根据步骤104中获取的所述K帧目标图像中的所述特征点的表示相互位置偏移的运动矢量,重新设置所述K帧目标图像中的每一帧图像中的所述特征点的位置,将所述K帧目标图像中的每一帧图像中的所述特征点的各像素点进行重叠以对齐所述K帧目标图像。In an optional implementation manner of this embodiment, the mutual position of the K frame target image is obtained according to the positional offset of each frame image in the K frame target image acquired in step 104 with respect to the reference frame image. Offset, resetting the position of each frame image in the K frame target image to align the K frame target image. In another optional implementation manner of the embodiment, the K-frame target image is reset according to the motion vector indicating the mutual positional deviation of the feature points in the K-frame target image acquired in step 104. The position of the feature point in each frame image is overlapped with each pixel point of the feature point in each frame image in the K frame target image to align the K frame target image.
在本实施例的一个可选实施方式中,对所述K帧目标图像执行对齐操作后,可以根据加权平均法对执行对齐操作后的所述K帧目标图像进行合成,即,对执行对齐操作后的所述K帧目标图像中的相应像素值求和取平均值以生成最终图像,例如,可以对执行对齐操作后的所述K帧目标图像的各像素点的颜色值和亮度值求和取平均值以生成最终图像,颜色值包括像素点的红、绿、蓝通道的颜色值。In an optional implementation manner of this embodiment, after performing an alignment operation on the K frame target image, the K frame target image after performing the alignment operation may be synthesized according to a weighted average method, that is, performing an alignment operation The corresponding pixel values in the K-frame target image are summed and averaged to generate a final image, for example, the color value and the luminance value of each pixel of the K-frame target image after the alignment operation is performed may be summed The average is taken to generate the final image, and the color values include the color values of the red, green, and blue channels of the pixel.
可选地,在本实施例中,在步骤101之前还包括对N帧图像中的每一帧图像曝光开始时间的控制流程,以使得每一帧图像曝光过程中照相设备的抖动最小。现结合图4所示的流程图解释本实施例中执行的曝光开始时间控制流程。Optionally, in the embodiment, before step 101, a control flow of the exposure start time of each frame of the N frame images is further included to minimize the jitter of the camera device during each frame image exposure. The exposure start time control flow executed in the present embodiment will now be explained in conjunction with the flowchart shown in FIG.
在步骤401中,检测N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号。In step 401, an output signal of at least one inertial sensor within a preset period of time before the start of exposure corresponding to each frame image of the N frame image is detected.
在本实施例中,曝光开始前的预设时段可以包括取景、对焦、点击快门的时间,例如可以设置为曝光开始前两秒,本实施例对此不做限定。In this embodiment, the preset time period before the start of the exposure may include the time of framing, focusing, and clicking the shutter. For example, it may be set to two seconds before the start of the exposure, which is not limited in this embodiment.
在步骤402中,生成抖动预测信号。In step 402, a jitter prediction signal is generated.
在本实施例中,根据步骤401获得的N帧图像中的每一帧图像曝光开始前一段时间内至少一个惯性传感器的输出信号、各频率成分 的权重和N帧图像中的每一帧图像的曝光时长生成N帧图像中的每一帧图像的抖动预测信号。In this embodiment, at least one inertial sensor output signal and each frequency component are detected for a period of time before the start of each frame image in the N frame image obtained in step 401. The weight and the exposure duration of each frame image in the N-frame image generate a jitter prediction signal for each of the N-frame images.
可选地,在本实施例中,所述惯性传感器包括角速度传感器和加速度传感器中的至少一种,步骤401中检测N帧图像中的每一帧图像对应的曝光开始前的预设时段内的角速度传感器输出的角速度信号后执行步骤201到203的处理流程,得到第二抖动角位移信号DEG_DAT,步骤401中检测N帧图像中的每一帧图像对应的曝光开始前的预设时段内的加速度传感器输出的加速度信号后执行步骤301到305的处理流程,得到第二抖动移位信号DIS_DAT。Optionally, in this embodiment, the inertial sensor includes at least one of an angular velocity sensor and an acceleration sensor, and in step 401, detecting a preset time period before the start of exposure corresponding to each frame image in the N frame image After the angular velocity signal output by the angular velocity sensor is performed, the processing flow of steps 201 to 203 is performed to obtain a second shake angle displacement signal DEG_DAT, and in step 401, the acceleration in the preset time period before the start of exposure corresponding to each frame image in the N frame image is detected. After the acceleration signal output by the sensor, the processing flow of steps 301 to 305 is performed to obtain the second jitter shift signal DIS_DAT.
可选地,当所述至少一个惯性传感器的输出信号包括角速度信号和加速度信号两种时,可以根据角度抖动、移位抖动和物距X之间的关系将第二抖动移位信号DIS_DAT转换为第二转动信号ROT_DAT(其中,ROT_DAT=arcsin(DIS_DAT/X)),再将第二转动信号ROT_DAT与第二抖动角位移信号DEG_DAT进行矢量合成,得到第二目标旋转信号DEG_TARGET_DAT。Optionally, when the output signal of the at least one inertial sensor includes an angular velocity signal and an acceleration signal, the second jitter shift signal DIS_DAT may be converted into a relationship according to the angle jitter, the shift jitter, and the object distance X. The second rotation signal ROT_DAT (where ROT_DAT=arcsin(DIS_DAT/X)) performs vector synthesis of the second rotation signal ROT_DAT and the second dither angular displacement signal DEG_DAT to obtain a second target rotation signal DEG_TARGET_DAT.
通常,抖动的频率范围为0Hz至15Hz,因此,在本实施例中,抖动角位移信号DEG_DAT和抖动移位信号DIS_DAT经过带通滤波器滤波,可选地,在本实施例中,带通滤波器的频率范围为0Hz至15Hz。Generally, the frequency of the jitter ranges from 0 Hz to 15 Hz. Therefore, in the present embodiment, the jitter angular displacement signal DEG_DAT and the jitter shift signal DIS_DAT are filtered by a band pass filter, optionally, in the present embodiment, band pass filtering The frequency range of the device is 0Hz to 15Hz.
在很多情况下,角度抖动(DEG_DAT)、移位抖动(DIS_DAT)和第二目标旋转信号(DEG_TARGET_DAT)包含多个频率分量,并且不同的频率分量对成像的影响是不同的。因此,在本实施例中,对于给定的曝光时长Δt,当将要生成抖动预测信号时,对每一频率分量对成像的影响程度进行评估,并且根据评估结果而分配的权重来组合生成抖动预测信号。在此,分配权重意味着,当组合多个分量以产生组合值时,在执行计算之前,每一分量根据预定准则而乘以某个系数,即,固定了频率和曝光时间,则可以通过查表找到各个频率分量对应的权重,采用加权和的方式生成抖动预测信号。基于角速度传感器输出以及加速度传感器输出中的至少一个来执行成像的影响程度的评估。 In many cases, angular jitter (DEG_DAT), shift jitter (DIS_DAT), and second target rotation signal (DEG_TARGET_DAT) contain multiple frequency components, and the effects of different frequency components on imaging are different. Therefore, in the present embodiment, for a given exposure time length Δt, when the jitter prediction signal is to be generated, the degree of influence of each frequency component on the imaging is evaluated, and the weights assigned according to the evaluation result are combined to generate the jitter prediction. signal. Here, assigning weight means that when a plurality of components are combined to generate a combined value, each component is multiplied by a certain coefficient according to a predetermined criterion, that is, the frequency and the exposure time are fixed, before the calculation is performed, The table finds the weights corresponding to the respective frequency components, and generates a jitter prediction signal by using a weighted sum. The evaluation of the degree of influence of imaging is performed based on at least one of the angular velocity sensor output and the acceleration sensor output.
由于用户抖动可以近似分解为多个幅值和频率不同的正弦波或余弦波,下面以周期为T,振幅为A,初始相位为0的正弦波
Figure PCTCN2015093923-appb-000010
对权重的计算方法作进一步介绍。
Since user jitter can be approximately decomposed into multiple sine or cosine waves of different amplitudes and frequencies, the following sine wave with period T, amplitude A, and initial phase 0
Figure PCTCN2015093923-appb-000010
The method of calculating the weight is further introduced.
权重为曝光时长Δt和周期T的函数,表示为θ(Δt,T)。曝光开始时刻为t,曝光时长为Δt时,f(t)表示曝光时段内转动的角度范围宽度,t∈[0,T]。The weight is a function of the exposure duration Δt and the period T, expressed as θ(Δt, T). When the exposure start time is t and the exposure time is Δt, f(t) represents the angular range width of the rotation in the exposure period, t ∈ [0, T].
Figure PCTCN2015093923-appb-000011
Figure PCTCN2015093923-appb-000011
f(t)与曝光时长Δt有关,由三角函数性质和f(t)的定义可知f(t)是以
Figure PCTCN2015093923-appb-000012
为周期的周期函数,因此只需要计算f(t)在
Figure PCTCN2015093923-appb-000013
上的值,其他区间的值可以根据函数周期性计算得到。
f(t) is related to the exposure time Δt. From the definition of the trigonometric function and the definition of f(t), f(t) is
Figure PCTCN2015093923-appb-000012
Is a periodic function of the period, so only need to calculate f(t) at
Figure PCTCN2015093923-appb-000013
The value above, the value of other intervals can be calculated periodically according to the function.
Figure PCTCN2015093923-appb-000014
时,
when
Figure PCTCN2015093923-appb-000014
Time,
Figure PCTCN2015093923-appb-000015
Figure PCTCN2015093923-appb-000015
Figure PCTCN2015093923-appb-000016
时,
when
Figure PCTCN2015093923-appb-000016
Time,
Figure PCTCN2015093923-appb-000017
Figure PCTCN2015093923-appb-000017
Figure PCTCN2015093923-appb-000018
时,
when
Figure PCTCN2015093923-appb-000018
Time,
Figure PCTCN2015093923-appb-000019
Figure PCTCN2015093923-appb-000019
Figure PCTCN2015093923-appb-000020
时,
when
Figure PCTCN2015093923-appb-000020
Time,
Figure PCTCN2015093923-appb-000021
Figure PCTCN2015093923-appb-000021
当Δt∈(T,+∞)时,When Δt∈(T, +∞),
Figure PCTCN2015093923-appb-000022
Figure PCTCN2015093923-appb-000022
可选地,在本实施例中,还可以在[0,T]上均匀选取N个离散点,计算每一点在曝光时段内转动的角度范围宽度,再求均值得到权重:Optionally, in this embodiment, N discrete points may be uniformly selected on [0, T], the width of the angular range of each point in the exposure period is calculated, and the average is obtained to obtain weights:
Figure PCTCN2015093923-appb-000023
Figure PCTCN2015093923-appb-000023
在步骤403中,根据抖动预测信号和曝光时长控制曝光开始时间。In step 403, the exposure start time is controlled based on the jitter prediction signal and the exposure duration.
在本实施例的一个可选实施方式中,根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小。In an optional implementation manner of this embodiment, adjusting the N frame image according to a jitter prediction signal of each frame image in the N frame image and an exposure duration of each frame image in the N frame image. Exposure start time of each frame of image such that the jitter prediction signal of each frame image of the N frame images is at a maximum value and a minimum value within an exposure time period of each frame image of the N frame images The difference is the smallest.
在本实施例的另一个可选实施方式中,根据所述N帧图像中的每一帧图像的抖动预测信号、所述N帧图像中的每一帧图像的曝光时长和照相设备的硬件延时调节所述N帧图像中的每一帧图像的曝 光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小,其中,照相设备的硬件延时为传感器检测数值的时刻与上报至处理器计算完成的时刻的差值。硬件延时根据器件的规格不同而存在差异,包括传感器检测所需时间、上报至处理器所需时间以及处理器计算时间等。In another optional implementation manner of this embodiment, the jitter prediction signal according to each frame image in the N frame image, the exposure duration of each frame image in the N frame image, and the hardware extension of the camera device Adjusting the exposure of each frame image in the N frame image a light start time such that a difference between a maximum value and a minimum value of a jitter prediction signal of each of the N frames of images in an exposure time of each of the N frames of images is minimized, wherein The hardware delay of the camera device is the difference between the time at which the sensor detects the value and the time at which the processor calculates the completion. Hardware delays vary depending on the device's specifications, including the time required for sensor detection, the time required to report to the processor, and the processor's computation time.
本发明实施例提供的方法可以根据惯性传感器的输出筛选出目标图像,基于目标图像的相互位置偏移来对齐所述目标图像并合成所述目标图像以生成最终图像,因此可以有效抑制抖动造成的图像模糊,提升用户拍照体验。The method provided by the embodiment of the present invention can filter out the target image according to the output of the inertial sensor, align the target image based on the mutual position offset of the target image, and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused by The image is blurred to enhance the user's photo experience.
图5为本发明实施例提供的一种防抖拍照的装置的组成框图,请参照图5,该装置包括:FIG. 5 is a structural block diagram of an apparatus for anti-shake photographing according to an embodiment of the present invention. Referring to FIG. 5, the apparatus includes:
获取单元51,用于获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号,N≥2;The acquiring unit 51 is configured to acquire an output signal of at least one inertial sensor corresponding to each frame image in the N frame image, N≥2;
抖动幅度值计算单元52,用于根据获取单元51获取的所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;The jitter amplitude value calculation unit 52 is configured to calculate, according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image acquired by the acquiring unit 51, a jitter amplitude of each frame image in the N frame image. value;
目标图像选取单元53,用于根据抖动幅度值计算单元52计算的所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;The target image selecting unit 53 is configured to select a K frame target image according to the jitter amplitude value of each frame image in the N frame image calculated by the jitter amplitude value calculating unit 52, 2≤K≤N;
相互位置偏移计算单元54,用于计算所述K帧目标图像的相互位置偏移;a mutual position offset calculating unit 54 configured to calculate a mutual position offset of the K frame target image;
最终图像生成单元55,用于根据相互位置偏移计算单元54计算出的所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。The final image generating unit 55 is configured to align the K-frame target image according to the mutual positional offset of the K-frame target image calculated by the mutual position offset calculating unit 54 and synthesize the aligned K-frame target image to generate The final image.
在本实施例的一个可选实施方式中,抖动幅度值计算单元52具体可以包括:滤波处理模块61、积分处理模块62和计算模块63,其中滤波处理模块61用于对获取单元51获取的所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号进行滤波处理;积分处理模块62用于对所述滤波处理模块61的输出信号进行积分处理; 计算模块63用于根据所述积分处理模块62的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值。In an optional implementation manner of the embodiment, the jitter amplitude value calculation unit 52 may specifically include: a filter processing module 61, an integration processing module 62, and a calculation module 63, where the filter processing module 61 is used to acquire the acquisition unit 51. The output signal of the at least one inertial sensor corresponding to each frame image in the N frame image is subjected to filtering processing; the integration processing module 62 is configured to perform an integration process on the output signal of the filter processing module 61; The calculation module 63 is configured to calculate a jitter amplitude value of each frame image in the N frame image according to an output signal of the integration processing module 62.
在本实施例的一个可选实施方式中,计算模块63具体可以根据所述积分处理模块62的输出信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。In an optional implementation manner of the embodiment, the calculating module 63 may specifically generate the jitter of each frame image in the N frame image according to the difference between the maximum value and the minimum value of the output signal of the integration processing module 62. Amplitude value.
在本实施例的另一个可选实施方式中,计算模块63具体可以根据所述积分处理模块62的输出信号相邻采样点信号值的差值与相邻采样点的时间间隔之比的绝对值的平均值生成所述N帧图像中的每一帧图像的抖动幅度值FiIn another optional implementation manner of the embodiment, the calculating module 63 may specifically determine an absolute value of a ratio of a difference between adjacent sample point signal values and a time interval of adjacent sampling points according to an output signal of the integration processing module 62. The average value of the jitter amplitude value F i of each of the N frames of images is generated:
Figure PCTCN2015093923-appb-000024
Figure PCTCN2015093923-appb-000024
其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
在本实施例的另一个可选实施方式中,计算模块63具体可以根据所述积分处理模块62的输出信号生成序列HiIn another optional implementation manner of the embodiment, the calculating module 63 may specifically generate the sequence H i according to the output signal of the integration processing module 62:
Figure PCTCN2015093923-appb-000025
Figure PCTCN2015093923-appb-000025
计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度值;Using the feature parameter as a jitter amplitude value of each frame image in the N frame image;
其中,among them,
Figure PCTCN2015093923-appb-000026
Figure PCTCN2015093923-appb-000026
i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
在本实施例的另一个可选实施方式中,计算模块63具体可以根据所述积分处理模块62的输出信号生成序列AiIn another optional implementation manner of the embodiment, the calculating module 63 may specifically generate the sequence A i according to the output signal of the integration processing module 62:
Figure PCTCN2015093923-appb-000027
Figure PCTCN2015093923-appb-000027
搜索序列Ai的波峰和波谷,根据波峰点和相邻的波谷点之间的差值生成所述N帧图像中的每一帧图像的抖动幅度值。The peaks and troughs of the search sequence A i are generated, and the jitter amplitude values of each of the N frames of images are generated based on the difference between the peak points and the adjacent valley points.
其中,among them,
Figure PCTCN2015093923-appb-000028
Figure PCTCN2015093923-appb-000028
xi,j =xi,j-xi,1 x i,j =x i,j -x i,1
其中,i代表帧序号,1≤i≤N,2≤k≤j,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1≤i≤N, 2≤k≤j, η i represents the number of sampling points of the ith frame, and t i,j represents the jth sampling time of the ith frame, x i,j Indicates the value of the jth sample point signal of the ith frame.
在本实施例的一个可选实施方式中,目标图像选取单元53具体可以将所述N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像作为所述K帧目标图像。In an optional implementation manner of the embodiment, the target image selecting unit 53 may specifically sort the jitter amplitude values of each frame image in the N frame image, and take the first K corresponding sequences in order from small to large. The K frame image is used as the K frame target image.
在本实施例中,相互位置偏移计算单元54具体用于根据获取单元51获取的所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述K帧目标图像的相互位置偏移;或者,使用图像检测算法从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移。In this embodiment, the mutual position offset calculating unit 54 is specifically configured to calculate the K frame target image according to an output signal of at least one inertial sensor corresponding to each frame image in the N frame image acquired by the acquiring unit 51. Mutual positional offset; or, an image detection algorithm is used to extract feature points from the K-frame target image, and mutual positional offsets of the feature points in the K-frame target image are calculated.
在本实施例中,所述至少一个惯性传感器包括角速度传感器和加速度传感器中的至少一个。In this embodiment, the at least one inertial sensor includes at least one of an angular velocity sensor and an acceleration sensor.
在本实施例的一个可选实施方式中,所述防抖拍照的装置还包括曝光开始时间控制单元71,用于控制所述N帧图像中的每一帧图像的曝光开始时间。In an optional embodiment of the embodiment, the anti-shake photographing device further includes an exposure start time control unit 71 for controlling an exposure start time of each frame image in the N-frame image.
在本实施例的一个可选实施方式中,所述曝光开始时间控制单元71包括检测模块81、生成模块82和控制模块83。其中,检测模块81用于检测所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号;生成模块82用于根据所述检测模块检测的所述N帧图像中的每一帧图像对应的曝光开始前 的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号;控制模块83用于根据所述生成模块生成的N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间。In an optional embodiment of the embodiment, the exposure start time control unit 71 includes a detection module 81, a generation module 82, and a control module 83. The detecting module 81 is configured to detect an output signal of at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image of the N frame image; and the generating module 82 is configured to detect according to the detecting module. Each of the N frames of images corresponds to an exposure before the start of the exposure The output signal of the at least one inertial sensor within the preset time period generates a jitter prediction signal of each frame image in the N frame image; the control module 83 is configured to use each frame in the N frame image generated by the generation module The exposure timing of the image of the jitter prediction signal of the image and each of the N frames of images controls the exposure start time of each of the N frames of images.
在本实施例的一个可选实施方式中,所述生成模块82具体用于:根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号、各频率成分的权重和所述N帧图像中的每一帧图像的曝光时长生成所述N帧图像中的每一帧图像的抖动预测信号,所述各频率成分的权重用于评估各频率成分的惯性传感器的输出信号对成像的影响程度。In an optional implementation manner of the embodiment, the generating module 82 is specifically configured to: output according to at least one inertial sensor in a preset period before the start of exposure corresponding to each frame image in the N frame image a signal, a weight of each frequency component, and an exposure duration of each of the N frames of images to generate a jitter prediction signal for each of the N frames of images, the weights of the respective frequency components being used to evaluate each The degree to which the output signal of the inertial sensor of the frequency component affects the imaging.
在本实施例的一个可选实施方式中,所述控制模块83具体用于:根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小。In an optional implementation manner of this embodiment, the control module 83 is specifically configured to: according to the jitter prediction signal of each frame image in the N frame image and each frame image in the N frame image. The exposure duration adjusts an exposure start time of each of the N frames of images such that an exposure prediction signal of each of the N frames of images is exposed in each of the N frames of images The difference between the maximum and minimum values in the duration is minimum.
本发明实施例提供的装置可以根据惯性传感器的输出筛选出目标图像,基于目标图像的相互位置偏移来对齐所述目标图像并合成所述目标图像以生成最终图像,因此可以有效抑制抖动造成的图像模糊,提升用户拍照体验。The device provided by the embodiment of the present invention may filter out a target image according to an output of the inertial sensor, and align the target image based on mutual position offset of the target image and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused by The image is blurred to enhance the user's photo experience.
图6为本发明实施例提供的一种照相设备的结构示意图,本发明实施例中,所述照相设备可以是数字照相机、数字摄像机、具有内置照相机的手机以及具有内置照相机的个人数字助理(Personal Digital Assistant,简称PDA)等。如图6所示,其一般包括至少一个处理器(例如CPU)和至少一个惯性传感器。本领域的技术人员可以理解,图6中示出的照相设备的结构不构成对电子设备的限定,所述照相设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 6 is a schematic structural diagram of a camera device according to an embodiment of the present invention. In the embodiment of the present invention, the camera device may be a digital camera, a digital camera, a mobile phone with a built-in camera, and a personal digital assistant with a built-in camera (Personal) Digital Assistant, PDA for short. As shown in Figure 6, it generally includes at least one processor (e.g., a CPU) and at least one inertial sensor. It will be understood by those skilled in the art that the structure of the photographic apparatus shown in FIG. 6 does not constitute a limitation on an electronic apparatus, and the photographic apparatus may include more or less components than those illustrated, or may combine some components, or Different parts are arranged.
下面结合图6对照相设备的各个构成部件进行具体的介绍,请参 照图6,该照相设备包括:The specific components of the camera device will be specifically described below with reference to FIG. According to Figure 6, the camera device comprises:
至少一个惯性传感器601,用于检测N帧图像中的每一帧图像对应的所述照相设备的抖动,N≥2;At least one inertial sensor 601 is configured to detect jitter of the camera device corresponding to each frame image in the N frame image, N≥2;
处理器602,用于根据所述至少一个惯性传感器601的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;计算所述K帧目标图像的相互位置偏移;根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。The processor 602 is configured to calculate, according to an output signal of the at least one inertial sensor 601, a jitter amplitude value of each frame image in the N frame image; and a jitter amplitude value according to each frame image in the N frame image. Selecting a K-frame target image, 2≤K≤N; calculating a mutual positional offset of the K-frame target image; aligning the K-frame target image according to the mutual positional offset of the K-frame target image and synthesizing the aligned objects The K frame target image is described to generate a final image.
通信总线603用于实现处理器602及至少一个惯性传感器601之间的连接通信。 Communication bus 603 is used to implement connection communication between processor 602 and at least one inertial sensor 601.
在本实施例的一个可选实施方式中,所述处理器602具体用于:In an optional implementation manner of this embodiment, the processor 602 is specifically configured to:
对所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号进行滤波处理和积分处理;Performing filtering processing and integration processing on an output signal of at least one inertial sensor corresponding to each frame image in the N frame image;
根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is calculated based on the filtering process and the integrated processed signal.
在本实施例的一个可选实施方式中,所述处理器602还用于:In an optional implementation manner of this embodiment, the processor 602 is further configured to:
根据滤波处理和积分处理后的信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is generated based on a difference between a maximum value and a minimum value of the filter processed and integrated processed signals.
在本实施例的另一个可选实施方式中,所述处理器602还用于:In another optional implementation manner of this embodiment, the processor 602 is further configured to:
根据滤波处理和积分处理后的信号相邻采样点信号值的差值与相邻采样点的时间间隔之比的绝对值的平均值生成所述N帧图像中的每一帧图像的抖动幅度值FiGenerating a jitter amplitude value of each frame image in the N frame image according to an average value of absolute values of a ratio of a difference between a signal value of a neighboring sample point signal and a time interval of adjacent sample points after the filtering process and the integration process F i :
Figure PCTCN2015093923-appb-000029
Figure PCTCN2015093923-appb-000029
其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
在本实施例的另一个可选实施方式中,所述处理器602还用于:In another optional implementation manner of this embodiment, the processor 602 is further configured to:
根据所述滤波处理和积分处理后的信号生成序列HiGenerating sequence H i according to the filtering process and the integrated processed signal:
Figure PCTCN2015093923-appb-000030
Figure PCTCN2015093923-appb-000030
计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度值;Using the feature parameter as a jitter amplitude value of each frame image in the N frame image;
其中,among them,
Figure PCTCN2015093923-appb-000031
Figure PCTCN2015093923-appb-000031
i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
在本实施例的另一个可选实施方式中,所述处理器602还用于:In another optional implementation manner of this embodiment, the processor 602 is further configured to:
根据所述滤波处理和积分处理后的信号生成序列AiGenerating sequence A i according to the filtering process and the integrated processed signal:
Figure PCTCN2015093923-appb-000032
Figure PCTCN2015093923-appb-000032
搜索序列Ai的波峰和波谷,根据波峰点和相邻的波谷点之间的差值生成所述N帧图像中的每一帧图像的抖动幅度值。The peaks and troughs of the search sequence A i are generated, and the jitter amplitude values of each of the N frames of images are generated based on the difference between the peak points and the adjacent valley points.
其中,among them,
Figure PCTCN2015093923-appb-000033
Figure PCTCN2015093923-appb-000033
xi,j =xi,j-xi,1 x i,j =x i,j -x i,1
其中,i代表帧序号,1≤i≤N,2≤k≤j,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1≤i≤N, 2≤k≤j, η i represents the number of sampling points of the ith frame, and t i,j represents the jth sampling time of the ith frame, x i,j Indicates the value of the jth sample point signal of the ith frame.
在本实施例中,所述处理器602具体用于:将所述N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像作为所述K帧目标图像。In this embodiment, the processor 602 is specifically configured to: sort the jitter amplitude values of each frame image in the N frame image, and take the first K corresponding K frame images in order from small to large. The K frame target image.
在本实施例中,所述至少一个惯性传感器包括角速度传感器和加 速度传感器中的至少一个。In this embodiment, the at least one inertial sensor comprises an angular velocity sensor and At least one of the speed sensors.
在本实施例中,所述处理器602具体用于:根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器601的输出信号计算所述K帧目标图像的相互位置偏移;或者,使用图像检测算法从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移。In this embodiment, the processor 602 is specifically configured to: calculate a mutual position offset of the K frame target image according to an output signal of the at least one inertial sensor 601 corresponding to each frame image in the N frame image; Alternatively, feature points are extracted from the K-frame target image using an image detection algorithm, and mutual positional offsets of the feature points in the K-frame target image are calculated.
在本实施例的一种可选实施方式中,所述处理器602还用于:获取所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号;根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号;根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间。In an optional implementation manner of this embodiment, the processor 602 is further configured to: acquire at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image in the N frame image Outputting a signal; generating, according to an output signal of the at least one inertial sensor in a preset period before the start of exposure corresponding to each frame image in the N frame image, a jitter prediction signal of each frame image in the N frame image; And an exposure start time of each of the N frames of images is controlled according to a jitter prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images.
在本实施例的一种可选实施方式中,所述处理器602具体用于:根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号、各频率成分的权重和所述N帧图像中的每一帧图像的曝光时长生成所述N帧图像中的每一帧图像的抖动预测信号。其中,所述各频率成分的权重用于评估各频率成分的惯性传感器的输出信号对成像的影响程度。In an optional implementation manner of this embodiment, the processor 602 is specifically configured to: according to at least one inertial sensor in a preset time period before the start of exposure corresponding to each frame image in the N frame image The output signal, the weight of each frequency component, and the exposure duration of each of the N frames of images generate a jitter prediction signal for each of the N frames of images. The weight of each frequency component is used to evaluate the degree of influence of the output signal of the inertial sensor of each frequency component on imaging.
在本实施例的一种可选实施方式中,所述处理器602还用于:根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小。In an optional implementation manner of this embodiment, the processor 602 is further configured to: according to the jitter prediction signal of each frame image in the N frame image and each frame image in the N frame image The exposure duration adjusts an exposure start time of each of the N frames of images such that a jitter prediction signal of each of the N frames of images is in each of the N frames of images The difference between the maximum and minimum values within the exposure duration is minimal.
本发明实施例提供的照相设备可以根据惯性传感器的输出筛选出目标图像,基于目标图像的相互位置偏移来对齐所述目标图像并合成所述目标图像以生成最终图像,因此可以有效抑制抖动造成的图像模糊,提升用户拍照体验。The camera device provided by the embodiment of the present invention can filter out the target image according to the output of the inertial sensor, align the target image based on the mutual positional offset of the target image, and synthesize the target image to generate a final image, thereby effectively suppressing the jitter caused. The image is blurred to enhance the user's photo experience.
本领域普通技术人员可以理解实现上述实施例方法中的全部或 部分流程,是可以通过计算机程序来指令相关的硬件来完成,上述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,上述的存储介质可为磁碟、光盘、只读存储记忆体(ROM:Read-Only Memory)或随机存储记忆体(RAM:Random Access Memory)等。Those skilled in the art can understand that all of the above embodiments are implemented or The partial process can be completed by a computer program to instruct related hardware. The above program can be stored in a computer readable storage medium, and when executed, the program can include the flow of an embodiment of each method as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The principles and embodiments of the present invention have been described herein with reference to specific examples. The foregoing description of the embodiments are merely for the purpose of understanding the method of the present invention and the concept thereof. Also, those skilled in the art in accordance with the present invention The present invention is not limited by the scope of the present invention.

Claims (37)

  1. 一种防抖拍照的方法,其特征在于,包括:A method for anti-shake photographing, comprising:
    获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号,N≥2;Obtaining an output signal of at least one inertial sensor corresponding to each frame image in the N frame image, N≥2;
    根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;Calculating a jitter amplitude value of each frame image in the N frame image according to an output signal of at least one inertial sensor corresponding to each frame image in the N frame image;
    根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;Selecting a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2≤K≤N;
    计算所述K帧目标图像的相互位置偏移;Calculating a mutual position offset of the K frame target image;
    根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。The K frame target image is aligned according to mutual positional shift of the K frame target image and the aligned K frame target image is synthesized to generate a final image.
  2. 如权利要求1所述的方法,其特征在于,所述根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The method according to claim 1, wherein said calculating an image of each of said N frames of images based on an output signal of at least one inertial sensor corresponding to each of said N frames of images Amplitude values, including:
    对所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号进行滤波处理和积分处理;Performing filtering processing and integration processing on an output signal of at least one inertial sensor corresponding to each frame image in the N frame image;
    根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is calculated based on the filtering process and the integrated processed signal.
  3. 如权利要求2所述的方法,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The method of claim 2, wherein calculating the jitter amplitude value of each frame image in the N frame image according to the filtering process and the integrated processed signal comprises:
    根据滤波处理和积分处理后的信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is generated based on a difference between a maximum value and a minimum value of the filter processed and integrated processed signals.
  4. 如权利要求2所述的方法,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The method of claim 2, wherein calculating the jitter amplitude value of each frame image in the N frame image according to the filtering process and the integrated processed signal comprises:
    根据以下公式计算所述N帧图像中的每一帧图像的抖动幅度值FiCalculating the jitter amplitude value F i of each of the N frames of images according to the following formula:
    Figure PCTCN2015093923-appb-100001
    Figure PCTCN2015093923-appb-100001
    其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数ti,j表 示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1i ≤ N, η i represents the number of sampling points t i of the ith frame , j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
  5. 如权利要求2所述的方法,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The method of claim 2, wherein calculating the jitter amplitude value of each frame image in the N frame image according to the filtering process and the integrated processed signal comprises:
    根据滤波处理和积分处理后的信号生成序列HiThe sequence H i is generated according to the filter processing and the integrated processed signal:
    Figure PCTCN2015093923-appb-100002
    Figure PCTCN2015093923-appb-100002
    计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
    将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度值;Using the feature parameter as a jitter amplitude value of each frame image in the N frame image;
    其中,among them,
    Figure PCTCN2015093923-appb-100003
    Figure PCTCN2015093923-appb-100003
    i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
  6. 如权利要求2所述的方法,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The method of claim 2, wherein calculating the jitter amplitude value of each frame image in the N frame image according to the filtering process and the integrated processed signal comprises:
    根据滤波处理和积分处理后的信号生成序列AiThe sequence A i is generated according to the filter processing and the integrated processed signal:
    Figure PCTCN2015093923-appb-100004
    Figure PCTCN2015093923-appb-100004
    搜索序列Ai的波峰和波谷,根据波峰点和相邻的波谷点之间的差值生成所述N帧图像中的每一帧图像的抖动幅度值;Searching for the peaks and troughs of the sequence A i , generating a jitter amplitude value of each frame image in the N frame image according to a difference between the peak point and the adjacent valley point;
    其中,among them,
    Figure PCTCN2015093923-appb-100005
    Figure PCTCN2015093923-appb-100005
    xi,j′=xi,j-xi,1 x i,j ′=x i,j -x i,1
    其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
  7. 如权利要求1至6任一所述的方法,所述根据所述N帧图像 中的每一帧图像的抖动幅度值选取K帧目标图像,包括:The method according to any one of claims 1 to 6, wherein said image is based on said N frames The jitter amplitude value of each frame image in the selected K frame target image includes:
    将所述N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像作为所述K帧目标图像。The jitter amplitude values of each of the N frames of images are sorted, and the first K corresponding K frame images are taken as the K frame target images in ascending order.
  8. 如权利要求1至7任一所述的方法,所述计算所述K帧目标图像的相互位置偏移,包括:The method according to any one of claims 1 to 7, wherein calculating the mutual positional offset of the K-frame target image comprises:
    根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述K帧目标图像的相互位置偏移;或者,Calculating a mutual positional offset of the K frame target image according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image; or
    使用图像检测算法从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移。Feature points are extracted from the K-frame target image using an image detection algorithm, and mutual positional offsets of the feature points in the K-frame target image are calculated.
  9. 如权利要求1至8任一所述的方法,其特征在于,所述至少一个惯性传感器包括角速度传感器和加速度传感器中的至少一个。The method of any of claims 1 to 8, wherein the at least one inertial sensor comprises at least one of an angular velocity sensor and an acceleration sensor.
  10. 如权利要求1至9任一所述的方法,其特征在于,所述获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号之前,还包括:The method according to any one of claims 1 to 9, wherein before the acquiring the output signal of the at least one inertial sensor corresponding to each frame image in the N frame image, the method further includes:
    检测所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号;Detecting an output signal of at least one inertial sensor within a preset period of time before the start of exposure corresponding to each frame image of the N frames of images;
    根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号;Generating, according to an output signal of at least one inertial sensor in a preset period before the start of exposure corresponding to each frame image in the N frame image, a jitter prediction signal of each frame image in the N frame image;
    根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间。And an exposure start time of each of the N frames of images is controlled according to a jitter prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images.
  11. 如权利要求10所述的方法,其特征在于,所述根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号,包括:The method according to claim 10, wherein said generating said N frame based on an output signal of at least one inertial sensor within a preset period of time before exposure start corresponding to each frame image of said N frame image A jitter prediction signal for each frame of the image, including:
    根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号、各频率成分的权重和所述N帧图像中的每一帧图像的曝光时长生成所述N帧图像中的每一帧图像的抖动预测信号,所述各频率成分的权重用于评估各频率成分的惯 性传感器的输出信号对成像的影响程度。And an output signal of at least one inertial sensor, a weight of each frequency component, and an exposure of each frame image in the N frame image according to a preset time period before exposure start corresponding to each frame image in the N frame image The duration generates a jitter prediction signal for each of the N frames of images, and the weights of the respective frequency components are used to estimate the frequency components The extent to which the output signal of the sensor affects imaging.
  12. 如权利要求10或11所述的方法,其特征在于,所述根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间,包括:The method according to claim 10 or 11, wherein said exposure time control signal according to a jitter prediction signal of each frame image of said N frame image and each frame image of said N frame image The exposure start time of each frame image in the N frame image includes:
    根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小。Adjusting an exposure start time of each of the N frames of images according to a dither prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images to cause The jitter prediction signal of each of the N frames of images is minimized by a difference between a maximum value and a minimum value within an exposure time period of each of the N frame images.
  13. 一种防抖拍照的装置,其特征在于,包括:An anti-shake photographing device, comprising:
    获取单元,用于获取N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号,N≥2;An acquiring unit, configured to acquire an output signal of at least one inertial sensor corresponding to each frame image in the N frame image, N≥2;
    抖动幅度值计算单元,用于根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;a jitter amplitude value calculation unit, configured to calculate a jitter amplitude value of each frame image in the N frame image according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image;
    目标图像选取单元,用于根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;a target image selecting unit, configured to select a K frame target image according to a jitter amplitude value of each frame image in the N frame image, 2≤K≤N;
    相互位置偏移计算单元,用于计算所述K帧目标图像的相互位置偏移;a mutual position offset calculating unit, configured to calculate a mutual position offset of the K frame target image;
    最终图像生成单元,用于根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。And a final image generating unit configured to align the K frame target image according to mutual positional offset of the K frame target image and synthesize the aligned K frame target image to generate a final image.
  14. 如权利要求13所述的装置,其特征在于,所述抖动幅度值计算单元包括:The apparatus according to claim 13, wherein said jitter amplitude value calculation unit comprises:
    滤波处理模块,用于对所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号进行滤波处理;a filtering processing module, configured to perform filtering processing on an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image;
    积分处理模块,用于对所述滤波处理模块的输出信号进行积分处理;An integration processing module, configured to perform integral processing on an output signal of the filter processing module;
    计算模块,用于根据所述积分处理模块的输出信号计算所述N 帧图像中的每一帧图像的抖动幅度值。a calculation module, configured to calculate the N according to an output signal of the integration processing module The jitter amplitude value of each frame image in the frame image.
  15. 如权利要求14所述的装置,所述计算模块具体用于:The apparatus of claim 14, wherein the calculating module is specifically configured to:
    根据所述积分处理模块的输出信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。Generating a jitter amplitude value of each frame image in the N frame image according to a difference between a maximum value and a minimum value of an output signal of the integration processing module.
  16. 如权利要求14所述的装置,所述计算模块具体用于:The apparatus of claim 14, wherein the calculating module is specifically configured to:
    根据以下公式计算所述N帧图像中的每一帧图像的抖动幅度值FiCalculating the jitter amplitude value F i of each of the N frames of images according to the following formula:
    Figure PCTCN2015093923-appb-100006
    Figure PCTCN2015093923-appb-100006
    其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
  17. 如权利要求14所述的装置,所述计算模块具体用于:The apparatus of claim 14, wherein the calculating module is specifically configured to:
    根据所述积分处理模块的输出信号生成序列HiGenerating a sequence H i according to an output signal of the integration processing module:
    Figure PCTCN2015093923-appb-100007
    Figure PCTCN2015093923-appb-100007
    计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
    将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度值;Using the feature parameter as a jitter amplitude value of each frame image in the N frame image;
    其中,among them,
    Figure PCTCN2015093923-appb-100008
    Figure PCTCN2015093923-appb-100008
    i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the jth of the ith frame Sample point signal value.
  18. 如权利要求14所述的装置,所述计算模块具体用于:The apparatus of claim 14, wherein the calculating module is specifically configured to:
    根据所述积分处理模块的输出信号生成序列AiGenerating a sequence A i according to an output signal of the integration processing module:
    Figure PCTCN2015093923-appb-100009
    Figure PCTCN2015093923-appb-100009
    搜索序列Ai的波峰和波谷,根据波峰点和相邻的波谷点之间的差 值生成所述N帧图像中的每一帧图像的抖动幅度值。The peaks and troughs of the search sequence A i are generated based on the difference between the peak point and the adjacent valley point to generate a jitter amplitude value for each of the N frames of images.
    其中,among them,
    Figure PCTCN2015093923-appb-100010
    Figure PCTCN2015093923-appb-100010
    xi,j′=xi,j-xi,1 x i,j ′=x i,j -x i,1
    其中,i代表帧序号,1≤i≤N,2≤k≤j,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1≤i≤N, 2≤k≤j, η i represents the number of sampling points of the ith frame, and t i,j represents the jth sampling time of the ith frame, x i,j Indicates the value of the jth sample point signal of the ith frame.
  19. 如权利要求13至18任一所述的装置,所述目标图像选取单元具体用于:The apparatus according to any one of claims 13 to 18, wherein the target image selecting unit is specifically configured to:
    将所述N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像作为所述K帧目标图像。The jitter amplitude values of each of the N frames of images are sorted, and the first K corresponding K frame images are taken as the K frame target images in ascending order.
  20. 如权利要求13至19任一所述的装置,其特征在于,所述相互位置偏移计算单元具体用于:The device according to any one of claims 13 to 19, wherein the mutual position offset calculation unit is specifically configured to:
    根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述K帧目标图像的相互位置偏移;或者,Calculating a mutual positional offset of the K frame target image according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image; or
    使用图像检测算法从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移。Feature points are extracted from the K-frame target image using an image detection algorithm, and mutual positional offsets of the feature points in the K-frame target image are calculated.
  21. 如权利要求13至20任一所述的装置,其特征在于,所述至少一个惯性传感器包括角速度传感器和加速度传感器中的至少一个。A device according to any one of claims 13 to 20, wherein said at least one inertial sensor comprises at least one of an angular velocity sensor and an acceleration sensor.
  22. 如权利要求13至21任一所述的装置,其特征在于,所述装置还包括曝光开始时间控制单元,用于控制所述N帧图像中的每一帧图像的曝光开始时间。The apparatus according to any one of claims 13 to 21, characterized in that the apparatus further comprises an exposure start time control unit for controlling an exposure start time of each of the N frames of images.
  23. 如权利要求22所述的装置,所述曝光开始时间控制单元包括:The apparatus according to claim 22, wherein said exposure start time control unit comprises:
    检测模块,用于检测所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号;a detecting module, configured to detect an output signal of the at least one inertial sensor within a preset time period before the start of exposure corresponding to each frame image of the N frame image;
    生成模块,用于根据所述检测模块检测的所述N帧图像中的每 一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号;Generating a module for each of the N frames of images detected by the detection module An output signal of at least one inertial sensor within a preset period of time before the start of exposure corresponding to one frame image generates a jitter prediction signal of each of the N frames of images;
    控制模块,用于根据所述生成模块生成的N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间。a control module, configured to control each of the N frame images according to a jitter prediction signal of each frame image in the N frame image generated by the generation module and an exposure duration of each frame image in the N frame image The exposure start time of the frame image.
  24. 如权利要求23所述的装置,其特征在于,所述生成模块具体用于:The device according to claim 23, wherein the generating module is specifically configured to:
    根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号、各频率成分的权重和所述N帧图像中的每一帧图像的曝光时长生成所述N帧图像中的每一帧图像的抖动预测信号,所述各频率成分的权重用于评估各频率成分的惯性传感器的输出信号对成像的影响程度。And an output signal of at least one inertial sensor, a weight of each frequency component, and an exposure of each frame image in the N frame image according to a preset time period before exposure start corresponding to each frame image in the N frame image The duration generates a jitter prediction signal for each of the N frames of images, and the weights of the respective frequency components are used to evaluate the degree of influence of the output signals of the inertial sensors of the respective frequency components on the imaging.
  25. 如权利要求23或24所述的装置,其特征在于,所述控制模块具体用于:The device according to claim 23 or 24, wherein the control module is specifically configured to:
    根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小值的差值为最小。Adjusting an exposure start time of each of the N frames of images according to a dither prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images to cause The jitter prediction signal of each of the N frames of images is minimized by a difference between a maximum value and a minimum value within an exposure time period of each of the N frame images.
  26. 一种照相设备,其特征在于,包括:A camera device, comprising:
    至少一个惯性传感器,用于检测N帧图像中的每一帧图像对应的所述照相设备的抖动,N≥2;At least one inertial sensor for detecting jitter of the camera device corresponding to each frame image in the N frame image, N≥2;
    处理器,用于根据所述至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图像的抖动幅度值;根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,2≤K≤N;计算所述K帧目标图像的相互位置偏移;根据所述K帧目标图像的相互位置偏移对齐所述K帧目标图像并合成所对齐的所述K帧目标图像以生成最终图像。a processor, configured to calculate a jitter amplitude value of each frame image in the N frame image according to an output signal of the at least one inertial sensor; and select K according to a jitter amplitude value of each frame image in the N frame image a frame target image, 2≤K≤N; calculating a mutual positional offset of the K-frame target image; aligning the K-frame target image according to a mutual positional shift of the K-frame target image and synthesizing the aligned K Frame the target image to generate the final image.
  27. 如权利要求26所述的照相设备,其特征在于,所述根据所述至少一个惯性传感器的输出信号计算所述N帧图像中的每一帧图 像的抖动幅度值,包括:The photographic apparatus according to claim 26, wherein said calculating each frame of said N frame image based on an output signal of said at least one inertial sensor The jitter amplitude value of the image includes:
    对所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号进行滤波处理和积分处理;Performing filtering processing and integration processing on an output signal of at least one inertial sensor corresponding to each frame image in the N frame image;
    根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is calculated based on the filtering process and the integrated processed signal.
  28. 如权利要求27所述的照相设备,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The photographic apparatus according to claim 27, wherein said calculating a jitter amplitude value of each frame image in said N frame image based on the filtering process and the integrated processed signal comprises:
    根据滤波处理和积分处理后的信号的最大值和最小值的差值生成所述N帧图像中的每一帧图像的抖动幅度值。A jitter amplitude value of each of the N frames of images is generated based on a difference between a maximum value and a minimum value of the filter processed and integrated processed signals.
  29. 如权利要求27所述的照相设备,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The photographic apparatus according to claim 27, wherein said calculating a jitter amplitude value of each frame image in said N frame image based on the filtering process and the integrated processed signal comprises:
    根据以下公式计算所述N帧图像中的每一帧图像的抖动幅度值FiCalculating the jitter amplitude value F i of each of the N frames of images according to the following formula:
    Figure PCTCN2015093923-appb-100011
    Figure PCTCN2015093923-appb-100011
    其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
  30. 如权利要求27所述的照相设备,所述根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The photographic apparatus according to claim 27, wherein said calculating a jitter amplitude value of each frame image in said N frame image based on the filtering process and the integrated processed signal comprises:
    根据滤波处理和积分处理后的信号生成序列HiThe sequence H i is generated according to the filter processing and the integrated processed signal:
    Figure PCTCN2015093923-appb-100012
    Figure PCTCN2015093923-appb-100012
    计算所述序列Hi的特征参数,所述特征参数为以下值的任意一种:所述序列Hi的均值的绝对值、所述序列Hi所有元素取绝对值后再平均的结果、所述序列Hi的标准差、所述序列Hi的方差;Any calculation of characteristic parameters of the sequence H i, the characteristic values of the following parameters: the mean absolute value of the sequence H i, H i the sequence of the absolute value and then average the results of all the elements, the said standard deviation of the sequence H i, H i is the variance of the sequence;
    将所述特征参数作为所述N帧图像中的每一帧图像的抖动幅度 值;Using the feature parameter as the jitter amplitude of each frame image in the N frame image value;
    其中,among them,
    Figure PCTCN2015093923-appb-100013
    Figure PCTCN2015093923-appb-100013
    其中,i代表帧序号,1≤i≤N,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1 ≤ i ≤ N, η i represents the number of sampling points of the ith frame, t i, j represents the jth sampling time of the ith frame, and x i, j represents the ith frame j sample point signal values.
  31. 如权利要求27所述的照相设备,所述处理器根据滤波处理和积分处理后的信号计算所述N帧图像中的每一帧图像的抖动幅度值,包括:The photographic apparatus according to claim 27, wherein said processor calculates a jitter amplitude value of each frame image in said N frame image based on the filtering process and the integrated processed signal, comprising:
    根据滤波处理和积分处理后的信号生成序列AiThe sequence A i is generated according to the filter processing and the integrated processed signal:
    Figure PCTCN2015093923-appb-100014
    Figure PCTCN2015093923-appb-100014
    搜索序列Ai的波峰和波谷,根据波峰点和相邻的波谷点之间的差值生成所述N帧图像中的每一帧图像的抖动幅度值。The peaks and troughs of the search sequence A i are generated, and the jitter amplitude values of each of the N frames of images are generated based on the difference between the peak points and the adjacent valley points.
    其中,among them,
    Figure PCTCN2015093923-appb-100015
    Figure PCTCN2015093923-appb-100015
    xi,j′=xi,j-xi,1 x i,j ′=x i,j -x i,1
    其中,i代表帧序号,1≤i≤N,2≤k≤j,ηi表示第i帧的采样点个数,ti,j表示第i帧的第j个采样时刻,xi,j表示第i帧的第j个采样点信号值。Where i represents the frame number, 1≤i≤N, 2≤k≤j, η i represents the number of sampling points of the ith frame, and t i,j represents the jth sampling time of the ith frame, x i,j Indicates the value of the jth sample point signal of the ith frame.
  32. 如权利要求26至31任一所述的照相设备,所述根据所述N帧图像中的每一帧图像的抖动幅度值选取K帧目标图像,包括:The photographic apparatus according to any one of claims 26 to 31, wherein the selecting a K-frame target image based on a jitter amplitude value of each frame image in the N-frame image comprises:
    将所述N帧图像中的每一帧图像的抖动幅度值进行排序,按从小到大的顺序取前K个对应的K帧图像作为所述K帧目标图像。The jitter amplitude values of each of the N frames of images are sorted, and the first K corresponding K frame images are taken as the K frame target images in ascending order.
  33. 如权利要求26至32任一所述的照相设备,其特征在于,所述计算所述K帧目标图像的相互位置偏移,包括:The photographic apparatus according to any one of claims 26 to 32, wherein said calculating a mutual positional shift of said K-frame target image comprises:
    根据所述N帧图像中的每一帧图像对应的至少一个惯性传感器的输出信号计算所述K帧目标图像的相互位置偏移;或者, Calculating a mutual positional offset of the K frame target image according to an output signal of the at least one inertial sensor corresponding to each frame image in the N frame image; or
    使用图像检测算法从所述K帧目标图像提取特征点,计算所述K帧目标图像中的所述特征点的相互位置偏移。Feature points are extracted from the K-frame target image using an image detection algorithm, and mutual positional offsets of the feature points in the K-frame target image are calculated.
  34. 如权利要求26至33任一所述的照相设备,其特征在于,所述至少一个惯性传感器包括角速度传感器和加速度传感器中的至少一个。A photographic apparatus according to any one of claims 26 to 33, wherein said at least one inertial sensor comprises at least one of an angular velocity sensor and an acceleration sensor.
  35. 如权利要求26至34任一所述的照相设备,其特征在于,所述处理器还用于:获取所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号;根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号;根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间。The photographic device according to any one of claims 26 to 34, wherein the processor is further configured to: acquire at least a preset period of time before the start of exposure corresponding to each frame image of the N frames of images An output signal of the inertial sensor; generating an image of each of the N frames of images according to an output signal of the at least one inertial sensor within a preset period of time before the start of exposure corresponding to each frame image of the N frames of images a jitter prediction signal; controlling exposure start of each frame image in the N frame image according to a jitter prediction signal of each frame image in the N frame image and an exposure duration of each frame image in the N frame image time.
  36. 如权利要求35所述的照相设备,其特征在于,所述根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号生成所述N帧图像中的每一帧图像的抖动预测信号,包括:The photographic apparatus according to claim 35, wherein said generating said N based on an output signal of at least one inertial sensor within a preset period of time before exposure start corresponding to each frame image of said N frame image The jitter prediction signal of each frame image in the frame image includes:
    根据所述N帧图像中的每一帧图像对应的曝光开始前的预设时段内的至少一个惯性传感器的输出信号、各频率成分的权重和所述N帧图像中的每一帧图像的曝光时长生成所述N帧图像中的每一帧图像的抖动预测信号,所述各频率成分的权重用于评估各频率成分的惯性传感器的输出信号对成像的影响程度。And an output signal of at least one inertial sensor, a weight of each frequency component, and an exposure of each frame image in the N frame image according to a preset time period before exposure start corresponding to each frame image in the N frame image The duration generates a jitter prediction signal for each of the N frames of images, and the weights of the respective frequency components are used to evaluate the degree of influence of the output signals of the inertial sensors of the respective frequency components on the imaging.
  37. 如权利要求35或36所述的照相设备,其特征在于,所述根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长控制所述N帧图像中的每一帧图像的曝光开始时间,包括:The photographing apparatus according to claim 35 or 36, wherein said exposure time length control signal according to each of said N frames of images and exposure time control of each of said N frames of images The exposure start time of each frame image in the N frame image includes:
    根据所述N帧图像中的每一帧图像的抖动预测信号和所述N帧图像中的每一帧图像的曝光时长调节所述N帧图像中的每一帧图像的曝光开始时间,以使得所述N帧图像中的每一帧图像的抖动预测信号在所述N帧图像中的每一帧图像的曝光时长内的最大值和最小 值的差值为最小。 Adjusting an exposure start time of each of the N frames of images according to a dither prediction signal of each of the N frames of images and an exposure duration of each of the N frames of images to cause a maximum value and a minimum of a jitter prediction signal of each frame image in the N frame image within an exposure time period of each frame image in the N frame image The difference in values is minimal.
PCT/CN2015/093923 2015-11-05 2015-11-05 Anti-jitter photographing method and apparatus, and camera device WO2017075788A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/093923 WO2017075788A1 (en) 2015-11-05 2015-11-05 Anti-jitter photographing method and apparatus, and camera device
CN201580050507.0A CN107079085B (en) 2015-11-05 2015-11-05 A kind of stabilization photographic method, device and camera installation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/093923 WO2017075788A1 (en) 2015-11-05 2015-11-05 Anti-jitter photographing method and apparatus, and camera device

Publications (1)

Publication Number Publication Date
WO2017075788A1 true WO2017075788A1 (en) 2017-05-11

Family

ID=58661478

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093923 WO2017075788A1 (en) 2015-11-05 2015-11-05 Anti-jitter photographing method and apparatus, and camera device

Country Status (2)

Country Link
CN (1) CN107079085B (en)
WO (1) WO2017075788A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151323A (en) * 2018-10-18 2019-01-04 Oppo广东移动通信有限公司 A kind of photographic method and device, terminal, storage medium
CN110290323A (en) * 2019-06-28 2019-09-27 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN110942047A (en) * 2019-12-09 2020-03-31 Oppo广东移动通信有限公司 Application optimization method and related product
WO2020120997A1 (en) 2018-12-14 2020-06-18 Cambridge Mechatronics Limited Sma actuator assembly
CN111930156A (en) * 2020-08-17 2020-11-13 北京配天技术有限公司 Vibration suppression method, vibration suppression system, vibration suppression device and robot equipment
CN112132879A (en) * 2019-06-25 2020-12-25 北京沃东天骏信息技术有限公司 Image processing method, device and storage medium
CN113438409A (en) * 2021-05-18 2021-09-24 影石创新科技股份有限公司 Delay calibration method, delay calibration device, computer equipment and storage medium
WO2022089341A1 (en) * 2020-10-30 2022-05-05 华为技术有限公司 Image processing method and related apparatus

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110072049B (en) * 2019-03-26 2021-11-09 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN114253301B (en) * 2021-11-29 2024-03-22 天津津航技术物理研究所 Method for testing stability and precision of two-axis four-frame platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777238A (en) * 2004-11-15 2006-05-24 佳能株式会社 Image processing apparatus and image processing method
US20070098291A1 (en) * 2005-11-02 2007-05-03 Kentarou Niikura Image stabilization apparatus, method thereof, and program product thereof
CN101272455A (en) * 2007-03-23 2008-09-24 富士胶片株式会社 Image taking apparatus
CN101661208A (en) * 2008-08-29 2010-03-03 佳能株式会社 Apparatus having image shake correction function and method of controlling the same
CN102917168A (en) * 2011-08-02 2013-02-06 佳能株式会社 Image blurring correction apparatus, control method thereof, optical device and imaging apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777238A (en) * 2004-11-15 2006-05-24 佳能株式会社 Image processing apparatus and image processing method
US20070098291A1 (en) * 2005-11-02 2007-05-03 Kentarou Niikura Image stabilization apparatus, method thereof, and program product thereof
CN101272455A (en) * 2007-03-23 2008-09-24 富士胶片株式会社 Image taking apparatus
CN101661208A (en) * 2008-08-29 2010-03-03 佳能株式会社 Apparatus having image shake correction function and method of controlling the same
CN102917168A (en) * 2011-08-02 2013-02-06 佳能株式会社 Image blurring correction apparatus, control method thereof, optical device and imaging apparatus

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151323A (en) * 2018-10-18 2019-01-04 Oppo广东移动通信有限公司 A kind of photographic method and device, terminal, storage medium
CN109151323B (en) * 2018-10-18 2021-06-04 Oppo广东移动通信有限公司 Photographing method and device, terminal and storage medium
WO2020120997A1 (en) 2018-12-14 2020-06-18 Cambridge Mechatronics Limited Sma actuator assembly
CN112132879A (en) * 2019-06-25 2020-12-25 北京沃东天骏信息技术有限公司 Image processing method, device and storage medium
CN112132879B (en) * 2019-06-25 2024-03-08 北京沃东天骏信息技术有限公司 Image processing method, device and storage medium
CN110290323A (en) * 2019-06-28 2019-09-27 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN110290323B (en) * 2019-06-28 2021-09-07 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110942047A (en) * 2019-12-09 2020-03-31 Oppo广东移动通信有限公司 Application optimization method and related product
CN111930156A (en) * 2020-08-17 2020-11-13 北京配天技术有限公司 Vibration suppression method, vibration suppression system, vibration suppression device and robot equipment
WO2022089341A1 (en) * 2020-10-30 2022-05-05 华为技术有限公司 Image processing method and related apparatus
CN114449151A (en) * 2020-10-30 2022-05-06 华为技术有限公司 Image processing method and related device
CN114449151B (en) * 2020-10-30 2023-06-02 华为技术有限公司 Image processing method and related device
CN113438409A (en) * 2021-05-18 2021-09-24 影石创新科技股份有限公司 Delay calibration method, delay calibration device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN107079085A (en) 2017-08-18
CN107079085B (en) 2019-10-25

Similar Documents

Publication Publication Date Title
WO2017075788A1 (en) Anti-jitter photographing method and apparatus, and camera device
JP6663040B2 (en) Depth information acquisition method and apparatus, and image acquisition device
US8208746B2 (en) Adaptive PSF estimation technique using a sharp preview and a blurred image
JP5179398B2 (en) Image processing apparatus, image processing method, and image processing program
US8760526B2 (en) Information processing apparatus and method for correcting vibration
US8379096B2 (en) Information processing apparatus and method for synthesizing corrected image data
US11611697B2 (en) Optical image stabilization movement to create a super-resolution image of a scene
US20150042839A1 (en) Distance measuring apparatus, imaging apparatus, and distance measuring method
CN109194876A (en) Image processing method, device, electronic equipment and computer readable storage medium
US20070098383A1 (en) Motion blur reduction and compensation
JP2015148532A (en) Distance measuring device, imaging apparatus, distance measuring method, and program
JP2009188837A (en) Image pickup apparatus and image pickup method
US20160314591A1 (en) Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method
CN107615744A (en) A kind of image taking determination method for parameter and camera device
WO2019000664A1 (en) Information processing method and electronic device
WO2022242569A1 (en) Delay calibration method and apparatus, and computer device and storage medium
CN107231526B (en) Image processing method and electronic device
EP3267675B1 (en) Terminal device and photographing method
US10965877B2 (en) Image generating method and electronic apparatus
JP2006203504A (en) Image pickup device
JP6602089B2 (en) Image processing apparatus and control method thereof
JP2015095670A (en) Imaging apparatus, control method thereof and control program
JPWO2006043315A1 (en) IMAGING DEVICE AND PORTABLE DEVICE HAVING IMAGING DEVICE
JP2007266771A (en) Camera shake detector and digital camera
CN104796595B (en) Image processing method and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15907630

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15907630

Country of ref document: EP

Kind code of ref document: A1