CN110570367A - Fisheye image correction method, electronic device and storage medium - Google Patents

Fisheye image correction method, electronic device and storage medium Download PDF

Info

Publication number
CN110570367A
CN110570367A CN201910772843.6A CN201910772843A CN110570367A CN 110570367 A CN110570367 A CN 110570367A CN 201910772843 A CN201910772843 A CN 201910772843A CN 110570367 A CN110570367 A CN 110570367A
Authority
CN
China
Prior art keywords
image
corrected
pixel
fisheye
coordinate
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
CN201910772843.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.)
Suzhou Kodak Technology Co Ltd
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Kodak Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Kodak Technology Co Ltd filed Critical Suzhou Kodak Technology Co Ltd
Priority to CN201910772843.6A priority Critical patent/CN110570367A/en
Publication of CN110570367A publication Critical patent/CN110570367A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • G06T3/047Fisheye or wide-angle transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a fisheye image correction method, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining a fisheye image to be corrected; acquiring a coordinate mapping table; the coordinate mapping table records the mapping relation of coordinates of each pixel point of a preset image on a fisheye image to be corrected; determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table; and performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image, wherein the pixel value is used as the corrected image of the fisheye image to be corrected. The coordinate mapping table is used for representing the coordinates of each pixel point in the preset image on the fisheye image to be corrected, after the fisheye image to be corrected is obtained, the coordinate mapping is directly searched, pixel interpolation is carried out based on the mapping result, the preset image can be obtained, and the fisheye image correction efficiency is improved.

Description

Fisheye image correction method, electronic device and storage medium
Technical Field
The invention relates to the technical field of image processing, in particular to a fisheye image correction method, electronic equipment and a storage medium.
Background
In a monitoring system, considering the installation and cost of equipment, it is generally better to install fewer cameras in a certain range, so that a single camera is required to acquire more scene information, and all fisheye lenses with short focal length and wide view are more and more widely applied. However, since the fisheye lens generally has a wide field of view and a large curvature of the lens, the distortion of the finally presented image is very large, so that the information in the image is not intuitive enough, or the subsequent information extraction and mining are not facilitated, and the distortion correction must be performed on the image.
The prior art provides a fisheye correction system, which is divided into three parts, wherein a certain number of frames are all stored in a memory, and then each frame of image is divided into a complex part and a simple part to be corrected and combined for output. The inventor researches on the system to find that, in the system, each frame of image is divided into a complex part and a simple part and processed at the same time, although the processing efficiency of each frame is improved, a large amount of repeated calculation needs to be carried out on each frame of image, namely, the complex part and the simple part of each frame of image are processed, a large amount of CPU (central processing unit) computing power is occupied, and therefore the correction efficiency of the fisheye image is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an electronic device, and a storage medium for correcting a fisheye image, so as to solve the problem of low correction efficiency of the fisheye image.
According to a first aspect, an embodiment of the present invention provides a method for correcting a fisheye image, including:
Obtaining a fisheye image to be corrected;
acquiring a coordinate mapping table; the coordinate mapping table records the mapping relation between each pixel point of a preset image and the coordinate on the fisheye image to be corrected;
Determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table;
and performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image, and taking the preset image obtained after interpolation as an image after correction of the fisheye image to be corrected.
According to the fisheye image correction method provided by the embodiment of the invention, the coordinate mapping table is used for representing the mapping relation between each pixel point in the preset image and the coordinate on the fisheye image to be corrected, after the fisheye image to be corrected is obtained, the coordinate mapping is directly searched, and the preset image can be obtained by performing pixel interpolation based on the mapping result, without performing coordinate transformation calculation on each fisheye image to be corrected, so that the repeated calculation process can be avoided, and the fisheye image correction efficiency is improved.
With reference to the first aspect, in a first implementation manner of the first aspect, performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image to form the preset image includes:
acquiring parameters of the preset image and determining a pixel interpolation mode; wherein the parameter of the preset image comprises a resolution;
determining pixel points corresponding to each coordinate in the fisheye image to be corrected based on the pixel interpolation mode;
and performing pixel interpolation on the determined pixel points by using the parameters of the preset image to obtain the pixel value of each pixel point of the preset image.
according to the fisheye image correction method provided by the embodiment of the invention, the determined pixel points are subjected to pixel interpolation according to different parameters of the preset image so as to meet different requirements, and further, different application requirements can be met in the same electronic device.
With reference to the first embodiment of the first aspect, in a second embodiment of the first aspect, the performing pixel interpolation on the determined pixel points by using the parameters of the preset image to obtain a pixel value of each pixel point of the preset image includes:
Extracting an interpolation weight table by using the parameters of the preset image; the interpolation weight table is used for expressing the interpolation weight of each coordinate and the corresponding pixel point;
and calculating the pixel value of each pixel point of the preset image according to the pixel value of the pixel point corresponding to each coordinate and the corresponding pixel interpolation weight.
According to the fisheye image correction method provided by the embodiment of the invention, the interpolation weight table is used for representing the interpolation weight of each coordinate and the corresponding pixel point, namely, after the coordinate and the pixel interpolation mode are determined, the pixel interpolation weight corresponding to each coordinate can be obtained through one-time calculation by using the parameters of the preset image, and after the fisheye image to be corrected is obtained, the coordinate mapping table and the interpolation weight table can be directly inquired, so that the fisheye image can be corrected, a large amount of repeated calculation is avoided, and the correction efficiency is improved.
with reference to the second implementation manner of the first aspect, in the third implementation manner of the first aspect, after the step of performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image so as to form the preset image, the method further includes:
Acquiring a control instruction for moving a target area in the preset image; wherein the control instruction comprises the moving distance of the target area;
And inquiring the coordinate mapping table and the pixel interpolation table based on the moving distance to obtain the moved preset image.
According to the fisheye image correction method provided by the embodiment of the invention, when the target area in the preset image needs to be moved, the corresponding pixel interpolation can be inquired only by inquiring the corresponding coordinate mapping table and the corresponding pixel interpolation table and carrying out corresponding coordinate offset. When the correction picture image moves, such as translation of a panoramic expansion image, all mapping coordinates do not need to be recalculated, the coordinate mapping relation only needs to be updated by table lookup, corresponding offset is carried out on the mapping coordinates according to the moving distance, and complex calculation is not needed; and then carrying out pixel interpolation according to the updated distortion correction coordinates to obtain a final pixel value.
With reference to the second implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the step of obtaining a coordinate mapping table further includes:
Acquiring a browsing mode of the preset image; the browsing modes comprise screenshot browsing and real-time browsing, and parameters of the preset images corresponding to the browsing modes;
And determining the coordinate mapping table and the pixel interpolation table corresponding to each browsing mode based on the browsing modes.
According to the fisheye image correction method provided by the embodiment of the invention, after the browsing mode of the current equipment is determined, the electronic equipment configures the current initialization parameters, performs inverse mapping calculation on the coordinates of the determined correction model, stores the calculation result in the memory, and often stores the coordinates of the inverse mapping result in the sub-pixel coordinates, so that the pixel weights in each adjacent domain are calculated according to the selection of a subsequent pixel interpolation algorithm and are also stored in the memory together for the subsequent pixel interpolation.
With reference to the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, the determining the pixel interpolation table corresponding to each browsing mode based on the browsing mode includes:
Determining a pixel interpolation mode corresponding to the browsing mode;
calculating the interpolation weight of a pixel point corresponding to each coordinate in the fisheye image to be corrected based on the pixel interpolation mode;
And storing the corresponding relation between each coordinate and the interpolation weight of the corresponding pixel point to obtain the pixel interpolation table.
The fisheye image correction method provided by the embodiment of the invention has the difference between real-time browsing and screenshot browsing that an interpolation method (such as a nearest neighbor interpolation algorithm for real-time browsing and a bilinear interpolation or bicubic interpolation algorithm for screenshot browsing) with lower algorithm complexity is basically used on the premise that the resolution of the real-time browsing is ensured not to influence the display effect, so that the calculated amount of the algorithm under the real-time browsing is reduced, a large amount of CPU (Central processing Unit) resources are not occupied, and when the screenshot is required, the algorithm better than the real-time browsing can be used to obtain a higher-quality image because of no real-time requirement.
With reference to the first aspect or any one of the first to fifth embodiments of the first aspect, in a sixth embodiment of the first aspect, the obtaining a coordinate mapping table includes:
Acquiring the size of the preset image and the size of the fisheye image to be corrected;
Based on the size of the preset image and the size of the fisheye image to be corrected, mapping each pixel point in the preset image to the fisheye image to be corrected to obtain the coordinate of each pixel point in the preset image on the fisheye image to be corrected;
And storing the corresponding relation between each pixel point in the preset image and the coordinate on the fisheye image to be corrected to obtain the coordinate mapping table.
With reference to the sixth implementation manner of the first aspect, in the seventh implementation manner of the first aspect, the preset image is a panoramic image; obtaining the coordinates of each pixel point in the preset image on the fisheye image to be corrected by adopting the following formula:
Wherein, L ═ Rp×θ,Rp=R+RInner part
In the formula (Q)x,Qy) The coordinates of the pixel points in the preset image are obtained; (P)x,Py) For a pixel point (Q) in said predetermined imagex,Qy) Mapping to saidcoordinates in the fisheye image to be corrected; outH and outW are respectively the height and width of the preset image; rOuter coverthe radius of the fisheye image to be corrected is obtained; rInner partthe radius of the concentric circle corresponding to the fisheye image to be corrected is obtained; rpFor coordinates (P) in the fisheye image to be correctedx,Py) Distance to origin; theta is the coordinate (P)x,Py) A deflection angle relative to a reference radius; l is a coordinate (P)x,Py) Arc length relative to a reference radius.
According to a second aspect, an embodiment of the present invention further provides an electronic device, including:
A memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the method for correcting a fisheye image according to the first aspect of the invention or any embodiment of the first aspect.
According to the third aspect, the present invention further provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the method for correcting a fisheye image according to the first aspect of the present invention or any implementation manner of the first aspect.
Drawings
in order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method of correcting a fisheye image according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a fisheye image to be corrected according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a preset image according to an embodiment of the invention;
fig. 4 is a flowchart of a method of correcting a fisheye image according to an embodiment of the invention;
FIGS. 5a-5b are a schematic diagram of the computation of a coordinate map according to an embodiment of the invention;
FIG. 6 is a schematic diagram of pixel interpolation according to an embodiment of the present invention;
Fig. 7 is a flowchart of a method of correcting a fisheye image according to an embodiment of the invention;
8a-8b are schematic diagrams of a preset image before and after movement according to an embodiment of the invention;
Fig. 9 is a flowchart of a method of correcting a fisheye image according to an embodiment of the invention;
Fig. 10 is a block diagram of a structure of an apparatus for correcting a fisheye image according to an embodiment of the invention;
fig. 11 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the correction method for a fisheye image provided in the embodiment of the present invention, when the electronic device performs correction on a fisheye image for the first time, a reverse mapping relationship of coordinates of each pixel point in a preset image in the fisheye image to be corrected is established. The preset image is a corrected image, namely an expected corrected image, and the preset image is used for carrying out reverse mapping on pixel points so as to determine the coordinates of each pixel point in the preset image in the fisheye image to be corrected; after the coordinates are determined, the coordinates may be sub-pixel points in the fisheye image to be corrected, and then the pixel value of each pixel point in the preset image can be obtained through pixel interpolation.
The coordinate mapping table for representing the inverse mapping relation is only established when the fisheye image is corrected for the first time, and only the coordinate mapping table needs to be inquired when the preset image with the same requirement is performed subsequently, and the calculation of coordinate transformation does not need to be repeated.
further, for pixel interpolation, when the electronic device performs correction of the fisheye image for the first time, for a preset image with the same requirement, a pixel interpolation table may be established to represent pixel interpolation corresponding to each coordinate in the fisheye image to be corrected. Then, for the purpose of acquiring a preset image with the same requirement, the coordinate mapping table may be queried, the coordinate of each pixel point in the preset image in the fisheye image to be corrected is determined, the queried coordinate is utilized to query the pixel interpolation table, and the pixel interpolation corresponding to the coordinate is determined, so that the pixel value of each pixel point in the preset image can be obtained. The method can avoid a large amount of repeated calculation, and improves the correction efficiency of the fisheye image. Hereinafter, a correction method of the fisheye image will be described in detail.
the fisheye image correction method in the embodiment of the invention can be applied to correction of a single fisheye image and can also be applied to correction of a video image. When the fisheye correction method is applied to correction of video images, each frame of fisheye image in the video collected by the fisheye lens is corrected.
According to an embodiment of the present invention, an embodiment of a method for correcting a fisheye image is provided, it should be noted that the steps illustrated in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be executed in an order different from that here.
In this embodiment, a method for correcting a fisheye image is provided, which can be used in the above-mentioned electronic device, and fig. 1 is a flowchart of a method for correcting a fisheye image according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
And S11, acquiring the fisheye image to be corrected.
the fisheye image to be corrected is a fisheye image acquired from the outside, and can also be a frame image in a video. The source of the fisheye image to be corrected is not limited at all.
for example, as shown in fig. 2, a schematic diagram of a fisheye image to be corrected is shown. The fisheye image to be corrected can also be understood as an image with a certain distortion.
And S12, acquiring a coordinate mapping table.
The coordinate mapping table records the mapping relation between each pixel point of a preset image and the coordinate on the fisheye image to be corrected.
Specifically, the preset image is an image expected to be obtained after the fisheye image to be corrected is corrected. In practical applications, the preset image may be defined by image parameters such as the size, resolution, and the like of the image. After the parameters such as the size, the resolution and the like of the image are determined, the acquired fisheye image to be corrected can be corrected. For example, when a fisheye image is corrected for a video captured by a fisheye lens, the electronic device inputs consecutive fisheye image frames captured by the fisheye lens and outputs the consecutive fisheye image frames as consecutive preset image frames. The preset image frames correspond to the fisheye image frames one by one.
the preset image may be a panoramic expansion image or other types of images, and the specific type of the preset image is not limited in any way. For example, as shown in FIG. 3, FIG. 3 shows a panoramic expansion corresponding to FIG. 2.
further, when the parameters of the preset image are determined, the positions of all pixel points in the preset image are also determined, and the mapping relation between all the pixel points in the preset image and the coordinates on the fisheye image to be corrected is recorded through a coordinate mapping table. The coordinate mapping table may be established before fisheye correction, but the coordinate mapping table is related to parameters of the fisheye image to be corrected and the preset image, and when the fisheye image to be corrected or the parameters in the preset image change, the coordinate mapping table needs to be determined again. Similarly, when the parameters of the fisheye image to be corrected and the preset image are kept unchanged, the coordinate mapping table can be directly utilized to determine the coordinate position of the pixel point in the preset image in the fisheye image to be corrected, and repeated calculation of each frame of image is not needed.
And S13, determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table.
after the electronic equipment acquires the fisheye image to be corrected, for each pixel point in the preset image, the coordinate of each pixel point in the fisheye image to be corrected can be determined by inquiring the coordinate mapping table. Furthermore, after the coordinates corresponding to each pixel point are determined, the pixel values of the pixel points in the preset image can be calculated in the fisheye image to be corrected by using the pixel values of the pixel points corresponding to the coordinates.
And S14, performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image, and taking the preset image obtained after interpolation as the image after correction of the fisheye image to be corrected.
the electronic equipment positions the determined coordinates into the fisheye image to be corrected, and pixel points related to the coordinates can be positioned. After the pixel points are located, pixel interpolation can be performed by using the pixel values of the pixel points, so that the pixel value of each pixel point of the preset image is obtained, and the preset image can be formed.
The pixel interpolation mode can be specifically selected according to the requirement of the actual preset image. For example, for the case where the image quality requirement of the preset image is not too high, the nearest neighbor interpolation method may be adopted; for the occasions with higher image quality requirements of the preset images, a bilinear interpolation method can be adopted; the manner in which the pixels are interpolated is not limited in any way here.
According to the fisheye image correction method provided by the embodiment, the coordinate of each pixel point in the preset image on the fisheye image to be corrected is represented by the coordinate mapping table, after the fisheye image to be corrected is obtained, the coordinate mapping is directly searched, the preset image can be obtained by performing pixel interpolation based on the mapping result, and the transformation calculation of the coordinates is not required to be performed on each fisheye image to be corrected, so that the repeated calculation process can be avoided, and the fisheye image correction efficiency is improved.
In this embodiment, a method for correcting a fisheye image is provided, which can be used in the above-mentioned electronic device, and fig. 4 is a flowchart of a method for correcting a fisheye image according to an embodiment of the present invention, as shown in fig. 4, the flowchart includes the following steps:
And S21, acquiring the fisheye image to be corrected.
Please refer to S11 in fig. 1, which is not described herein again.
And S22, acquiring a coordinate mapping table.
The coordinate mapping table records the mapping relation between each pixel point of a preset image and the coordinate on the fisheye image to be corrected.
for the coordinate mapping table, the coordinate mapping may be performed on the basis of knowing the size of the preset image and the size of the fisheye image to be corrected, and specifically, the S22 may include the following steps:
And S221, acquiring the size of the preset image and the size of the fisheye image to be corrected.
When the electronic equipment corrects the fisheye image, the size of the preset image and the size of the fisheye image to be corrected can be acquired from the outside. For the fisheye image to be corrected, it is generally circular, and therefore, the size of the fisheye image to be corrected may be the radius, or the diameter, of the image; for the preset image, the size depends on the shape of its output, for example, when the preset image is a panorama expanded image, then the size of the preset image may be the height and width of the panorama expanded image.
S222, mapping each pixel point in the preset image to the fisheye image to be corrected based on the size of the preset image and the size of the fisheye image to be corrected, so as to obtain the coordinate of each pixel point in the preset image on the fisheye image to be corrected.
after the electronic device determines the size of the image, the mapping of subsequent pixel points can be understood as the mapping relationship between the two points in the image determined by the shape. For the mapping relation of the points, the two images can be normalized and aligned to the same coordinate system, so that the mapping relation of the points is determined; other ways of determining the mapping relationship are also possible.
and S223, storing the corresponding relation between each pixel point in the preset image and the coordinate on the fisheye image to be corrected to obtain a coordinate mapping table.
after the mapping relations are determined, each group of mapping relations are stored, and a coordinate mapping table can be obtained. The coordinate mapping table can store the pixel points in the preset image according to the arrangement mode of the pixel points in the preset image. For example, if the preset image is an M × N image, the pixel point stored at the position (i, j) in the coordinate mapping table as the ith row and the jth column in the preset image corresponds to the coordinate in the fisheye image to be corrected. Of course, other storage means may be used.
as a specific application example of obtaining the coordinate mapping table in this embodiment, when the preset image is a panoramic expansion image, the following formula may be adopted to obtain the coordinates of each pixel point in the preset image on the fisheye image to be corrected:
Wherein, L ═ Rp×θ,Rp=R+RInner part
In the formula (Q)x,Qy) The coordinates of the pixel points in the preset image are obtained; (P)x,Py) For a pixel point (Q) in said predetermined imagex,Qy) Mapping to coordinates in the fisheye image to be corrected; outH and outW are respectively the height and width of the preset image; router coverThe radius of the fisheye image to be corrected is obtained; rinner partThe radius of the concentric circle corresponding to the fisheye image to be corrected is obtained; rpFor coordinates (P) in the fisheye image to be correctedx,Py) To the originalThe distance of the points; theta is the coordinate (P)x,Py) A deflection angle relative to a reference radius; l is a coordinate (P)x,Py) Arc length relative to a reference radius.
specifically, as shown in fig. 5a, the coordinates corresponding to the fisheye image to be corrected (at this time, the fisheye image to be corrected may be regarded as a circular image) are obtained by inverse mapping according to the preset image, for example, the coordinates on the preset image are Q (x, y), and the coordinates corresponding to the fisheye are P (x, y), and the proportional relationship is as follows:
Router coverIs the radius of the original fish-eye image which is not corrected, and when the size of the fish-eye image to be corrected is determined, R isouter coverIt is determined that the outer circle is the original uncorrected fisheye image. RInner partIs commonly known as a convention, is artificially specified and can be adjusted in size, because a circle cannot be unfolded into a rectangle and only has one circular ring, and the size of the circular ring can be changed, namely the inner circle RInner partMay vary.
Also, referring to fig. 5b, since the size of the preset image and the position of each coordinate are known, it is desired to find the upper coordinate corresponding to the fish eye. It is to be understood that the input is a circle and the output is a rectangle, so there must be an inner circle, such that the circumference of the inner circle corresponds to outW2, and the circumference of the outer circle corresponds to outW1, Rp', i.e. the height of the circle, corresponds to the height outH of the output image, such that each row of pixels on the output image corresponds to each circumference of the circle below a defined radius (R outer ≧ R inner).
And then obtaining the P point coordinate P (x, y) through an arc length formula, so that the reverse mapping coordinates of all the pixel points can be obtained.
and S23, determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table.
Please refer to S13 in fig. 1, which is not described herein again.
And S24, performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of a preset image, and taking the preset image obtained after interpolation as an image corrected for the fisheye image to be corrected.
The coordinates determined by the electronic device in S23 may be sub-pixel coordinates, and pixel interpolation is required to obtain the pixel value of each pixel point of the preset image. Specifically, S24 may include the steps of:
And S241, acquiring parameters of a preset image and determining a pixel interpolation mode.
Wherein the parameter of the preset image comprises a resolution.
Since the requirements for the corrected preset image are different in different situations, pixel interpolation needs to be performed based on the parameters of the preset image. Meanwhile, various pixel interpolation modes can be set in the electronic equipment, and specific selection can be performed according to actual conditions.
Multiple browsing modes can also be preset in the electronic device, for example, when the browsing mode is real-time browsing, a first pixel interpolation mode is adopted; and when the browsing mode is screenshot browsing, adopting a second pixel interpolation mode and the like. Hereinafter, different browsing modes will be described in detail.
And S242, determining pixel points corresponding to each coordinate in the fisheye image to be corrected based on a pixel interpolation mode.
After the pixel interpolation mode is determined, the electronic device can determine pixel points corresponding to each coordinate in the fisheye image to be corrected. For example, when the pixel interpolation mode is the nearest neighbor interpolation, and the coordinate point is (2.85, 2.75), it can be determined that the pixel point corresponding to the coordinate is (3, 3), that is, the pixel point of the third row and the third column in the fisheye image to be corrected; when the pixel interpolation mode is bilinear interpolation, it can be determined that the pixel point corresponding to the coordinate is 4 pixel points in the neighborhood.
and S243, performing pixel interpolation on the determined pixel points by using the parameters of the preset image to obtain the pixel value of each pixel point of the preset image.
After the electronic device determines the pixel points, the pixel values corresponding to the pixel points can be correspondingly extracted, and then the pixel values of each pixel point of the preset image can be obtained by combining the parameters of the preset image and the interpolation mode.
As an optional implementation manner of this embodiment, for pixel interpolation, an interpolation weight table may be established, and when determining the coordinates of the pixel points in the preset image in the fisheye image to be corrected by using the coordinate mapping table, the interpolation weight of the corresponding pixel points may be obtained by querying the interpolation weight table. Specifically, the S244 may include the steps of:
(1) And extracting an interpolation weight table by using the parameters of the preset image.
The interpolation weight table is used for expressing the interpolation weight of each coordinate and the corresponding pixel point.
the same input image size, different output sizes, different image scaling, and different determined coordinates and weights in various interpolation methods are of course different, so that the resolution of the output image needs to be obtained.
For example, as shown in fig. 6, by using bilinear interpolation, it is necessary to consider pixel values of 4 points (P1, P2, P3, and P4) in the surrounding neighborhood, and obtain corresponding weights W1, W2, W3, and W4 by using distances L1, L2, L3, and L4 corresponding to the 4 points, so that the pixel value of the point finally interpolated is W1 × L1+ W2 × L2+ W3 × L3+ W4 × L4.
Therefore, W1, W2, W3 and W4 are stored simultaneously, and correspond to 4 tables, each having a size of a predetermined image, for example, if the current point (i, j) corresponds to the sub-pixel position on the original image, then the corresponding 4 weights are stored at the (i, j) positions of the other 4 tables. For example, if the preset image size is 10 × 10, 4 spaces of 10 × 10 are allocated in advance, and the corresponding 4 weights are stored.
Of course, if other interpolation methods are used, the weight table may not be used, for example, the nearest neighbor interpolation may not be needed, and only the coordinate position corresponding to the original image needs to be stored in advance.
(2) And calculating the pixel value of each pixel point of the preset image according to the pixel value of the pixel point corresponding to each coordinate and the corresponding pixel interpolation weight.
The electronic device can directly calculate the pixel value of each pixel point of the preset image after obtaining the pixel value of the pixel point corresponding to each coordinate and the corresponding pixel interpolation weight. The interpolation weight table is used for representing the interpolation weight of each coordinate and the corresponding pixel point, namely after the coordinate and the pixel interpolation mode are determined, the pixel interpolation weight corresponding to each coordinate can be obtained through one-time calculation, and after the fisheye image to be corrected is obtained subsequently, the coordinate mapping table and the interpolation weight table can be directly inquired, so that the correction of the fisheye image can be realized, a large amount of repeated calculation is avoided, and the correction efficiency is improved.
according to the correction method of the fisheye image, different pixel interpolation modes are determined according to different parameters of the preset image, so that different requirements are met; furthermore, different pixel interpolation modes can be designed in the same electronic device according to different requirements, so that different application requirements can be met in the same electronic device.
In this embodiment, a method for correcting a fisheye image is provided, which can be used in the above-mentioned electronic device, and fig. 7 is a flowchart of a method for correcting a fisheye image according to an embodiment of the present invention, as shown in fig. 7, the flowchart includes the following steps:
and S31, acquiring the browsing mode of the preset image.
The browsing modes comprise screenshot browsing and real-time browsing, and parameters of the preset images corresponding to the browsing modes.
The electronic equipment is provided with a plurality of browsing modes for a user to select, for example, the browsing modes are screenshot browsing and real-time browsing, the user firstly selects the corresponding browsing mode, and parameters of a preset image can also be input. The parameters of the fisheye image to be corrected can be obtained by analyzing the fisheye image to be corrected.
After the browsing mode of the current device is determined, the subsequent electronic device configures the current initialization parameter, performs inverse mapping calculation of coordinates on the determined correction, and stores the calculation result in the memory, and the inverse mapping result coordinates are often sub-pixel coordinates, so that the pixel weights in each adjacent domain are calculated according to the selection of the subsequent pixel interpolation algorithm and are also stored in the memory together for the subsequent pixel interpolation.
S32, based on the browsing modes, determines the coordinate mapping table and the pixel interpolation table corresponding to each browsing mode.
the method comprises the steps that a screenshot view corresponding to a first pixel interpolation mode and a real-time view corresponding to a second pixel interpolation mode can be preset in the electronic equipment; various pixel interpolation modes can be set, and the electronic equipment can perform automatic matching and the like. After the browsing mode is determined, the corresponding pixel interpolation mode is also determined. Specifically, S32 includes the steps of:
S321, determining a pixel interpolation mode corresponding to the browsing mode.
After the pixel interpolation mode is determined, the corresponding interpolation weight table can be determined accordingly.
And S322, calculating the interpolation weight of the pixel point corresponding to each coordinate in the fisheye image to be corrected based on the pixel interpolation mode.
The electronic equipment can calculate the interpolation weight of the pixel point corresponding to each coordinate in the fisheye image to be corrected by using the determined pixel interpolation mode.
And S323, storing the corresponding relation between each coordinate and the interpolation weight of the corresponding pixel point to obtain a pixel interpolation table.
It should be noted that, the above steps S31-S33 may also be completed before the fisheye image to be corrected is corrected, that is, after the browsing mode and the parameters of the preset image are determined, the corresponding interpolation weight table may also be calculated and stored. Subsequently, when the electronic device corrects the fisheye image, pixel interpolation can be performed by querying the pixel interpolation table.
And S33, acquiring the fisheye image to be corrected.
please refer to S21 in fig. 4 for details, which are not described herein.
And S34, acquiring a coordinate mapping table.
The coordinate mapping table records the mapping relation of coordinates of each pixel point of a preset image on the fisheye image to be corrected.
it should be noted that the coordinate mapping table may also be obtained by calculating and storing the coordinate mapping table before the electronic device corrects the fisheye image. It can also be understood that the electronic device already stores the coordinate mapping table and the pixel interpolation table before the correction of the fisheye image.
Please refer to S22 in fig. 4 for details, which are not described herein.
And S35, determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table.
please refer to S23 in fig. 4 for details, which are not described herein.
s36, performing pixel interpolation on the fisheye image to be corrected according to the determined fisheye image to be corrected to obtain a pixel value of each pixel point of a preset image, and taking the preset image obtained after interpolation as the image corrected by the fisheye image to be corrected.
please refer to S24 in fig. 4 for details, which are not described herein.
and S37, acquiring a control instruction for moving the target area in the preset image.
Wherein, the control instruction includes a moving distance of the target area.
After the electronic device obtains the preset image, the user may move the target area, that is, the electronic device can obtain the control instruction for moving the target area in the preset image accordingly.
for example, referring to fig. 8a, fig. 8a shows a preset image obtained by the electronic device. At this time, when the electronic device acquires a control instruction for moving the target area in the image, the preset image is formed again, as shown in fig. 8 b.
And S38, inquiring the coordinate mapping table and the pixel interpolation table based on the moving distance to obtain the moved preset image.
The electronic equipment stores a coordinate mapping table and a pixel interpolation table, and coordinates of each point on the preset image Q corresponding to the original image P can be obtained by searching the coordinate mapping table; that is, Q (i, j) corresponds to P (x, y). When the picture is shifted by L, Q (i, j) corresponds to P (x, y + L).
Of course, if the interpolation is bilinear interpolation, the corresponding 4 weight tables also perform the same offset processing, which is specifically as follows:
W1(x, y) becomes W1(x, y + L);
W2(x, y) becomes W2(x, y + L);
W3(x, y) becomes W3(x, y + L);
w4(x, y) becomes W4(x, y + L).
The above calculation formula does not change, and does not need to be recalculated, and only the table look-up position corresponding to the calculated table needs to be changed.
According to the correction method for the fisheye image, when the target area in the preset image needs to be moved, corresponding coordinate mapping tables and pixel interpolation tables only need to be inquired, and corresponding coordinate offset is carried out, so that the corresponding pixel interpolation can be inquired. When the correction picture image moves, such as translation of a panoramic expansion image, all mapping coordinates do not need to be recalculated, the coordinate mapping relation only needs to be updated by table lookup, corresponding offset is carried out on the mapping coordinates according to the moving distance, and complex calculation is not needed; and then carrying out pixel interpolation according to the updated distortion correction coordinates to obtain a final pixel value.
As a specific application example of the method for correcting a fisheye image according to this embodiment, as shown in fig. 9, the method, which is executed on a cpu of an X86 platform, may include the following steps:
1. For example, an original circular distorted image with a fish eye resolution of 2560 × 2560 is input, a scene use mode is determined to be a desktop mode, and a browsing mode implements browsing and screenshot browsing respectively.
2. Initializing parameters: when the use mode and the browsing mode are determined, parameter configuration is carried out, the resolution of the currently configured real-time browsing output image is 3048 x 424, and the resolution of the screenshot browsing output image is 6104 x 856, namely the resolution of the real-time browsing is 1/4 of the screenshot image, so that the calculation amount of image pixels for real-time browsing is greatly reduced.
3. And (3) correction calculation: according to the resolution of the input image and the output image, the coordinates corresponding to the fisheye circle are obtained according to the reverse mapping of the output image by the panoramic expansion model, the obtained coordinates are sub-pixel coordinates generally, and the interpolation weight of 4 pixels in the neighborhood can be obtained in advance because a bilinear interpolation algorithm is selected and used in a subsequent pixel interpolation module.
4. Pixel interpolation
And (4) obtaining the pixel values and the weights of 4 points in the neighborhood by looking up a table through the mapping coordinates in the last step, and obtaining the corresponding output pixel values through bilinear interpolation.
Resultpixel=p1*w1+p2*w2+p3*w3+p4*w4
P is the pixel value and w is the weight corresponding to 4 points
By analogy, the values of all pixels on each frame of image can be obtained, and the corrected image is obtained
5. When the position of the concerned object in the picture needs to be moved, the corrected picture needs to be dragged to move left and right
at this moment, the reflection mapping coordinate calculation of each pixel point does not need to be carried out again in the third step, and the corresponding offset is carried out on the searching mapping of the mapping coordinate table according to the left-right movement distance of the picture before the pixel interpolation.
For example, the picture moving distance L, and the mapping table is a table () function, where X is table (X + L). Wherein, X is the new coordinate after the offset, and X is the coordinate before the offset. And then repeating the step 4.
6. Screenshot browsing
The detailed step modules are similar to real-time browsing, and the difference is that when the parameters are initialized, the configured resolution is 4 times or more than that of real-time browsing, so that the screenshot is ensured to have enough detail information, and a more complex interpolation algorithm is probably used in the pixel interpolation module to improve the detail expression capability of the picture.
1. The invention can ensure the normal use of the system without depending on a high-performance GPU or CPU platform, and ensure the real-time property of image processing and the definition of the intercepted image. In the process of processing the image in real time, the image with lower resolution ratio compared with the screenshot processing flow is used as an output result, and the nearest interpolation is used for image interpolation, so that the complexity and the calculated amount of the algorithm are reduced as much as possible under the condition of meeting the requirement of real-time browsing, and the requirement of real-time performance is ensured. When a certain frame of image needs to be intercepted, because no real-time requirement exists, the frame of image is calculated by using a higher resolution and a more complex and accurate pixel interpolation algorithm, and the image quality requirement is ensured.
2. The method can be freely switched between different correction models and use modes, the use requirements of different scenes are met, and after the correction models and the use modes are determined, the distortion correction models are determined, so that the next operation is carried out.
3. In addition, because the calculated mapping coordinates are generally sub-pixel coordinate positions, the weights of pixel interpolation can be calculated in the module, so that the calculated amount in the pixel interpolation module of each frame of image can be greatly reduced, and the convolution of the pixel value and the corresponding weight is required.
4. In the panoramic expansion mode, a fisheye circular original image needs to be expanded into a 360-degree panoramic image by a distortion correction model, the corrected image often needs to be moved left and right in a monitoring system to ensure that required image information is displayed in the center of a picture, and when the picture is moved, the correction method does not need to recalculate mapping coordinates, which needs to perform certain-proportion offset when a pixel coordinate lookup table is performed according to the moving distance of the picture. Therefore, the problem that the calculated amount of the algorithm is not suddenly increased and the picture is not jammed during moving can be solved.
It should be noted that, the current usage modes of the electronic device are divided into a desktop mode, a ceiling mode and a wall mode, and different installation modes correspond to different distortion models and distortion correction algorithms, and are not limited to one correction mode.
Different from other fisheye correction system methods, the invention creates 2 sets of image correction processes which respectively correspond to real-time browsing image output and screenshot browsing image output. The difference between the real-time browsing and the screenshot browsing is that the real-time browsing uses 1\4 or less of the output resolution of the screenshot browsing and uses an interpolation method with lower algorithm complexity in the subsequent pixel interpolation processing (for example, the real-time browsing uses a nearest neighbor interpolation algorithm, and the screenshot browsing uses a bilinear interpolation or bicubic interpolation algorithm), which not only ensures the reduction of the calculated amount of the algorithm under the real-time browsing without occupying a large amount of CPU resources, but also ensures that when the screenshot requirement exists, because of no real-time requirement, the algorithm better than the real-time browsing can be used to obtain a higher-quality image.
When the current device using mode and the browsing mode are selected, the system configures the current initialization parameters, performs inverse mapping calculation on the coordinates of the determined correction model, and stores the calculation result in the memory, and the coordinates of the inverse mapping result are often sub-pixel coordinates, so that the pixel weights in each adjacent domain are calculated according to the selection of the subsequent pixel interpolation algorithm and are also stored in the memory together for the subsequent pixel interpolation.
And then, image pixel interpolation is carried out on each frame of image to obtain a corresponding corrected output result, when the current image is judged not to have the moving operation, the correction coordinate calculation and the interpolation weight in the previous step do not need to be repeatedly calculated, each frame of image only needs to be subjected to pixel interpolation to obtain the final pixel value, and a large amount of repeated calculation is reduced.
when the image of the correction picture moves, for example, the translation of the panoramic expansion image, all the distortion correction reverse mapping coordinates do not need to be recalculated, the mapping relation of the coordinates only needs to be updated, and the corresponding offset is carried out on the mapping coordinates according to the picture moving distance, so that the complex calculation is not needed. And then carrying out pixel interpolation according to the updated distortion correction coordinates to obtain a final pixel value.
In this embodiment, a device for correcting a fisheye image is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides a correction apparatus for a fisheye image, as shown in fig. 10, including:
The first obtaining module 41 is configured to obtain a fisheye image to be corrected.
A second obtaining module 42, configured to obtain a coordinate mapping table; the coordinate mapping table records the mapping relation between each pixel point of a preset image and the coordinate on the fisheye image to be corrected.
A coordinate determining module 43, configured to determine, based on the coordinate mapping table, coordinates of each pixel point in the preset image on the fisheye image to be corrected;
And the pixel interpolation module 44 is configured to perform pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image, and use the preset image obtained after interpolation as an image after correction of the fisheye image to be corrected.
The fisheye image correction device provided by this embodiment uses the coordinate mapping table to represent the coordinates of each pixel point in the preset image on the fisheye image to be corrected, directly searches the coordinate mapping after the fisheye image to be corrected is obtained, and performs pixel interpolation based on the mapping result to obtain the preset image without performing coordinate transformation calculation for each fisheye image to be corrected, so that the process of repeated calculation can be avoided, and the fisheye image correction efficiency is improved.
The fisheye image correction apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that can provide the above-described functions.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides an electronic device, which has the correction apparatus for fisheye image shown in fig. 10.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 11, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, at least one communication bus 52. Wherein a communication bus 52 is used to enable the connection communication between these components. The communication interface 53 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 53 may also include a standard wired interface and a standard wireless interface. The Memory 54 may be a high-speed RAM Memory (volatile Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 54 may alternatively be at least one memory device located remotely from the processor 51. Wherein the processor 51 may be in connection with the apparatus described in fig. 10, the memory 54 stores an application program, and the processor 51 calls the program code stored in the memory 54 for performing any of the above-mentioned method steps.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 52 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 11, but this is not intended to represent only one bus or type of bus.
The memory 54 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviation: HDD), or a solid-state drive (english: SSD); the memory 54 may also comprise a combination of the above types of memories.
the processor 51 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 51 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The aforementioned PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 54 is also used to store program instructions. The processor 51 may call program instructions to implement the fisheye image correction method as shown in the embodiments of fig. 1, 4 and 7 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the fisheye image correction method in any method embodiment. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard disk (Hard disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for correcting a fisheye image, comprising:
Obtaining a fisheye image to be corrected;
Acquiring a coordinate mapping table; the coordinate mapping table records the mapping relation between each pixel point of a preset image and the coordinate on the fisheye image to be corrected;
Determining the coordinates of each pixel point in the preset image on the fisheye image to be corrected based on the coordinate mapping table;
And performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image, and taking the preset image obtained after interpolation as an image after correction of the fisheye image to be corrected.
2. The method according to claim 1, wherein the performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image to form the preset image comprises:
acquiring parameters of the preset image and determining a pixel interpolation mode; wherein the parameter of the preset image comprises a resolution;
Determining pixel points corresponding to each coordinate in the fisheye image to be corrected based on the pixel interpolation mode;
and performing pixel interpolation on the determined pixel points by using the parameters of the preset image to obtain the pixel value of each pixel point of the preset image.
3. The method according to claim 2, wherein the performing pixel interpolation on the determined pixel points by using the parameter of the preset image to obtain a pixel value of each pixel point of the preset image comprises:
extracting an interpolation weight table by using the parameters of the preset image; the interpolation weight table is used for expressing the interpolation weight of each coordinate and the corresponding pixel point;
And calculating the pixel value of each pixel point of the preset image according to the pixel value of the pixel point corresponding to each coordinate and the corresponding pixel interpolation weight.
4. The method according to claim 3, wherein after the step of performing pixel interpolation on the fisheye image to be corrected according to the determined coordinates and the fisheye image to be corrected to obtain a pixel value of each pixel point of the preset image so as to form the preset image, the method further comprises:
acquiring a control instruction for moving a target area in the preset image; wherein the control instruction comprises the moving distance of the target area;
And inquiring the coordinate mapping table and the pixel interpolation table based on the moving distance to obtain the moved preset image.
5. The method of claim 3, wherein the step of obtaining a coordinate mapping table is preceded by:
acquiring a browsing mode of the preset image; the browsing modes comprise screenshot browsing and real-time browsing, and parameters of the preset images corresponding to the browsing modes;
and determining the coordinate mapping table and the pixel interpolation table corresponding to each browsing mode based on the browsing modes.
6. the method of claim 5, wherein the determining the pixel interpolation table corresponding to each browsing mode based on the browsing mode comprises:
Determining a pixel interpolation mode corresponding to the browsing mode;
Calculating the interpolation weight of a pixel point corresponding to each coordinate in the fisheye image to be corrected based on the pixel interpolation mode;
And storing the corresponding relation between each coordinate and the interpolation weight of the corresponding pixel point to obtain the pixel interpolation table.
7. the method according to any one of claims 1-6, wherein the obtaining a coordinate mapping table comprises:
Acquiring the size of the preset image and the size of the fisheye image to be corrected;
Based on the size of the preset image and the size of the fisheye image to be corrected, mapping each pixel point in the preset image to the fisheye image to be corrected to obtain the coordinate of each pixel point in the preset image on the fisheye image to be corrected;
And storing the corresponding relation between each pixel point in the preset image and the coordinate on the fisheye image to be corrected to obtain the coordinate mapping table.
8. the method of claim 7, wherein the preset image is a panoramic image; obtaining the coordinates of each pixel point in the preset image on the fisheye image to be corrected by adopting the following formula:
Wherein, L ═ Rp×θ,Rp=R+RInner part
in the formula (Q)x,Qy) To said issetting coordinates of pixel points in the image; (P)x,Py) For a pixel point (Q) in said predetermined imagex,Qy) Mapping to coordinates in the fisheye image to be corrected; outH and outW are respectively the height and width of the preset image; rOuter coverThe radius of the fisheye image to be corrected is obtained; rInner partthe radius of the concentric circle corresponding to the fisheye image to be corrected is obtained; rpFor coordinates (P) in the fisheye image to be correctedx,Py) Distance to origin; theta is the coordinate (P)x,Py) A deflection angle relative to a reference radius; l is a coordinate (P)x,Py) Arc length relative to a reference radius.
9. An electronic device, comprising:
a memory and a processor, wherein the memory and the processor are connected in communication with each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the fisheye image correction method according to any one of claims 1-8.
10. A computer-readable storage medium storing computer instructions for causing a computer to execute the method for correcting a fisheye image according to any one of claims 1 to 8.
CN201910772843.6A 2019-08-21 2019-08-21 Fisheye image correction method, electronic device and storage medium Pending CN110570367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910772843.6A CN110570367A (en) 2019-08-21 2019-08-21 Fisheye image correction method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910772843.6A CN110570367A (en) 2019-08-21 2019-08-21 Fisheye image correction method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN110570367A true CN110570367A (en) 2019-12-13

Family

ID=68774257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910772843.6A Pending CN110570367A (en) 2019-08-21 2019-08-21 Fisheye image correction method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110570367A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738909A (en) * 2020-06-11 2020-10-02 杭州海康威视数字技术股份有限公司 Image generation method and device
CN111899151A (en) * 2020-07-28 2020-11-06 北京中星微电子有限公司 Picture generation method and device, electronic equipment and computer readable medium
CN112037301A (en) * 2020-08-27 2020-12-04 上海联影医疗科技股份有限公司 Method and device for correcting reconstructed image and storage medium
CN112991145A (en) * 2019-12-16 2021-06-18 杭州海康威视数字技术股份有限公司 Image generation method, system, electronic device and machine-readable storage medium
CN113487500A (en) * 2021-06-28 2021-10-08 北京紫光展锐通信技术有限公司 Image distortion correction method and apparatus, electronic device, and storage medium
CN113658053A (en) * 2021-07-04 2021-11-16 浙江大华技术股份有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN114936987A (en) * 2022-07-19 2022-08-23 武汉极动智能科技有限公司 Lens distortion correction method, device, equipment and storage medium
CN115131224A (en) * 2021-03-29 2022-09-30 北京小米移动软件有限公司 Image correction method and device, electronic device and storage medium
CN115578473A (en) * 2022-12-09 2023-01-06 浙江至格科技有限公司 Method and system for correcting output image of diffraction light waveguide
CN116503290A (en) * 2023-06-20 2023-07-28 苏州浪潮智能科技有限公司 Image processing method, device, server and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783011A (en) * 2010-01-08 2010-07-21 宁波大学 Distortion correction method of fish eye lens
CN102156970A (en) * 2011-04-14 2011-08-17 复旦大学 Fisheye image correction method based on distorted straight slope calculation
CN104574289A (en) * 2013-10-29 2015-04-29 深圳市中航比特通讯技术有限公司 Fish-eye image distortion correction algorithm based on ellipsoidal model
CN104921756A (en) * 2015-06-08 2015-09-23 深圳市恩普电子技术有限公司 Improved digital scanning conversion method
CN106815808A (en) * 2017-01-20 2017-06-09 长沙全度影像科技有限公司 A kind of image split-joint method of utilization piecemeal computing
CN108564551A (en) * 2018-04-25 2018-09-21 珠海全志科技股份有限公司 Fish eye images processing method and fish eye images processing unit

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783011A (en) * 2010-01-08 2010-07-21 宁波大学 Distortion correction method of fish eye lens
CN102156970A (en) * 2011-04-14 2011-08-17 复旦大学 Fisheye image correction method based on distorted straight slope calculation
CN104574289A (en) * 2013-10-29 2015-04-29 深圳市中航比特通讯技术有限公司 Fish-eye image distortion correction algorithm based on ellipsoidal model
CN104921756A (en) * 2015-06-08 2015-09-23 深圳市恩普电子技术有限公司 Improved digital scanning conversion method
CN106815808A (en) * 2017-01-20 2017-06-09 长沙全度影像科技有限公司 A kind of image split-joint method of utilization piecemeal computing
CN108564551A (en) * 2018-04-25 2018-09-21 珠海全志科技股份有限公司 Fish eye images processing method and fish eye images processing unit

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991145A (en) * 2019-12-16 2021-06-18 杭州海康威视数字技术股份有限公司 Image generation method, system, electronic device and machine-readable storage medium
CN111738909B (en) * 2020-06-11 2023-09-26 杭州海康威视数字技术股份有限公司 Image generation method and device
CN111738909A (en) * 2020-06-11 2020-10-02 杭州海康威视数字技术股份有限公司 Image generation method and device
CN111899151A (en) * 2020-07-28 2020-11-06 北京中星微电子有限公司 Picture generation method and device, electronic equipment and computer readable medium
CN111899151B (en) * 2020-07-28 2023-06-27 北京中星微电子有限公司 Picture generation method, device, electronic equipment and computer readable medium
CN112037301A (en) * 2020-08-27 2020-12-04 上海联影医疗科技股份有限公司 Method and device for correcting reconstructed image and storage medium
CN115131224A (en) * 2021-03-29 2022-09-30 北京小米移动软件有限公司 Image correction method and device, electronic device and storage medium
CN113487500B (en) * 2021-06-28 2022-08-02 北京紫光展锐通信技术有限公司 Image distortion correction method and apparatus, electronic device, and storage medium
CN113487500A (en) * 2021-06-28 2021-10-08 北京紫光展锐通信技术有限公司 Image distortion correction method and apparatus, electronic device, and storage medium
CN113658053A (en) * 2021-07-04 2021-11-16 浙江大华技术股份有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN114936987A (en) * 2022-07-19 2022-08-23 武汉极动智能科技有限公司 Lens distortion correction method, device, equipment and storage medium
CN115578473A (en) * 2022-12-09 2023-01-06 浙江至格科技有限公司 Method and system for correcting output image of diffraction light waveguide
CN116503290A (en) * 2023-06-20 2023-07-28 苏州浪潮智能科技有限公司 Image processing method, device, server and storage medium
CN116503290B (en) * 2023-06-20 2023-09-12 苏州浪潮智能科技有限公司 Image processing method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN110570367A (en) Fisheye image correction method, electronic device and storage medium
CN110622497B (en) Device with cameras having different focal lengths and method of implementing a camera
TWI524306B (en) Image transformation and multi-view output systems and methods
US8855441B2 (en) Method and apparatus for transforming a non-linear lens-distorted image
CN112367459B (en) Image processing method, electronic device, and non-volatile computer-readable storage medium
US11030715B2 (en) Image processing method and apparatus
CN111062881A (en) Image processing method and device, storage medium and electronic equipment
CN111292278B (en) Image fusion method and device, storage medium and terminal
JP2011139367A (en) Apparatus and method for processing image
CN110493525A (en) Zoom image determines method and device, storage medium, terminal
CN109005334A (en) A kind of imaging method, device, terminal and storage medium
JP6039657B2 (en) Method and device for retargeting 3D content
US20170330311A1 (en) Image processing device and method, image capturing device, program, and record medium
US8467630B2 (en) Image processing device and processing method for generating a super-resolution image
CN112215906A (en) Image processing method and device and electronic equipment
CN114648458A (en) Fisheye image correction method and device, electronic equipment and storage medium
US20240208419A1 (en) Display method and display system of on-vehicle avm, electronic device, and storage medium
US9082183B2 (en) Image processing device and image processing method
US10701286B2 (en) Image processing device, image processing system, and non-transitory storage medium
Mody et al. Flexible and efficient perspective transform engine
CN114219840A (en) Image registration and fusion method and device and computer storage medium
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
KR102655332B1 (en) Device and method for image correction
JP2019517688A (en) Method and apparatus for determining the transition between two display images, and a vehicle
Kim Panoramic image communication for mobile application using content-aware image resizing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213

RJ01 Rejection of invention patent application after publication