CN107680060A - A kind of image distortion correction method, terminal and computer-readable recording medium - Google Patents

A kind of image distortion correction method, terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107680060A
CN107680060A CN201710917762.1A CN201710917762A CN107680060A CN 107680060 A CN107680060 A CN 107680060A CN 201710917762 A CN201710917762 A CN 201710917762A CN 107680060 A CN107680060 A CN 107680060A
Authority
CN
China
Prior art keywords
image
binocular camera
characteristic point
distortion correction
distortion
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.)
Pending
Application number
CN201710917762.1A
Other languages
Chinese (zh)
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 CN201710917762.1A priority Critical patent/CN107680060A/en
Publication of CN107680060A publication Critical patent/CN107680060A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a kind of image distortion correction method, terminal and computer-readable recording medium, methods described includes step:Obtain the image of binocular camera shooting;Determine the characteristic point concentrated area of the image of binocular camera shooting;Calculate light stream value of the characteristic point concentrated area between left mesh image and right mesh image, and the light stream value according to the characteristic point concentrated area of calculating between left mesh image and right mesh image, determine the distance of subject and binocular camera;According to default distortion parameter and the model of distance, the distortion parameter of the subject of determination and the distance of binocular camera is calculated;Distortion correction is carried out to binocular camera according to the distortion parameter of calculating.The present invention is calculated distortion parameter and gone forward side by side line distortion correction by the model and subject of default distortion parameter and distance and the distance of binocular camera;And then the precision of distortion correction processing is improved, while improve background blurring stability and accuracy.

Description

A kind of image distortion correction method, terminal and computer-readable recording medium
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of image distortion correction method, terminal and computer-readable Storage medium.
Background technology
With the development of mobile terminal technology, the mobile terminal with camera function has been obtained in the life of people Popularization.The increasingly abundanter mobile terminal of function is very easy to the life of people.In recent years, image processing techniques is rapidly sent out Exhibition, the camera function of mobile terminal also becomes stronger day by day, plus mobile terminal it is easy to carry the advantages of, increasing user's favor Taken pictures by mobile terminal.
In order to improve the effect of taking pictures of mobile terminal, increasing mobile terminal uses dual camera.Pass through double shootings The photo that the mobile terminal of head is shot is very higher than the effect for the photo that the terminal of single camera is taken, and image quality becomes apparent from.But It is that the photo with different imaging effects can not directly be shot by the mobile terminal of dual camera, it is also necessary to after terminal user Phase is handled photo.During image procossing, background blurring is a gimmick often occurred, because it can be dashed forward rapidly Go out main body and known to numerous shutterbugs and use.
During the present invention is realized, inventor has found that prior art has problems with:In the processing of distortion correction During, fixed distance is all based on when distortion correction parameter is calculated, i.e. parameter fixes use later any Photographed scene;But according to the optical property of camera lens, distortion parameter is to change in different distances, therefore different distances Upper distortion parameter should be dynamic change.
The content of the invention
It is a primary object of the present invention to propose a kind of image distortion correction method, terminal and computer-readable storage medium Matter, it is intended to solve the problems, such as that prior art is present.
To achieve the above object, first aspect of the embodiment of the present invention provides a kind of image distortion correction method, methods described Including step:
The image of binocular camera shooting is obtained, the left mesh image and second that described image includes the shooting of the first camera is taken the photograph Mesh image shot as head and right;
Determine the characteristic point concentrated area of the image of the binocular camera shooting;
Calculate light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image, and according to Light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image calculated, determine subject with The distance of the binocular camera;
According to default distortion parameter and the model of distance, the subject of determination and the distance of the binocular camera are calculated Distortion parameter;
Distortion correction is carried out to the binocular camera according to the distortion parameter of calculating.
Optionally, step is also included before the characteristic point concentrated area of the image for determining the binocular camera shooting Suddenly:
Judge whether the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value;
If the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value, step is performed Determine the characteristic point concentrated area of the image of the binocular camera shooting.
Optionally, the characteristic point concentrated area of the image for determining the binocular camera shooting includes step:
Extract the characteristic point of the image of the binocular camera shooting;
Local comparatively dense characteristic point is counted, and determines that the binocular camera is clapped according to the local comparatively dense characteristic point of statistics The characteristic point concentrated area for the image taken the photograph.
Optionally, the local comparatively dense characteristic point of statistics, and according to determining the local comparatively dense characteristic point of statistics Also include step after the characteristic point concentrated area of the image of binocular camera shooting:
Record the co-ordinate position information of the characteristic point concentrated area of the image of the binocular camera shooting.
Optionally, the local comparatively dense characteristic point of statistics includes step:
Calculate the response of the characteristic point of the image of the binocular camera shooting of extraction;
If the response is less than preset value, retain this feature point.
Optionally, the characteristic point for the image that the binocular camera is shot is extracted by FAST algorithms;
The response of the characteristic point of the image of the binocular camera shooting for calculating extraction includes step:
Calculate the characteristic point of image and the absolute value of its surrounding features point deviation of the binocular camera shooting of extraction With.
Optionally, the default distortion parameter and the multinomial model that the model of distance is distortion parameter and distance.
Optionally, the distortion correction includes Lens Distortion Correction and/or tangential distortion corrects.
In addition, to achieve the above object, second aspect of the embodiment of the present invention provides a kind of terminal, the terminal includes:Deposit Reservoir, processor and the image distortion correction program that can be run on the memory and on the processor is stored in, it is described The step of image distortion correction method described in first aspect is realized when image distortion correction program is by the computing device.
Furthermore to achieve the above object, the third aspect of the embodiment of the present invention provides a kind of computer-readable recording medium, institute State and image distortion correction program is stored with computer-readable recording medium, described image distortion correction program is executed by processor The step of image distortion correction method described in Shi Shixian first aspects.
A kind of image distortion correction method, terminal and computer-readable recording medium provided in an embodiment of the present invention, pass through The model and subject of default distortion parameter and distance and the distance of binocular camera, calculate distortion parameter and go forward side by side line distortion school Just;And then the precision of distortion correction processing is improved, while improve background blurring stability and accuracy.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the image distortion correction method flow schematic diagram of the embodiment of the present invention;
Fig. 4 is to determine area flow schematic diagram in feature point set in the image distortion correction method of the embodiment of the present invention;
Fig. 5 is the terminal structure schematic diagram of the embodiment of the present invention;
Fig. 6 is that the FAST characteristic points of the embodiment of the present invention judge structural representation;
Fig. 7 is the local comparatively dense characteristic point structural representation of the shooting image of the embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
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.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, 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..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite as the LTE system of universal mobile communications technology, the UE that the LTE system includes communicating connection successively (User Equipment, is used Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and preserve some and used about service features, data rate etc. The special information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE 201 IP Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources Point, it selects and provided available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the inventive method is proposed.
First embodiment
As shown in figure 3, first embodiment of the invention provides a kind of image distortion correction method, methods described includes step:
S31, the image for obtaining binocular camera shooting, described image include the left mesh image and the of the first camera shooting The shooting of two cameras and right mesh image.
In actual photographed, some cameras can produce distortion, and the image polar curve collected intersects, follow-up in order to reduce The difficulty of images match is, it is necessary to obtain the focal length of two cameras, principal point coordinate, inclination factor, distortion factor and they it Between the parameter information such as rotating vector, camera is demarcated according to obtained parameter information.
S32, the characteristic point concentrated area for determining the image that the binocular camera is shot.
In one embodiment, before the characteristic point concentrated area of the image for determining the binocular camera shooting Also include step:
Judge whether the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value;
If the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value, step is performed Determine the characteristic point concentrated area of the image of the binocular camera shooting.
In this embodiment, the image that can be shot binocular camera substitutes into model set in advance, to obtain image Average distortion degree value, by the average distortion degree value got compared with the default distortion threshold value set in advance, if be more than or Equal to default distortion threshold value, wherein, default distortion threshold value for example can be:0.2nd, 0.4,0.8,1,2 or other values.
It refer to shown in Fig. 4, in the present embodiment, the feature point set of the image for determining the binocular camera shooting Middle region includes step:
The characteristic point for the image that S321, the extraction binocular camera are shot.
In the present embodiment, extracted by FAST (Features from Accelerated Segment Test) algorithm The characteristic point of the image of the binocular camera shooting.
FAST algorithms are generally acknowledged most fast Feature Points Extractions, be refer to shown in Fig. 6, and a point P is chosen from image. It is that circle of the radius as 3pixel is drawn in the center of circle using P.On circumference if continuous n pixel gray value than P point gray scale It is worth big or small, then it is assumed that P is characterized a little.General n is arranged to 12.It is that the method for characteristic point is to examine first to judge the point The gray value surveyed on four neighborhoods (1,9,5,13) position, if P is characteristic point, it is necessary to meet the gray value at least three position More than the gray value of (being less than) P points.If be unsatisfactory for, the non-characteristic point of point.
S322, the local comparatively dense characteristic point of statistics, and determine that the binocular is taken the photograph according to the local comparatively dense characteristic point of statistics As the characteristic point concentrated area for the image that head is shot.
In the present embodiment, the local comparatively dense characteristic point of statistics includes step:
Calculate the response of the characteristic point of the image of the binocular camera shooting of extraction;
The response of the characteristic point for the image that can be shot with continued reference to the binocular camera for shown in Fig. 6, calculating extraction, As calculate extraction the binocular camera shooting image characteristic point and around it 16 characteristic point deviations absolute value With.
If the response is less than preset value, retain this feature point.
If it should be understood that the response is not less than preset value, this feature point can be deleted.It is determined that local closeer After collection characteristic point, you can carry out the characteristic point concentrated area that statistics determines the image of the binocular camera shooting.
In one embodiment, the local comparatively dense characteristic point of statistics, and according to the local comparatively dense feature of statistics Point determines also to include step after the characteristic point concentrated area of the image of the binocular camera shooting:
Record the co-ordinate position information of the characteristic point concentrated area of the image of the binocular camera shooting.
In this embodiment, the coordinate of the characteristic point concentrated area of the image shot by recording the binocular camera Positional information, the calculating for the light stream value being easy in subsequent step.
S33, light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image is calculated, and According to light stream value of the characteristic point concentrated area of calculating between the left mesh image and the right mesh image, it is determined that shooting Thing and the distance of the binocular camera.
The concept of light stream is that Gibson puts forward first in nineteen fifty.It is space motion object in observation imaging plane On pixel motion instantaneous velocity, be to utilize the phase in image sequence between change and consecutive frame of the pixel in time-domain Closing property finds previous frame with existing corresponding relation between present frame, so as to calculate the movable information of object between consecutive frame A kind of method.In general, light stream is due to foreground target movement in itself in scene, the motion of camera, or both Caused by associated movement.
When the eye observation moving object of people, the scene of object forms a series of consecutive variations on the retina of human eye Image, a series of information of this consecutive variations constantly " flowing through " retina (i.e. the plane of delineation), as " stream " of a kind of light, therefore Referred to as light stream (optical flow).Light stream expresses the change of image, because it contains the information of target motion, therefore Can observed person be used for determining the motion conditions of target.
In the present embodiment, the characteristic point concentrated area can be calculated by Lucas-Kanade optical flow algorithms on the left side Light stream value between mesh image and the right mesh image.
Lucas-Kanade optical flow algorithms, refer to prior art.Below to realizing Lucas-Kanade optical flow algorithms Step is introduced:
Realize that Lucas-Kanade optical flow algorithms can be divided into three steps, first step initialization needs to track Point.Light stream according to second step between two frames calculates the target point of the point tracked by the needs initialized, for this will be first Calculate the light stream pyramid of two frames.Third step is is interchangeable input and output point, and also previous frame and present frame is mutual Change and previous frame and the pyramidal exchange of present frame.
S34, the model according to default distortion parameter and distance, calculate the subject of determination and the binocular camera The distortion parameter of distance.
In the present embodiment, the default distortion parameter and the polynomial module that the model of distance is distortion parameter and distance Type.
Multinomial model can be formed by the amount of distortion fitting in the angle of visual field and its corresponding different distance.As example Ground, in below table, the angle of visual field 0.7,3- the 13rd is classified as its 10cm-5m apart from upper amount of distortion.
After being fitted to the angle of visual field in above table and its amount of distortion in corresponding different distance, it can obtain more Item formula is as follows:
Y=0.0000015x5-0.0025x4+0.042x3-0.3389x2+ 1.3077x-0.0274, wherein y join for distortion Number, x is distance.
S35, distortion correction carried out to the binocular camera according to the distortion parameter of calculating.
In the present embodiment, the distortion correction includes Lens Distortion Correction and/or tangential distortion corrects.Camera it is abnormal Change be due to imaging model it is inaccurate caused by, people replace aperture to be imaged, due to this to improve luminous flux with lens Kind replacement can not comply fully with the property of pinhole imaging system, therefore distortion just generates.In order in Stereo matching, binocular camera The plane of image is row alignment, subsequently also needs to be corrected image, and solid correction can effectively reduce Stereo matching Amount of calculation.
In order to further illustrate the present embodiment, now by taking smart mobile phone as an example, illustrated with reference to Fig. 7:
Smart mobile phone includes binocular camera, i.e., main camera and secondary camera.Pass through main camera and secondary camera point Left mesh image and right mesh image are not got, and left mesh image is referred to shown in a in Fig. 7, and right mesh image refers to the b in Fig. 7 It is shown.
The characteristic point for the image that binocular camera is shot is obtained by FAST algorithms, is deleting non local comparatively dense feature After point, local comparatively dense characteristic point is counted, determines the characteristic point concentrated area of the image of binocular camera shooting, such as A1 and A2 shown in figure.
Light stream values of the characteristic point concentrated area A1 and A2 between the left mesh image a and the right mesh image b is calculated, and Determine the distance of subject and the binocular camera.
The multinomial model of default distortion parameter and distance is y=0.0000015x5-0.0025x4+0.042x3- 0.3389x2+ 1.3077x-0.0274, the distance of the subject of determination and the binocular camera is substituted into the multinomial model, It can obtain distortion parameter y.And then according to obtained distortion parameter y to the binocular camera carry out Lens Distortion Correction and/or Tangential distortion corrects.
A kind of image distortion correction method provided in an embodiment of the present invention, passes through default distortion parameter and the model of distance With subject and the distance of binocular camera, calculate distortion parameter go forward side by side line distortion correction;And then improve distortion correction processing Precision, while improve background blurring stability and accuracy.
Second embodiment
Reference picture 5, Fig. 5 provide a kind of terminal for second embodiment of the invention, and the terminal 40 includes:Memory 41, place Manage device 42 and be stored in the image distortion correction program that can be run on the memory 41 and on the processor 42, the figure When image distortion correction program is performed by the processor 42, the step of for realizing image distortion correction method as described below:
S31, the image for obtaining binocular camera shooting, described image include the left mesh image and the of the first camera shooting The shooting of two cameras and right mesh image;
S32, the characteristic point concentrated area for determining the image that the binocular camera is shot;
S33, light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image is calculated, and According to light stream value of the characteristic point concentrated area of calculating between the left mesh image and the right mesh image, it is determined that shooting Thing and the distance of the binocular camera;
S34, the model according to default distortion parameter and distance, calculate the subject of determination and the binocular camera The distortion parameter of distance;
S35, distortion correction carried out to the binocular camera according to the distortion parameter of calculating.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
Also include step before the characteristic point concentrated area of the image for determining the binocular camera shooting:
Judge whether the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value;
If the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value, step is performed Determine the characteristic point concentrated area of the image of the binocular camera shooting.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The characteristic point concentrated area of the image for determining the binocular camera shooting includes step:
The characteristic point for the image that S321, the extraction binocular camera are shot;
S322, the local comparatively dense characteristic point of statistics, and determine that the binocular is taken the photograph according to the local comparatively dense characteristic point of statistics As the characteristic point concentrated area for the image that head is shot.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The local comparatively dense characteristic point of statistics, and the binocular camera shooting is determined according to the local comparatively dense characteristic point of statistics Also include step after the characteristic point concentrated area of the image of head shooting:
Record the co-ordinate position information of the characteristic point concentrated area of the image of the binocular camera shooting.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The local comparatively dense characteristic point of statistics includes step:
Calculate the response of the characteristic point of the image of the binocular camera shooting of extraction;
If the response is less than preset value, retain this feature point.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The characteristic point for the image that the binocular camera is shot is extracted by FAST algorithms;
The response of the characteristic point of the image of the binocular camera shooting for calculating extraction includes step:
Calculate the characteristic point of image and the absolute value of its surrounding features point deviation of the binocular camera shooting of extraction With.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The default distortion parameter and the multinomial model that the model of distance is distortion parameter and distance.
When described image distortion correction program is performed by the processor 42, it is additionally operable to realize pattern distortion as described below The step of bearing calibration:
The distortion correction includes Lens Distortion Correction and/or tangential distortion corrects.
Terminal provided in an embodiment of the present invention, taken the photograph by the model and subject and binocular of default distortion parameter and distance As the distance of head, calculate distortion parameter and go forward side by side line distortion correction;And then the precision of distortion correction processing is improved, improve simultaneously Background blurring stability and accuracy.
3rd embodiment
Third embodiment of the invention provides a kind of computer-readable recording medium, is deposited on the computer-readable recording medium Image distortion correction program is contained, described image distortion correction program realizes the figure described in first embodiment when being executed by processor The step of image distortion bearing calibration.
Computer-readable recording medium provided in an embodiment of the present invention, by the model of default distortion parameter and distance and The distance of subject and binocular camera, calculate distortion parameter go forward side by side line distortion correction;And then improve distortion correction processing Precision, while improve background blurring stability and accuracy.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, these are belonged within the protection of the present invention.

Claims (10)

  1. A kind of 1. image distortion correction method, it is characterised in that methods described includes step:
    The image of binocular camera shooting is obtained, described image includes left the mesh image and second camera of the first camera shooting Shooting and right mesh image;
    Determine the characteristic point concentrated area of the image of the binocular camera shooting;
    Light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image is calculated, and according to calculating Light stream value of the characteristic point concentrated area between the left mesh image and the right mesh image, determine subject with it is described The distance of binocular camera;
    According to default distortion parameter and the model of distance, the abnormal of the subject of determination and the distance of the binocular camera is calculated Variable element;
    Distortion correction is carried out to the binocular camera according to the distortion parameter of calculating.
  2. 2. a kind of image distortion correction method according to claim 1, it is characterised in that described to determine the binocular camera shooting Also include step before the characteristic point concentrated area of the image of head shooting:
    Judge whether the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value;
    If the distortion degree of the image of the binocular camera shooting is more than or equal to default distortion threshold value, performs step and determine The characteristic point concentrated area of the image of the binocular camera shooting.
  3. 3. a kind of image distortion correction method according to claim 1, it is characterised in that described to determine the binocular camera shooting The characteristic point concentrated area of the image of head shooting includes step:
    Extract the characteristic point of the image of the binocular camera shooting;
    Local comparatively dense characteristic point is counted, and determines what the binocular camera was shot according to the local comparatively dense characteristic point of statistics The characteristic point concentrated area of image.
  4. 4. a kind of image distortion correction method according to claim 3, it is characterised in that the local comparatively dense of statistics is special Levy point, and the characteristic point concentrated area for the image that the binocular camera shoots is determined according to the local comparatively dense characteristic point of statistics Also include step afterwards:
    Record the co-ordinate position information of the characteristic point concentrated area of the image of the binocular camera shooting.
  5. 5. a kind of image distortion correction method according to claim 3, it is characterised in that the local comparatively dense of statistics is special Sign point includes step:
    Calculate the response of the characteristic point of the image of the binocular camera shooting of extraction;
    If the response is less than preset value, retain this feature point.
  6. 6. a kind of image distortion correction method according to claim 5, it is characterised in that by described in the extraction of FAST algorithms The characteristic point of the image of binocular camera shooting;
    The response of the characteristic point of the image of the binocular camera shooting for calculating extraction includes step:
    Calculate extraction the binocular camera shooting image characteristic point and its surrounding features point deviation absolute value and.
  7. A kind of 7. image distortion correction method according to claim 1, it is characterised in that the default distortion parameter with The model of distance is the multinomial model of distortion parameter and distance.
  8. 8. a kind of image distortion correction method according to claim 1, it is characterised in that the distortion correction is included radially Distortion correction and/or tangential distortion correction.
  9. 9. a kind of terminal, it is characterised in that the terminal includes:Memory, processor and it is stored on the memory and can The image distortion correction program run on the processor, described image distortion correction program is by real during the computing device Now the step of image distortion correction method as any one of claim 1 to 8.
  10. 10. a kind of computer-readable recording medium, it is characterised in that it is abnormal to be stored with image on the computer-readable recording medium Become correction program, realized when described image distortion correction program is executed by processor as any one of claim 1 to 8 The step of image distortion correction method.
CN201710917762.1A 2017-09-30 2017-09-30 A kind of image distortion correction method, terminal and computer-readable recording medium Pending CN107680060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710917762.1A CN107680060A (en) 2017-09-30 2017-09-30 A kind of image distortion correction method, terminal and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710917762.1A CN107680060A (en) 2017-09-30 2017-09-30 A kind of image distortion correction method, terminal and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107680060A true CN107680060A (en) 2018-02-09

Family

ID=61138904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710917762.1A Pending CN107680060A (en) 2017-09-30 2017-09-30 A kind of image distortion correction method, terminal and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107680060A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109432768A (en) * 2018-10-16 2019-03-08 深圳市眼界科技有限公司 The distortion correction method and device of curve screens coordinate
CN109615586A (en) * 2018-05-07 2019-04-12 杭州新瀚光电科技有限公司 Infrared image distortion correction algorithm
CN109639930A (en) * 2018-12-01 2019-04-16 吴克成 A kind of semiconductor crystal wafer diced system based on computer vision and its cutting method
CN111028161A (en) * 2019-11-22 2020-04-17 维沃移动通信有限公司 Image correction method and electronic equipment
CN111080542A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111091507A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111325691A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN111656391A (en) * 2018-07-17 2020-09-11 华为技术有限公司 Image correction method and terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268898A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Method for detecting density of passengers in bus on basis of image analysis
CN104867113A (en) * 2015-03-31 2015-08-26 酷派软件技术(深圳)有限公司 Method and system for perspective distortion correction of image
CN105005972A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Shooting distance based distortion correction method and mobile terminal
CN106408609A (en) * 2016-09-13 2017-02-15 江苏大学 Parallel mechanism end motion pose detection method based on binocular vision
CN106708081A (en) * 2017-03-17 2017-05-24 北京思比科微电子技术股份有限公司 Control system for multi-rotor unmanned aerial vehicle
CN106851104A (en) * 2017-02-28 2017-06-13 努比亚技术有限公司 A kind of method and device shot according to user perspective
CN106878588A (en) * 2017-02-27 2017-06-20 努比亚技术有限公司 A kind of video background blurs terminal and method
CN206460410U (en) * 2017-02-04 2017-09-01 上海肇观电子科技有限公司 Smart machine with augmented reality

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268898A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Method for detecting density of passengers in bus on basis of image analysis
CN104867113A (en) * 2015-03-31 2015-08-26 酷派软件技术(深圳)有限公司 Method and system for perspective distortion correction of image
CN105005972A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Shooting distance based distortion correction method and mobile terminal
CN106408609A (en) * 2016-09-13 2017-02-15 江苏大学 Parallel mechanism end motion pose detection method based on binocular vision
CN206460410U (en) * 2017-02-04 2017-09-01 上海肇观电子科技有限公司 Smart machine with augmented reality
CN106878588A (en) * 2017-02-27 2017-06-20 努比亚技术有限公司 A kind of video background blurs terminal and method
CN106851104A (en) * 2017-02-28 2017-06-13 努比亚技术有限公司 A kind of method and device shot according to user perspective
CN106708081A (en) * 2017-03-17 2017-05-24 北京思比科微电子技术股份有限公司 Control system for multi-rotor unmanned aerial vehicle

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RUBLEE 等: ""ORB:an efficient alternative to SIFT or SURF"", 《INTERNATIONAL CONFERENCE ON COMPUTER VISION》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615586A (en) * 2018-05-07 2019-04-12 杭州新瀚光电科技有限公司 Infrared image distortion correction algorithm
CN111656391A (en) * 2018-07-17 2020-09-11 华为技术有限公司 Image correction method and terminal
CN111656391B (en) * 2018-07-17 2023-09-22 华为技术有限公司 Image correction method and terminal
CN109432768A (en) * 2018-10-16 2019-03-08 深圳市眼界科技有限公司 The distortion correction method and device of curve screens coordinate
CN109639930A (en) * 2018-12-01 2019-04-16 吴克成 A kind of semiconductor crystal wafer diced system based on computer vision and its cutting method
CN111028161A (en) * 2019-11-22 2020-04-17 维沃移动通信有限公司 Image correction method and electronic equipment
CN111028161B (en) * 2019-11-22 2024-04-05 维沃移动通信有限公司 Image correction method and electronic equipment
CN111080542A (en) * 2019-12-09 2020-04-28 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111091507A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111080542B (en) * 2019-12-09 2024-05-28 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and storage medium
CN111325691A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN111325691B (en) * 2020-02-20 2023-11-10 Oppo广东移动通信有限公司 Image correction method, apparatus, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN107680060A (en) A kind of image distortion correction method, terminal and computer-readable recording medium
CN108322644A (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN107730462A (en) A kind of image processing method, terminal and computer-readable recording medium
CN107404617A (en) A kind of image pickup method and terminal, computer-readable storage medium
CN107707821A (en) Modeling method and device, bearing calibration, terminal, the storage medium of distortion parameter
CN108108704A (en) Face identification method and mobile terminal
CN107317963A (en) A kind of double-camera mobile terminal control method, mobile terminal and storage medium
CN107194963A (en) A kind of dual camera image processing method and terminal
CN107704176A (en) A kind of picture-adjusting method and terminal
CN107948360A (en) Image pickup method, terminal and the computer-readable recording medium of flexible screen terminal
CN108008889A (en) Photographic method, mobile terminal and the computer-readable recording medium of flexible screen
CN108182726A (en) Three-dimensional rebuilding method, cloud server and computer readable storage medium
CN107295269A (en) A kind of light measuring method and terminal, computer-readable storage medium
CN107333056A (en) Image processing method, device and the computer-readable recording medium of moving object
CN107959795A (en) A kind of information collecting method, equipment and computer-readable recording medium
CN107566731A (en) A kind of focusing method and terminal, computer-readable storage medium
CN107909540A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN107239205A (en) A kind of photographic method, mobile terminal and storage medium
CN107040723A (en) A kind of imaging method based on dual camera, mobile terminal and storage medium
CN107240072A (en) A kind of screen luminance adjustment method, terminal and computer-readable recording medium
CN107105166A (en) Image capturing method, terminal and computer-readable recording medium
CN107613208A (en) Adjusting method and terminal, the computer-readable storage medium of a kind of focusing area
CN107404618A (en) A kind of image pickup method and terminal
CN107483804A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN107749947A (en) Photographic method, mobile terminal and computer-readable recording medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180209

RJ01 Rejection of invention patent application after publication