| Public security organs are inseparable from on-site investigation and forensics in their daily work.Using normal cameras requires a lot of pictures,which is not only a large task,but also difficult to establish the connection of the object being photographed.Fisheye camera has a short focal length and a large viewing angle,taking pictures with a fisheye camera can effectively reduce the number of times a picture is taken.At the same time,the stitching technique can establish the correlation between images,and combine the pictures of the common area into an image with a larger viewing angle.The research based on the fisheye camera to develop panoramic stitching technology has great significance for reducing the workload of public security police and improving work efficiency.This paper starts from the basic theory of fisheye camera,learns image registration technology and fusion technology.Focus on the correction method of fisheye images,Image registration algorithm based on feature points and Image fusion algorithm based on pixel level.Based on this,a real-time stitching system of fisheye cameras is developed by C++ language.The main work and innovation of the paper are as follows:First,correct the distortion of the fisheye image.Use the progressive row-by-column scanning algorithm to obtain the effective area of the fisheye image,rotate the image multiple times and measure the center and radius,solve the arithmetic mean to reduce the error caused by the presence of black pixels at the boundary;Compare the correction effects of spherical coordinate positioning method and latitude and longitude mapping method,the latter is selected to correct the fisheye image for stitching research;The interpolation effect of the three interpolation algorithms on the image is realized,and the bilinear interpolation is selected to improve the corrected fisheye image to improve the image quality.Then,research on the stitching algorithm.Use SURF(Speeded Up Robust Features)algorithm to quickly extract feature points with scale invariance;The linear matching and the feature point matching of the nearest neighbor and the next nearest neighbor ratio are respectively implemented,and the latter is selected as the initial matching algorithm of the feature points;Aiming at the problems of no correlation and frequent iterations between sampled samples in the traditional RANSAC(RANdom Sample Consensus)purification algorithm,an improved algorithm based on feature points to sort Euclidean distance and reduce the number of samples,which is proposed to improve the purification efficiency of RANSAC;The averaging method and the gradual involution method are used to unnaturally merge the overlapping regions of the image,a weighted fusion algorithm based on the trigonometric function is proposed to eliminate the band and ghost linearity of the overlapping region,the mathematical formulas of entropy and average gradient are used to further verify that the fusion quality obtained by the improved algorithm is better than the averaging method and the gradual involution method.Finally,real-time panoramic stitching based on fisheye camera is realized.The improved matching method of halving area is proposed,and the 360° panoramic mosaic of three fisheye images is realized.The fisheye panoramic stitching system is designed and built,realizing the real-time panoramic stitching function and real-time panoramic monitoring function of the fisheye cameras. |