CN108389159A - A kind of distortion correction method and terminal - Google Patents

A kind of distortion correction method and terminal Download PDF

Info

Publication number
CN108389159A
CN108389159A CN201810162833.6A CN201810162833A CN108389159A CN 108389159 A CN108389159 A CN 108389159A CN 201810162833 A CN201810162833 A CN 201810162833A CN 108389159 A CN108389159 A CN 108389159A
Authority
CN
China
Prior art keywords
correction
distortion
region
photo
angle
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
CN201810162833.6A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810162833.6A priority Critical patent/CN108389159A/en
Publication of CN108389159A publication Critical patent/CN108389159A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses a kind of distortion correction methods, including:A wide-angle photo is shot using the camera of terminal;Determine the distorted region in the wide-angle photo and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is the integer more than or equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;Subregion and the non-distorted region after described M is corrected splice.Distorted region can be divided into using the embodiment of the present invention by M region, then the M region is subjected to distortion correction respectively, spliced by the M sub-regions after correction, to reduce the distortion degree of distorted region.

Description

A kind of distortion correction method and terminal
Technical field
The present embodiments relate to technical field of electronic equipment more particularly to a kind of distortion correction method and terminals.
Background technology
With the rapid development of information technology, the integrated achievable function of terminal is more and more, such as takes pictures, surfs the Internet, swims Play, shopping etc., but terminal is not omnipotent, in the prior art, terminal can be realized and be taken pictures, but model is taken pictures during taking pictures Enclose that there is certain constraints.
Under normal conditions, it will recognize that and taken pictures using wide-angle camera, but wide-angle camera shoots the image come Distortion is being generated beyond the region except certain angle range, the generation of this distortion is the characteristic due to wide-angle camera itself Caused by, how this problem of being corrected of distorting never effectively is solved.
Invention content
An embodiment of the present invention provides a kind of method of distortion correction and terminals, to generating distortion in camera image Region be corrected, to reduce distortion degree.
First aspect of the embodiment of the present invention discloses a kind of method of distortion correction, including step:
A wide-angle photo is shot using the camera of terminal;
Determine the distorted region in the wide-angle photo and non-distorted region;
The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is more than or equal to 1 Integer;
Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;
Subregion and the non-distorted region after described M is corrected splice.
Correspondingly, second aspect of the embodiment of the present invention discloses a kind of terminal, including:
Shooting unit, for shooting a wide-angle photo using the camera of terminal;
Determination unit, for determining distorted region and non-distortion area in wide-angle photo that the shooting unit takes Domain;
Division unit, the distorted region for determining the determination unit are divided into M according to predetermined angle interval Subregion, wherein M is the integer more than or equal to 1;
Unit is corrected, the M sub-regions for being divided to the division unit carry out distortion correction respectively, to obtain M Subregion after correction;
Concatenation unit, for splicing the subregion after the corrected M correction of the correction unit.
The embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the distortion in the wide-angle photo Region and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M be more than Or the integer equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;By the M Subregion and the non-distorted region after a correction are spliced.Distorted region can be divided into using the embodiment of the present invention M region, then the M region is subjected to distortion correction respectively, splice by the M sub-regions after correction, it is abnormal to reduce Become the distortion degree in region.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to required in embodiment, description The attached drawing used is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the embodiment of the present invention Example is applied, it for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow diagram of the first embodiment of the method for distortion correction provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of the second embodiment of the method for distortion correction provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of the 3rd embodiment of the method for distortion correction provided in an embodiment of the present invention;
Fig. 4 a are a kind of structural schematic diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 b are a kind of another structural schematic diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 c are a kind of another structural schematic diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 d are a kind of another structural schematic diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 e are a kind of another structural schematic diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of the second embodiment of terminal provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiment is only a part of the embodiment of the embodiment of the present invention, rather than whole implementation Example.Based on the embodiment in the embodiment of the present invention, those of ordinary skill in the art institute without creative efforts The every other embodiment obtained belongs to the range of protection of the embodiment of the present invention.
In realization, in the embodiment of the present invention, terminal can include but is not limited to:Laptop, mobile phone, tablet computer, Intelligent wearable device etc..The system of terminal refers to the operating system of equipment, can include but is not limited to:Android system, plug Class's system, Windows systems, IOS (Mobile operating system of Apple Inc.'s exploitation), XP systems, 8 systems of windows etc.. It should be noted that Android terminal refers to the terminal of android system, Saipan terminal refers to the terminal, etc. of Saipan system.On It is citing to state terminal only, and non exhaustive, including but not limited to above-mentioned terminal.
In implementation, camera described in the embodiment of the present invention is wide-angle camera, and range is commonly taken the photograph more than existing As the photo angle of head.
Combination of embodiment of the present invention Fig. 1 to Fig. 5 is to a kind of method and terminal of distortion correction provided in an embodiment of the present invention It is described.
Referring to Fig. 1, Fig. 1 is a kind of flow of the first embodiment of the method for distortion correction provided in an embodiment of the present invention Schematic diagram.The method of distortion correction described in the present embodiment, including step:
S101, a wide-angle photo is shot using the camera of terminal.
Wherein, terminal shoots a wide-angle photo using the camera of the terminal
As a kind of possible embodiment, terminal can using terminal camera shoot a wide-angle photo before, Determine the pre- photo angle range of the camera of the terminal, user, can be according to wanting to take pictures when starting the camera of terminal Scenery adjustment shooting angular range, the size that pre- photo angle range is exactly user according to region shared by scenery in scene It is determined.Terminal can first obtain the touching instruction of the photo angle range of user's selection, and taking the photograph for terminal is determined according to the instruction As the pre- photo angle range of head.For example, if the scenery range in scene is smaller, pre- photo angle range can be adjusted to general The camera lens range of logical camera, in this case, the photo distortion very little taken pictures, it is believed that undistorted;If in scene Scenery range it is larger, have been over the camera lens range of common camera, the image of pre- photo angle range may carry out Distortion correction.
As a kind of possible embodiment, the camera of terminal can be front camera or the postposition camera shooting of terminal Head;Alternatively, the camera of terminal can be terminal wirelessly or wired mode control camera.
S102, distorted region and non-distorted region in the wide-angle photo are determined.
Wherein, terminal can determine that the distorted region in wide-angle photo and non-distorted region, terminal can be arranged one in advance in advance If threshold value, the region that will be greater than the pixel composition of the predetermined threshold value is determined as distorted region, will be less than or equal to the default threshold The region of value is determined as non-distorted region, and further, the size of predetermined threshold value can be voluntarily arranged by user or system default. It should be noted that under normal conditions, due to the characteristic of wide-angle camera itself, thus, the distortion of wide-angle camera is deposited always , and wide-angle camera has symmetry characteristic under normal conditions, with the center of wide-angle camera to both sides, distortion factor Present symmetrical, distortion factor occurred in the prior art, did not described excessively herein.Distortion factor indicates wide-angle The distortion degree of the image of camera shooting, the distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and wide-angle camera Distortion factor in a certain range, i.e., distortion factor be less than a certain predetermined threshold value the case where, then it is believed that distortion factor be less than The corresponding region of a certain predetermined threshold value is non-distorted region, and corresponding photo angle range may be defined as undistorted photo angle Range.
S103, the distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is to be more than or wait In 1 integer.
Wherein, distorted region can be divided into M sub-regions by terminal according to predetermined angle interval, wherein M be more than or Integer equal to 1, during specific implementation, M is bigger, then the pattern distortion degree obtained after distortion calibration is smaller, between processing The processing speed of device, it is proposed that predetermined angle is set to 0.1 degree or so and is divided to distorted region.
S104, distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction.
Wherein, terminal can carry out distortion correction respectively to M sub-regions, to obtain the subregion after M correction, due to every The distortion degree of sub-regions is different, thus, the processing mode used to M region can be different.
As a kind of possible embodiment, terminal can determine the average distortion system of any subregion i in the M sub-regions Number;And distortion correction is carried out to any subregion i according to the average distortion coefficient.For any subregion i, it may be determined that this is any The distortion factor of each pixel, average distortion coefficient is sought so as to the distortion factor to each pixel in subregion i.Root Distortion correction is carried out to any subregion i according to the average distortion coefficient.
S105, by described M correction after subregion and the non-distorted region splice.
Wherein, subregion and non-distorted region after terminal can correct M splice.
The embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the distortion in the wide-angle photo Region and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M be more than Or the integer equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;By the M Subregion and the non-distorted region after a correction are spliced.Distorted region can be divided into using the embodiment of the present invention M region, then the M region is subjected to distortion correction respectively, splice by the M sub-regions after correction, it is abnormal to reduce Become the distortion degree in region.
Referring to Fig. 2, Fig. 2 is a kind of flow of the second embodiment of the method for distortion correction provided in an embodiment of the present invention Schematic diagram.The method of distortion correction described in the present embodiment, including step:
S201, a wide-angle photo is shot using the camera of terminal.
Wherein, terminal shoots a wide-angle photo using the camera of the terminal
As a kind of possible embodiment, terminal can using terminal camera shoot a wide-angle photo before, Determine the pre- photo angle range of the camera of the terminal, user, can be according to wanting to take pictures when starting the camera of terminal Scenery adjustment shooting angular range, the size that pre- photo angle range is exactly user according to region shared by scenery in scene It is determined.Terminal can first obtain the touching instruction of the photo angle range of user's selection, and taking the photograph for terminal is determined according to the instruction As the pre- photo angle range of head.For example, if the scenery range in scene is smaller, pre- photo angle range can be adjusted to general The camera lens range of logical camera, in this case, the photo distortion very little taken pictures, it is believed that undistorted;If in scene Scenery range it is larger, have been over the camera lens range of common camera, the image of pre- photo angle range may carry out Distortion correction.
As a kind of possible embodiment, the camera of terminal can be front camera or the postposition camera shooting of terminal Head;Alternatively, the camera of terminal can be terminal wirelessly or wired mode control camera.
S202, distorted region and non-distorted region in the wide-angle photo are determined.
Wherein, terminal can determine that the distorted region in wide-angle photo and non-distorted region, terminal can be arranged one in advance in advance If threshold value, the region that will be greater than the pixel composition of the predetermined threshold value is determined as distorted region, will be less than or equal to the default threshold The region of value is determined as non-distorted region, and further, the size of predetermined threshold value can be voluntarily arranged by user or system default. It should be noted that under normal conditions, due to the characteristic of wide-angle camera itself, thus, the distortion of wide-angle camera is deposited always , and wide-angle camera has symmetry characteristic under normal conditions, with the center of wide-angle camera to both sides, distortion factor Present symmetrical, distortion factor occurred in the prior art, did not described excessively herein.Distortion factor indicates wide-angle The distortion degree of the image of camera shooting, the distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and wide-angle camera Distortion factor in a certain range, i.e., distortion factor be less than a certain predetermined threshold value the case where, then it is believed that distortion factor be less than The corresponding region of a certain predetermined threshold value is non-distorted region, and corresponding photo angle range may be defined as undistorted photo angle Range.
S203, the distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is to be more than or wait In 1 integer.
Wherein, distorted region can be divided into M sub-regions by terminal according to predetermined angle interval, wherein M be more than or Integer equal to 1, during specific implementation, M is bigger, then the pattern distortion degree obtained after distortion calibration is smaller, between processing The processing speed of device, it is proposed that predetermined angle is set to 0.1 degree or so and is divided to distorted region.
S204, distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction.
Wherein, terminal can carry out distortion correction respectively to M sub-regions, to obtain the subregion after M correction, due to every The distortion degree of sub-regions is different, thus, the processing mode used to M region can be different.
S205, the boundary line for determining subregion and the non-distorted region after the M correction.
Wherein, terminal can be according to some tools used in boundary line of the M sub-regions in wide-angle photo and correction course The boundary line of subregion rather than distorted region after the determination correction of body algorithm after M correction can be determined according to wide-angle photo.
S206, according to the boundary line by subregion and the non-distorted region after described M correction according to it is described The corresponding sequence of wide-angle photo is spliced.
Wherein, terminal according to the boundary line by subregion and the non-distorted region after M correction according to wide-angle photo pair The sequence answered is spliced.Wherein, M sub-regions and non-distorted region are all corresponding with the scenery sequence in wide-angle photo.
The embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the distortion in the wide-angle photo Region and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M be more than Or the integer equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;Determine institute State the boundary line of the subregion and the non-distorted region after M correction;Son after correcting described M according to the boundary line Region and the non-distorted region are spliced according to sequence corresponding with the wide-angle photo.It can be incited somebody to action using the embodiment of the present invention Distorted region is divided into M region, then the M region is carried out distortion correction respectively, the M sub-regions after it will correct into Row splicing, to reduce the distortion degree of distorted region.
Referring to Fig. 3, Fig. 3 is a kind of flow of the 3rd embodiment of the method for distortion correction provided in an embodiment of the present invention Schematic diagram.The method of distortion correction described in the present embodiment, including step:
S301, a wide-angle photo is shot using the camera of terminal.
Wherein, terminal shoots a wide-angle photo using the camera of the terminal
As a kind of possible embodiment, terminal can using terminal camera shoot a wide-angle photo before, Determine the pre- photo angle range of the camera of the terminal, user, can be according to wanting to take pictures when starting the camera of terminal Scenery adjustment shooting angular range, the size that pre- photo angle range is exactly user according to region shared by scenery in scene It is determined.Terminal can first obtain the touching instruction of the photo angle range of user's selection, and taking the photograph for terminal is determined according to the instruction As the pre- photo angle range of head.For example, if the scenery range in scene is smaller, pre- photo angle range can be adjusted to general The camera lens range of logical camera, in this case, the photo distortion very little taken pictures, it is believed that undistorted;If in scene Scenery range it is larger, have been over the camera lens range of common camera, the image of pre- photo angle range may carry out Distortion correction.
As a kind of possible embodiment, the camera of terminal can be front camera or the postposition camera shooting of terminal Head;Alternatively, the camera of terminal can be terminal wirelessly or wired mode control camera.
S302, distorted region and non-distorted region in the wide-angle photo are determined.
Wherein, terminal can determine that the distorted region in wide-angle photo and non-distorted region, terminal can be arranged one in advance in advance If threshold value, the region that will be greater than the pixel composition of the predetermined threshold value is determined as distorted region, will be less than or equal to the default threshold The region of value is determined as non-distorted region, and further, the size of predetermined threshold value can be voluntarily arranged by user or system default. It should be noted that under normal conditions, due to the characteristic of wide-angle camera itself, thus, the distortion of wide-angle camera is deposited always , and wide-angle camera has symmetry characteristic under normal conditions, with the center of wide-angle camera to both sides, distortion factor Present symmetrical, distortion factor occurred in the prior art, did not described excessively herein.Distortion factor indicates wide-angle The distortion degree of the image of camera shooting, the distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and wide-angle camera Distortion factor in a certain range, i.e., distortion factor be less than a certain predetermined threshold value the case where, then it is believed that distortion factor be less than The corresponding region of a certain predetermined threshold value is non-distorted region, and corresponding photo angle range may be defined as undistorted photo angle Range.
S303, the distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is to be more than or wait In 1 integer.
Wherein, distorted region can be divided into M sub-regions by terminal according to predetermined angle interval, wherein M be more than or Integer equal to 1, during specific implementation, M is bigger, then the pattern distortion degree obtained after distortion calibration is smaller, between processing The processing speed of device, it is proposed that predetermined angle is set to 0.1 degree or so and is divided to distorted region.
S304, distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction.Wherein, eventually End can carry out distortion correction respectively to M sub-regions, to obtain the subregion after M correction, due to the distortion of every sub-regions Degree is different, thus, the processing mode used to M region can be different.
As a kind of possible embodiment, terminal can determine the average distortion system of any subregion i in the M sub-regions Number;And distortion correction is carried out to any subregion i according to the average distortion coefficient.For any subregion i, it may be determined that this is any The distortion factor of each pixel, average distortion coefficient is sought so as to the distortion factor to each pixel in subregion i.Root Distortion correction is carried out to any subregion i according to the average distortion coefficient.
S305, by described M correction after subregion and the non-distorted region splice.
S306, the stitching position of the image for splicing and obtaining is smoothed.
Wherein, the stitching position for the image that terminal can obtain splicing is smoothed, and the purpose of smoothing processing is Remove the gap of splicing.
S307, the edge of the image after smoothing processing is subjected to cutting process, to obtain rectangle picture.
Wherein, the marginal position of the image obtained after splicing is likely to occur irregular appearance, and terminal will can smoothly be located The edge of image after reason carries out cutting process, to obtain rectangle picture.
The embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the distortion in the wide-angle photo Region and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M be more than Or the integer equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;Determine institute State the boundary line of the subregion and the non-distorted region after M correction;Son after correcting described M according to the boundary line Region and the non-distorted region are spliced according to sequence corresponding with the wide-angle photo;By the image for splicing and obtaining Stitching position be smoothed;The edge of image after smoothing processing is subjected to cutting process, to obtain rectangle picture.It adopts Distorted region can be divided into M region with the embodiment of the present invention, then the M region is subjected to distortion correction respectively, incited somebody to action M sub-regions after correction are spliced, to reduce the distortion degree of distorted region.
Fig. 4 a are please referred to, Fig. 4 a are a kind of structural schematic diagrams of the first embodiment of terminal provided in an embodiment of the present invention. Terminal described in the present embodiment, including:
Shooting unit 401, for shooting a wide-angle photo using the camera of terminal.
Wherein, shooting unit 401 shoots a wide-angle photo using the camera of the terminal
As a kind of possible embodiment, shooting unit 401 can shoot a wide-angle in the camera using terminal and shine Before piece, determination unit (not marked in figure) determines that the pre- photo angle range of the camera of the terminal, user are starting terminal Camera when, can according to the angular range for the scenery adjustment shooting for wanting to take pictures, pre- photo angle range is exactly user according to It is determined according to the size in region shared by scenery in scene.The touch that terminal can first obtain the photo angle range of user's selection refers to It enables, the pre- photo angle range of the camera of terminal is determined according to the instruction.For example, if the scenery range in scene is smaller, Then pre- photo angle range can be adjusted to the camera lens range of common camera, in this case, the photo distortion taken pictures Very little, it is believed that undistorted;If the scenery range in scene is larger, the camera lens range of common camera is had been over, it is pre- to clap The image of irradiation angle range may carry out distortion correction.
As a kind of possible embodiment, the camera of terminal can be front camera or the postposition camera shooting of terminal Head;Alternatively, the camera of terminal can be terminal wirelessly or wired mode control camera.
Determination unit 402, for determining distorted region in wide-angle photo that the shooting unit 401 takes and non-abnormal Become region.
Wherein it is determined that unit 402 can determine that distorted region and non-distorted region in wide-angle photo, terminal can be arranged in advance One predetermined threshold value, the region that will be greater than the pixel composition of the predetermined threshold value are determined as distorted region, and will be less than or equal to should The region of predetermined threshold value is determined as non-distorted region, and further, the size of predetermined threshold value can be voluntarily arranged by user or be System acquiescence.It should be noted that under normal conditions, due to the characteristic of wide-angle camera itself, thus, the distortion of wide-angle camera It always exists, and wide-angle camera has symmetry characteristic under normal conditions, it is abnormal with the center of wide-angle camera to both sides Variable coefficient presentation is symmetrical, and distortion factor occurred in the prior art, did not described excessively herein.Distortion factor table Show the distortion degree of the image of wide-angle camera shooting, the distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and wide-angle The distortion factor of camera in a certain range, i.e., distortion factor be less than a certain predetermined threshold value the case where, then it is believed that distortion system It is non-distorted region that number, which is less than the corresponding region of a certain predetermined threshold value, and corresponding photo angle range may be defined as undistorted bat Irradiation angle range.
Division unit 403, the distorted region for determining the determination unit 402 are divided into according to predetermined angle interval For M sub-regions, wherein M is the integer more than or equal to 1.
Wherein, distorted region can be divided into M sub-regions by division unit 403 according to predetermined angle interval, wherein M For the integer more than or equal to 1, during specific implementation, M is bigger, then the pattern distortion degree obtained after distortion calibration is smaller, Between the processing speed of processor, it is proposed that predetermined angle is set to 0.1 degree or so and is divided to distorted region.
Unit 404 is corrected, the M sub-regions for being divided to the division unit 403 carry out distortion correction respectively, with Subregion to after M correction.
Wherein, correction unit 404 can carry out distortion correction respectively to M sub-regions, to obtain the sub-district after M correction Domain, since the distortion degree of every sub-regions is different, thus, the processing mode used to M region can be different.
Concatenation unit 405, for splicing the subregion after described corrected M correction of correction unit 404.
Wherein, subregion and non-distorted region after concatenation unit 405 can correct M splice.
As a kind of possible embodiment, as shown in Figure 4 b, the determination unit 402 of terminal described in Fig. 4 a can wrap It includes:First determination unit 4021 and the second determination unit 4022, it is specific as follows:
First determination unit 4021, distortion factor is more than pre- in the wide-angle photo for shooting the shooting unit 401 If the region of threshold value is determined as distorted region.
Second determination unit 4022, in the wide-angle photo for shooting the shooting unit 401 distortion factor be less than or Non- distorted region is determined equal to the region of predetermined threshold value.
As a kind of possible embodiment, as illustrated in fig. 4 c, the correction unit 404 of terminal described in Fig. 4 a can wrap It includes:Third determination unit 4041 and correction subelement 4042:
Third determination unit 4041, for determine the division unit 403 divide M sub-regions in any subregion i Average distortion coefficient;
Subelement 4042 is corrected, the average distortion coefficient for being determined according to the third determination unit 4041 is to described One subregion i carries out distortion correction.
As a kind of possible embodiment, as shown in figure 4d, the concatenation unit 405 of terminal described in Fig. 4 a can wrap It includes:4th determination unit 4051 and splicing subelement 4052:
4th determination unit 4051, for determining subregion and institute after M correction of correction unit 404 correction State the boundary line of non-distorted region;
Splice subelement 4052, for splicing the boundary line determined according to the 4th determination unit 4051 by the M Subregion and the non-distorted region after correction are spliced according to sequence corresponding with the wide-angle photo.
As a kind of possible embodiment, as shown in fig 4e, terminal described in Fig. 4 a may also include:Processing unit 406 and cutter unit 407:
The stitching position of processing unit 406, the image for splicing the concatenation unit is smoothed;
Cutter unit 407, for the edge of the image after smoothing processing to be carried out cutting process, to obtain rectangle picture.
Terminal described in the embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the wide-angle Distorted region in photo and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, Wherein, M is the integer more than or equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the son after M correction Region;Subregion and the non-distorted region after described M is corrected splice.It can will be distorted using the embodiment of the present invention Region division becomes M region, then the M region is carried out distortion correction respectively, is spelled by the M sub-regions after correction It connects, to reduce the distortion degree of distorted region.
Referring to Fig. 5, Fig. 5 is a kind of structural schematic diagram of the second embodiment of terminal provided in an embodiment of the present invention.This Terminal described in embodiment includes:At least one input equipment 1000;At least one output equipment 2000;At least one place Manage device 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, processor 3000 and storage Device 4000 is connected by bus 5000.
Wherein, above-mentioned input equipment 1000 can be touch panel, common PC, liquid crystal display, touch screen, push button etc..
Above-mentioned memory 4000 can be high-speed RAM memory or non-labile memory (non-volatile ), such as magnetic disk storage memory.Above-mentioned memory 4000 is above-mentioned input equipment 1000, defeated for storing batch processing code Go out equipment 2000 and processor 3000 for calling the program code stored in memory 4000, executes following operation:
Above-mentioned processor 3000, is used for:
A wide-angle photo is shot using the camera of terminal;
Determine the distorted region in the wide-angle photo and non-distorted region;
The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is more than or equal to 1 Integer;
Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;
Subregion and the non-distorted region after described M is corrected splice.
As a kind of possible embodiment, above-mentioned processor 3000 determines distorted region in the wide-angle photo and non- Distorted region, specially:
The region that distortion factor in the wide-angle photo is more than to predetermined threshold value is determined as distorted region;
The region that distortion factor in the wide-angle photo is less than or equal to predetermined threshold value determines non-distorted region.
As a kind of possible embodiment, above-mentioned processor 3000 carries out distortion correction respectively to the M sub-regions, To obtain the subregion after M correction, specially:
Determine the average distortion coefficient of any subregion i in the M sub-regions;
Distortion correction is carried out to any subregion i according to the average distortion coefficient.
As a kind of possible embodiment, above-mentioned processor 3000 is by the subregion and described non-after described M correction Distorted region is spliced, specially:
Determine the boundary line of the subregion and the non-distorted region after the M correction;
The subregion after described M correction is shone with the non-distorted region according to the wide-angle according to the boundary line The corresponding sequence of piece is spliced.
As a kind of possible embodiment, above-mentioned processor 3000 is by the subregion and described non-after described M correction After distorted region is spliced, also particularly useful for:
The stitching position of the image for splicing and obtaining is smoothed;
The edge of image after smoothing processing is subjected to cutting process, to obtain rectangle picture.
The embodiment of the present invention shoots a wide-angle photo using the camera of terminal;Determine the distortion in the wide-angle photo Region and non-distorted region;The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M be more than Or the integer equal to 1;Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;By the M Subregion and the non-distorted region after a correction are spliced.Distorted region can be divided into using the embodiment of the present invention M region, then the M region is subjected to distortion correction respectively, splice by the M sub-regions after correction, it is abnormal to reduce Become the distortion degree in region.
The embodiment of the present invention also provides a kind of computer storage media, wherein the computer storage media can be stored with journey Sequence, the program include some or all of any one signal processing method described in above method embodiment step when executing Suddenly.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
It should be noted that for each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the described action sequence because According to the present invention, certain steps may can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this hair Necessary to bright.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, for example, said units division, it is only a kind of Division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit, Can be electrical or other forms.
The above-mentioned unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit, can also be Each unit physically exists alone, can also be during two or more units are integrated in one unit.Above-mentioned integrated unit Both the form that hardware may be used is realized, can also be realized in the form of SFU software functional unit.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or network equipment etc., can be specifically the processor in computer equipment) is held The all or part of step of each embodiment above method of the row present invention.Wherein, storage medium above-mentioned may include:USB flash disk, shifting Dynamic hard disk, magnetic disc, CD, read-only memory (English:Read-Only Memory, abbreviation:) or random access memory ROM (English:Random Access Memory, abbreviation:The various media that can store program code such as RAM).
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (13)

1. a kind of method of distortion correction, which is characterized in that including:
A wide-angle photo is shot using the camera of terminal;
Determine the distorted region in the wide-angle photo and non-distorted region;
The distorted region is divided into M sub-regions according to predetermined angle interval, wherein M is whole more than or equal to 1 Number;
Distortion correction is carried out respectively to the M sub-regions, to obtain the subregion after M correction;
Subregion and the non-distorted region after described M is corrected splice.
2. the method as described in claim 1, which is characterized in that distorted region in the determination wide-angle photo and non-abnormal Become region, including:
The region that distortion factor in the wide-angle photo is more than to predetermined threshold value is determined as distorted region;
The region that distortion factor in the wide-angle photo is less than or equal to predetermined threshold value determines non-distorted region.
3. such as claims 1 or 2 any one of them method, which is characterized in that it is described the M sub-regions are carried out respectively it is abnormal Become correction, to obtain the subregion after M correction, including:
Determine the average distortion coefficient of any subregion i in the M sub-regions;
Distortion correction is carried out to any subregion i according to the average distortion coefficient.
4. such as claims 1 or 2 any one of them method, which is characterized in that the subregion by after described M correction with The non-distorted region is spliced, including:
Determine the boundary line of the subregion and the non-distorted region after the M correction;
According to the boundary line by subregion and the non-distorted region after described M correction according to the wide-angle photo pair The sequence answered is spliced.
5. such as claims 1 or 2 any one of them method, which is characterized in that the subregion by after described M correction with After the non-distorted region is spliced, the method further includes:
The stitching position of the image for splicing and obtaining is smoothed;
The edge of image after smoothing processing is subjected to cutting process, to obtain rectangle picture.
6. the method as described in claim 1, which is characterized in that shoot a wide-angle photo in the camera using terminal Before, the method further includes:
User is obtained according to wanting that the scenery taken pictures adjusts the touching instruction of the photo angle range of selection, is determined eventually according to the instruction The pre- photo angle range of the camera at end, and progress distortion correction is determined whether according to the pre- photo angle range.
7. a kind of terminal, which is characterized in that including:
Shooting unit, for shooting a wide-angle photo using the camera of terminal;
Determination unit, for determining distorted region and non-distorted region in wide-angle photo that the shooting unit takes;
Division unit, the distorted region for determining the determination unit are divided into M sub-district according to predetermined angle interval Domain, wherein M is the integer more than or equal to 1;
Unit is corrected, the M sub-regions for being divided to the division unit carry out distortion correction respectively, to obtain M correction Subregion afterwards;
Concatenation unit, for splicing the subregion after the corrected M correction of the correction unit.
8. terminal as claimed in claim 7, which is characterized in that the determination unit includes:
First determination unit, distortion factor is more than the region of predetermined threshold value in the wide-angle photo for shooting the shooting unit It is determined as distorted region;
Second determination unit, distortion factor is less than or equal to predetermined threshold value in the wide-angle photo for shooting the shooting unit Region determine non-distorted region.
9. such as claim 7 or 8 any one of them terminals, which is characterized in that the correction unit includes:
Third determination unit, the average distortion system for determining any subregion i in M sub-regions that the division unit divides Number;
Correct subelement, the average distortion coefficient for being determined according to the third determination unit to any subregion i into Line distortion corrects.
10. such as claim 7 or 8 any one of them terminals, which is characterized in that the concatenation unit includes:
4th determination unit, for determining subregion and the non-distortion area after M correction of the correction unit correction The boundary line in domain;
Splice subelement, for splicing the boundary line determined according to the 4th determination unit by the sub-district after described M correction Domain and the non-distorted region are spliced according to sequence corresponding with the wide-angle photo.
11. such as claim 7 or 8 any one of them terminals, which is characterized in that the terminal further includes:
The stitching position of processing unit, the image for splicing the concatenation unit is smoothed;
Cutter unit, for the edge of the image after smoothing processing to be carried out cutting process, to obtain rectangle picture.
12. such as claim 7 or 8 any one of them terminals, which is characterized in that the determination unit be additionally operable to obtain user according to The touching instruction that the photo angle range of selection is adjusted according to the scenery for wanting to take pictures, the pre- of the camera of terminal is determined according to the instruction Photo angle range, and progress distortion correction is determined whether according to the pre- photo angle range.
13. a kind of computer readable storage medium, which is characterized in that have program stored therein finger in the computer readable storage medium It enables, described program instructs the method for executing distortion correction as claimed in any one of claims 1 to 6 after being called for computer.
CN201810162833.6A 2015-06-30 2015-06-30 A kind of distortion correction method and terminal Pending CN108389159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810162833.6A CN108389159A (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510382678.5A CN105141826B (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal
CN201810162833.6A CN108389159A (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201510382678.5A Division CN105141826B (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal

Publications (1)

Publication Number Publication Date
CN108389159A true CN108389159A (en) 2018-08-10

Family

ID=54727024

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201510382678.5A Active CN105141826B (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal
CN201810162833.6A Pending CN108389159A (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201510382678.5A Active CN105141826B (en) 2015-06-30 2015-06-30 A kind of distortion correction method and terminal

Country Status (1)

Country Link
CN (2) CN105141826B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189269A (en) * 2019-05-23 2019-08-30 Oppo广东移动通信有限公司 Antidote, device, terminal and storage medium for wide-angle lens 3D distortion
CN110572578A (en) * 2019-09-30 2019-12-13 联想(北京)有限公司 Image processing method, apparatus, computing device, and medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106447602B (en) * 2016-08-31 2020-04-03 浙江大华技术股份有限公司 Image splicing method and device
CN107025638B (en) * 2017-03-28 2020-02-07 北京小米移动软件有限公司 Image processing method and device
CN109146781A (en) * 2018-07-20 2019-01-04 深圳市创客工场科技有限公司 Method for correcting image and device, electronic equipment in laser cutting
CN115905237B (en) * 2022-12-09 2024-03-22 江苏泽景汽车电子股份有限公司 Image processing method, device, HUD and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572828A (en) * 2009-05-20 2009-11-04 长春理工大学 Method for correcting distortion in real time based on GPU camera and video camera
CN102169573A (en) * 2011-03-23 2011-08-31 北京大学 Real-time distortion correction method and system of lens with high precision and wide field of view
CN102982516A (en) * 2012-10-25 2013-03-20 西安理工大学 Panoramic picture method based on hemisphere annular panoramic camera
CN103247031A (en) * 2013-04-19 2013-08-14 华为技术有限公司 Method, terminal and system for correcting aberrant image
CN104200454A (en) * 2014-05-26 2014-12-10 深圳市中瀛鑫科技股份有限公司 Fisheye image distortion correction method and device
CN104636743A (en) * 2013-11-06 2015-05-20 北京三星通信技术研究有限公司 Character image correction method and device
TWM503714U (en) * 2015-03-03 2015-06-21 Nuuo Inc Wide-angle image splitter processing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3084866B2 (en) * 1991-12-24 2000-09-04 松下電工株式会社 Lens distortion correction method
JP2008283507A (en) * 2007-05-11 2008-11-20 Nippon Seiki Co Ltd Distortion correction method
CN102339169B (en) * 2010-07-27 2014-04-30 中国科学院软件研究所 Method for calibrating large-sized multipoint touch system
CN103262561B (en) * 2010-10-13 2016-08-10 日本电气株式会社 Video distribution system and method for video distribution

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572828A (en) * 2009-05-20 2009-11-04 长春理工大学 Method for correcting distortion in real time based on GPU camera and video camera
CN102169573A (en) * 2011-03-23 2011-08-31 北京大学 Real-time distortion correction method and system of lens with high precision and wide field of view
CN102982516A (en) * 2012-10-25 2013-03-20 西安理工大学 Panoramic picture method based on hemisphere annular panoramic camera
CN103247031A (en) * 2013-04-19 2013-08-14 华为技术有限公司 Method, terminal and system for correcting aberrant image
CN104636743A (en) * 2013-11-06 2015-05-20 北京三星通信技术研究有限公司 Character image correction method and device
CN104200454A (en) * 2014-05-26 2014-12-10 深圳市中瀛鑫科技股份有限公司 Fisheye image distortion correction method and device
TWM503714U (en) * 2015-03-03 2015-06-21 Nuuo Inc Wide-angle image splitter processing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
18954831892: "浅谈如何控制广角的畸变", 《HTTPS://WENKU.BAIDU.COM/VIEW/48326BB5102DE2BD96058865.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189269A (en) * 2019-05-23 2019-08-30 Oppo广东移动通信有限公司 Antidote, device, terminal and storage medium for wide-angle lens 3D distortion
CN110189269B (en) * 2019-05-23 2023-06-09 Oppo广东移动通信有限公司 Correction method, device, terminal and storage medium for 3D distortion of wide-angle lens
CN110572578A (en) * 2019-09-30 2019-12-13 联想(北京)有限公司 Image processing method, apparatus, computing device, and medium

Also Published As

Publication number Publication date
CN105141826B (en) 2018-03-27
CN105141826A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN108389159A (en) A kind of distortion correction method and terminal
CN105141827B (en) Distortion correction method and terminal
CN104994281B (en) A kind of method and terminal of face distortion correction
US9736391B2 (en) Photographing method of dual-lens device, and dual-lens device
CN106997283B (en) Information processing method and electronic equipment
US10645278B2 (en) Imaging control apparatus and control method therefor
US20200267296A1 (en) Electronic device comprising plurality of cameras using rolling shutter mode
CN110648296B (en) Pupil color correction method, correction device, terminal device and storage medium
CN108769545A (en) A kind of image processing method, image processing apparatus and mobile terminal
US10070041B2 (en) Electronic apparatus and method for taking a photograph in electronic apparatus
US20220182554A1 (en) Image display method, mobile terminal, and computer-readable storage medium
CN104994286B (en) The method and terminal of a kind of distortion correction
CN104991695A (en) Information processing method and electronic equipment
CN112954212A (en) Video generation method, device and equipment
US10629138B2 (en) Mobile terminal and adjusting method thereof, and computer readable storage medium
CN108509125B (en) Page turning method, device, terminal and computer readable storage medium
JP2017055910A (en) Information processing device, posture motion control method, and posture control program
US20180052536A1 (en) Method for detecting input device and detection device
CN104994295B (en) The method and mobile terminal of a kind of distortion correction
EP2955621B1 (en) Electronic device and file storing method thereof
CN107682629B (en) Correction method of photographing interface, storage medium and mobile terminal
US20230008653A1 (en) Display method, apparatus and computer-readable storage medium
US20120056883A1 (en) Display control device, display control method, and program
CN115797160A (en) Image generation method and device
CN113509728A (en) Card display control method, device, equipment and 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