CN106791367B - A kind of filming apparatus and method, mobile terminal - Google Patents

A kind of filming apparatus and method, mobile terminal Download PDF

Info

Publication number
CN106791367B
CN106791367B CN201611055492.XA CN201611055492A CN106791367B CN 106791367 B CN106791367 B CN 106791367B CN 201611055492 A CN201611055492 A CN 201611055492A CN 106791367 B CN106791367 B CN 106791367B
Authority
CN
China
Prior art keywords
pixel
coordinate
image
physical coordinates
camera
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201611055492.XA
Other languages
Chinese (zh)
Other versions
CN106791367A (en
Inventor
徐爱辉
王猛
陈鹏飞
张腾
汤少华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201611055492.XA priority Critical patent/CN106791367B/en
Publication of CN106791367A publication Critical patent/CN106791367A/en
Application granted granted Critical
Publication of CN106791367B publication Critical patent/CN106791367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

A kind of filming apparatus and method, mobile terminal, described device include: acquiring unit, for periodically obtaining the first image using the first camera, while obtaining the second image using second camera in shooting preview;Unit is corrected, for being corrected according to the first parameter for correcting image of pre-set first camera to the first image;The second image is corrected according to the second parameter for correcting image of pre-set second camera;Synthesis unit is synthesized to obtain third image for the first image after correcting and the second image after correction;Display unit, for showing default photo and third image in the preview window jointly;Indicating unit, the relative positional relationship of the scenery in the scenery and third image in the default photo for being shown according to the display unit, instruction user adjust position of the scenery in described the preview window in third image.

Description

A kind of filming apparatus and method, mobile terminal
Technical field
The present invention relates to electronic information technical field more particularly to a kind of filming apparatus and methods, mobile terminal.
Background technique
Present most of filming apparatus both provide display equipment real-time display shooting preview image.However, for more In frame image superposition class application (such as multiple-exposure, clone's camera), user can only be by imagining preceding piece image and current shooting figure The corresponding relationship of picture, to be shot.In this way, the photo shot is when carrying out multiple image superposition, the superposition of photographed It is likely to occur flaw, for example, personage's ghost image, out of proportion etc., thus keep image superposition effect poor, poor user experience.
Summary of the invention
The embodiment of the present invention proposes a kind of filming apparatus and method, mobile terminal, it is intended to solve multiple image superposition class and clap According to when, the problem of Overlay bad poor user experience.
A kind of filming apparatus provided in an embodiment of the present invention, comprising:
Acquiring unit, for periodically obtaining the first image using the first camera, while using second in shooting preview Camera obtains the second image;
Unit is corrected, for the first parameter for correcting image according to pre-set first camera to the first figure As being corrected;School is carried out to the second image according to the second parameter for correcting image of pre-set second camera Just;
Synthesis unit is synthesized to obtain third figure for the first image after correcting and the second image after correction Picture;
Display unit, for showing default photo and third image in the preview window jointly;
Indicating unit, in the scenery in the default photo and third image for being shown according to the display unit The relative positional relationship of scenery, instruction user adjust position of the scenery in described the preview window in third image.
Optionally, the display unit, including Overlapping display module are used for default photo and third image with default Energy proportion, Overlapping display is in described the preview window.
Optionally, the Overlapping display module, is specifically used for: determining the energy of the default photo and the third image Amount ratio;According to the determining energy proportion, default photo and third image superposition are shown in described the preview window.
Optionally, the display unit, including module is alternately displayed, it is used for default photo and third image with default Switching frequency alternately displays in described the preview window.
Optionally, the default photo includes the newest photo of the last shooting, and/or, multiple pictures are superposed on one another Fusion photo afterwards.
Optionally, first parameter includes: that the 4th physical coordinates system pre-established is imaged to first pre-established The first spin matrix and the first camera parameter of the second physical coordinates system where head;
Where second parameter includes: the 4th physical coordinates system to the second camera pre-established pre-established The second spin matrix and second camera parameter of third physical coordinates system;
The correction module is specifically used for being realized in the following ways according to pre-set first camera for school First parameter of positive image is corrected the first image:
Pre-defined size grid image identical with the first image or the second image;
For the first pixel of each of grid image, according to the first camera parameter or second camera shooting Pixel coordinate of first pixel under third pixel coordinate system is converted into the third pixel coordinate system by head parameter Under physical coordinates;Physical coordinates of first pixel under third pixel coordinate system are converted into the 4th physical coordinates The coordinate of system;Wherein, the 4th physical coordinates system is positioned at the second physical coordinates where first camera pre-established System and the second camera where third physical coordinates system between coordinate system, the third pixel coordinate system be with it is described The corresponding coordinate system of 4th physical coordinates system;
Coordinate according to the first spin matrix by first pixel in the 4th physical coordinates system is converted into institute The coordinate for stating the second physical coordinates system, the coordinate by first pixel in second physical coordinates system are converted into first Physical coordinates under pixel coordinate system;First pixel is sat in first pixel according to the first camera parameter Physical coordinates under mark system are converted into the pixel coordinate under the first pixel coordinate system;Wherein, first pixel coordinate system is Coordinate system corresponding with second physical coordinates system;
By the pixel coordinate in the grid image under first pixel coordinate system less than 0 or greater than the first image First pixel of frame filters out;
For the second pixel of each of grid image after filtering out, second pixel is sat in the first pixel Pixel coordinate under mark system carries out shaping processing;
It is shapingization treated the second pixel under the first pixel coordinate system according to pixel coordinate in the first image The color value of the pixel of pixel coordinate assigns the color value of the second pixel in the grid image after filtering out.
Optionally, the first camera parameter includes:
First camera exists in focal length fx0, first camera of the x-axis direction of second physical coordinates system The focal length fy0 in the y-axis direction of second physical coordinates system, first camera optical center project to first pixel and sit The x-axis coordinate cx0 of pixel coordinate, the optical center of first camera under mark system are projected under first pixel coordinate system The y-axis coordinate cy0 of pixel coordinate;
The second camera parameter includes:
The second camera exists in focal length fx1, the second camera of the x-axis direction of the third physical coordinates system The focal length fy1 in the y-axis direction of the third physical coordinates system, the optical center of the second camera project to the second pixel coordinate system Under the x-axis coordinate cx1 of pixel coordinate, the optical center of the second camera project to the pixel under second pixel coordinate system The y-axis coordinate cy1 of coordinate;Wherein, second pixel coordinate system is coordinate system corresponding with the third physical coordinates system;
First correction module is specifically used for realizing in the following ways described according to the first camera parameter or second Pixel coordinate of first pixel under third pixel coordinate system is converted into third pixel coordinate system by camera parameter Under physical coordinates:
According to formulaWith Alternatively, according to formulaWith Calculate physical coordinates of j-th of first pixels under the third pixel coordinate system;
Wherein, pud0_x_j is that the x-axis of physical coordinates of j-th of first pixels under the third pixel coordinate system is sat Mark, p0_x_j are the x-axis coordinate of pixel coordinate of j-th of first pixels under the third coordinate system, and pud0_y_j is jth The y-axis coordinate of physical coordinates of a first pixel under the third pixel coordinate system, p0_y_j are j-th of first pixels The y-axis coordinate of pixel coordinate under the third coordinate system.
Optionally, first correction module is specifically used for realizing in the following ways described according to the first spin matrix general First pixel is converted into the coordinate in the second physical coordinates system in the coordinate of the 4th physical coordinates system:
According to formulaJ-th of first pixels are calculated in second physics The coordinate of coordinate system;
Wherein, pOL_j (x) is x-axis coordinate of j-th of first pixels in second physical coordinates system, pOL_j (y) It is j-th of first pixels in the y-axis coordinate of second physical coordinates system, pOL_j (z) is j-th of first pixels in institute The z-axis coordinate of the second physical coordinates system is stated, R0 is first spin matrix, and pO_j (x) is j-th of first pixels described The x-axis coordinate of 4th physical coordinates system, pO_j (y) are that j-th of first pixels are sat in the y-axis of the 4th physical coordinates system Mark, pO_j (z) are z-axis coordinate of j-th of first pixels in the 4th physical coordinates system.
Optionally, first correction module be specifically used for realize in the following ways it is described to the second pixel first Pixel coordinate under pixel coordinate system carries out shapingization processing
The x-axis coordinate of pixel coordinate of second pixel under first pixel coordinate system is rounded up respectively It is rounded with downward, the y-axis coordinate difference of pixel coordinate of second pixel under first pixel coordinate system is upward It is rounded and is rounded downwards, obtain shapingization treated pixel coordinate of second pixel under first pixel coordinate system point It is not With
Wherein, pOL_k (x) is that the x-axis of pixel coordinate of k-th of second pixels under first pixel coordinate system is sat Mark, pOL_k (y) are the y-axis coordinate of pixel coordinate of k-th of second pixels under first pixel coordinate system.
On the other hand, the present invention also provides a kind of image pickup methods, comprising:
In shooting preview, the first image is periodically obtained using the first camera, while obtaining the using second camera Two images;
The first image is corrected according to the first parameter for correcting image of pre-set first camera;Root The second image is corrected according to the second parameter for correcting image of pre-set second camera;
It is synthesized the first image after correction and the second image after correction to obtain third image;
Default photo and third image are shown in the preview window jointly;
According to the relative positional relationship of the scenery in the scenery and third image in the default photo, instruction user's adjustment Position of the scenery in described the preview window in third image.
Optionally, described show default photo and third image in the preview window jointly includes: by default photo And third image, with preset energy proportion, Overlapping display is in described the preview window.
Optionally, it is described by default photo and third image with preset energy proportion, Overlapping display is in the preview The energy proportion of the default photo and the third image is comprised determining that in window;According to the determining energy proportion, Default photo and third image superposition are shown in described the preview window.
Optionally, described show default photo and third image in the preview window jointly includes: by default photo And third pre-set image is alternately displayed in described the preview window with presetting switching frequency.
Optionally, first parameter includes: that the 4th physical coordinates system pre-established is imaged to first pre-established The first spin matrix and the first camera parameter of the second physical coordinates system where head;
Where second parameter includes: the 4th physical coordinates system to the second camera pre-established pre-established The second spin matrix and second camera parameter of third physical coordinates system;
It is described that school is carried out to the first image according to the first parameter for correcting image of pre-set first camera Just include:
Pre-defined size grid image identical with the first image or the second image;
For the first pixel of each of grid image, according to the first camera parameter or second camera shooting Pixel coordinate of first pixel under third pixel coordinate system is converted into the third pixel coordinate system by head parameter Under physical coordinates;Physical coordinates of first pixel under third pixel coordinate system are converted into the 4th physical coordinates The coordinate of system;Wherein, the 4th physical coordinates system is positioned at the second physical coordinates where first camera pre-established System and the second camera where third physical coordinates system between coordinate system, the third pixel coordinate system be with it is described The corresponding coordinate system of 4th physical coordinates system;
Coordinate according to the first spin matrix by first pixel in the 4th physical coordinates system is converted into institute The coordinate for stating the second physical coordinates system, the coordinate by first pixel in second physical coordinates system are converted into first Physical coordinates under pixel coordinate system;First pixel is sat in first pixel according to the first camera parameter Physical coordinates under mark system are converted into the pixel coordinate under the first pixel coordinate system;Wherein, first pixel coordinate system is Coordinate system corresponding with second physical coordinates system;
By the pixel coordinate in the grid image under first pixel coordinate system less than 0 or greater than the first image First pixel of frame filters out;
For the second pixel of each of grid image after filtering out, second pixel is sat in the first pixel Pixel coordinate under mark system carries out shaping processing;
It is shapingization treated the second pixel under the first pixel coordinate system according to pixel coordinate in the first image The color value of the pixel of pixel coordinate assigns the color value of the second pixel in the grid image after filtering out.
Optionally, the first camera parameter includes:
First camera exists in focal length fx0, first camera of the x-axis direction of second physical coordinates system The focal length fy0 in the y-axis direction of second physical coordinates system, first camera optical center project to first pixel and sit The x-axis coordinate cx0 of pixel coordinate, the optical center of first camera under mark system are projected under first pixel coordinate system The y-axis coordinate cy0 of pixel coordinate;
The second camera parameter includes:
The second camera exists in focal length fx1, the second camera of the x-axis direction of the third physical coordinates system The focal length fy1 in the y-axis direction of the third physical coordinates system, the optical center of the second camera project to the second pixel coordinate system Under the x-axis coordinate cx1 of pixel coordinate, the optical center of the second camera project to the pixel under second pixel coordinate system The y-axis coordinate cy1 of coordinate;Wherein, second pixel coordinate system is coordinate system corresponding with the third physical coordinates system;
It is described according to the first camera parameter or second camera parameter by first pixel in third pixel coordinate The physical coordinates that are converted under third pixel coordinate system of pixel coordinate under system include:
According to formulaWithAlternatively, according to formula WithCalculate object of j-th of first pixels under the third pixel coordinate system Manage coordinate;
Wherein, pud0_x_j is that the x-axis of physical coordinates of j-th of first pixels under the third pixel coordinate system is sat Mark, p0_x_j are the x-axis coordinate of pixel coordinate of j-th of first pixels under the third coordinate system, and pud0_y_j is jth The y-axis coordinate of physical coordinates of a first pixel under the third pixel coordinate system, p0_y_j are j-th of first pixels The y-axis coordinate of pixel coordinate under the third coordinate system.
Optionally, the coordinate according to the first spin matrix by the first pixel in the 4th physical coordinates system is converted into The coordinate of second physical coordinates system includes:
According to formulaJ-th of first pixels are calculated in second physics The coordinate of coordinate system;
Wherein, pOL_j (x) is x-axis coordinate of j-th of first pixels in second physical coordinates system, pOL_j (y) It is j-th of first pixels in the y-axis coordinate of second physical coordinates system, pOL_j (z) is j-th of first pixels in institute The z-axis coordinate of the second physical coordinates system is stated, R0 is first spin matrix, and pO_j (x) is j-th of first pixels described The x-axis coordinate of 4th physical coordinates system, pO_j (y) are that j-th of first pixels are sat in the y-axis of the 4th physical coordinates system Mark, pO_j (z) are z-axis coordinate of j-th of first pixels in the 4th physical coordinates system.
Optionally, the pixel coordinate to the second pixel under the first pixel coordinate system carries out shapingization processing packet It includes:
The x-axis coordinate of pixel coordinate of second pixel under first pixel coordinate system is rounded up respectively It is rounded with downward, the y-axis coordinate difference of pixel coordinate of second pixel under first pixel coordinate system is upward It is rounded and is rounded downwards, obtain shapingization treated pixel coordinate of second pixel under first pixel coordinate system point It is not With
Wherein, pOL_k (x) is that the x-axis of pixel coordinate of k-th of second pixels under first pixel coordinate system is sat Mark, pOL_k (y) are the y-axis coordinate of pixel coordinate of k-th of second pixels under first pixel coordinate system.
On the other hand, the present invention also provides a kind of mobile terminals, including any middle filming apparatus provided by the invention.
Filming apparatus provided by the invention, display unit can be in shooting previews, by default photo and third image It is shown in the preview window jointly;Indicating unit can be opposite with the scenery in third image according to the scenery in default photo Positional relationship, instruction user adjust position of the scenery in described the preview window in third image.In this way, when needing to multiframe When image is overlapped processing, when subsequent shooting photo, can be using the photo that had previously shot as reference, to assist user's standard The scenery that really locking is currently carrying out shooting preview should be in which kind of position of the preview window respectively, so as to avoid the later period The various flaws being likely to occur when photo superposition are carried out, photographic quality is effectively increased, also greatly improves user experience.
Also, school is carried out by the image that pre-set first parameter and the second parameter obtain two cameras Just, to reduce the same o'clock position difference on the image that two cameras are shot.
Detailed description of the invention
The attached drawing in the embodiment of the present invention is illustrated below, the attached drawing in embodiment be for of the invention into one Step understands, is used to explain the present invention, does not constitute a limitation on the scope of protection of the present invention together with specification.
The hardware structural diagram of Fig. 1 optional mobile terminal of each embodiment one to realize the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is a kind of structural schematic diagram of filming apparatus provided in an embodiment of the present invention;
Fig. 4 is a kind of effect diagram shot using filming apparatus provided in an embodiment of the present invention;
Fig. 5 is another structural schematic diagram of filming apparatus provided in an embodiment of the present invention;
Fig. 6 is another structural schematic diagram of filming apparatus provided in an embodiment of the present invention;
Fig. 7 is a kind of flow chart of image pickup method provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram for the coordinate system that the embodiment of the present invention is established;
Fig. 9 is the flow chart for the method that the embodiment of the present invention obtains the first parameter and the second parameter;
Figure 10 is the flow chart for the method that the embodiment of the present invention calculates the first parameter and the second parameter;
Figure 11 is another flow chart of image pickup method provided in an embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
For the ease of the understanding of those skilled in the art, optional description is made to the present invention with reference to the accompanying drawing, it can not For limiting the scope of the invention.It should be noted that in the absence of conflict, embodiment and implementation in the application Various modes in example can be combined with each other.
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use For indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself There is no specific meanings.Therefore, " module " can be used mixedly with " component ".
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as moving Phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP The mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidated Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that in addition to being used in particular for moving Except the element of purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Fig. 1 to realize the present invention the optional mobile terminal of each embodiment one hardware configuration signal.
Mobile terminal 100 may include wireless communication unit 110, A/V (audio/video) input unit 120, user's input Unit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power supply unit 190 Etc..Fig. 1 shows the mobile terminal with various assemblies, it should be understood that being not required for implementing all groups shown Part.More or fewer components can alternatively be implemented.The element of mobile terminal will be discussed in more detail below.
Wireless communication unit 110 generally includes one or more components, allows mobile terminal 100 and wireless communication system Or the radio communication between network.For example, wireless communication unit may include broadcasting reception module 111, mobile communication module 112, at least one of wireless Internet module 113, short range communication module 114 and location information module 115.
Broadcasting reception module 111 receives broadcast singal and/or broadcast from external broadcast management server via broadcast channel Relevant information.Broadcast channel may include satellite channel and/or terrestrial channel.Broadcast management server, which can be, to be generated and sent The broadcast singal and/or broadcast related information generated before the server or reception of broadcast singal and/or broadcast related information And send it to the server of terminal.Broadcast singal may include TV broadcast singal, radio signals, data broadcasting Signal etc..Moreover, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase Closing information can also provide via mobile communications network, and in this case, broadcast related information can be by mobile communication mould Block 112 receives.Broadcast singal can exist in a variety of manners, for example, it can be with the electronics of digital multimedia broadcasting (DMB) Program guide (EPG), digital video broadcast-handheld (DVB-H) electronic service guidebooks (ESG) etc. form and exist.Broadcast Receiving module 111 can receive signal broadcast by using various types of broadcast systems.Particularly, broadcasting reception module 111 It can be wide by using such as multimedia broadcasting-ground (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video It broadcasts-holds (DVB-H), forward link media (MediaFLO@) Radio Data System, received terrestrial digital broadcasting integrated service (ISDB-T) etc. digit broadcasting system receives digital broadcasting.Broadcasting reception module 111, which may be constructed such that, to be adapted to provide for extensively Broadcast the various broadcast systems and above-mentioned digit broadcasting system of signal.Via the received broadcast singal of broadcasting reception module 111 and/ Or broadcast related information can store in memory 160 (or other types of storage medium).
Mobile communication module 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminal And at least one of server and/or receive from it radio signal.Such radio signal may include that voice is logical Talk about signal, video calling signal or according to text and/or Multimedia Message transmission and/or received various types of data.
The Wi-Fi (Wireless Internet Access) of the support mobile terminal of wireless Internet module 113.The module can be internally or externally It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
Short range communication module 114 is the module for supporting short range communication.Some examples of short-range communication technology include indigo plant ToothTM, radio frequency identification (RFID), Infrared Data Association (IrDA), ultra wide band (UWB), purple honeybeeTMEtc..
Location information module 115 is the module for checking or obtaining the location information of mobile terminal.Location information module Typical case be GPS (global positioning system).According to current technology, GPS module 115, which calculates, comes from three or more satellites Range information and correct time information and the Information application triangulation for calculating, thus according to longitude, latitude Highly accurately calculate three-dimensional current location information.Currently, it is defended for the method for calculating position and temporal information using three Star and the error that calculated position and temporal information are corrected by using an other satellite.In addition, GPS module 115 It can be by Continuous plus current location information in real time come calculating speed information.
A/V input unit 120 is for receiving audio or video signal.A/V input unit 120 may include 121 He of camera Microphone 1220, camera 121 is to the static map obtained in video acquisition mode or image capture mode by image capture apparatus The image data of piece or video is handled.Treated, and picture frame may be displayed on display unit 151.At camera 121 Picture frame after reason can store in memory 160 (or other storage mediums) or carry out via wireless communication unit 110 It sends, two or more cameras 1210 can be provided according to the construction of mobile terminal.Microphone 122 can be in telephone relation mould Sound (audio data) is received via microphone in formula, logging mode, speech recognition mode etc. operational mode, and can be incited somebody to action Such acoustic processing is audio data.Audio that treated (voice) data can be converted in the case where telephone calling model For the format output that can be sent to mobile communication base station via mobile communication module 112.Various types can be implemented in microphone 122 Noise eliminate (or inhibit) algorithm with eliminate noise that (or inhibition) generates during sending and receiving audio signal or Person's interference.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminal Kind operation.User input unit 130 allows user to input various types of information, and may include keyboard, metal dome, touch Plate (for example, the sensitive component of detection due to the variation of resistance, pressure, capacitor etc. caused by being contacted), idler wheel, rocking bar etc. Deng.Particularly, when touch tablet is superimposed upon in the form of layer on display unit 151, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shape State), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal 100 orientation, the acceleration or deceleration movement of mobile terminal 100 and direction etc., and generate for controlling mobile terminal 100 The order of operation or signal.For example, sensing unit 140 can sense when mobile terminal 100 is embodied as sliding-type mobile phone The sliding-type phone is to open or close.In addition, sensing unit 140 be able to detect power supply unit 190 whether provide electric power or Whether person's interface unit 170 couples with external device (ED).Sensing unit 140 may include proximity sensor 141.
Interface unit 170 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Identification module can be storage and use each of mobile terminal 100 for verifying user It plants information and may include subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) Etc..In addition, the device (hereinafter referred to as " identification device ") with identification module can take the form of smart card, therefore, know Other device can be connect via port or other attachment devices with mobile terminal 100.Interface unit 170, which can be used for receiving, to be come from The input (for example, data information, electric power etc.) of external device (ED) and the input received is transferred in mobile terminal 100 One or more elements can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connect with external base, interface unit 170 may be used as allowing will be electric by it Power, which is provided from pedestal to the path or may be used as of mobile terminal 100, allows the various command signals inputted from pedestal to pass through it It is transferred to the path of mobile terminal.The various command signals or electric power inputted from pedestal, which may be used as mobile terminal for identification, is The no signal being accurately fitted on pedestal.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeated Signal (for example, audio signal, vision signal, alarm signal, vibration signal etc.) out.Output unit 150 may include display Unit 151, audio output module 152, alarm unit 153 etc..
Display unit 151 may be displayed on the information handled in mobile terminal 100.For example, when mobile terminal 100 is in electricity When talking about call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia file Downloading etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling mode Or when image capture mode, display unit 151 can show captured image and/or received image, show video or figure Picture and the UI or GUI of correlation function etc..
Meanwhile when display unit 151 and touch tablet in the form of layer it is superposed on one another to form touch screen when, display unit 151 may be used as input unit and output device.Display unit 151 may include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least It is a kind of.Some in these displays may be constructed such that transparence to allow user to watch from outside, this is properly termed as transparent Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific Desired embodiment, mobile terminal 100 may include two or more display units (or other display devices), for example, moving Dynamic terminal may include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detecting touch Input pressure and touch input position and touch input area.
Audio output module 152 can mobile terminal be in call signal reception pattern, call mode, logging mode, It is when under the isotypes such as speech recognition mode, broadcast reception mode, wireless communication unit 110 is received or in memory 160 The audio data transducing audio signal of middle storage and to export be sound.Moreover, audio output module 152 can provide and movement The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that terminal 100 executes. Audio output module 152 may include loudspeaker, buzzer etc..
Alarm unit 153 can provide output notifying event to mobile terminal 100.Typical event can be with Including calling reception, message sink, key signals input, touch input etc..Other than audio or video output, alarm unit 153 can provide output in different ways with the generation of notification event.For example, alarm unit 153 can be in the form of vibration Output is provided, when receiving calling, message or some other entrance communications (incoming communication), alarm list Member 153 can provide tactile output (that is, vibration) to notify to user.By providing such tactile output, even if When the mobile phone of user is in the pocket of user, user also can recognize that the generation of various events.Alarm unit 153 The output of the generation of notification event can be provided via display unit 151 or audio output module 152.
Memory 160 can store the software program etc. of the processing and control operation that are executed by controller 180, Huo Zheke Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And And memory 160 can store about the vibrations of various modes and audio signal exported when touching and being applied to touch screen Data.
Memory 160 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, more Media card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access storage Device (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connection The network storage device of 160 store function cooperates.
The overall operation of the usually control mobile terminal of controller 180.For example, controller 180 executes and voice communication, data Communication, video calling etc. relevant control and processing.In addition, controller 180 may include for reproducing (or playback) more matchmakers The multi-media module 1810 of volume data, multi-media module 1810 can construct in controller 180, or can be structured as and control Device 180 processed separates.Controller 180 can be with execution pattern identifying processing, by the handwriting input executed on the touchscreen or figure Piece draws input and is identified as character or image.
Power supply unit 190 receives external power or internal power under the control of controller 180 and provides operation each member Electric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereof Machine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Programming gate array (FPGA), controller, microcontroller, microprocessor, is designed to execute function described herein processor At least one of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180. For software implementation, the embodiment of such as process or function can with allow to execute the individual of at least one functions or operations Software module is implemented.Software code can by the software application (or program) write with any programming language appropriate Lai Implement, software code can store in memory 160 and be executed by controller 180.
So far, oneself is through describing mobile terminal according to its function.In the following, for the sake of brevity, will description such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc., which is used as, to be shown Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 may be constructed such that using via frame or grouping send data it is all if any Line and wireless communication system and satellite-based communication system operate.
Referring now to Fig. 2 description communication system that wherein mobile terminal according to the present invention can operate.
Different air interface and/or physical layer can be used in such communication system.For example, used by communication system Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system System (UMTS) (particularly, long term evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under The description in face is related to cdma communication system, but such introduction is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system may include multiple mobile terminals 100, multiple base stations (BS) 270, base station Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to and Public Switched Telephony Network (PSTN) 290 form interface.MSC280 is also structured to form interface with the BSC275 that can be couple to base station 270 via back haul link. Back haul link can be constructed according to any in several known interfaces, and the interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system may include multiple B SC2750 as shown in Figure 2.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of direction specific direction Each subregion of line covering is radially far from BS270.Alternatively, each subregion can be by two or more for diversity reception Antenna covering.Each BS270, which may be constructed such that, supports multiple frequency distribution, and the distribution of each frequency has specific frequency spectrum (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed, which intersects, can be referred to as CDMA Channel.BS270 can also be referred to as base station transceiver System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly indicating single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Alternatively, each subregion of specific BS270 can be claimed For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to the mobile terminal operated in system by broadcsting transmitter (BT) 295 100.Broadcasting reception module 111 as shown in Figure 1 is arranged at mobile terminal 100 to receive the broadcast sent by BT295 Signal.In fig. 2 it is shown that several global positioning system (GPS) satellites 300.The help of satellite 300 positions multiple mobile terminals At least one of 100.
In Fig. 2, multiple satellites 300 are depicted, it is understood that, it is useful to can use any number of satellite acquisition Location information.GPS module 115 as shown in Figure 1 is generally configured to cooperate with satellite 300 to obtain desired positioning and believe Breath.It substitutes GPS tracking technique or except GPS tracking technique, the other of the position that can track mobile terminal can be used Technology.In addition, at least one 300 property of can choose of GPS satellite or extraly processing satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminals 100 Signal.Mobile terminal 100 usually participates in call, information receiving and transmitting and other types of communication.Certain base station 270 is received each anti- It is handled in specific BS270 to link signal.The data of acquisition are forwarded to relevant BSC275.BSC provides call The mobile management function of resource allocation and the coordination including the soft switching process between BS270.The number that BSC275 will also be received According to MSC280 is routed to, the additional route service for forming interface with PSTN290 is provided.Similarly, PSTN290 with MSC280 forms interface, and MSC and BSC275 form interface, and BSC275 controls BS270 correspondingly with by forward link signals It is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the method for the present invention is proposed.
As shown in figure 3, first embodiment of the invention proposes a kind of filming apparatus, the photograph of the device and above-mentioned mobile terminal Module is corresponding, it may include:
Acquiring unit 31 periodically obtains the first image using the first camera in shooting preview, while using the Two cameras obtain the second image;
Unit 32 is corrected, for the first parameter for correcting image according to pre-set first camera to first Image is corrected;School is carried out to the second image according to the second parameter for correcting image of pre-set second camera Just;
Synthesis unit 33 is synthesized to obtain third figure for the first image after correcting and the second image after correction Picture;
Display unit 34, for showing default photo and third image in the preview window jointly;
Indicating unit 35, for according in the scenery and third image in the default photo shown in display unit 34 Scenery relative positional relationship, instruction user adjusts position of the scenery in described the preview window in third image.
Wherein, the specific implementation of acquiring unit 31, correction unit 32 and synthesis unit 33 can refer to subsequent image pickup method Realization process, which is not described herein again.
Filming apparatus provided in an embodiment of the present invention, display unit 34 can in shooting preview, by default photo and Third image is shown in the preview window jointly;Indicating unit 35 can be according in the scenery and third image in default photo The relative positional relationship of scenery, instruction user adjust position of the scenery in described the preview window in third image.In this way, working as When needing to be overlapped processing to multiple image, when subsequent shooting photo can using the photo that had previously shot as referring to, so as to Auxiliary user, which accurately locks the current scenery for carrying out shooting preview respectively, should be in which kind of position of the preview window, thus The various flaws being likely to occur when later period progress photo superposition are avoided, photographic quality is effectively increased, also greatly improves use Family experience.
As shown in figure 4, the first width is default photo in three width images from top to bottom, an intermediate width is third image, A bottom width is to show default photo and third image in the preview window jointly.Figure 4, it is seen that third image In position of the scenery relative to scenery in default photo, so as to indicate that user adjusts the scenery in third image described Position in the preview window, to obtain expected image effect.
Specifically, display unit 34, can be by default photo and third image in shooting preview in the present embodiment It is shown in the preview window jointly.These default photos are either the photograph just shot in several continuous shootings applied at one Piece has shot the photo being stored in various storage equipment before being also possible to very early, as long as user needs with this photo to be ginseng The relative position to determine scenery in the currently third image that is shooting is examined, it just can be by the photo and third image together It is shown in the preview window.
In order to achieve the effect that reference by location, when specifically carrying out preview display, presets photo and third image respectively can To be full of entire the preview window, and in a manner of different light and shades, gray scale, lines etc. default photo and third image distinguished aobvious Show.For example, the brightness of default photo can be arranged it is smaller, to the larger of the brightness of third image setting, so as in preview The two is distinguish in window;Default photo can also be arranged to black and white gray scale to show, and coloured silk is arranged to third image Color is shown, to be distinguish in the preview window to the two;The scenery lines in default photo can also be sketched the contours of with dotted line, To provide reference etc. for the scenery in third image.The embodiment of the present invention is unlimited to this.
Specifically, indicating unit 35, it can be according to the scenery and in the default photo shown in display unit 34 The relative positional relationship of scenery in three images, instruction user adjust position of the scenery in the preview window in third image. Optionally, the relative positional relationship for presetting the scenery in the scenery and third image in photo, may include between each scenery Relative positional relationship and proportionate relationship also may include relative position of each scenery in entire image.And indicating unit 35 refers to Show that user adjusts position of the scenery in described the preview window in third image, then it both can be by adjusting binocular camera Position or angle are realized, can also be realized by adjusting the actual placement for the scenery that is taken.
Optionally, indicating unit 35 indicates that user adjusts position of the scenery in third image in described the preview window To after predeterminated position, filming apparatus provided in an embodiment of the present invention can be according to the photographing instruction of user by the scape in third image Object is taken photos.Due to when shooting this photo with reference to the similar photo that is overlapped of needs, the position of scenery in photo Set, size can be determined conveniently, thus effectively increase superposition photomontage quality also greatly improve use Family experience.
Optionally, in an embodiment of the present invention, the quantity for being used as the default photo of reference is unlimited, both can be 1 , or multiple, it both may include the newest photo of the last shooting, and also may include after multiple pictures are superposed on one another Fusion photo.Wherein, multiple pictures fusion superposed on one another is also superimposed with regard to multiple pictures, wherein every photo occupies one Fixed energy proportion.
For example, the total number for being located at image sequence to be shown in the preview window is n, wherein the arrangement of n images Sequence reversing according to image capturing time, i.e., the image newly taken pictures more are thought to need mainly to be shown.
It (reverses, i.e., the d finally shot images) d before if the need to keep as main display image, then may be used With the energy binned to display image for d+1 parts, it is respectively used to preceding d width primary picture and remaining n-d width in display sequence Want image.If showing that the energy of image is 1, then the energy distribution of each width image can be expressed as follows:
Correspondingly, if image sequence is I1,…,In, the make of the final image I for showing user are as follows:
Wherein, I is the gross energy of the image shown in the preview window, I1,…,InThe energy of respectively each width image.
Optionally, display unit 34, can be using Overlapping display when showing default photo and third image jointly Mode, can also be by the way of alternately displaying or other modes.
For example, as shown in figure 5, the embodiment of the present invention provides a kind of filming apparatus, comprising:
Acquiring unit 31 periodically obtains the first image using the first camera in shooting preview, while using the Two cameras obtain the second image;
Unit 32 is corrected, for the first parameter for correcting image according to pre-set first camera to first Image is corrected;School is carried out to the second image according to the second parameter for correcting image of pre-set second camera Just;
Synthesis unit 33 is synthesized to obtain third figure for the first image after correcting and the second image after correction Picture;
Display unit 34, for showing default photo and third image in the preview window jointly;
Indicating unit 35, for according in the scenery and third image in the default photo shown in display unit 34 Scenery relative positional relationship, instruction user adjusts position of the scenery in described the preview window in third image.
Wherein, display unit 34, it may include Overlapping display module 341 is used for default photo and third image with pre- If energy proportion, Overlapping display is in described the preview window.
Specifically, when as reference default photo and third image be shown in the preview window jointly when, third The energy of image can also be determined according to formula 1, it is only necessary to using third image as photo when n=1, the number of other photos Analogized forward with this.
Default photo is arbitrarily opened it should be noted that, although can theoretically show in the preview window, but according to human eye Identification habit, exceed three Zhang Yihou in same position superimposed image, the order of accuarcy of human eye identification will decline, and human eye Degree of fatigue also will increase.Therefore, in one embodiment of the invention, 2 default photos can be used as a reference to auxiliary It helps and takes pictures, count live preview scene in this way, a total of 3 width image is being shown jointly in the preview window.
By the symbolic expression of formula 1, if having shot image number is n, display retains image number d=2, then energy balane side Formula are as follows:
Wherein A1It is the energy of real-time third image, Ai(i=2 ..., n) is the energy of the i-th width image of shooting.
As n≤2, since number is very few, it is only necessary to divide equally energy A1=A2=1/n.
Live preview image calculated in this way, newest shooting image, secondary new shooting image are accounted for according to compared with reasonable manner With 1/3 energy of display image, display effect is preferable.
Certainly, in other embodiments of the invention, the distribution of energy can also have other modes, the energy of each width image Proportion can be configured by user according to actual needs.For example, in another embodiment of the present invention, it can be by preview window The energy mean allocation of image is shown in mouthful into three parts, the third image that a copy of it gives current live preview is shown, another Part is given important references object and is shown, the newest photo for such as giving the last shooting shows that remaining portion gives other ginsengs Object is examined to show, such as give remaining earlier the time shooting photo show.Here, the multiple pictures shot earliest are shared remaining A energy, therefore the opposite influence power for weakening the photo of time shooting earlier.
Optionally, in the present embodiment, when display unit 34 shows default photo and third figure using stacked system jointly When picture, Overlapping display module 341 can be specifically used for:
Determine the energy proportion of the default photo and the third image;
According to the determining energy proportion, default photo and third image superposition are shown in described the preview window In.
In the present embodiment, energy proportion can still be determined with formula 1.
Above-described embodiment is mainly shown jointly by the way of showing default photo and third image superposition in preview In window, but embodiments of the present invention are not limited thereto.In other embodiments of the invention, in shooting preview, photo is preset And third image can also be otherwise shown in the preview window jointly.
Specifically, as shown in fig. 6, the present embodiment provides a kind of filming apparatus, it may include:
Acquiring unit 31 periodically obtains the first image using the first camera in shooting preview, while using the Two cameras obtain the second image;
Unit 32 is corrected, for the first parameter for correcting image according to pre-set first camera to first Image is corrected;School is carried out to the second image according to the second parameter for correcting image of pre-set second camera Just;
Synthesis unit 33 is synthesized to obtain third figure for the first image after correcting and the second image after correction Picture;
Display unit 34, for showing default photo and third image in the preview window jointly;
Indicating unit 35, for according in the scenery and third image in the default photo shown in display unit 34 Scenery relative positional relationship, instruction user adjusts position of the scenery in described the preview window in third image.
Wherein, display unit 34, including module 342 is alternately displayed, it is used for default photo and third image with default Switching frequency alternately displays in described the preview window.
Although in this way, be not superimposed to each image shown in the preview window, by feat of by default photo and working as Preceding preview scenery still may provide the user with good reference of taking pictures to preset alternately displaying for switching frequency.
Correspondingly, as shown in fig. 7, the embodiment of the present invention also provides a kind of image pickup method, comprising:
S41 periodically obtains the first image using the first camera, while obtaining using second camera in shooting preview Take the second image;
In this step, the first camera and second camera form binocular camera, have common visual field, can be Positioned at the left camera and right camera of same level, it is also possible to the upper camera and lower camera shooting positioned at same vertical plane Head, the case where being also possible to other, the embodiment of the present invention is not construed as limiting this.
S42 carries out school to the first image according to the first parameter for correcting image of pre-set first camera Just;The second image is corrected according to the second parameter for correcting image of pre-set second camera;
In this step, the first parameter includes: the 4th physical coordinates system that pre-establishes to the first camera pre-established The the first spin matrix R0 and the first camera parameter of second physical coordinates system at place.
Wherein, the first camera parameter include: the first camera the x-axis direction of the second physical coordinates system focal length fx0, Focal length fy0 of first camera in the y-axis direction of the second physical coordinates system, optical center (i.e. the second physical coordinates of the first camera The origin of system) the x-axis coordinate cx0 of pixel coordinate, the optical center of the first camera that project under the first pixel coordinate system project to The y-axis coordinate cy0 of pixel coordinate under first pixel coordinate system.
Second parameter includes: the third physical coordinates system where the 4th physical coordinates system to the second camera pre-established The second spin matrix R1 and second camera parameter.
Second camera parameter include: second camera the x-axis direction of third physical coordinates system focal length fx1, second Focal length fy1 of the camera in the y-axis direction of third physical coordinates system, optical center (the i.e. third physical coordinates system of second camera Origin) the x-axis coordinate cx1 of pixel coordinate, the optical center of second camera that project under the second pixel coordinate system project to second The y-axis coordinate cy1 of pixel coordinate under pixel coordinate system.
Wherein, as shown in figure 8, the first physical coordinates system P, third physical coordinates system OR, the 4th physical coordinates system O and second Physical coordinates system OL is three-dimensional system of coordinate, the first pixel coordinate system Pl, the second pixel coordinate system Pr and third pixel coordinate system P0 For two-dimensional coordinate system.
Wherein, the first physical coordinates system is the coordinate system where subject, can be arbitrarily arranged according to actual needs, The z-axis that the second physical coordinates system can be set is parallel with the optical axis of the first camera, and the z-axis of third physical coordinates system can be set Parallel with the optical axis of second camera, the 4th physical coordinates system is a virtual physical coordinates system, and the 4th physics can be set The origin of coordinate system to the second physical coordinates system origin distance and to the third object where the second camera pre-established Manage being equidistant for the origin of coordinate system.
Wherein, the first pixel coordinate system is coordinate system corresponding with the second physical coordinates system, is and the first camera The corresponding coordinate system of detector;Second pixel coordinate system is coordinate system corresponding with third physical coordinates system, is and second The corresponding coordinate system of the detector of camera;Third pixel coordinate system is coordinate system corresponding with the 4th physical coordinates system, i.e., It is coordinate system corresponding with the detector of Softcam where the 4th physical coordinates system.These three pixel coordinate systems can be with It is set according to actual needs.
In this step, according to pre-set first camera for correct the first parameter of image to the first image into Row corrects
Pre-defined size grid image identical with the first image or the second image;
It, will according to the first camera parameter or second camera parameter for the first pixel of each of grid image First pixel is converted into the physical coordinates under third pixel coordinate system in the pixel coordinate under third pixel coordinate system;By Physical coordinates of one pixel under third pixel coordinate system are converted into the coordinate in the 4th physical coordinates system;Wherein, the 4th object Managing coordinate system is positioned at the second physical coordinates system where the first camera pre-established and the third where second camera Coordinate system between physical coordinates system, third pixel coordinate system are coordinate system corresponding with the 4th physical coordinates system;
The first pixel is converted into sitting in the second physics in the coordinate of the 4th physical coordinates system according to the first spin matrix First pixel is converted into the physics under the first pixel coordinate system in the coordinate of the second physical coordinates system and sat by the coordinate for marking system Mark;Physical coordinates of first pixel under the first pixel coordinate system are converted into the first pixel according to the first camera parameter Pixel coordinate under coordinate system;Wherein, the first pixel coordinate system is coordinate system corresponding with the second physical coordinates system;
By the pixel coordinate in grid image under the first pixel coordinate system less than 0 or greater than the of the first framing mask One pixel filters out;
For the second pixel of each of grid image after filtering out, to the second pixel in the first pixel coordinate system Under pixel coordinate carry out shaping processing;
It is shapingization treated the second pixel under the first pixel coordinate system according to pixel coordinate in the first image The color value of the pixel of pixel coordinate assigns the color value of the second pixel in the grid image after filtering out.
Wherein, when the first image and the second image are gray level image, the gray level of grid image can be arbitrarily arranged, Such as 255 or 0 are set by the gray level of grid image, naturally it is also possible to be arranged to other values;When the first image and When two images are color image, the value of R, G, B of grid image can be arbitrarily arranged, for example, can by the R of grid image, G, B is disposed as 255 or 0, naturally it is also possible to be arranged to other values, the embodiment of the present invention is not construed as limiting this.
Wherein, according to the first camera parameter or second camera parameter by the first pixel under third pixel coordinate system The physical coordinates that are converted under third pixel coordinate system of pixel coordinate include:
According to formulaWith Alternatively, according to formulaWith Calculate physical coordinates of j-th of first pixels under third pixel coordinate system;
Wherein, pud0_x_j is the x-axis coordinate of physical coordinates of j-th of first pixels under third pixel coordinate system, P0_x_j is the x-axis coordinate of pixel coordinate of j-th of first pixels under third coordinate system, and pud0_y_j is j-th first The y-axis coordinate of physical coordinates of the pixel under third pixel coordinate system, p0_y_j are j-th of first pixels in third coordinate The y-axis coordinate of pixel coordinate under system.
Wherein it is possible to which the known technology using those skilled in the art is realized the first pixel in third pixel coordinate system Under physical coordinates be converted into the coordinate in the 4th physical coordinates system, be not intended to limit the present invention the protection scope of embodiment, Which is not described herein again.
Wherein, the coordinate according to the first spin matrix by the first pixel in the 4th physical coordinates system is converted into the second object Reason coordinate system coordinate include:
According to formulaJ-th of first pixels are calculated in the second physical coordinates The coordinate of system;
Wherein, pOL_j (x) is x-axis coordinate of j-th of first pixels in the second physical coordinates system, and pOL_j (y) is jth For a first pixel in the y-axis coordinate of the second physical coordinates system, pOL_j (z) is j-th of first pixels in the second physical coordinates The z-axis coordinate of system, R0 are the first spin matrix, and pO_j (x) is that j-th of first pixels are sat in the x-axis of the 4th physical coordinates system Mark, pO_j (y) are y-axis coordinate of j-th of first pixels in the 4th physical coordinates system, and pO_j (z) is j-th of first pixels In the z-axis coordinate of the 4th physical coordinates system.
The first pixel is sat in the second physics wherein it is possible to be realized using the known technological means of those skilled in the art The coordinate of mark system is converted into the physical coordinates under the first pixel coordinate system, is not intended to limit the present invention the protection model of embodiment It encloses, which is not described herein again.
Wherein, physical coordinates of first pixel under the first pixel coordinate system are converted into according to the first camera parameter Pixel coordinate under the first pixel coordinate system includes:
According to formula POL_j_pixel (x)=c_OL_j (x) fx0+cx0 and POL_j_pixel (y)=c_OL_j (y) Fy0+cy0 calculates pixel coordinate of first pixel under the first pixel coordinate system;
Wherein, POL_j_pixiel (x) is the x of pixel coordinate of j-th of first pixels under the first pixel coordinate system Axial coordinate, POL_j_pixiel (y) are the y-axis coordinate of pixel coordinate of j-th of first pixels under the first pixel coordinate system, C_OL_j (x) is the x-axis coordinate of physical coordinates of j-th of first pixels under the first pixel coordinate system, and c_OL_j (y) is the The y-axis coordinate of j physical coordinates of first pixel under the first pixel coordinate system.
Wherein, if the x-axis coordinate of pixel coordinate of first pixel under the first pixel coordinate system less than 0 or is greater than The width of first image, alternatively, the y-axis coordinate of pixel coordinate of first pixel under the first pixel coordinate system less than 0 or Greater than the length of the first image, then the first pixel is filtered out.
Wherein, the pixel coordinate progress shapingization to the second pixel under the first pixel coordinate system, which is handled, includes:
The x-axis coordinate of pixel coordinate of second pixel under the first pixel coordinate system is rounded up respectively and is taken downwards It is whole, the y-axis coordinate of pixel coordinate of second pixel under the first pixel coordinate system is rounded up respectively and is rounded downwards, is obtained To shapingization, treated that pixel coordinate of second pixel under the first pixel coordinate system is respectively With
Wherein, pOL_k (x) is the x-axis coordinate of pixel coordinate of k-th of second pixels under the first pixel coordinate system, POL_k (y) is the y-axis coordinate of pixel coordinate of k-th of second pixels under the first pixel coordinate system.
It wherein, is shapingization treated the second pixel in the first pixel coordinate system according to pixel coordinate in the first image Under the color value of the second pixel that assigns in the grid image after filtering out of color value of pixel of pixel coordinate include:
According to formula Assign the color value of the second pixel in the grid image after filtering out.
Wherein, I (k) is the gray value of k-th of second pixels in grid image, and w1, w2, w3 and w4 are weight system Number,It is for pixel coordinate in the first imagePixel Gray value,It is for pixel coordinate in the first imagePicture The gray value of vegetarian refreshments,It is for pixel coordinate in the first image Pixel gray value,It is for pixel coordinate in the first imagePixel gray value;
Alternatively, according to formula
And formulaAfter imparting filters out Grid image in the second pixel color value.
Wherein, IR (k) is the R value of k-th of second pixels in grid image, and w1, w2, w3 and w4 are weight coefficient,It is for pixel coordinate in the first imagePicture The R value of vegetarian refreshments,It is for pixel coordinate in the first imagePixel R value,For in the first image Pixel coordinate isPixel R value,For Pixel coordinate is in first imagePixel R value;
IG (k) is the G value of k-th of second pixels in grid image,For Pixel coordinate is in first imagePixel G value,It is for pixel coordinate in the first imagePicture The G value of vegetarian refreshments,It is for pixel coordinate in the first imagePixel G value,For in the first image Pixel coordinate isPixel G value;
IB (k) is the B value of k-th of second pixels in grid image,For Pixel coordinate is in first imagePixel B value,It is for pixel coordinate in the first imagePicture The B value of vegetarian refreshments,It is for pixel coordinate in the first imagePixel B value,For in the first image Pixel coordinate isPixel B value.
Wherein, according to formulaCalculate w1; Wherein, pk (x) is the x-axis coordinate of pixel coordinate of k-th of second pixels under the first pixel coordinate system, and pk (y) is k-th The y-axis coordinate of pixel coordinate of second pixel under the first pixel coordinate system.
According to formulaCalculate w2;
According to formulaCalculate w3;
According to formulaCalculate w4.
Similar with the correction course to the first image to the correction course of the second image in this step, which is not described herein again.
S43 is synthesized the first image after correction and the second image after correction to obtain third image;
It, can be first to correction when the first image after correction and the second image after correction are synthesized in this step After the first image afterwards is registrated with the second image after correction, then synthesized, it can be using to same position pixel The mode that is averaged of gray value synthesized.
S44 shows default photo and third image in the preview window jointly;
S45 indicates user according to the relative positional relationship of the scenery in the scenery and third image in the default photo Adjust position of the scenery in third image in described the preview window.
Default photo and third image can be total to by image pickup method provided in an embodiment of the present invention in shooting preview With being shown in the preview window, then closed according to the relative position of the scenery in the scenery and third image in the default photo System, instruction user adjust position of the scenery in described the preview window in third image.In this way, when need to multiple image into When row superposition processing, when subsequent shooting photo, can be using the photo that had previously shot as referring to, to assist user accurately to lock The scenery for currently carrying out shooting preview should be in which kind of position of the preview window respectively, be shone so as to avoid the later period The various flaws that piece is likely to occur when being superimposed, effectively increase photographic quality, also greatly improve user experience.
Also, school is carried out by the image that pre-set first parameter and the second parameter obtain two cameras Just, to reduce the same o'clock position difference on the image that two cameras are shot.
Above-mentioned first parameter and the second parameter can be prepared by the following, after obtaining the first parameter and the second parameter, First parameter and the second parameter are pre-stored in the correction that image can be realized in the terminal with binocular camera.
Referring to Fig. 9, the method for obtaining the first parameter and the second parameter includes:
Step 900 establishes coordinate system: establishing the first physical coordinates system where presetting object, where the first camera Third physical coordinates system where second physical coordinates system and corresponding first pixel coordinate system, second camera and corresponding Two pixel coordinate systems, the 4th physical coordinates system being arranged between the second physical coordinates system and third physical coordinates system and corresponding Third pixel coordinate system.
In this step, as shown in figure 8, the first physical coordinates system P, the second physical coordinates system OL, third physical coordinates system OR, 4th physical coordinates system O is three-dimensional system of coordinate, the first pixel coordinate system Pl, the second pixel coordinate system Pr and third pixel coordinate system P0 is two-dimensional coordinate system.
Wherein, the first physical coordinates system can be arbitrarily arranged according to actual needs, and the z of the second physical coordinates system can be set Axis is parallel with the optical axis of the first camera, and the z-axis of third physical coordinates system and the optical axis of second camera are parallel, and the 4th physics is sat Mark system is a virtual physical coordinates system, and the origin of the 4th physical coordinates system can be set to the origin of the second physical coordinates system Distance and be equidistant to the origin of third physical coordinates system.
First pixel coordinate system is coordinate system corresponding with the detector of the first camera, the second pixel coordinate system be with The corresponding coordinate system of the detector of second camera, third pixel coordinate system are and virtually taking the photograph where the 4th physical coordinates system As the corresponding coordinate system of the detector of head, these three pixel coordinate systems can be set according to actual needs.
In this step, the first camera and second camera form binocular camera, have common visual field, can be Positioned at the left camera and right camera of same level, it is also possible to the upper camera and lower camera shooting positioned at same vertical plane Head, the case where being also possible to other, the embodiment of the present invention is not construed as limiting this.
Step 901, the third image that default object is obtained using the first camera, while being obtained in advance using second camera If the 4th image of object.
Step 902 obtains fiveth image Chong Die with the 4th image from third image, the acquisition and the from the 4th image 6th image of three images overlapping.
Step 903 is used to correct according to the coordinate system established, the 5th image and the 6th image the first camera of calculating First parameter of image and the second parameter for being used to correct image of second camera.
In this step, the first parameter includes: the first spin matrix R0 of the 4th physical coordinates system to the second physical coordinates system With the first camera parameter.
Second parameter includes: that the 4th physical coordinates system is imaged to the second spin matrix R1 of third physical coordinates system and second Head parameter.
Wherein, the first camera parameter include: the first camera the x-axis direction of the second physical coordinates system focal length fx0, Focal length fy0 of first camera in the y-axis direction of the second physical coordinates system, optical center (i.e. the second physical coordinates of the first camera The origin of system) the x-axis coordinate cx0 of pixel coordinate, the optical center of the first camera that project under the first pixel coordinate system project to The y-axis coordinate cy0 of pixel coordinate under first pixel coordinate system.
Second camera parameter include: second camera the x-axis direction of third physical coordinates system focal length fx1, second Focal length fy1 of the camera in the y-axis direction of third physical coordinates system, optical center (the i.e. third physical coordinates system of second camera Origin) the x-axis coordinate cx1 of pixel coordinate, the optical center of second camera that project under the second pixel coordinate system project to second The y-axis coordinate cy1 of pixel coordinate under pixel coordinate system.
In this step, referring to Figure 10, the first camera is calculated according to the coordinate system established, the 5th image and the 6th image The second parameter for correcting image of the first parameter and second camera for correcting image include:
Step 1000, initialization the first weight coefficient matrix a and the second weight coefficient matrix b;
In this step, the first weight coefficient matrix a is the matrix of 6 rows 1 column, and the second weight coefficient matrix b is 3 rows 1 column Matrix, i.e. a=[a1;a2;a3;a4;a5;A6], b=[b1;b2;b3].
When initialization, the first weight coefficient matrix a and the second weight coefficient matrix b can be initialized as null matrix, i.e. a =[0;0;0;0;0;0], [0 b=;0;0], it is of course also possible to by the beginning of the first weight coefficient matrix a and the second weight coefficient matrix Beginning turns to other values, and the embodiment of the present invention is not construed as limiting this.
Step 1001 calculates the first spin matrix R0 and the second spin matrix R1 according to the second weight coefficient matrix b;
In this step, according to formulaIt calculates First spin matrix R0, according to formulaCalculate the Two spin matrix R1.
Step 1002, according to the first weight coefficient matrix and the first spin matrix by the i-th preset in the first physical coordinates Coordinate pw in system projects to the second physical coordinates system and obtains the i-th preset in the coordinate Pc0_i of the second physical coordinates system, according to Coordinate pw of i-th preset in the first physical coordinates system is projected to third by the first weight coefficient matrix and the second spin matrix Physical coordinates system obtains the i-th preset in the coordinate Pc1_i of third physical coordinates system;Wherein, i is the integer more than or equal to 1; Include:
The first transformation that the first physical coordinates system projects to the 4th physical coordinates system is calculated according to the first weight coefficient matrix a Matrix M;The first physical coordinates system, which is calculated, according to the first transformation matrix M and the first spin matrix R0 projects to the second physical coordinates system The second transformation matrix M0, the first physical coordinates system is calculated according to the first transformation matrix M and the second spin matrix R1 and projects to the The third transformation matrix M1 of three physical coordinates systems.
Wherein, according to formulaCalculate the first transformation matrix M;
Wherein,Offset of the 4th physical coordinates system O in x-axis is projected to for the first physical coordinates system P,The offset of the 4th physical coordinates system O on the y axis is projected to for the first physical coordinates system P, Offset of the 4th physical coordinates system O in z-axis is projected to for the first physical coordinates system P,For the first physics seat The spin matrix that the x-axis of mark system P is rotated around the x-axis of the 4th physical coordinates system O,For the first physical coordinates system The spin matrix that the y-axis of P is rotated around the y-axis of the 4th physical coordinates system O,For the z of the first physical coordinates system P The spin matrix that axis is rotated around the z-axis of the 4th physical coordinates system O.
Wherein, according to formula M0=[R0 ,-R0C0;0,0,0,1] M calculates the second transformation matrix M0, according to formula M0= [R1,-R1C1;0,0,0,1] M calculates third transformation matrix M1.
Wherein, C0 be the 4th physical coordinates system O origin to the second physical coordinates system OL origin distance, C1 be the 4th The origin of physical coordinates system O to third physical coordinates system OR origin distance.
Wherein, according to formulaThe i-th preset is calculated in the seat of the second physical coordinates system Pc0_i is marked, according to formulaThe i-th preset is calculated in the coordinate Pc1_i of third physical coordinates system.
Wherein, Pc0_i (x) is x-axis coordinate of i-th preset in the second physical coordinates system, and Pc0_i (y) is the i-th preset In the y-axis coordinate of the second physical coordinates system, Pc0_i (z) is z-axis coordinate of i-th preset in the second physical coordinates system, Pc1_i It (x) is the i-th preset in the x-axis coordinate of third physical coordinates system, Pc1_i (y) is the i-th preset in third physical coordinates system Y-axis coordinate, Pc1_i (z) are z-axis coordinate of i-th preset in third physical coordinates system, and pw (x) is the i-th preset in the first object The x-axis coordinate in coordinate system is managed, pw (y) is y-axis coordinate of i-th preset in the first physical coordinates system, and pw (z) is i-th pre- Set up an office the z-axis coordinate in the first physical coordinates system.
Step 1003, according to the first camera parameter by i-th preset the second physical coordinates system coordinate Pc0_i It is converted into first pixel coordinate Pc0_i_pixiel of i-th preset under the first pixel coordinate system, is joined according to second camera I-th preset is converted into the i-th preset in the second pixel coordinate in the coordinate Pc0_i_pixiel of third physical coordinates system by number The second pixel coordinate Pc1_i_pixiel under system.Include:
I-th preset is projected to the first pixel coordinate system and obtain i-th in the coordinate Pc0_i of the second physical coordinates system and is preset The first physical coordinates c_y0_i o'clock under the first pixel coordinate system, by the i-th preset third physical coordinates system coordinate Pc1_i projects to the second pixel coordinate system and obtains second physical coordinates c_y1_i of i-th preset under the second pixel coordinate system; The of the i-th preset under the first pixel coordinate system is calculated according to the first physical coordinates c_y0_i and the first camera parameter It is default to calculate i-th according to the second physical coordinates c_y1_i and the second camera parameter by one pixel coordinate Pc0_i_pixiel The second pixel coordinate Pc1_i_pixiel o'clock under the second pixel coordinate system;
Wherein it is possible to which the known technology using those skilled in the art is realized the i-th preset in the second physical coordinates system Coordinate Pc0_i project to the first pixel coordinate system and obtain first physical coordinates of i-th preset under the first pixel coordinate system I-th preset is projected to the second pixel coordinate system and obtains i-th and preset by c_y0_i in the coordinate Pc1_i of third physical coordinates system The second physical coordinates c_y1_i o'clock under the second pixel coordinate system, is not intended to limit the present invention the protection scope of embodiment, Which is not described herein again.
Wherein, according to formula Pc0_i_pixel (x)=c_y0_i (x) fx0+cx0 and Pc0_i_pixel (y)=c_y0_i (y) fy0+cy0 calculates first pixel coordinate Pc0_i_pixiel of i-th preset under the first pixel coordinate system, according to formula It is default that Pc1_i_pixel (x)=c_y1_i (x) fx1+cx1 and Pc1_i_pixel (y)=c_y1_i (y) fy1+cy1 calculates i-th The second pixel coordinate Pc1_i_pixiel o'clock under the second pixel coordinate system.
Wherein, Pc0_i_pixiel (x) is the x-axis of first pixel coordinate of i-th preset under the first pixel coordinate system Coordinate, Pc0_i_pixiel (y) are the y-axis coordinate of first pixel coordinate of i-th preset under the first pixel coordinate system, c_ Y0_i (x) is the x-axis coordinate of the first physical coordinates, and c_y0_i (y) is the y-axis coordinate of the first physical coordinates, Pc1_i_pixiel It (x) is the x-axis coordinate of second pixel coordinate of i-th preset under the second pixel coordinate system, Pc1_i_pixiel (y) is i-th The y-axis coordinate of second pixel coordinate of the preset under the second pixel coordinate system, c_y1_i (x) are the x-axis of the second physical coordinates Coordinate, c_y1_i (y) are the y-axis coordinate of the second physical coordinates.
Step 1004, coordinate, the first pixel coordinate, all presets according to all presets in the third image First physical coordinates of coordinate, all presets in the 4th image and the second physical coordinates calculate Increment Matrix.Packet It includes:
I-th is calculated according to the i-th preset coordinate P0_i in the 5th image and the first pixel coordinate Pc0_i_pixiel First difference e rror0_i of preset, according to coordinate P1_i and first pixel coordinate of i-th preset in the 6th image Pc0_i_pixiel calculates the second difference e rror1_i of the i-th preset, the first difference e rror0_i of all presets and the Two difference e rror1_i form matrix of differences residusl;Calculate the first physical coordinates c_y0_i and the second object of all presets Coordinate c_y1_i is managed about the first weight coefficient matrix a, the second weight coefficient matrix b, first camera ginseng Several and the second camera parameter Jacobian matrix Jac;It is calculated according to Jacobian matrix Jac and matrix of differences residusl Increment Matrix plus;
In this step, according to formulaIt is pre- to calculate i-th The the first difference e rror0_i to set up an office, according to formula Calculate the second difference e rror1_i of the i-th preset.
Wherein, P0_i (x) is x-axis coordinate of i-th preset in third image, and P0_i (y) is the i-th preset in third Y-axis coordinate in image, error0_i (x) are first difference of i-th preset in x-axis, and error0_i (y) is the i-th preset In the first difference of y-axis, error1_i (x) is second difference of i-th preset in x-axis, and error1_i (y) is the i-th preset In the second difference of y-axis.
In this step, matrix of differences residusl is the matrix that 4n row 1 arranges, wherein n is the number of preset, i.e., Residusl=[error0_1 (x);error0_1(y);error1_1(x);error1_1(y);error0_2(x); error0_2(y);error1_2(x);error1_2(y);……;error0_n(x);error0_n(y);error1_n(x); error1_n(y)]。
Wherein, according to formula
That is, Jacobian matrix is the matrix that 4n row 17 arranges, the of the 1st the first preset of behavior of Jacobian matrix The x-axis coordinate of one physical coordinates is respectively to 6 elements in the first weight coefficient matrix a, 3 in the second weight coefficient matrix b The local derviation of a element, the first camera parameter and second camera parameter totally 17 parameters, the first of the 2nd the first preset of behavior The y-axis coordinate of physical coordinates respectively to the local derviation of 17 parameters, sit by the x-axis of the second physical coordinates of the 3rd the first preset of behavior Mark is respectively to the local derviation of 17 parameters, and the y-axis coordinate of the second physical coordinates of the 4th the first preset of behavior is respectively to 17 parameters Local derviation, the x-axis coordinate of the first physical coordinates of the 5th the second preset of behavior is respectively to the local derviation of 17 parameters, the 6th behavior The y-axis coordinate of first physical coordinates of two presets is respectively to the local derviation of 17 parameters, the second object of the 7th the second preset of behavior The x-axis coordinate of coordinate is managed respectively to the local derviation of 17 parameters, eighth row is the y-axis coordinate of the second physical coordinates of the second preset Respectively to the local derviation of 17 parameters, and so on, the x-axis coordinate point of the first physical coordinates of the n-th preset of (4n-3) behavior The other local derviation to 17 parameters, the y-axis coordinate of the first physical coordinates of the n-th preset of (4n-2) behavior is respectively to 17 parameters Local derviation, the x-axis coordinate of the second physical coordinates of the n-th preset of (4n-1) behavior is respectively to the local derviation of 17 parameters, 4n The y-axis coordinate of second physical coordinates of the n-th preset of behavior is respectively to the local derviation of 17 parameters.
Wherein, according to formula plus=(Jac'Jac) (Jac'residusl) calculate Increment Matrix plus.
Increment Matrix plus is the matrix of 1 row 17 column, and every a line corresponds to one increment in above-mentioned 17 parameters, i.e., Plus=[△ a1, △ a2, △ a3, △ a4, △ a5, △ a6, △ b1, △ b2, △ b3, △ fx0, △ fy0, △ cx0, △ cy0, △ fx1, △ fy1, △ cx1, △ cy1].
Wherein, △ a1 is the increment of a1, and △ a2 is the increment of a2, and △ a3 is the increment of a3, and △ a4 is the increment of a4, △ a5 For the increment of a5, △ a6 is the increment of a6, and △ b1 is the increment of b1, and △ b2 is the increment of b2, and △ b3 is the increment of b3, △ fx0 For the increment of fx0, △ fy0 is the increment of fy0, and △ cx0 is the increment of cx0, and △ cy0 is the increment of cy0, and △ fx1 is the increasing of fx1 Amount, △ fy1 are the increment of fy1, and △ cx1 is the increment of cx1, and △ cy1 is the increment of cy1.
Step 1005 joins the first weight coefficient matrix a, the second weight coefficient matrix b, first according to Increment Matrix plus Several and the second parameter is updated;
In this step, the initial value of each parameter is obtained into updated parameter plus corresponding increment.For example, Updated a1 is 0+ △ a1, and so on.
Step 1006, according to updated first weight coefficient matrix a, the second weight coefficient matrix b, the first parameter and Two parameters continue to execute step 1001~step 1005, until the number of iterations is greater than or equal to preset times, the first parameter of output With the second parameter.
In this step, in odd-times iterative process, the first rotation is calculated according to updated second weight coefficient matrix b Matrix R0, and the second spin matrix R1 still uses last value;In even-times iterative process, according to updated second Weight coefficient matrix b calculates the second spin matrix R1, and the first spin matrix R0 still uses last value.
Specifically, default photo and third image can be shown in the preview window jointly in step S44. These default photos are shot before being also possible to very early either the photo just shot in several continuous shootings applied at one Complete photos being stored in various storage equipment, as long as user needs to be with reference to determining the currently photograph that is shooting with this photo The photo and current preview scenery can just be display together in the preview window by the relative position of scenery in piece.
In order to achieve the effect that reference by location, when specifically carrying out preview display, presets photo and third image respectively can To be full of entire the preview window, and in a manner of different light and shades, gray scale, lines etc. default photo and third image distinguished aobvious Show.For example, the brightness of default photo can be arranged it is smaller, to the larger of the brightness of third image setting, so as in preview The two is distinguish in window;Default photo can also be arranged to black and white gray scale to show, and coloured silk is arranged to third image Color is shown, to be distinguish in the preview window to the two;The scenery lines in default photo can also be sketched the contours of with dotted line, To provide reference etc. for the scenery in third image.The embodiment of the present invention is unlimited to this.
Specifically, in step S45, it can be according to the phase of scenery and the scenery in third image in the default photo To positional relationship, indicate that user adjusts position of the scenery in described the preview window in third image.Wherein, it presets in photo Scenery and third image in scenery relative positional relationship, may include the relative positional relationship and ratio between each scenery Relationship also may include relative position of each scenery in entire image.And the scenery for indicating that user adjusts in third image exists Position in described the preview window, then both can be by adjusting the position of camera or angle realization, can also be by adjusting quilt The actual placement of photographed is realized.
Optionally, position of the scenery in third image in described the preview window is adjusted to predeterminated position by instruction user Afterwards, filming apparatus provided in an embodiment of the present invention can clap the scenery in third image at photograph according to the photographing instruction of user Piece.Due to when shooting this photo with reference to the similar photo that is overlapped of needs, the position of scenery, size in photo It can conveniently determine, so that the quality for effectively increasing superposition photomontage also greatly improves user experience.
Optionally, in an embodiment of the present invention, the quantity for being used as the default photo of reference is unlimited, both can be 1 , or multiple, it both may include the newest photo of the last shooting, and also may include after multiple pictures are superposed on one another Fusion photo.Wherein, multiple pictures fusion superposed on one another is also superimposed with regard to multiple pictures, wherein every photo occupies one Fixed energy proportion.
For example, the total number for being located at image sequence to be shown in the preview window is n, wherein the arrangement of n images Sequence reversing according to image capturing time, i.e., the image newly taken pictures more are thought to need mainly to be shown.
It (reverses, i.e., the d finally shot images) d before if the need to keep as main display image, then may be used With the energy binned to display image for d+1 parts, it is respectively used to preceding d width primary picture and remaining n-d width in display sequence Want image.If showing that the energy of image is 1, then the energy distribution of each width image can be expressed as follows:
Correspondingly, if image sequence is I1,…,In, the make of the final image I for showing user are as follows:
Wherein, I is the gross energy of the image shown in the preview window, I1,…,InThe energy of respectively each width image.
It optionally,, can be using Overlapping display when showing default photo and third image jointly in step S44 Mode, can also be by the way of alternately displaying or other modes.
For example, in one embodiment of the invention, in shooting preview, by default photo and third image with default Energy proportion, Overlapping display is in described the preview window.
Specifically, when as reference default photo and current preview scenery be shown in the preview window jointly when, The energy of current preview scenery can also be determined according to formula 1, it is only necessary to using current preview scenery as photo when n=1, He is analogized forward the number of photo with this.
Default photo is arbitrarily opened it should be noted that, although can theoretically show in the preview window, but according to human eye Identification habit, exceed three Zhang Yihou in same position superimposed image, the order of accuarcy of human eye identification will decline, and human eye Degree of fatigue also will increase.Therefore, in one embodiment of the invention, 2 default photos can be used as a reference to auxiliary It helps and takes pictures, count live preview scene in this way, a total of 3 width image is being shown jointly in the preview window.
By the symbolic expression of formula 1, if having shot image number is n, display retains image number d=2, then energy balane side Formula are as follows:
Wherein A1It is the energy of the third image of live preview image, Ai(i=2 ..., n) it is the i-th width image shot Energy.
As n≤2, since number is very few, it is only necessary to divide equally energy A1=A2=1/n.
Live preview image calculated in this way, newest shooting image, secondary new shooting image are accounted for according to compared with reasonable manner With 1/3 energy of display image, display effect is preferable.
Certainly, in other embodiments of the invention, the distribution of energy can also have other modes, the energy of each width image Proportion can be configured by user according to actual needs.For example, in another embodiment of the present invention, it can be by preview window The energy mean allocation of image is shown in mouthful into three parts, the scenery that a copy of it gives the third image of current live preview is aobvious Show, another is given important references object and shows, the newest photo for such as giving the last shooting shows that remaining portion is given Other references object show, the photo for such as giving remaining time shooting earlier is shown.Here, the multiple pictures shot earliest are shared Remaining portion energy, therefore the opposite influence power for weakening the photo of time shooting earlier.
Optionally, by default photo and third image with preset energy proportion, Overlapping display is in described the preview window In can include:
Determine the energy proportion of the default photo and the third image;
According to the determining energy proportion, default photo and third image superposition are shown in described the preview window In.
In the present embodiment, energy proportion can still be determined with formula 1.
Optionally, during being merged to several photos, in order to simplify image co-registration process in computer program In realization, can realize in the following way formula 1 energy distribution.It is as shown in Figure 8:
S100 shoots a sub-picture.
By the latest image being stored in front of, (if it is first time shooting image then without this image, this step saves S200 Slightly) follow-up process processing is given as newly-increased secondary new images.Then the image newly shot is saved as into newest shooting image.
S300 newly-increased secondary new images are merged with previously stored new blending image, and update time new fusion figure Picture.(if it is the first width time new images, then this step is omitted, and newly-increased new images are directly saved as time new blending image)
Amalgamation mode are as follows:
I′fIndicate updated new blending image, IfIndicate previously stored new blending image, InewIt indicates newly-increased time New images.
S400 melts preview realtime graphic, newest shooting image, secondary new blending image according to respectively accounting near 1/3 It closes, amalgamation mode refers to formula 2.Fused image is given image-display units and is shown.
S500 judges whether to continue to shoot, if so, going to S100 step;If it is not, then process terminates.
Optionally, for the image co-registration process in above-described embodiment, other modes replacement also can be used.For example, In In one embodiment of the present of invention, translucent control can be used when program is realized instead of preview realtime graphic and shooting image Fusion process.
Concrete condition is roughly the same with the process of embodiment shown in Fig. 7, the difference is that S400 step.With S400 Unlike, in the present embodiment, newest shooting image and time new blending image are first subjected to 1:1 fusion, fused image can It is that 2/3rds translucent control shows to carry out control, while using half that transmitance is one third to use transmitance Transparent control shows live preview scenery to control.Due to having used ready-made control, corresponding additive fusion process is saved, To further improve shooting efficiency.
Above-described embodiment is mainly shown by the way of by default photo and current preview scenery Overlapping display jointly In the preview window, but embodiments of the present invention are not limited thereto.In other embodiments of the invention, it in shooting preview, presets Photo and current preview scenery can also be otherwise shown in the preview window jointly.
For example, in one embodiment of the invention, default photo and third image are shown jointly in the preview window In it is specific can include: by default photo and third image to preset switching frequency, alternately display in described the preview window.This Sample, although not being superimposed to each image shown in the preview window, by feat of by default photo and third image with pre- If switching frequency alternately displays, good reference of taking pictures still may provide the user with.
Correspondingly, the embodiment of the present invention also provides a kind of mobile terminal, previous embodiment is provided on the mobile terminal Any filming apparatus provided, therefore it is also able to achieve corresponding technical effect, detailed description has been carried out above, herein not It repeats again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of filming apparatus characterized by comprising
Acquiring unit, for periodically obtaining the first image using the first camera, while using the second camera shooting in shooting preview Head obtains the second image;
Correct unit, for according to pre-set first camera for correct the first parameter of image to the first image into Row correction;The second image is corrected according to the second parameter for correcting image of pre-set second camera;
Synthesis unit is synthesized to obtain third image for the first image after correcting and the second image after correction;
Display unit, for showing default photo and third image in the preview window jointly;
Indicating unit, the scenery in the scenery and third image in the default photo for being shown according to the display unit Relative positional relationship, instruction user adjusts position of the scenery in described the preview window in third image;
First parameter includes: second where the 4th physical coordinates system to the first camera pre-established pre-established First spin matrix of physical coordinates system and the first camera parameter;
Second parameter includes: the third where the 4th physical coordinates system to the second camera pre-established pre-established The second spin matrix and second camera parameter of physical coordinates system;
The correction unit is specifically used for being realized in the following ways according to pre-set first camera for correction chart First parameter of picture is corrected the first image:
Pre-defined size grid image identical with the first image or the second image;
For the first pixel of each of grid image, joined according to the first camera parameter or the second camera First pixel is converted under the third pixel coordinate system by number in the pixel coordinate under third pixel coordinate system Physical coordinates;Physical coordinates of first pixel under third pixel coordinate system are converted into the 4th physical coordinates system Coordinate;Wherein, the 4th physical coordinates system be positioned at where first camera pre-established the second physical coordinates system and The coordinate system between third physical coordinates system where the second camera, the third pixel coordinate system are and the described 4th The corresponding coordinate system of physical coordinates system;
First pixel is converted into the coordinate of the 4th physical coordinates system described according to the first spin matrix The coordinate of two physical coordinates systems, the coordinate by first pixel in second physical coordinates system are converted into the first pixel Physical coordinates under coordinate system;According to the first camera parameter by first pixel in first pixel coordinate system Under physical coordinates be converted into the pixel coordinate under the first pixel coordinate system;Wherein, first pixel coordinate system for institute State the corresponding coordinate system of the second physical coordinates system;
By the pixel coordinate in the grid image under first pixel coordinate system less than 0 or greater than the first framing mask The first pixel filter out;
For the second pixel of each of grid image after filtering out, to second pixel in the first pixel coordinate system Under pixel coordinate carry out shaping processing;
It is shapingization treated pixel of second pixel under the first pixel coordinate system according to pixel coordinate in the first image The color value of the pixel of coordinate assigns the color value of the second pixel in the grid image after filtering out.
2. filming apparatus according to claim 1, which is characterized in that the first camera parameter includes:
First camera is in the focal length fx0 of the x-axis direction of second physical coordinates system, first camera described The focal length fy0 in the y-axis direction of the second physical coordinates system, first camera optical center project to first pixel coordinate system Under the x-axis coordinate cx0 of pixel coordinate, the optical center of first camera project to the pixel under first pixel coordinate system The y-axis coordinate cy0 of coordinate;
The second camera parameter includes:
The second camera is in the focal length fx1 of the x-axis direction of the third physical coordinates system, the second camera described The focal length fy1 in the y-axis direction of third physical coordinates system, the optical center of the second camera project under the second pixel coordinate system The x-axis coordinate cx1 of pixel coordinate, the optical center of the second camera project to the pixel coordinate under second pixel coordinate system Y-axis coordinate cy1;Wherein, second pixel coordinate system is coordinate system corresponding with the third physical coordinates system;
The correction unit is specifically used for realizing in the following ways described joins according to the first camera parameter or second camera First pixel is converted into the physics under third pixel coordinate system in the pixel coordinate under third pixel coordinate system by number Coordinate:
According to formulaWith Alternatively, according to formulaWith Calculate physical coordinates of j-th of first pixels under the third pixel coordinate system;
Wherein, pud0_x_j is the x-axis coordinate of physical coordinates of j-th of first pixels under the third pixel coordinate system, P0_x_j is the x-axis coordinate of pixel coordinate of j-th of first pixels under the third pixel coordinate system, pud0_y_j the The y-axis coordinate of j physical coordinates of first pixel under the third pixel coordinate system, p0_y_j are j-th of first pixels The y-axis coordinate of pixel coordinate of the point under the third pixel coordinate system.
3. filming apparatus according to claim 1, which is characterized in that the correction unit is specifically used in the following ways Realize it is described according to the first spin matrix by the first pixel the coordinate of the 4th physical coordinates system be converted into the second physics sit Mark the coordinate of system:
According to formulaJ-th of first pixels are calculated in second physical coordinates The coordinate of system;
Wherein, pOL_j (x) is x-axis coordinate of j-th of first pixels in second physical coordinates system, and pOL_j (y) is jth For a first pixel in the y-axis coordinate of second physical coordinates system, pOL_j (z) is j-th of first pixels described second The z-axis coordinate of physical coordinates system, R0 are first spin matrix, and pO_j (x) is j-th of first pixels in the 4th object The x-axis coordinate of coordinate system is managed, pO_j (y) is y-axis coordinate of j-th of first pixels in the 4th physical coordinates system, pO_j It (z) is z-axis coordinate of j-th of first pixels in the 4th physical coordinates system.
4. filming apparatus according to claim 1, which is characterized in that the correction unit is specifically used in the following ways Realize that the pixel coordinate to the second pixel under the first pixel coordinate system carries out shapingization processing and includes:
By the x-axis coordinate of pixel coordinate of second pixel under first pixel coordinate system round up respectively and to Lower rounding rounds up the y-axis coordinate of pixel coordinate of second pixel under first pixel coordinate system respectively It is rounded with downward, obtains shapingization treated that pixel coordinate of second pixel under first pixel coordinate system is respectively With
Wherein, pOL_k (x) is the x-axis coordinate of pixel coordinate of k-th of second pixels under first pixel coordinate system, POL_k (y) is the y-axis coordinate of pixel coordinate of k-th of second pixels under first pixel coordinate system.
5. a kind of image pickup method characterized by comprising
In shooting preview, the first image is periodically obtained using the first camera, while the second figure is obtained using second camera Picture;
The first image is corrected according to the first parameter for correcting image of pre-set first camera;According to pre- The second parameter for correcting image for the second camera being first arranged is corrected the second image;
It is synthesized the first image after correction and the second image after correction to obtain third image;
Default photo and third image are shown in the preview window jointly;
According to the relative positional relationship of the scenery in the scenery and third image in the default photo, indicate described in user's adjustment Position of the scenery in described the preview window in third image;
First parameter includes: second where the 4th physical coordinates system to the first camera pre-established pre-established First spin matrix of physical coordinates system and the first camera parameter;
Second parameter includes: the third where the 4th physical coordinates system to the second camera pre-established pre-established The second spin matrix and second camera parameter of physical coordinates system;
It is described that packet is corrected to the first image according to the first parameter for correcting image of pre-set first camera It includes:
Pre-defined size grid image identical with the first image or the second image;
For the first pixel of each of grid image, joined according to the first camera parameter or the second camera First pixel is converted under the third pixel coordinate system by number in the pixel coordinate under third pixel coordinate system Physical coordinates;Physical coordinates of first pixel under third pixel coordinate system are converted into the 4th physical coordinates system Coordinate;Wherein, the 4th physical coordinates system be positioned at where first camera pre-established the second physical coordinates system and The coordinate system between third physical coordinates system where the second camera, the third pixel coordinate system are and the described 4th The corresponding coordinate system of physical coordinates system;
First pixel is converted into the coordinate of the 4th physical coordinates system described according to the first spin matrix The coordinate of two physical coordinates systems, the coordinate by first pixel in second physical coordinates system are converted into the first pixel Physical coordinates under coordinate system;According to the first camera parameter by first pixel in first pixel coordinate system Under physical coordinates be converted into the pixel coordinate under the first pixel coordinate system;Wherein, first pixel coordinate system for institute State the corresponding coordinate system of the second physical coordinates system;
By the pixel coordinate in the grid image under first pixel coordinate system less than 0 or greater than the first framing mask The first pixel filter out;
For the second pixel of each of grid image after filtering out, to second pixel in the first pixel coordinate system Under pixel coordinate carry out shaping processing;
It is shapingization treated pixel of second pixel under the first pixel coordinate system according to pixel coordinate in the first image The color value of the pixel of coordinate assigns the color value of the second pixel in the grid image after filtering out.
6. image pickup method according to claim 5, which is characterized in that the first camera parameter includes:
First camera is in the focal length fx0 of the x-axis direction of second physical coordinates system, first camera described The focal length fy0 in the y-axis direction of the second physical coordinates system, first camera optical center project to first pixel coordinate system Under the x-axis coordinate cx0 of pixel coordinate, the optical center of first camera project to the pixel under first pixel coordinate system The y-axis coordinate cy0 of coordinate;
The second camera parameter includes:
The second camera is in the focal length fx1 of the x-axis direction of the third physical coordinates system, the second camera described The focal length fy1 in the y-axis direction of third physical coordinates system, the optical center of the second camera project under the second pixel coordinate system The x-axis coordinate cx1 of pixel coordinate, the optical center of the second camera project to the pixel coordinate under second pixel coordinate system Y-axis coordinate cy1;Wherein, second pixel coordinate system is coordinate system corresponding with the third physical coordinates system;
It is described according to the first camera parameter or second camera parameter by first pixel under third pixel coordinate system The physical coordinates that are converted under third pixel coordinate system of pixel coordinate include:
According to formulaWith Alternatively, according to formulaWith Calculate physical coordinates of j-th of first pixels under the third pixel coordinate system;
Wherein, pud0_x_j is the x-axis coordinate of physical coordinates of j-th of first pixels under the third pixel coordinate system, P0_x_j is the x-axis coordinate of pixel coordinate of j-th of first pixels under the third pixel coordinate system, pud0_y_j the The y-axis coordinate of j physical coordinates of first pixel under the third pixel coordinate system, p0_y_j are j-th of first pixels The y-axis coordinate of pixel coordinate of the point under the third pixel coordinate system.
7. image pickup method according to claim 5, which is characterized in that it is described according to the first spin matrix by the first pixel Be converted into the coordinate of the 4th physical coordinates system include: in the coordinate of the second physical coordinates system
According to formulaJ-th of first pixels are calculated in second physical coordinates The coordinate of system;
Wherein, pOL_j (x) is x-axis coordinate of j-th of first pixels in second physical coordinates system, and pOL_j (y) is jth For a first pixel in the y-axis coordinate of second physical coordinates system, pOL_j (z) is j-th of first pixels described second The z-axis coordinate of physical coordinates system, R0 are first spin matrix, and pO_j (x) is j-th of first pixels in the 4th object The x-axis coordinate of coordinate system is managed, pO_j (y) is y-axis coordinate of j-th of first pixels in the 4th physical coordinates system, pO_j It (z) is z-axis coordinate of j-th of first pixels in the 4th physical coordinates system.
8. a kind of mobile terminal, which is characterized in that including filming apparatus described in any one of Claims 1-4.
CN201611055492.XA 2016-11-25 2016-11-25 A kind of filming apparatus and method, mobile terminal Active CN106791367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611055492.XA CN106791367B (en) 2016-11-25 2016-11-25 A kind of filming apparatus and method, mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611055492.XA CN106791367B (en) 2016-11-25 2016-11-25 A kind of filming apparatus and method, mobile terminal

Publications (2)

Publication Number Publication Date
CN106791367A CN106791367A (en) 2017-05-31
CN106791367B true CN106791367B (en) 2019-11-15

Family

ID=58913068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611055492.XA Active CN106791367B (en) 2016-11-25 2016-11-25 A kind of filming apparatus and method, mobile terminal

Country Status (1)

Country Link
CN (1) CN106791367B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241504B (en) * 2017-06-08 2020-03-27 努比亚技术有限公司 Image processing method, mobile terminal and computer readable storage medium
CN107343140A (en) * 2017-06-14 2017-11-10 努比亚技术有限公司 A kind of image processing method and mobile terminal
CN108010106A (en) * 2017-11-22 2018-05-08 努比亚技术有限公司 A kind of method for displaying image, terminal and computer-readable recording medium
CN114095641A (en) * 2020-07-21 2022-02-25 珠海格力电器股份有限公司 Image display method and device
JP2022097928A (en) * 2020-12-21 2022-07-01 株式会社リコー Imaging apparatus, imaging method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102107374B (en) * 2011-02-01 2012-05-23 吉林大学 On-line detection method for diameter size of shaft disc type part
CN103546730A (en) * 2012-07-11 2014-01-29 北京博雅华录视听技术研究院有限公司 Method for enhancing light sensitivities of images on basis of multiple cameras
CN103763477B (en) * 2014-02-21 2016-06-08 上海果壳电子有限公司 A kind of dual camera claps back focusing imaging device and method
CN105959551A (en) * 2016-05-30 2016-09-21 努比亚技术有限公司 Shooting device, shooting method and mobile terminal
CN106131527A (en) * 2016-07-26 2016-11-16 深圳众思科技有限公司 Dual camera color synchronization method, device and terminal

Also Published As

Publication number Publication date
CN106791367A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106791367B (en) A kind of filming apparatus and method, mobile terminal
CN105404484B (en) Terminal split screen device and method
WO2017067520A1 (en) Mobile terminal having binocular cameras and photographing method therefor
CN105141833B (en) Terminal image pickup method and device
CN106612397A (en) Image processing method and terminal
CN106791455B (en) Panorama shooting method and device
CN106097284B (en) A kind of processing method and mobile terminal of night scene image
CN105227865B (en) A kind of image processing method and terminal
CN106612393B (en) A kind of image processing method and device and mobile terminal
CN105959551A (en) Shooting device, shooting method and mobile terminal
CN105187724B (en) A kind of mobile terminal and method handling image
CN105488756B (en) Picture synthetic method and device
CN105979148A (en) Panoramic photographing device, system and method
CN106534619A (en) Method and apparatus for adjusting focusing area, and terminal
CN106534590B (en) A kind of photo processing method, device and terminal
CN106506927A (en) A kind of terminal and the method shot using terminal
CN106506858B (en) Star orbital prediction technique and device
CN106231095B (en) Picture synthesizer and method
CN105120164B (en) The processing means of continuous photo and method
CN104750389B (en) The method and device of display picture
CN106851113A (en) A kind of photographic method and mobile terminal based on dual camera
CN105979235A (en) Image processing method and terminal
CN106803879A (en) Cooperate with filming apparatus and the method for finding a view
CN108668071A (en) A kind of image pickup method, device, system and a kind of mobile terminal
CN106851125A (en) A kind of mobile terminal and multiple-exposure image pickup method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant