This application relates to the technical field of fisheye image processing, and more particularly relates to a fisheye image processing method, an electronic device, and a computer-readable storage medium.
In the process of anti-distortion correction for a fisheye camera, it is necessary to accurately determine an effective imaging area and an optical center to ensure a correction effect. In general, accurate calibration will be performed before delivery. However, in the process of using the fisheye camera, in the case where displacement of a structure of the fisheye camera is caused by a collision, and the like, the effective imaging area may change, and it is necessary to recalibrate the effective imaging area. After delivery, recalibration and using environments are more complicated than a production environment, resulting in a lower accuracy of the effective imaging area determined based on an image collected by the fisheye camera after delivery. Therefore, a method with relatively strong robustness is urgently needed to accurately detect the effective imaging area.
This application provides a fisheye image processing method, an electronic device, and a computer-readable storage medium.
In a first aspect, this application provides a fisheye image processing method. The method includes: extracting n sampling points in a fisheye image shot by a fisheye camera; randomly selecting 3 sampling points from the n sampling points to obtain Cn3 sets of sampling points, and determining a circle corresponding to each set of sampling points; for any one set of sampling points in the Cn3 sets of sampling points, calculating a sum of distances from the n sampling points to the circle corresponding to the set of sampling points as an error of the set of sampling points; calculating a first accumulated value of the errors of the Cn3 sets of sampling points, and for any one sampling point p in the n sampling points, calculating a second accumulated value of the errors of all sets of sampling points containing the point p; calculating a weight coefficient of the point p according to the first accumulated value and the second accumulated value, the weight coefficient having a negative correlation with the second accumulated value; and constructing a nonlinear optimization equation according to the weight coefficient, and determining an effective imaging area of the fisheye camera according to the nonlinear optimization equation.
Optionally, the fisheye image processing method further includes: acquiring an original image shot by the fisheye camera; and preprocessing the original image to obtain the fisheye image, the preprocessing including edge detection and image binarization.
Optionally, the original image is preprocessed by performing downsampling on the original image; and preprocessing the downsampled original image to obtain the fisheye image.
Optionally, the weight coefficient of the point p is calculated by the following formula: WP=1−ΣFP/ΣF, wherein WP is the weight coefficient of the point p, ΣF is the first accumulated value, and ΣFP is the second accumulated value.
Optionally, the nonlinear optimization equation is constructed according to the following formula: C(x, y, R)=ΣP=1nWP*[(xP−x)2+(yP−y)2−R2], wherein (xP, yP) is an image coordinate of the point p, (x, y) is an image coordinate of a center of circle of the effective imaging area, WP is the weight coefficient of the point p, and R is a radius of the effective imaging area.
Optionally, the effective imaging area of the fisheye camera is determined by means of: taking a partial derivative of x in the nonlinear optimization equation to obtain a first equation; taking a partial derivative of y in the nonlinear optimization equation to obtain a second equation; taking a partial derivative of R in the nonlinear optimization equation to obtain a third equation; getting values of x, y and R by a preset step length according to the first equation, the second equation, the third equation and a preset gradient descent algorithm to obtain a plurality of sets of numerical values, and calculating a function value of the nonlinear optimization equation corresponding to each set of numerical values; and determining the effective imaging area according to the numerical value corresponding to the minimum function value.
Optionally, the fisheye image processing method further includes: extracting m sampling points having distances from the center of circle of the effective imaging area located within a preset distance range; and reconstructing the nonlinear optimization equation according to weight coefficients corresponding to the m sampling points, and updating the effective imaging area according to the reconstructed nonlinear optimization equation.
In a second aspect, this application further provides an electronic device which includes: a memory configured to store a plurality of computer-readable instructions; one or more processors coupled to the memory and configured to execute the computer-readable instructions to perform the fisheye image processing method described above.
In a third aspect, this application further provides a non-transitory computer-readable storage medium containing a plurality of computer-readable instructions stored thereon, when the computer-readable instructions are executed by a processor of the electronic device, causes the processor to execute the fisheye image processing method described above.
For the fisheye image processing method, a fisheye image processing apparatus, the electronic device, and the computer-readable storage medium according to the embodiments of this application, by extracting n sampling points in the fisheye image, and then taking any 3 sampling points in the n sampling points as a set, Cn3 sets of sampling points are determined, and a circle corresponding to each set of sampling points is determined; an error corresponding to each set of sampling points may be determined by calculating a sum of distances from the n sampling points to the circle corresponding to each set of sampling points; and then by determining a first accumulated value of the errors of the Cn3 sets of sampling points, and a second accumulated value of the errors of all sets of sampling points containing any one sampling point p in the n sampling points, a weight coefficient of any one sampling point p is determined. It can be understood that the farther one sampling point is from other sampling points, the greater the possibility that the sampling point is noise is, therefore the greater the second accumulated value of the sampling point p is, the farther the sampling point p is from other sampling points, and the smaller the weight coefficient of the sampling point p is. By determining the weight coefficient of any one sampling point p in advance, the influence of the sampling point which may be noise in the fisheye image is reduced, and thus the nonlinear optimization equation for determining the effective imaging area of the fisheye image is constructed based on the weight coefficient of each sampling point, and the effective imaging area of the fisheye image may be accurately obtained by calculating the optimal solution for the nonlinear optimization equation. In this way, compared with the case where it is difficult to accurately screen target sampling points which can be used for accurately calculating the effective imaging area in all the sampling points in different scenes, in this application, the sampling points do not need to be screened, only the weight coefficient of each sampling point needs to be accurately calculated in advance to reduce the influence of noise, and then the nonlinear optimization equation is constructed according to the weight coefficients of all the sampling points, thereby not only adapting to the determination of the effective imaging area of the fisheye image shot in different scenes, with relatively strong robustness, but also ensuring the determination accuracy of the effective imaging area of the fisheye image.
Additional aspects and advantages of the embodiments of this application will be set forth in part in the description below, and will become apparent in part from the description below, or may be learned by practice of the embodiments of this application.
The foregoing and/or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments in conjunction with the following accompanying drawings, in which:
The embodiments of this application will be described in detail below, and examples of the embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals indicate the same or similar elements or the elements having same or similar functions throughout the drawings. The embodiments described below with reference to the accompanying drawings are exemplary only to explain the embodiments of this application and should not be construed as limiting the embodiments of this application.
With reference to
The sampling points are pixels satisfying the requirements in the fisheye image, for example, the sampling points are pixels with pixel values greater than a preset pixel value threshold in the fisheye image; or the fisheye image is a binary image, the pixel values of the pixels include 0 and 1, and the sampling points are pixels with the pixel values being 1 in the fisheye image.
After extracting n (n being an integer) sampling points in the fisheye image, for the convenience of subsequent calculation, image coordinates of the n sampling points in the fisheye image may be acquired.
Step 012: randomly selecting 3 sampling points from the n sampling points to obtain Cn3 sets of sampling points, and determining a circle corresponding to each set of sampling points.
The image coordinates of the sampling points are used for representing positions of the sampling points in the fisheye image, for example, an image coordinate system is established with a preset position (such as an upper left corner, an upper right corner and a center) of the fisheye image as a coordinate origin, so as to determine the image coordinates of the sampling points in the image coordinate system according to the positions of the sampling points in the fisheye image.
The effective imaging area of the fisheye camera is circular, and therefore when calculating the error of each sampling point, any 3 sampling points may be selected as one set of sampling points. If there are n sampling points, Cn3 (namely n!/[3!×(n−3)!]) sets of sampling points may be determined, and if there are 5 sampling points, C53 is 5!/[3!×(5−3)!]=10.
Each set of sampling points includes 3 sampling points, and one circle may be determined by the 3 sampling points. For example, the circle corresponding to each set of sampling points is determined according to the image coordinates of the 3 sampling points of each set of sampling points.
Step 013: for any one set of sampling points in the Cn3 sets of sampling points, calculating a sum of distances from the n sampling points to the circle corresponding to the set of sampling points as an error of the set of sampling points.
After determining the circle corresponding to each set of sampling points, the sum of distances from the n sampling points to the circle corresponding to each set of sampling points as the error of each set of sampling points. It can be understood that the closer the circle determined by the set of sampling points is to the effective imaging area of the fisheye camera, the more the sampling points on the circle determined by the set of sampling points are, and the smaller the distances between sampling points outside the set of sampling points and the circle determined by the set of sampling points are. Therefore, the sum of the distances from the n sampling points to the circle corresponding to the set of sampling points may be taken as the error of the set of sampling points, the greater the error of the set of sampling points is, the greater the deviation between the circle corresponding to the set of sampling points and the effective imaging area of the fisheye camera is, and the greater the possibility that the 3 sampling points in the set of sampling points are noisy points is.
For example, the distance from the sampling point to the circle corresponding to the set of sampling points may be an absolute value of a difference value between the distance from the sampling point to the center of circle corresponding to the set of sampling points and the radius of the circle corresponding to the set of sampling points. If 5 sampling points are included, namely, a sampling point a1 (x1, y1), a sampling point a2 (x2, y2), a sampling point a3 (x3, y3), a sampling point a4 (x4, y4) and a sampling point a5 (x5, y5) respectively, a circle R1 is determined by a set of sampling points A1 (including the sampling point a1, the sampling point a2 and the sampling point a3). In this case, the distance from each of the sampling points a1 to a5 to the circle R1 may be calculated, for example, firstly the distance from each of the sampling points a1 to a5 to the center of circle R1is calculated, the distance from the sampling point a1 to the center (xA1, yA1) of the circle R1 is d1=√{square root over ((x1−xA1)2−(y1−yA1)2)}, the distance from the sampling point a2 to the center (xA1, yA1) of the circle R1 is calculated by d2=√{square root over ((x2−xA1)2−(y2−yA1)2)}, the distance from the sampling point a3 to the center (xA1, yA1) of the circle R1 is calculated by d3=√{square root over ((x3−xA1)2−(y3−yA1)2)}, the distance from the sampling point a4 to the center (xA1, yA1) of the circle R1 is calculated by d4=√{square root over ((x4−xA1)2−(y4−yA1)2)}, and the distance from the sampling point a5 to the center of circle R1 is calculated by d5=√{square root over ((x5−xA1)2−(y5−yA1)2)}. Then the absolute value of the difference value between the distance from each of the sampling points a1 to a5 to the center of circle R1 and the radius r of the circle R1 is respectively calculated to respectively determine the distance from each of the sampling points a1 to a5 to the circle R1. For example, the absolute value |d1−r| of the difference value between the distance d1 and the radius r of the circle R1,the absolute value |d2−r| of the difference value between the distance d2 and the radius r of the circle R1, the absolute value |d3−r| of the difference value between the distance d3 and the radius r of the circle R1, the absolute value |d4−r| of the difference value between the distance d4 and the radius r of the circle R1, and the absolute value |d5−r| of the difference value between the distance d5 and the radius r of the circle R1 are calculated, and thus the sum of the distance |d1−r| from the sampling point a1 to the circle R1, the distance |d2−r| from the sampling point a2 to the circle R1, the distance |d3−r| from the sampling point a3 to the circle R1, the distance |d4−r| from the sampling point a4 to the circle R1, and the distance |d5−r| from the sampling point a5 to the circle R1 is taken as the error of the set of sampling points A1. For the errors of other sets of sampling points, the errors are calculated in a way similar to the way in which the error of the set of sampling points A1 is calculated, which is not described in detail herein.
Step 014: calculating a first accumulated value of the errors of the Cn3 sets of sampling points, and for any one sampling point p in the n sampling points, calculating a second accumulated value of the errors of all sets of sampling points containing the point p.
In order to determine the probability that each sampling point is noise more accurately, firstly the first accumulated value of the errors of the Cn3 sets of sampling points may be determined as a total error; and for any one sampling point p in the n sampling points, since the point p may be located in a plurality of sets of sampling points, the second accumulated value of the errors of all sets of sampling points containing the point p may be calculated.
Step 015: calculating a weight coefficient of the point p according to the first accumulated value and the second accumulated value, the weight coefficient having a negative correlation with the second accumulated value.
After determining the first accumulated value and the second accumulated value of any one sampling point p, the weight coefficient of the point p may be determined by the second accumulated value of the point p and the first accumulated value. For example, the greater the ratio of the second accumulated value of the point p to the first accumulated value is, the greater the deviation between the circle corresponding to the set of sampling points in which the point p is located and the effective imaging area of the fisheye camera is, so that the possibility that the point p is noise may be accurately determined. For example, the greater the second accumulated value of the point p is, the greater the possibility that the point p is noise is, and the smaller the weight coefficient of the point p is. Namely, the weight coefficient of the sampling point has a negative correlation with the second accumulated value of the sampling point. The smaller the weight coefficient of the point p is, the less the influence of the point p on the subsequent determination of the effective imaging area of the fisheye camera is, thereby reducing the influence of the sampling point which may be noise on the determination accuracy of the effective imaging area of the fisheye camera.
For example, the weight coefficient of the point p is calculated by the following formula: WP=1−ΣFP/ΣF, wherein WP is the weight coefficient of the point p, ΣF is the first accumulated value, and ΣFP is the second accumulated value. In this way, the sum of the weight coefficients of all the sampling points may be 1, and the negative correlation between the second accumulated value of the sampling points and the weight coefficients is achieved.
With reference to
However, in different scenes, according to this application, after acquiring the fisheye image, the sampling points do not need to be screened, and the weight coefficient of each sampling point is determined based on the second accumulated value of the errors of the set of sampling points of each sampling point and the first accumulated value of the errors of all the sets of sampling points, the greater the possibility that the sampling point is noise is, the smaller the weight coefficient of the sampling point is, thereby reducing the influence brought about by the noise, ensuring the accuracy of the effective imaging area of the fisheye image calculated subsequently, adapting to the fisheye images in different scenes, and having relatively strong robustness.
Step 016: constructing a nonlinear optimization equation according to the weight coefficient, and determining an effective imaging area of the fisheye camera according to the nonlinear optimization equation. In the embodiment of this application, the anti-distortion correction for the fisheye camera is performed in the process of shooting images according to the effective imaging area of the fisheye camera.
Specifically, after obtaining the weighting coefficient of any one sampling point p, the nonlinear optimization equation may be constructed based on the weighting coefficient of the point p.
The effective imaging area of the fisheye camera is circular, and therefore, in order to determine the effective imaging area of the fisheye camera, the center of circle (namely the optical center) and the radius of the effective imaging area need to be determined. Therefore, when constructing the nonlinear optimization equation, preset parameters to be solved in the nonlinear optimization equation include the image coordinate of the center of circle and the radius of the effective imaging area. In this way, subsequent determination of the effective imaging area according to the nonlinear optimization equation may be facilitated.
For example, a nonlinear optimization error equation may be constructed based on the image coordinate and the weight coefficient of each sampling point, and the preset parameters to be solved, so as to determine the effective imaging area by the nonlinear optimization error equation. For example, the nonlinear optimization equation is constructed according to the following formula: C(x, y, R)=ΣP=1nWP*[(xP−x)2+(yP−y)2−R2], wherein (xP, yP) is the image coordinate of the point p, (x, y) is the image coordinate of the center of circle of the effective imaging area, WP is the weight coefficient of the point p, and R is the radius of the effective imaging area.
Wherein optimal solutions of the nonlinear optimization equation are values of the preset parameters to be solved when enabling the function value of the nonlinear optimization equation is minimum, and when the function value of the nonlinear optimization equation is minimum, the optimal solutions of the nonlinear optimization equation may be determined.
After the construction of the nonlinear optimization equation is finished, the nonlinear optimization equation may be solved to obtain the optimal solutions of the nonlinear optimization equation. For example, each parameter to be solved of the nonlinear optimization equation is differentiated to determine the optimal solution for each parameter to be solved. After the optimal solution is determined, the optimal solution includes the radius and the image coordinate of the center of circle of the effective imaging area, so as to determine the effective imaging area of the fisheye image.
For the fisheye image processing method according to the embodiment of this application, by extracting n sampling points in the fisheye image, and then taking any 3 sampling points in the n sampling points as a set, Cn3 sets of sampling points are determined, and a circle corresponding to each set of sampling points is determined; an error corresponding to each set of sampling points may be determined by calculating a sum of distances from the n sampling points to the circle corresponding to each set of sampling points; and then by determining a first accumulated value of the errors of the Cn3 sets of sampling points, and a second accumulated value of the errors of all sets of sampling points containing any one sampling point p in the n sampling points, a weight coefficient of any one sampling point p is determined.
It can be understood that since noise points containing OSD are generally at edges of the effective imaging area (circle) of the fisheye camera or at corners of the image, these sampling points at the edges or the corners are obviously farther from most of the sampling points in the image (such as the sampling points in the effective imaging area), and the farther one sampling point is from other sampling points, the greater the possibility that the sampling point is noise is.
Therefore, the greater the second accumulated value of the sampling point p is, the farther the sampling point p is from other sampling points, and the smaller the weight coefficient of the sampling point p is. By determining the weight coefficient of any one sampling point p in advance, the influence of the sampling point which may be noise in the fisheye image is reduced, and thus the nonlinear optimization equation for determining the effective imaging area of the fisheye image is constructed based on the weight coefficient of each sampling point, and the effective imaging area of the fisheye image may be accurately obtained by calculating the optimal solution for the nonlinear optimization equation. In this way, compared with the case where it is difficult to accurately screen target sampling points which can be used for accurately calculating the effective imaging area in all the sampling points in different scenes, in this application, the sampling points do not need to be screened, only the weight coefficient of each sampling point needs to be accurately calculated in advance to reduce the influence of noise, and then the nonlinear optimization equation is constructed according to the weight coefficients of all the sampling points, thereby not only adapting to the determination of the effective imaging area of the fisheye image shot in different scenes, with relatively strong robustness, but also ensuring the determination accuracy of the effective imaging area of the fisheye image.
With reference to
step 0161: taking a partial derivative of x in the nonlinear optimization equation to obtain a first equation;
step 0162: taking a partial derivative of y in the nonlinear optimization equation to obtain a second equation;
step 0163: taking a partial derivative of R in the nonlinear optimization equation to obtain a third equation;
step 0164: getting values of x, y and R by a preset step length according to the first equation, the second equation, the third equation and a preset gradient descent algorithm to obtain a plurality of sets of numerical values, and calculating a function value of the nonlinear optimization equation corresponding to each set of numerical values; and
step 0165: determining the effective imaging area according to the numerical value corresponding to the minimum function value.
Specifically, after determining the nonlinear optimization equation, for example, after constructing the nonlinear optimization error equation C(x, y, R)=ΣP=1nWP*[(xP−x)2+(yP−y)2−R2], in this case, the nonlinear optimization error equation may be solved to obtain the optimal solution for the nonlinear optimization error equation, wherein (xP, yP) is the image coordinate of the point p, (x, y) is the image coordinate of the center of circle of the effective imaging area, WP is the weight coefficient of the point p, and R is the radius of the effective imaging area.
The image coordinate of the center of circle of the effective imaging area is (x, y), and adjustment directions of x, y and R when enabling the function value of the nonlinear optimization equation to be decreased may be determined by taking partial derivatives of x, y and R, so as to select x, y and R according to the adjustment directions of x, y and R by iteration to obtain a plurality of sets of x, y and R, so that a set of x, y and R which enables the function value of the nonlinear optimization equation to be minimum is obtained as the optimal solution, and the effective imaging area of the fisheye camera may be determined according to the optimal solution.
For example, the adjustment direction of x may be determined by the first equation
obtained by taking a partial derivative of x; the adjustment direction of y may be determined by the second equation
obtained by taking a partial derivative of y; and the adjustment direction of R may be determined by the third equation
obtained by taking a partial derivative of R.
In this case, values of x, y and R are got by a preset step length according to the first equation, the second equation, the third equation and a preset gradient descent (GD) algorithm to obtain a plurality of sets of numerical values, for example, the preset step length of x is 1, 2, and the like, the preset step length of y is 1, 2, and the like, and the preset step length of R is 1, 2, and the like. Each set of numerical values includes x, y and R, the function value of the nonlinear optimization equation corresponding to each set of numerical values may be calculated, as the values continue to be gotten, the function value of the nonlinear optimization equation is continuously decreased until a plurality of function values of the nonlinear optimization equation obtained by getting the values again substantially remain unchanged (for example, the difference value of the plurality of function values is less than a preset difference value threshold), or a plurality of function values of the nonlinear optimization equation obtained by getting the values again are increased, and a set of numerical values which enables the value of the nonlinear optimization equation to be minimum may be determined as the optimal solution.
With reference to
Specifically, when the fisheye camera is used for shooting, the original image is firstly generated, and after acquiring the original image shot by the fisheye camera, the original image may be preprocessed. It can be understood that the original image contains targets such as objects and people of a scene, and when determining the effective imaging area, it is generally necessary to determine a boundary of the original image and determine the effective imaging area by utilizing pixels of the boundary of the original image, and therefore the original image needs to be preprocessed to filter a large number of pixels without texture areas, so as to retain the pixels near the boundary as much as possible.
For example, preprocessing the original image may be performing edge detection on the original image (for example, detecting an edge pixel in the original image based on a preset edge detection algorithm), and then performing image binarization processing to obtain the fisheye image mainly containing the edge pixel. After the image binarization, for the edge pixel, it is determined that the pixel value is 1, and for other pixels, it is determined that the pixel value is 0. In this case, n sampling points in the preprocessed original image (namely the fisheye image) may be extracted.
It can be understood that in the fisheye image obtained after preprocessing the original image, in addition to the edge pixel of the boundary of the effective imaging area, background noise may be distributed inside and outside the boundary, such as the edge pixel of the object, the pixel of the OSD area, and the like, and these pixels are all taken as subsequent sampling points to participate in the determination of the effective imaging area, so as to adapt to the determination of the effective imaging area of the fisheye image obtained in any scene.
With reference to
Specifically, after the original image is acquired, in order to reduce the calculation amount for the subsequent determination of the effective imaging area, downsampling may be firstly performed on the original image, and the downsampling may reduce the number of sampling points. For example, after performing downsampling on the original image according to a sampling coefficient k, a ratio of the size of the downsampled original image to the size of the original image before the downsampling is 1/(k+1)2. For example, for an N*M image, if the downsampling coefficient is k, one image is formed by taking one pixel at intervals of k pixels in every row and every column in the original image, so as to achieve the downsampling of the image, and the size of the downsampled image becomes (N*M)/(k+1)2. It should be explained that k+1 may be a common divisor of N and M to ensure the accuracy of the size of the downsampled image (namely (N*M)/(k+1)2).
It can be understood that when the size of the original image is too large, there will be too many sampling points in the preprocessed original image, and in order to reduce the calculation amount for calculating the effective imaging area, it is necessary to reduce the number of the extracted sampling points. Therefore, downsampling may be performed on the original image, if the fisheye image is a 1,000*1,000 image, and the downsampling coefficient is 1, one image is formed by taking one pixel at intervals of 1 pixel in every row and every column in the original image as the downsampled original image, and the downsampled original image becomes 500*500. In this way, by performing downsampling on the original image, the pixels of the downsampled original image are reduced, so that the number of sampling points extracted in the fisheye image is reduced to reduce the calculation amount for calculating the effective imaging area.
After the downsampled original image is acquired, the downsampled original image may be preprocessed (namely, edge detection, image binarization, and the like), so as to obtain the fisheye image.
This application aims at acquiring the effective imaging area of the fisheye camera, and the effective imaging area of the fisheye camera is the effective imaging area of the fisheye image before the downsampling, while after performing downsampling on the fisheye image, the size of the fisheye image is different from the size before the downsampling. Therefore, the effective imaging area of the fisheye image is obviously also different from the effective imaging area of the fisheye image before the downsampling, and therefore the effective imaging area of the fisheye image may be restored according to the sampling coefficient for downsampling to determine the effective imaging area of the fisheye camera. For example, if the sampling coefficient is 1, the radius of the effective imaging area of the fisheye image is R, and the center of circle of the effective imaging area is (x, y), it can be understood that the center of circle of the effective imaging area is substantially unchanged, the radius is changed, the center of circle of the effective imaging area of the fisheye camera may be determined to be (x, y), and the radius of the effective imaging area of the fisheye camera is 2R, namely, the radius of the effective imaging area of the fisheye camera=(the sampling coefficient+1)*the radius of the effective imaging area of the fisheye image, so as to determine the effective imaging area of the fisheye camera.
With reference to
Specifically, the sampling points near the boundary of the effective imaging area of the fisheye image may be further screened to correct the effective imaging area of the fisheye image. The sampling points near the boundary of the effective imaging area may be m (m is an integer) sampling points having distances from the center of circle of the effective imaging area of the fisheye image located within the preset distance range, if the radius of the effective imaging area of the fisheye image is R, m sampling points having distances from the center of circle of the effective imaging area of the fisheye image located near the radius R may be acquired, for example, the preset distance range is (R±1), (R±2), and the like. In this way, the m sampling points near the boundary of the effective imaging area of the fisheye image may be extracted to reconstruct the nonlinear optimization equation by more accurate image coordinates and weight coefficients of the m sampling points, in this case, the optimal solution for the reconstructed nonlinear optimization equation is calculated, namely, the effective imaging area of the fisheye camera may be updated according to the redetermined optimal solution, thereby improving the accuracy of the finally determined effective imaging area of the fisheye camera, wherein the way of calculating the optimal solution for the reconstructed nonlinear optimization equation is substantially similar to the way of calculating the optimal solution for the nonlinear optimization equation, which is not described in detail herein.
With reference to
Wherein the electronic device 100 may be a fisheye camera or a back-end server device communicated with the fisheye camera, a mobile phone, a tablet computer, a notebook computer, a smart watch, and the like. As shown in
With reference to
The skilled in the art can understand that the above-mentioned computer-readable instructions can be stored in a computer-readable storage medium, if the computer instructions are implemented in a form of software functional modules and sold or used as independent products. Based on this understanding, the technical solution of this application, in essence, or a part that contributes to the prior art, or all or part of the technical solution can be embodied in a form of a software product. A computer software product is stored in a storage medium, including several instructions for an electronic device (which can be a fisheye camera, a type of camera device, or a computing device, etc.) to perform all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium is a RAM, a memory, a read-only memory (ROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a register, a hard disk, a removable magnetic disk, a CD-ROM, or any storage medium of other forms well-known in the technical field.
Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion including codes of one or more executable instructions for implementing the steps of a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations, wherein functions may be executed in substantially the same way or in a reverse order, not in the order illustrated or discussed, including according to the functions referenced, as will be understood by those skilled in the art to which the examples of this application pertain.
Although the embodiments of this application have been illustrated and described above, it can be understood that the embodiments described above are exemplary and are not to be construed as limiting this application, and variations, modifications, substitutions and alterations may be made to the embodiments described above by those ordinarily skilled in the art within the scope of this application.
Number | Date | Country | Kind |
---|---|---|---|
202310232011.1 | Feb 2023 | CN | national |
This application is a continuation of International Application No. PCT/CN2024/078833, filed on Feb. 27, 2024, which claims priority to Chinese Patent Application No. 202310232011.1, filed on Feb. 28, 2023. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2024/078833 | Feb 2024 | WO |
Child | 18978253 | US |