CN110473159A - Image processing method and device, electronic equipment, computer readable storage medium - Google Patents
Image processing method and device, electronic equipment, computer readable storage medium Download PDFInfo
- Publication number
- CN110473159A CN110473159A CN201910769994.6A CN201910769994A CN110473159A CN 110473159 A CN110473159 A CN 110473159A CN 201910769994 A CN201910769994 A CN 201910769994A CN 110473159 A CN110473159 A CN 110473159A
- Authority
- CN
- China
- Prior art keywords
- grid
- jitter compensation
- apex coordinate
- original
- spacing
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 238000012937 correction Methods 0.000 claims abstract description 88
- 238000004364 calculation method Methods 0.000 claims abstract description 19
- 238000006073 displacement reaction Methods 0.000 claims description 67
- 238000000034 method Methods 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 15
- 238000013507 mapping Methods 0.000 claims description 9
- 230000000694 effects Effects 0.000 abstract description 11
- 238000003384 imaging method Methods 0.000 description 13
- 230000006641 stabilisation Effects 0.000 description 12
- 238000011105 stabilization Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 238000013461 design Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000000571 coke Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000005304 optical glass Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
- H04N23/682—Vibration or motion blur correction
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
This application involves a kind of image processing method, device, electronic equipment, computer readable storage mediums, include: the grid determined according to the distortion correction parameter of camera lens on original image frame, obtain electronic equipment shooting original image frame when jitter compensation information, grid apex coordinate.Jitter compensation is carried out according to apex coordinate of the jitter compensation information to grid, the apex coordinate of grid after obtaining jitter compensation, picture frame at the apex coordinate of grid after the pixel being located at the apex coordinate of grid in original image frame to be mapped to jitter compensation, after jitter compensation is obtained according to the pixel at the apex coordinate of the grid after jitter compensation.Propose the grid determined on original image frame according to the distortion correction parameter of camera lens, the region different for distortion degree in picture frame needs accordingly to carry out jitter compensation using the grid of different densities, calculation amount can be reduced while improving the anti-shake effect of whole image frame.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of image processing method and device, electronic equipment, meter
Calculation machine readable storage medium storing program for executing.
Background technique
With the continuous development of photography technology, people increasingly improve the requirement of taking pictures of camera of electronic equipment.Traditional
Electronic equipment develops dual camera finally from single camera, and quality of taking pictures has significant raising.But people are to electronics
The requirement of taking pictures of equipment also increasingly improves therewith, how to further increase that the quality of taking pictures of electronic equipment, to meet user higher
It takes pictures demand, is exactly a urgent problem to be solved.
Summary of the invention
The embodiment of the present application provides a kind of image processing method, device, electronic equipment, computer readable storage medium, can
To improve the quality of taking pictures of electronic equipment, meet higher demand of taking pictures.
A kind of image processing method is applied to electronic equipment, comprising:
The grid on original image frame is determined according to the distortion correction parameter of camera lens;
Obtain the jitter compensation information when electronic equipment shoots the original image frame, the vertex of the grid is sat
Mark;
Jitter compensation is carried out according to apex coordinate of the jitter compensation information to the grid, after obtaining jitter compensation
The apex coordinate of grid;
The pixel being located at the apex coordinate of the grid in the original image frame is mapped into the jitter compensation
At the apex coordinate of grid afterwards, jitter compensation is obtained according to the pixel at the apex coordinate of the grid after the jitter compensation
Picture frame afterwards.
A kind of image processing apparatus, comprising:
Grid determining module, for determining the grid on original image frame according to the distortion correction parameter of camera lens;
The coordinate obtaining module of grid vertex, for obtaining the shake when electronic equipment shoots the original image frame
The apex coordinate of compensated information, the grid;
Grid vertex jitter compensation module, for according to the jitter compensation information to the coordinate on the vertex of the grid into
Row jitter compensation, the apex coordinate of the grid after obtaining jitter compensation;
Pixel mapping block, for the pixel at the apex coordinate of the grid will to be located in the original image frame
At the apex coordinate of grid after mapping to the jitter compensation, according to the apex coordinate of the grid after the jitter compensation
Pixel obtains the picture frame after jitter compensation.
A kind of electronic equipment, including memory and processor store computer program, the calculating in the memory
When machine program is executed by the processor, so that the step of processor executes method as above.
A kind of computer readable storage medium is stored thereon with computer program, when computer program is executed by processor
The step of realizing method as above.
Above-mentioned image processing method, device, electronic equipment, computer readable storage medium, according to the distortion correction of camera lens
Parameter determines the grid on original image frame, the jitter compensation information, grid when obtaining electronic equipment shooting original image frame
Apex coordinate.Jitter compensation is carried out according to apex coordinate of the jitter compensation information to grid, the grid after obtaining jitter compensation
Apex coordinate, the top of the grid after the pixel being located at the apex coordinate of grid in original image frame to be mapped to jitter compensation
At point coordinate, the picture frame after jitter compensation is obtained according to the pixel at the apex coordinate of the grid after jitter compensation.Tradition
It is all the grid using fixed format in method, if the grid spacing of fixed format is larger for picture frame, according to net
Lattice are poor come the effect for carrying out stabilization;And when if the grid spacing of fixed format is smaller for picture frame, according to grid come
The calculation amount for carrying out stabilization is too big.Therefore, present applicant proposes determined on original image frame according to the distortion correction parameter of camera lens
Grid it is big for distortion degree in picture frame because the distortion of camera lens will affect the distortion degree of different zones in picture frame
Region, that is, picture frame in displacement of pixel during distortion it is larger, then need to be shaken using highdensity grid
Compensation, and displacement of pixel during distortion is smaller in region, that is, picture frame small for distortion degree in picture frame, then
It only needs to carry out jitter compensation using the grid of low-density, it can be while improving the anti-shake effect of whole image frame, drop
Low calculation amount.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the applied environment figure of image processing method in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the flow chart for determining the grid method on original image frame in Fig. 2 according to the distortion correction parameter of camera lens;
Fig. 4 is to adjust the grid lines of original mesh according to the size of the displacement on each vertex of original mesh in Fig. 3
Spacing, the flow chart of the grid method after being adjusted;
Fig. 5 is that the figure after jitter compensation is obtained according to the pixel at the apex coordinate of the grid after jitter compensation in Fig. 2
As the flow chart of frame method;
Fig. 6 is the schematic diagram of image processing method in a specific embodiment;
Fig. 7 is the structural block diagram of image processing apparatus in one embodiment;
Fig. 8 A is the structural block diagram of grid determining module in Fig. 7;
Fig. 8 B is the structural block diagram of image processing apparatus in another embodiment;
Fig. 9 is the schematic diagram of internal structure of electronic equipment in one embodiment;
Figure 10 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes
It says, in the case where not departing from scope of the present application, the first camera can be known as second camera, and similarly, can incite somebody to action
Second camera is known as the first camera.First camera and second camera both camera, but it is not same takes the photograph
As head.
Fig. 1 is the application environment schematic diagram of image processing method in one embodiment.As shown in Figure 1, the application environment packet
Include electronic equipment 100.Electronic equipment 100 includes at least two camera modules, camera module 110 and camera module 120.Electronics
Equipment 100 can determine the grid on original image frame according to the distortion correction parameter of camera lens, and it is original to obtain electronic equipment shooting
The apex coordinate of jitter compensation information, grid when picture frame.It is trembled according to apex coordinate of the jitter compensation information to grid
Dynamic compensation, the apex coordinate of the grid after obtaining jitter compensation.The picture at the apex coordinate of grid will be located in original image frame
Vegetarian refreshments maps at the apex coordinate of the grid after jitter compensation, according to the pixel at the apex coordinate of the grid after jitter compensation
Point obtains the picture frame after jitter compensation.It is understood that above-mentioned electronic equipment 100 can be not limited to various mobile phones, phase
Mechanical, electrical brain, portable equipment etc..
Fig. 2 is the flow chart of image processing method in one embodiment, applied in the electronic flutter-proof of electronic equipment, EIS
Stabilization (electronic flutter-proof, Electric Image Stabilization) is dynamically adjusted using the degree for detecting fuselage shake
Whole ISO, shutter or software do fuzzy revising.EIS stabilization is a kind of algorithm operation, reduces compensation way through image to keep away
Exempt to obscure, shockproof effect depends on the design and efficiency of algorithm.The advantages of EIS stabilization is to be not required to additionally increase hardware, cost
Lower and suitable miniaturized design.
As shown in Fig. 2, image processing method includes step 220 to step 280.
Step 220, the grid on original image frame is determined according to the distortion correction parameter of camera lens.
Lens distortion is actually the general name of the intrinsic perspective distortion of optical lens.Lens distortion Producing reason be because
Eyeglass in camera lens because light the irregular refraction by generation, but because this is that camera lens inherently has characteristic,
In this case the distortion generated has no idea to eliminate, and can only improve.And better camera lens is because of optical design and materials
It is fastidious, using the optimization design of lens set, the optical glass of high quality is selected to manufacture eyeglass, can be aberration control very
In the case where small, but it cannot completely eliminate.
The distortion parameter of camera lens generally can be tested to obtain when carrying out camera calibration, such as can use and open
Family name demarcates to obtain.By the corresponding distortion correction parameter that can be obtained by camera lens of the distortion parameter of camera lens, the distortion correction of camera lens
Parameter can reflect the distortion degree in picture frame.The figure shot can be reduced according to the distortion correction parameter of camera lens
As the distortion situation of frame.
It in traditional electronic flutter-proof, is set on original image frame and carries out using unified, regular original mesh
The projection of pixel, such as M × N grid, wherein M refers to the transverse direction of original image frame being divided into M grid, and N is referred to
The longitudinal direction of original image frame is divided into N number of grid.However the distortion of camera lens will affect the distortion journey of different zones in picture frame
It spends, displacement of pixel during distortion is larger in region, that is, picture frame big for distortion degree in picture frame, then needs
Carry out jitter compensation using highdensity grid, and pixel in region, that is, picture frame small for distortion degree in picture frame
Displacement during distortion is smaller, then only needs to carry out jitter compensation using the grid of low-density.Here highly dense
Spend grid, in contrast low-density grid is.So in the embodiment of the present application can be according to the distortion correction parameter of camera lens
To determine the density of the grid of different zones in original image frame.
Step 240, obtain electronic equipment shooting original image frame when jitter compensation information, grid apex coordinate.
After the grid after the grid on original image frame i.e. distortion correction has been determined, it is original to obtain electronic equipment shooting
Jitter compensation information when picture frame.It is collected specifically to can be gyroscope institute when obtaining electronic equipment shooting original image frame
The angular speed of camera lens, collected angular speed can embody the shake intensity of electronic equipment, the more big then electronics of angular speed
The shake intensity of equipment is bigger.Gyroscope can acquire the angular speed of the camera lens in any camera module of electronic equipment, by angle
Speed data transmission to main control chip calculates jitter compensation information.The apex coordinate of grid after obtaining distortion correction again, i.e.,
Position coordinates of the vertex of grid after obtaining distortion correction in original image frame, are labeled as P ' (x, y).
Step 260, jitter compensation is carried out according to apex coordinate of the jitter compensation information to grid, after obtaining jitter compensation
The apex coordinate of grid.
According to electronic equipment shoot original image frame when gyroscope collected camera lens angular speed, to the vertex of grid
Coordinate carries out jitter compensation.I.e. to each apex coordinate of grid, sat by obtaining transformed vertex after jitter compensation
Mark is labeled as P " (x, y).
Step 280, after the pixel being located at the apex coordinate of grid in original image frame being mapped to jitter compensation
Image at the apex coordinate of grid, after jitter compensation is obtained according to the pixel at the apex coordinate of the grid after jitter compensation
Frame.
Since grid is set on original image frame, jitter compensation is carried out to grid vertex, has obtained jitter compensation
The apex coordinate of grid later is mended then shake can be mapped to the pixel for being located at the grid vertex of original image frame
At the apex coordinate of grid after repaying.The pixel of each grid vertex for being located at original image frame is mapped into shake again
Image after at the apex coordinate of compensated grid, after having can be formed by jitter compensation according to the pixel after mapping
Frame.In this way, just completing the jitter compensation to original image frame.
In the embodiment of the present application, the grid on original image frame is determined according to the distortion correction parameter of camera lens, obtains electronics
The apex coordinate of jitter compensation information, grid when equipment shooting original image frame.According to jitter compensation information to the top of grid
Point coordinate carries out jitter compensation, and the apex coordinate of the grid after obtaining jitter compensation will be located at the top of grid in original image frame
Pixel at point coordinate maps at the apex coordinate of the grid after jitter compensation, according to the vertex of the grid after jitter compensation
Pixel at coordinate obtains the picture frame after jitter compensation.It is all the grid using fixed format in conventional method, for figure
If poor come the effect for carrying out stabilization according to grid when larger as the grid spacing of fixed format for frame;And for picture frame
It is too big come the calculation amount for carrying out stabilization according to grid when if the grid spacing of fixed format is smaller for.Therefore, the application proposes
According to the distortion correction parameter of camera lens the grid on original image frame is determined, because the distortion of camera lens will affect in picture frame not
With the distortion degree in region, position of pixel during distortion in region, that is, picture frame big for distortion degree in picture frame
It moves larger, then needs to carry out jitter compensation using highdensity grid, and the region small for distortion degree in picture frame is
Displacement of pixel during distortion is smaller in picture frame, then only needs to carry out jitter compensation using the grid of low-density.
The grid on original image frame is determined according to the distortion correction parameter of camera lens, can improve the anti-shake effect of whole image frame
Meanwhile reducing calculation amount.
In one embodiment, step 220, the grid on original image frame is determined according to the distortion correction parameter of camera lens,
Include:
The spacing of the grid lines of the original mesh on original image frame is adjusted according to the size of the distortion correction parameter of camera lens.
Specifically, because the distortion of camera lens will affect the distortion degree of different zones in picture frame, for abnormal in picture frame
Displacement of pixel during distortion is larger in the big region, that is, picture frame of change degree, then need using highdensity grid come
Progress jitter compensation, and displacement of pixel during distortion in region, that is, picture frame small for distortion degree in picture frame
It is smaller, then it only needs to carry out jitter compensation using the grid of low-density.
Assuming that unified, regular original mesh such as M × N grid is provided with to original image frame in advance, due to picture frame
The size of the distortion correction parameter of middle camera lens embodies the size of distortion degree, biggish to distortion correction parameter in picture frame
Region needs to carry out jitter compensation using highdensity grid, therefore is adjusted to M × N grid in the region, by the area
The spacing of the grid lines of M × N grid in domain is turned down.For example, M × N grid in the region can be divided equally again, just obtained 2M ×
2N grid, the bisection method remain whole vertex in M × N grid.It is, of course, also possible to the region using other modes into
Row is divided equally, obtains I × J grid, wherein I > M;J>N.
The lesser region of distortion correction parameter in picture frame is needed to carry out jitter compensation using the grid of low-density, because
This is adjusted M × N grid in the region, and the spacing of the grid lines of M × N grid in the region is tuned up.For example, can incite somebody to action
The region resets grid, obtains I × J grid, wherein I < M;J<N.The grid in the region can also be merged, just
1/2M × 1/2N grid is obtained, which remains the part vertex in M × N grid.It is, of course, also possible to the region
M × N grid be configured using other modes.
In the embodiment of the present application, because the distortion of camera lens will affect the distortion degree of different zones in picture frame, for figure
As displacement of pixel during distortion is larger in the big region, that is, picture frame of distortion degree in frame, then need using high density
Grid carry out jitter compensation, and pixel is in distortion process in region, that is, picture frame small for distortion degree in picture frame
In displacement it is smaller, then only need to carry out jitter compensation using the grid of low-density.By the distortion correction parameter of camera lens, introduce
Into the setting of the spacing of grid, so that in original image frame not according to the distortion correction parameter of the camera lens of different zones
Together, the density of the grid in the region is adaptively adjusted.To use for the biggish region of distortion correction parameter of camera lens
Highdensity grid preferably carries out jitter compensation, improves the accuracy of jitter compensation.And for the distortion correction parameter of camera lens
Lesser region can reduce operand while realizing jitter compensation using the grid of low-density.
In one embodiment, as shown in figure 3, step 220, determines original image frame according to the distortion correction parameter of camera lens
On grid, comprising:
Step 222, the apex coordinate of original mesh is obtained from original image frame.
Original mesh can be unified, regular grid, such as M × N grid.Original mesh is set in original image
On frame, coordinate system is established to original image frame, so that it may calculate the apex coordinate of original mesh.
Step 224, distortion correction is carried out according to apex coordinate of the distortion correction parameter of camera lens to original mesh, obtained abnormal
The apex coordinate of original mesh after becoming correction.
Under normal circumstances, straight line can be shot when shooting into curve, especially marginal position by fish eye lens.Camera lens
Distortion correction parameter be specially distortion correction transformation matrix T (x, y), it is therefore, right according to distortion correction transformation matrix T (x, y)
The apex coordinate P (x, y) of original mesh carries out distortion correction, the apex coordinate P ' of the original mesh after obtaining distortion correction (x,
y).Calculation formula are as follows: P ' (x, y)=P (x, y) * T (x, y).
Step 226, according to the apex coordinate of the original mesh after the apex coordinate of every a pair of of original mesh, distortion correction,
Calculate the displacement on each vertex of original mesh.
According to the apex coordinate P ' of the original mesh after the apex coordinate P (x, y) of every a pair of of original mesh, distortion correction
(x, y), the displacement for calculating each vertex of original mesh are denoted as ShiftMap.Calculation formula are as follows: ShiftMap (x, y)=
P'(x,y)-P(x,y).By the formula calculated vertex displacement be vector, have direction.In order to by the displacement on vertex
Scalar is converted to, can directly take absolute value to the vector can be obtained the scalar of the displacement on vertex.It can also be by following
The scalar that formula defines the displacement on vertex is L=ShiftMap (x, y) .x*ShiftMap (x, y) .x+ShiftMap (x, y) .y*
ShiftMap(x,y).y.Wherein, ShiftMap (x, y) .x indicates displacement vector in the x direction, ShiftMap (x, y) .y table
Show displacement vector in y-direction.
Step 228, between the grid lines that original mesh is adjusted according to the size of the displacement on each vertex of original mesh
Away from grid after being adjusted.
The size of the displacement (scalar) on each vertex of original mesh has reacted the distortion degree near the vertex, displacement
Big then distortion degree is also bigger, the region big for distortion degree needs to carry out jitter compensation using highdensity grid, i.e.,
The spacing of the original mesh in the region is turned down.It is displaced that small then distortion degree is also smaller, the region small for distortion degree needs
Jitter compensation is carried out using the grid of low-density, i.e., tunes up the spacing of the original mesh in the region.To which spacing be adjusted
Grid later is merged, and entire grid has just been obtained.
In the embodiment of the present application, original mesh vertex is calculated according to the distortion correction parameter of camera lens and is occurred during distortion
Displacement, go quantizing distortion degree.The spacing that original mesh is adjusted further according to displacement, the grid after obtaining distortion correction,
Using the grid after distortion correction can region biggish for distortion degree, preferably trembled using highdensity grid
Dynamic compensation, improves the accuracy of jitter compensation.And region lesser for distortion degree, it can be in reality using the grid of low-density
Operand is reduced while existing jitter compensation.
In one embodiment, step 228, original net is adjusted according to the size of the displacement on each vertex of original mesh
The spacing of the grid lines of lattice, the grid after being adjusted, comprising:
Obtain the displacement on each vertex of original mesh;
According to the size of the displacement on each vertex of original mesh, the grid lines of original mesh is scaled on vertex
The spacing at place, the structure of the grid after being adjusted.
In the apex coordinate for obtaining original mesh from original image frame;According to the distortion correction parameter of camera lens to original net
The apex coordinate of lattice carries out distortion correction, the apex coordinate of the original mesh after obtaining distortion correction;And it is original according to every a pair
The apex coordinate of original mesh after the apex coordinate of grid, distortion correction, calculates the position on each vertex of original mesh
After shifting, according to the size of the displacement on each vertex of original mesh, the grid lines of original mesh is scaled on vertex
The spacing at place, the structure of the grid after being adjusted.
Specifically, spacing of the grid lines in apex of original mesh is scaled, can be according to original mesh
The size of the displacement on each vertex adjusts the grid lines of original mesh according to the ratio of displacement between apex
Away from.For example, A top displacement is 3mm in original mesh, B top displacement is 2mm in grid, then can will be original near the vertex A
The grid lines spacing of grid is divided into 3 parts, and the grid lines spacing of the original mesh near the vertex B is divided into 2 parts.That is vertex
The ratio of displacement is equal or approximately equal to the ratio of the spacing of grid near vertex adjusted.
In the embodiment of the present application, according to the size of the displacement on each vertex of original mesh, original net is scaled
Spacing of the grid lines of lattice in apex, the structure of the grid after being adjusted.Control grid lines fining may be implemented
Spacing reduces operand while to farthest improve jitter compensation effect.
In one embodiment, step 228, original net is adjusted according to the size of the displacement on each vertex of original mesh
The spacing of the grid lines of lattice, the grid after being adjusted, as shown in Figure 4, comprising:
Step 402, the displacement on each vertex of original mesh is obtained.
Obtain the detailed process of the displacement on each vertex of original mesh are as follows: original mesh is obtained from original image frame
Apex coordinate;Distortion correction is carried out according to apex coordinate of the distortion correction parameter of camera lens to original mesh, distortion is obtained and rectifys
The apex coordinate of original mesh after just;And according to the original mesh after the apex coordinate of every a pair of of original mesh, distortion correction
Apex coordinate, calculate the displacement on each vertex of original mesh.
Step 404, judge whether the displacement on vertex is greater than preset threshold, if so, the grid lines of original mesh is being pushed up
Spacing at point is adjusted to the first spacing, and the first spacing is less than the spacing of the grid lines of original mesh.
Here preset threshold is the threshold value of displacement of grid during lens distortion.For example, preset threshold can be 0
Or close to 0 numerical value (generally positive number), certainly, preset threshold is also possible to carry out statistical to the top displacement of entire grid
The calculated average value of institute after analysis.Judge whether the displacement on vertex is greater than preset threshold, if so, by the grid lines of original mesh
It is adjusted to the first spacing in the spacing of apex, the first spacing is less than the spacing of the grid lines of original mesh.
Step 406, if it is not, the grid lines of original mesh is then adjusted to the second spacing in the spacing of apex, between second
Spacing away from the grid lines for being greater than or equal to original mesh.
Judge whether the displacement on vertex is greater than preset threshold, if it is not, the displacement on i.e. vertex is less than or equal to preset threshold, then
The grid lines of original mesh is adjusted to the second spacing in the spacing of apex, the second spacing is greater than or equal to the net of original mesh
The spacing of ruling.Wherein it is possible to include following several situations: first, the displacement when vertex is less than preset threshold, then by original net
The grid lines of lattice is adjusted to the second spacing in the spacing of apex, and the second spacing is greater than the spacing of the grid lines of original mesh;Its
Two, when vertex displacement be equal to preset threshold, then the grid lines of original mesh is adjusted to the second spacing in the spacing of apex,
Second spacing is equal to the spacing of the grid lines of original mesh, that is, uses the grid lines of original mesh;Third, the displacement when vertex is small
In preset threshold, then the grid lines of original mesh is adjusted to the second spacing in the spacing of apex, the second spacing is equal to original
The spacing of the grid lines of grid uses the grid lines of original mesh.
Step 408, the grid lines of the first spacing is merged with the grid lines of the second spacing, the net after being adjusted
Lattice.
After the spacing of grid in original mesh near all vertex is adjusted, by the grid lines of the first spacing
It is merged with the grid lines of the second spacing, the grid after being adjusted.
In the embodiment of the present application, the size that the displacement of preset threshold opposite vertexes is arranged is judged, then by original mesh
In vertex divided, for vertex displacement be greater than preset threshold vertex, by the net of the original mesh near the vertex
The spacing of ruling is turned down.It is less than or equal to the vertex of preset threshold for the displacement on vertex, by the original mesh near the vertex
The spacing of grid lines tune up or constant.In this way, can then realize that be pointedly adjusted vertex to different vertex attached
Close grid has plenty of and turns the spacing of the grid lines of original mesh down, increases calculation amount but ensure that subsequent jitter compensation
Accuracy, have plenty of and tune up the spacing of the grid lines of original mesh, in the accuracy that equally ensure that subsequent jitter compensation
While reduce calculation amount.
It connects in one embodiment, the grid lines of the first spacing includes the grid lines of original mesh.
Specifically, judging whether the displacement on vertex is greater than preset threshold, if so, by the grid lines of original mesh on vertex
The spacing at place is adjusted to the first spacing, and the first spacing is less than the spacing of the grid lines of original mesh.By the original near the vertex
When the spacing of the grid lines of beginning grid is turned down, original mesh can be retained in the grid lines of the apex, and in addition increase grid newly
Line, so that the spacing of grid lines be turned down.
In the embodiment of the present application, if the spacing of the grid lines of the original mesh near the vertex is turned down, it can retain
Original mesh the apex grid lines, and in addition increase newly grid lines, so that the spacing of grid lines be turned down.Because of original net
The coordinate on the vertex in lattice be it is known, thus only need to calculate newly-increased grid lines and the coordinate on vertex that generates, this
Sample just reduces calculation amount, improves efficiency.
In one embodiment, as shown in figure 5, step 280, according to the picture at the apex coordinate of the grid after jitter compensation
Vegetarian refreshments obtains the picture frame after jitter compensation, comprising:
Step 282, the pixel value from the apex coordinate of the grid after obtaining jitter compensation in original image frame.
Jitter compensation is carried out according to apex coordinate of the jitter compensation information to grid adjusted, after obtaining jitter compensation
The apex coordinate of grid.Pixel value from the apex coordinate of grid after obtaining jitter compensation in original image frame.
Step 284, adjacent out using interpolation calculation to the pixel value at the apex coordinate for stating the grid after jitter compensation
The pixel value of pixel.
To the pixel value at the apex coordinate for stating the grid after jitter compensation, neighbor pixel is gone out using interpolation calculation
Pixel value, then and so on calculate the pixel values of all neighbor pixels.Here interpolation method also refers to closest
Interpolation method (Nearest Interpolation) or bilinear interpolation method (Bilinear Interpolation), certainly, are also wrapped
Include other unlisted interpolation methods.Wherein, closest interpolation method is exactly in neighbours' pixel of pixel to be asked, by distance picture to be asked
The nearest adjacent pixels gray value of element assigns pixel to be asked.Bilinear interpolation method is the gray scale using pixel four adjacent pixels to be asked
Value makees linear interpolation in two directions, obtains the gray value of pixel to be asked.
Step 286, according to the pixel value of pixel value, neighbor pixel at the apex coordinate of the grid after jitter compensation,
Picture frame after obtaining jitter compensation.
It, must according to the pixel value of pixel value, all neighbor pixels at the apex coordinate of the grid after jitter compensation
The pixel value of picture frame all pixels point after to jitter compensation, and then these pixels just constitute the image after jitter compensation
Frame.
In the embodiment of the present application, the grid vertex after the pixel in original image frame to be mapped to jitter compensation is realized
The pixel at place, then from the pixel value of the pixel is got in original image frame directly as the net after corresponding jitter compensation
The pixel of lattice apex.Then, the picture for then to the vertex for having got pixel value using these vertex of interpolation calculation adjacent
The pixel value of vegetarian refreshments.And then these pixels just constitute the picture frame after jitter compensation, the figure after obtained jitter compensation
As the clarity of frame is higher, anti-shake effect is preferable.
In one embodiment, distortion is carried out to the picture frame after jitter compensation according to the distortion correction parameter of camera lens to rectify
Just, the picture frame after obtaining distortion correction.
In the embodiment of the present application, distortion correction first can be carried out to original image frame according to the distortion correction parameter of camera lens,
Obtain original image frame after distortion correction and then on the original image frame after distortion correction according to the distortion of camera lens
It corrects parameter and adjusts grid, grid adjusted is set on the original image frame after distortion correction and carries out stabilization compensation meter
It calculates.It is of course also possible to have adjusted grid on original image frame in the distortion correction parameter according to camera lens and then according to camera lens
Distortion correction parameter to original image frame carry out distortion correction obtain the original image frame after distortion correction, will be adjusted
Grid is set in progress stabilization compensation calculation on the original image frame after distortion correction.It had both been improved obtained by reducing in this way
Picture frame distortion, also improve the anti-shake effect of picture frame.
It in a specific embodiment, should in advance to default mesh Default Mesh has been arranged in original image frame
The spacing of the grid lines of default mesh is fixed.As shown in fig. 6,
The first step obtains the distortion correction parameter Distortion Correction Param of camera lens;
Second step calculates the displacement ShiftMap on default mesh vertex according to the distortion correction parameter of camera lens;
Third step, according between the grid lines in the displacement on default mesh vertex adjustment default mesh at corresponding vertex
Away from;Specifically, judging whether the displacement on default mesh vertex is greater than preset threshold, if so, the grid lines of default mesh is existed
The spacing of apex is adjusted to the first spacing, and the first spacing is less than the spacing of the grid lines of default mesh, i.e. high-density gridding
High Density Mesh.If it is not, then using default mesh Default Mesh in apex.
4th step merges high-density gridding High Density Mesh and default mesh Default Mesh
(Mesh Fusion) obtains fused grid (AdaptiveMesh).
5th step obtains gyro data (GyroData), gyro data and fused grid is input to together
Attitude estimation (PoseEstimation) module, calculates transformed grid.
Position coordinates, the original image frame InputImage of transformation front and back grid are input to by the 6th step
The pixel being located at the apex coordinate of fused grid in original image frame is mapped to transformation by DewarpEngine module
At the apex coordinate of grid afterwards.According to the pixel at the apex coordinate of transformed grid, obtained using interpolation calculation
The pixel value of neighbor pixel, and then these pixels just constitute the picture frame after jitter compensation.
7th step, using the picture frame after jitter compensation as output Output.
In the embodiment of the present application, so that it may which, according to displacement of vertex during distortion, realization is directed to different vertex
The grid being adjusted to property near vertex, has plenty of and turns the spacing of the grid lines of original mesh down, increase calculation amount but
The accuracy that ensure that subsequent jitter compensation has plenty of reservation default mesh, ensure that the accuracy of subsequent jitter compensation
Calculation amount is reduced simultaneously.While guaranteeing anti-shake effect, the efficiency of picture frame stabilization is improved.This method is applied equally to
Video image improves the anti-shake effect of every frame image in entire video.
It should be understood that although each step in above-mentioned flow chart is successively shown according to the instruction of arrow, this
A little steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these steps
It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, in above-mentioned flow chart at least
A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps
Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to
Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps
Ground executes.
In one embodiment, as shown in fig. 7, providing a kind of image processing apparatus 700, comprising: grid determining module
720, the coordinate obtaining module 740, jitter compensation module 760 and pixel mapping block 780 of grid vertex.Wherein,
Grid determining module 720, for determining the grid on original image frame according to the distortion correction parameter of camera lens;
The coordinate obtaining module 740 of grid vertex, for obtaining jitter compensation when electronic equipment shooting original image frame
The apex coordinate of information, grid;
Grid vertex jitter compensation module 760, for being trembled according to coordinate of the jitter compensation information to the vertex of grid
Dynamic compensation, the apex coordinate of the grid after obtaining jitter compensation;
Pixel mapping block 780, for mapping the pixel being located at the apex coordinate of grid in original image frame
At the apex coordinate of grid after to jitter compensation, trembled according to the pixel of the apex coordinate of the grid after jitter compensation
Move compensated picture frame.
In one embodiment, grid determining module 720 is also used to be adjusted according to the size of the distortion correction parameter of camera lens
The spacing of the grid lines of grid on original image frame.
In one embodiment, grid determining module 720, as shown in Figure 8 A, comprising:
The apex coordinate acquiring unit 722 of original mesh, the vertex for obtaining original mesh from original image frame are sat
Mark;
Apex coordinate distortion correction unit 724, for being sat according to the distortion correction parameter of camera lens to the vertex of original mesh
Mark carries out distortion correction, the apex coordinate of the original mesh after obtaining distortion correction;
The displacement computing unit 726 on vertex, for according to the original after the apex coordinate of every a pair of of original mesh, distortion correction
The apex coordinate of beginning grid calculates the displacement on each vertex of original mesh;
Grid generation unit 728 adjusted, the size for the displacement according to each vertex of original mesh adjust
The spacing of the grid lines of original mesh, the grid after being adjusted.
In one embodiment, grid generation module 728 adjusted is also used to obtain each vertex of original mesh
Displacement;According to the size of the displacement on each vertex of original mesh, the grid lines of original mesh is scaled on vertex
The spacing at place, the structure of the grid after being adjusted.
In one embodiment, grid generation module 728 adjusted is also used to obtain each vertex of original mesh
Displacement;Judge whether the displacement on vertex is greater than preset threshold, if so, by the grid lines of original mesh apex spacing
It is adjusted to the first spacing, the first spacing is less than the spacing of the grid lines of original mesh;If it is not, then the grid lines of original mesh is existed
The spacing of apex is adjusted to the second spacing, and the second spacing is greater than or equal to the spacing of the grid lines of original mesh;Between first
Away from grid lines merged with the grid lines of the second spacing, the grid after being adjusted.
In one embodiment, the grid lines of the first spacing includes the grid lines of original mesh.
In one embodiment, pixel mapping block 780 is also used to after obtaining jitter compensation in original image frame
Pixel value at the apex coordinate of grid;To the pixel value at the apex coordinate for stating the grid after jitter compensation, using interpolation method
Calculate the pixel value of neighbor pixel;According to pixel value, the neighbor pixel at the apex coordinate of the grid after jitter compensation
Pixel value, the picture frame after obtaining jitter compensation.
In one embodiment, as shown in Figure 8 B, a kind of image processing apparatus is additionally provided, further includes: image frame distortion
Rectification module 790 obtains abnormal for carrying out distortion correction to the picture frame after jitter compensation according to the distortion correction parameter of camera lens
Picture frame after becoming correction.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus
As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
Fig. 9 is the schematic diagram of internal structure of electronic equipment in one embodiment.As shown in figure 9, the electronic equipment includes logical
Cross the processor and memory of system bus connection.Wherein, which supports entire electricity for providing calculating and control ability
The operation of sub- equipment.Memory may include non-volatile memory medium and built-in storage.Non-volatile memory medium is stored with behaviour
Make system and computer program.The computer program can be performed by processor, to be mentioned for realizing following each embodiment
A kind of image processing method supplied.Built-in storage provides high speed for the operating system computer program in non-volatile memory medium
The running environment of caching.The electronic equipment can be mobile phone, tablet computer or personal digital assistant or wearable device etc..
Realizing for the modules in image processing apparatus provided in the embodiment of the present application can be the shape of computer program
Formula.The computer program can be run in terminal or server.The program module that the computer program is constituted is storable in terminal
Or on the memory of server.When the computer program is executed by processor, method described in the embodiment of the present application is realized
Step.
The embodiment of the present application also provides a kind of electronic equipment.It include image processing circuit in above-mentioned electronic equipment, at image
Reason circuit can use hardware and or software component realization, it may include define ISP (Image Signal Processing, figure
As signal processing) the various processing units of pipeline.Figure 10 is the schematic diagram of image processing circuit in one embodiment.Such as Figure 10 institute
Show, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present application.
As shown in Figure 10, image processing circuit includes the first ISP processor 1030, the 2nd ISP processor 1040 and control
Logic device 1050.First camera 1010 includes one or more first lens 1012 and the first imaging sensor 1014.First
Imaging sensor 1014 may include colour filter array (such as Bayer filter), and the first imaging sensor 1014 can be obtained with first
The luminous intensity and wavelength information that each imaging pixel of imaging sensor 1014 captures, and providing can be by the first ISP processor
One group of image data of 1030 processing.Second camera 1020 includes one or more second lens 1022 and the second image sensing
Device 1024.Second imaging sensor 1024 may include colour filter array (such as Bayer filter), and the second imaging sensor 1024 can
Luminous intensity and wavelength information that each imaging pixel of the second imaging sensor 1024 captures are obtained, and providing can be by second
One group of image data of the processing of ISP processor 1040.
First image transmitting of the first camera 1010 acquisition is handled to the first ISP processor 1030, at the first ISP
It, can be by statistical data (brightness of such as image, the contrast value of image, the image of the first image after managing the first image of processing of device 1030
Color etc.) be sent to control logic device 1050, control logic device 1050 can determine the first camera 1010 according to statistical data
Control parameter, so that the first camera 1010 can carry out auto-focusing, the operation such as automatic exposure according to control parameter.First figure
As that can store after the first ISP processor 1030 is handled into video memory 1060, the first ISP processor 1030
The image that stores in video memory 1060 can be read with to handling.In addition, the first image passes through ISP processor 1030
It can be sent directly to display 1070 after being handled and shown that display 1070 can also be read in video memory 1060
Image to be shown.
Wherein, the first ISP processor 1030 handles image data pixel by pixel in various formats.For example, each image
Pixel can have the bit depth of 8,10,12 or 14 bits, and the first ISP processor 1030 can carry out image data one or more
The statistical information of image processing operations, collection about image data.Wherein, image processing operations can be by identical or different locating depth
Precision is spent to carry out.
Video memory 1060 can be independent special in a part, storage equipment or electronic equipment of memory device
It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from the first 1014 interface of imaging sensor, the first ISP processor 1030 can carry out one or more
A image processing operations, such as time-domain filtering.Image data that treated can be transmitted to video memory 1060, so as to shown
Other processing is carried out before.First ISP processor 1030 receives processing data from video memory 1060, and to processing data
Carry out the image real time transfer in RGB and YCbCr color space.Treated that image data can be defeated for first ISP processor 1030
Out to display 1070, so that user watches and/or by graphics engine or GPU (Graphics Processing Unit, figure
Processor) it is further processed.In addition, the output of the first ISP processor 1030 also can be transmitted to video memory 1060, and show
Device 1070 can read image data from video memory 1060.In one embodiment, video memory 1060 can be configured to
Realize one or more frame buffers.
The statistical data that first ISP processor 1030 determines can be transmitted to control logic device 1050.For example, statistical data can
Including automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 1012 shadow correction of the first lens etc. the
One imaging sensor, 1014 statistical information.Control logic device 1050 may include executing the processing of one or more routines (such as firmware)
Device and/or microcontroller, one or more routines can statistical data based on the received, determine the control ginseng of the first camera 1010
Several and the first ISP processor 1030 control parameter.For example, the control parameter of the first camera 1010 may include gain, exposure
Time of integration of control, stabilization parameter, flash of light control parameter, 1012 control parameter of the first lens (such as focus or zoom coke
Away from) or the combination of these parameters etc..ISP control parameter may include for automatic white balance and color adjustment (for example, at RGB
During reason) 1012 shadow correction parameter of gain level and color correction matrix and the first lens.
Similarly, the second image transmitting that second camera 1020 acquires is handled to the 2nd ISP processor 1040, the
After two ISP processors 1040 handle the first image, can by the statistical data of the second image (brightness of such as image, image contrast
Value, color of image etc.) it is sent to control logic device 1050, control logic device 1050 can determine the second camera shooting according to statistical data
First 1020 control parameter, so that second camera 1020 can carry out the operation such as auto-focusing, automatic exposure according to control parameter.
Second image can store after the 2nd ISP processor 1040 is handled into video memory 1060, the 2nd ISP processor
1040 can also read the image that stores in video memory 1060 with to handling.In addition, the second image is handled by ISP
Device 1040 can be sent directly to display 1070 after being handled and be shown, display 1070 can also read video memory
Image in 1060 is to be shown.Second camera 1020 and the 2nd ISP processor 1040 also may be implemented such as the first camera shooting
First 1010 and the first treatment process described in ISP processor 1030.
Above-mentioned image processing method may be implemented according to image processing circuit provided by the embodiments of the present application.Wherein, electronics
Equipment can include camera lens with multiple cameras, camera and the imaging sensor that is correspondingly arranged with camera lens, in multiple cameras
Imaging sensor is arranged using the cornerwise mode of rectangle.Electronic equipment realizes for example above-mentioned implementation of the process of the image processing method
Example, details are not described herein.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when computer executable instructions are executed by one or more processors,
So that processor executes the step of image processing method.
A kind of computer program product comprising instruction, when run on a computer, so that computer executes image
Processing method.
It may include non-to any reference of memory, storage, database or other media used in the embodiment of the present application
Volatibility and/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM in a variety of forms may be used
, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM),
Enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application
Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (11)
1. a kind of image processing method is applied to electronic equipment characterized by comprising
The grid on original image frame is determined according to the distortion correction parameter of camera lens;
Obtain the apex coordinate of jitter compensation information when the electronic equipment shoots the original image frame, the grid;
Jitter compensation is carried out according to apex coordinate of the jitter compensation information to the grid, the grid after obtaining jitter compensation
Apex coordinate;
After the pixel being located at the apex coordinate of the grid in the original image frame is mapped to the jitter compensation
At the apex coordinate of grid, after obtaining jitter compensation according to the pixel at the apex coordinate of the grid after the jitter compensation
Picture frame.
2. the method according to claim 1, wherein described determine original graph according to the distortion correction parameter of camera lens
As the grid on frame, comprising:
The spacing of the grid lines of the original mesh on original image frame is adjusted according to the size of the distortion correction parameter of camera lens.
3. the method according to claim 1, wherein described determine original graph according to the distortion correction parameter of camera lens
As the grid on frame, comprising:
The apex coordinate of original mesh is obtained from the original image frame;
Distortion correction is carried out according to apex coordinate of the distortion correction parameter of the camera lens to the original mesh, distortion is obtained and rectifys
The apex coordinate of original mesh after just;
According to the apex coordinate of the original mesh after the apex coordinate of every a pair original mesh, the distortion correction, calculate
The displacement on each vertex of the original mesh out;
The spacing that the grid lines of the original mesh is adjusted according to the size of the displacement on each vertex of the original mesh, obtains
To grid adjusted.
4. according to the method described in claim 3, it is characterized in that, the position on each vertex according to the original mesh
The size of shifting adjusts the spacing of the grid lines of the original mesh, the grid after being adjusted, comprising:
Obtain the displacement on each vertex of the original mesh;
According to the size of the displacement on each vertex of the original mesh, the grid lines that the original mesh is scaled exists
The spacing of the apex, the structure of the grid after being adjusted.
5. according to the method described in claim 3, it is characterized in that, the position on each vertex according to the original mesh
The size of shifting adjusts the spacing of the grid lines of the original mesh, the grid after being adjusted, comprising:
Obtain the displacement on each vertex of the original mesh;
Judge whether the displacement on the vertex is greater than preset threshold, if so, by the grid lines of the original mesh on the top
Spacing at point is adjusted to the first spacing, and first spacing is less than the spacing of the grid lines of the original mesh;
If it is not, the grid lines of the original mesh is then adjusted to the second spacing in the spacing of the apex, between described second
Spacing away from the grid lines for being greater than or equal to the original mesh;
The grid lines of first spacing is merged with the grid lines of second spacing, the grid after being adjusted.
6. according to the method described in claim 5, it is characterized in that, the grid lines of first spacing includes the original mesh
Grid lines.
7. the method according to claim 1, wherein described sit according to the vertex of the grid after the jitter compensation
Pixel at mark obtains the picture frame after jitter compensation, comprising:
Pixel value from the apex coordinate of grid after obtaining the jitter compensation in the original image frame;
To the pixel value at the apex coordinate of the grid after the jitter compensation, the picture of neighbor pixel is gone out using interpolation calculation
Element value;
According to the pixel value of pixel value, the neighbor pixel at the apex coordinate of the grid after the jitter compensation, obtain
Picture frame after jitter compensation.
8. the method according to claim 1, wherein the method also includes:
Distortion correction is carried out to the picture frame after the jitter compensation according to the distortion correction parameter of camera lens, after obtaining distortion correction
Picture frame.
9. a kind of image processing apparatus characterized by comprising
Grid determining module, for determining the grid on original image frame according to the distortion correction parameter of camera lens;
The coordinate obtaining module of grid vertex, for obtaining the jitter compensation when electronic equipment shoots the original image frame
The apex coordinate of information, the grid;
Grid vertex jitter compensation module, for being trembled according to the jitter compensation information to the coordinate on the vertex of the grid
Dynamic compensation, the apex coordinate of the grid after obtaining jitter compensation;
Pixel mapping block, for mapping the pixel being located at the apex coordinate of the grid in the original image frame
At the apex coordinate of grid after to the jitter compensation, according to the pixel of the apex coordinate of the grid after the jitter compensation
Point obtains the picture frame after jitter compensation.
10. a kind of electronic equipment, including memory and processor, computer program is stored in the memory, feature exists
In when the computer program is executed by the processor, so that the processor executes such as any one of claims 1 to 8
The step of described image processing method.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
It realizes when being executed by processor such as the step of method described in any item of the claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910769994.6A CN110473159B (en) | 2019-08-20 | 2019-08-20 | Image processing method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910769994.6A CN110473159B (en) | 2019-08-20 | 2019-08-20 | Image processing method and device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110473159A true CN110473159A (en) | 2019-11-19 |
CN110473159B CN110473159B (en) | 2022-06-10 |
Family
ID=68512776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910769994.6A Active CN110473159B (en) | 2019-08-20 | 2019-08-20 | Image processing method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110473159B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111371987A (en) * | 2020-02-25 | 2020-07-03 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
CN111432118A (en) * | 2020-03-26 | 2020-07-17 | Oppo广东移动通信有限公司 | Image anti-shake processing method and device, electronic equipment and storage medium |
CN111698421A (en) * | 2020-06-09 | 2020-09-22 | 展讯通信(上海)有限公司 | Image processing method and device and computer readable storage medium |
CN111951193A (en) * | 2020-08-21 | 2020-11-17 | 安谋科技(中国)有限公司 | Method and apparatus for correcting horizontal distortion of image |
CN112634165A (en) * | 2020-12-29 | 2021-04-09 | 广州光锥元信息科技有限公司 | Method and device for image adaptation VI environment |
CN112637500A (en) * | 2020-12-22 | 2021-04-09 | 维沃移动通信有限公司 | Image processing method and device |
CN112702515A (en) * | 2020-12-23 | 2021-04-23 | 上海立可芯半导体科技有限公司 | Image processing method, system and computer readable medium in camera system |
CN113077396A (en) * | 2021-03-29 | 2021-07-06 | Oppo广东移动通信有限公司 | Straight line segment detection method and device, computer readable medium and electronic equipment |
CN113256484A (en) * | 2021-05-17 | 2021-08-13 | 百果园技术(新加坡)有限公司 | Method and device for stylizing image |
CN113470095A (en) * | 2021-09-03 | 2021-10-01 | 贝壳技术有限公司 | Processing method and device for indoor scene reconstruction model |
CN115690567A (en) * | 2022-10-25 | 2023-02-03 | 广州三海海洋工程勘察设计有限公司 | Machine learning water depth inversion method and device, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6317704B1 (en) * | 1997-09-05 | 2001-11-13 | International Business Machines Corporation | Method for generating a mesh and a computer therefor |
CN101969527A (en) * | 2008-08-28 | 2011-02-09 | 奥多比公司 | Content-aware video stabilization |
CN103530852A (en) * | 2013-10-15 | 2014-01-22 | 南京芒冠光电科技股份有限公司 | Method for correcting distortion of lens |
CN104363986A (en) * | 2014-10-31 | 2015-02-18 | 华为技术有限公司 | Image processing method and device |
US20180035606A1 (en) * | 2016-08-05 | 2018-02-08 | Romello Burdoucci | Smart Interactive and Autonomous Robotic Property Maintenance Apparatus, System, and Method |
CN108596854A (en) * | 2018-04-28 | 2018-09-28 | 京东方科技集团股份有限公司 | Image distortion correction method and device, computer-readable medium, electronic equipment |
-
2019
- 2019-08-20 CN CN201910769994.6A patent/CN110473159B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6317704B1 (en) * | 1997-09-05 | 2001-11-13 | International Business Machines Corporation | Method for generating a mesh and a computer therefor |
CN101969527A (en) * | 2008-08-28 | 2011-02-09 | 奥多比公司 | Content-aware video stabilization |
CN103530852A (en) * | 2013-10-15 | 2014-01-22 | 南京芒冠光电科技股份有限公司 | Method for correcting distortion of lens |
CN104363986A (en) * | 2014-10-31 | 2015-02-18 | 华为技术有限公司 | Image processing method and device |
US20180035606A1 (en) * | 2016-08-05 | 2018-02-08 | Romello Burdoucci | Smart Interactive and Autonomous Robotic Property Maintenance Apparatus, System, and Method |
CN108596854A (en) * | 2018-04-28 | 2018-09-28 | 京东方科技集团股份有限公司 | Image distortion correction method and device, computer-readable medium, electronic equipment |
Non-Patent Citations (3)
Title |
---|
OGUZHAN URHAN: "Fast digital image stabilization using constrained one-bit transform, sparse search points, and partial distortion search", 《2008 IEEE 16TH SIGNAL PROCESSING, COMMUNICATION AND APPLICATIONS CONFERENCE》 * |
李山山 等: "Landsat-8姿态抖动对多光谱影像配准影响", 《遥感信息》 * |
田毅: "HEVC解码器图像质量优化的研究与设计", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111371987B (en) * | 2020-02-25 | 2021-06-25 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
CN111371987A (en) * | 2020-02-25 | 2020-07-03 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
CN111432118A (en) * | 2020-03-26 | 2020-07-17 | Oppo广东移动通信有限公司 | Image anti-shake processing method and device, electronic equipment and storage medium |
CN111698421A (en) * | 2020-06-09 | 2020-09-22 | 展讯通信(上海)有限公司 | Image processing method and device and computer readable storage medium |
CN111951193A (en) * | 2020-08-21 | 2020-11-17 | 安谋科技(中国)有限公司 | Method and apparatus for correcting horizontal distortion of image |
CN111951193B (en) * | 2020-08-21 | 2024-02-02 | 安谋科技(中国)有限公司 | Horizontal distortion correction method and horizontal distortion correction device for image |
CN112637500B (en) * | 2020-12-22 | 2023-04-18 | 维沃移动通信有限公司 | Image processing method and device |
CN112637500A (en) * | 2020-12-22 | 2021-04-09 | 维沃移动通信有限公司 | Image processing method and device |
CN112702515A (en) * | 2020-12-23 | 2021-04-23 | 上海立可芯半导体科技有限公司 | Image processing method, system and computer readable medium in camera system |
CN112634165A (en) * | 2020-12-29 | 2021-04-09 | 广州光锥元信息科技有限公司 | Method and device for image adaptation VI environment |
CN112634165B (en) * | 2020-12-29 | 2024-03-26 | 广州光锥元信息科技有限公司 | Method and device for image adaptation VI environment |
CN113077396A (en) * | 2021-03-29 | 2021-07-06 | Oppo广东移动通信有限公司 | Straight line segment detection method and device, computer readable medium and electronic equipment |
CN113077396B (en) * | 2021-03-29 | 2024-05-17 | Oppo广东移动通信有限公司 | Straight line segment detection method and device, computer readable medium and electronic equipment |
CN113256484B (en) * | 2021-05-17 | 2023-12-05 | 百果园技术(新加坡)有限公司 | Method and device for performing stylization processing on image |
CN113256484A (en) * | 2021-05-17 | 2021-08-13 | 百果园技术(新加坡)有限公司 | Method and device for stylizing image |
CN113470095B (en) * | 2021-09-03 | 2021-11-16 | 贝壳技术有限公司 | Processing method and device for indoor scene reconstruction model |
CN113470095A (en) * | 2021-09-03 | 2021-10-01 | 贝壳技术有限公司 | Processing method and device for indoor scene reconstruction model |
CN115690567A (en) * | 2022-10-25 | 2023-02-03 | 广州三海海洋工程勘察设计有限公司 | Machine learning water depth inversion method and device, computer equipment and storage medium |
CN115690567B (en) * | 2022-10-25 | 2023-09-26 | 广州三海海洋工程勘察设计有限公司 | Machine learning water depth inversion method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110473159B (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110473159A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
JP7371081B2 (en) | Night view photography methods, devices, electronic devices and storage media | |
CN107948519B (en) | Image processing method, device and equipment | |
CN108055452B (en) | Image processing method, device and equipment | |
CN107959778B (en) | Imaging method and device based on dual camera | |
US9288392B2 (en) | Image capturing device capable of blending images and image processing method for blending images thereof | |
US20200045219A1 (en) | Control method, control apparatus, imaging device, and electronic device | |
CN108111749B (en) | Image processing method and device | |
US11431915B2 (en) | Image acquisition method, electronic device, and non-transitory computer readable storage medium | |
CN110536057A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN108154514B (en) | Image processing method, device and equipment | |
CN108024054B (en) | Image processing method, device, equipment and storage medium | |
CN107925751A (en) | For multiple views noise reduction and the system and method for high dynamic range | |
CN110233970A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN111246089A (en) | Jitter compensation method and apparatus, electronic device, computer-readable storage medium | |
CN110248106A (en) | Image denoising method, device, electronic equipment and storage medium | |
CN110278360A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN109951638A (en) | Camera stabilization system, method, electronic equipment and computer readable storage medium | |
CN107509044A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
CN110266966A (en) | Image generating method and device, electronic equipment, computer readable storage medium | |
CN110475067A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN113875219B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN109559352B (en) | Camera calibration method, device, electronic equipment and computer-readable storage medium | |
CN108616700A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN110035206A (en) | Image processing method and device, electronic equipment, computer readable storage 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |