CN105120229A - Wide-angle lens omnidirectional monitor and image matching method - Google Patents

Wide-angle lens omnidirectional monitor and image matching method Download PDF

Info

Publication number
CN105120229A
CN105120229A CN201510586263.XA CN201510586263A CN105120229A CN 105120229 A CN105120229 A CN 105120229A CN 201510586263 A CN201510586263 A CN 201510586263A CN 105120229 A CN105120229 A CN 105120229A
Authority
CN
China
Prior art keywords
image
module
distortion correction
transformation
index
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
CN201510586263.XA
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.)
Wenzhou University
Original Assignee
Wenzhou University
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 Wenzhou University filed Critical Wenzhou University
Priority to CN201510586263.XA priority Critical patent/CN105120229A/en
Publication of CN105120229A publication Critical patent/CN105120229A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention relates to a columnar panoramic monitoring device, comprising a multi-path image collecting unit, an image processor and an image displayer. The output end of the multi-path image collecting unit is connected with the input end of the image processor. The output end of the image processor is connected with the input end of the image displayer. The multi-path image collecting unit comprises 2-16 paths of image collecting devices arranged by layer. The 2-16 paths of image collecting devices are uniformly distributed on the circumferences of the upper layer and the lower layer. The image processor comprises an image reading and preprocessing module, an image distortion correction conversion module, an index image distortion correction module, an image projecting cylinder module, a template matching algorithm based module, a graying and gap rejecting module, and an ease-in-out fusion module. The video acquired by the monitor is an omnidirectional image without dead angle in a monitored area, and one monitor can replace a plurality of monitors shooting in different angles, so that the monitoring cost is saved, and the omnidirectional clear video image of the same area can be acquired conveniently.

Description

广角镜头全方位监控器及图像匹配的方法Wide-angle lens omnidirectional monitor and image matching method

技术领域technical field

本发明涉及一种柱状全景监控装置及图像匹配的方法,特别适用于一个摄像头无法全方位无死角拍摄监控图像的场合。The invention relates to a columnar panoramic monitoring device and an image matching method, and is especially suitable for occasions where a camera cannot capture monitoring images in all directions without dead angles.

背景技术Background technique

传统摄像头往往采用一个感光元件,其后接一个视频处理单元,监控器得到的图像只是这个摄像镜头对准的区域内的图像画面,这种方案监控覆盖范围有限,存在大范围的盲区和死角,无法拍摄到摄像镜头对准区域以外的画面。Traditional cameras often use a photosensitive element followed by a video processing unit. The image obtained by the monitor is only the image in the area where the camera lens is aimed. This solution has limited monitoring coverage and has a large range of blind spots and dead spots. Images outside the area where the camera lens is aimed cannot be captured.

发明内容Contents of the invention

本发明的目的是为了解决上述技术中存在的问题,而提供一种能够全周监控,没有盲区和死角的柱状全景监控装置及图像匹配的方法。The object of the present invention is to solve the problems in the above-mentioned technologies, and provide a columnar panoramic monitoring device and an image matching method capable of monitoring all around without blind spots and dead angles.

为实现上述目的,本发明设计的一种柱状全景监控装置,包括多路图像采集单元、一个图像处理器、一个图像显示器,所述多路图像采集单元的输出端连接图像处理器的输入端,所述图像处理器的输出端连接图像显示器的输入端;所述多路图像采集单元为2-16路分层布置的图像采集设备,所述2-16路图像采集设备均匀分布在上下分层的圆周上;所述图像处理器包括图像读取及预处理模块、图像畸变校正变换模块、索引图像畸变校正模块、图像投影柱面模块、基于模板匹配算法模块、灰度化及剔除空白模块、渐入渐出融合模块;所述图像读取及预处理模块的输出端连接图像畸变校正变换模块的输入端,所述图像畸变校正变换模块的输出端连接索引图像畸变校正模块的输入端,所述索引图像畸变校正模块的输出端连接图像投影柱面模块的输入端,所述图像投影柱面模块的输出端连接基于模板匹配算法模块的输入端,所述基于模板匹配算法模块的输出端连接灰度化及剔除空白模块的输入端,所述灰度化及剔除空白模块的输出端连接渐入渐出融合模块的输入端。In order to achieve the above object, a columnar panoramic monitoring device designed by the present invention includes a multi-channel image acquisition unit, an image processor, and an image display, and the output end of the multi-channel image acquisition unit is connected to the input end of the image processor. The output end of the image processor is connected to the input end of the image display; the multi-channel image acquisition unit is an image acquisition device arranged in layers of 2-16 roads, and the image acquisition devices of the 2-16 roads are evenly distributed in the upper and lower layers on the circumference; the image processor includes an image reading and preprocessing module, an image distortion correction transformation module, an index image distortion correction module, an image projection cylinder module, a template-based matching algorithm module, a grayscale and blank elimination module, Fade in and fade out fusion module; the output end of the image reading and preprocessing module is connected to the input end of the image distortion correction transformation module, and the output end of the image distortion correction transformation module is connected to the input end of the index image distortion correction module, so The output end of the index image distortion correction module is connected to the input end of the image projection cylinder module, the output end of the image projection cylinder module is connected to the input end of the template matching algorithm module, and the output end of the template matching algorithm module is connected to The input end of the grayscale and blank elimination module, the output end of the grayscale and blank elimination module is connected to the input end of the fade-in and fade-out fusion module.

在上述技术方案中,所述图像畸变校正变换模块包括畸变校正正变换模块、结果存放矩阵模块和畸变校正逆变模块,所述畸变校正正变换模块内含有畸变校正正变换算法,通过畸变校正正变换公式计算出校正图像的大小,所述畸变校正正变换公式:In the above technical solution, the image distortion correction transformation module includes a distortion correction forward transformation module, a result storage matrix module, and a distortion correction inversion module. The distortion correction forward transformation module contains a distortion correction forward transformation algorithm. The transformation formula calculates the size of the corrected image, the distortion correction is the transformation formula:

xx == uu [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]] ythe y == vv [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]]

上述结果存放矩阵模块为畸变校正正变换后创建的两个矩阵,用于存放上述畸变校正正变换结果;The above-mentioned result storage matrix module is two matrices created after the distortion correction forward transformation, and is used to store the above-mentioned distortion correction forward transformation result;

所述畸变校正逆变模块内含有逆变算法,通过逆变换公式计算得到图像校正后的坐标点(x,y)→(u,v),逆变换公式为:The distortion correction inverter module contains an inversion algorithm, and the coordinate point (x, y)→(u, v) after the image correction is obtained by calculating the inverse transformation formula, and the inverse transformation formula is:

uu == xx 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33 vv == ythe y 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33

上述畸变校正正变换公式和逆变换公式中,x、y为图像读取及预处理模块获取的图像中点的横坐标和纵坐标,u、v为图像校正后点的横坐标和纵坐标,k为摄像镜头路数确定后的平均畸变系数,坐标的对应关系储存后输入至索引图像畸变校正模块用于索引图像畸变校正。In the above-mentioned distortion correction forward transformation formula and inverse transformation formula, x and y are the abscissa and ordinate of the image midpoint acquired by the image reading and preprocessing module, u and v are the abscissa and ordinate of the point after image correction, k is the average distortion coefficient after the number of camera lenses is determined, and the corresponding relationship of the coordinates is stored and then input to the index image distortion correction module for index image distortion correction.

在上述技术方案中,所述索引图像畸变校正模块获取结果存放矩阵模块中两个索引矩阵,使用索引的方法加快畸变校正速度。In the above technical solution, the index image distortion correction module acquires two index matrices in the result storage matrix module, and uses indexing to speed up the distortion correction speed.

在上述技术方案中,所述图像投影柱面模块用于将畸变校正后的图像投影至同一参考坐标圆柱面上,投影变换公式:In the above technical solution, the image projection cylinder module is used to project the distortion-corrected image onto the same reference coordinate cylinder surface, and the projection transformation formula is:

uu == rr sinsin (( ωω 22 )) ++ rr sinsin [[ arctanarctan (( xx -- WW // 22 rr )) ]] vv == Hh 22 -- rr (( ythe y -- Hh // 22 )) dd

其中:x、y为畸变校正后的图像上像素点的横坐标和纵坐标,u、v为投影变换后像素点的横坐标和纵坐标,r为焦距,W为每路图像采集单元的像素宽度,H为每路图像采集单元的像素高度,Among them: x, y are the abscissa and ordinate of the pixel point on the image after distortion correction, u, v are the abscissa and ordinate of the pixel point after projection transformation, r is the focal length, W is the pixel of each image acquisition unit Width, H is the pixel height of each image acquisition unit,

d = r 2 + ( W / 2 - x ) 2 , ω=2arctan(W/2f)。 d = r 2 + ( W / 2 - x ) 2 , ω=2arctan(W/2f).

本发明同时提供一种柱状全景监控装置进行图像匹配的方法,通过以下步骤,实现图像的匹配:The present invention also provides a method for image matching of a columnar panoramic monitoring device, and the image matching is realized through the following steps:

(一)、两幅图像的水平位移TempDsplyX和垂直位移TempDsplyY通过两层循环来模拟;(1), the horizontal displacement TempDsplyX and the vertical displacement TempDsplyY of the two images are simulated through two layers of circulation;

(二)、模板大小参数TemplateX和TemplateY;(2), template size parameters TemplateX and TemplateY;

(三)、然后在图像重叠部分选取一块固定的大小区域进行灰度值差异统计存入TempDifference与初值为0的Difference变量进行比较,保存数值较小的值于Difference中,并同时将当前的TemplateX和TemplateY值分别保存于DsplyX、DsplyY中;因为是固定区域,所以循环条件TempDsplyX初值不能小于模板宽度;(3), and then select a fixed size area in the overlapping part of the image for gray value difference statistics and store it in TempDifference and compare it with the Difference variable with an initial value of 0, save the value with a smaller value in Difference, and at the same time save the current TemplateX and TemplateY values are stored in DsplyX and DsplyY respectively; because it is a fixed area, the initial value of the loop condition TempDsplyX cannot be less than the width of the template;

(四)、循环结束后,变量DsplyX、DsplyY中存储的值就是所需的两图位置关系值,从而实现图像的配准。(4) After the loop ends, the values stored in the variables DsplyX and DsplyY are the required positional relationship values of the two images, thereby realizing image registration.

在上述技术方案中,所述灰度化及剔除空白模块用于将图像中空白无用区域去除,并灰度化图像来减少计算量,加快运行速度。In the above technical solution, the grayscale and blank elimination module is used to remove blank useless areas in the image, and grayscale the image to reduce the amount of calculation and speed up the operation.

在上述技术方案中,所述渐入渐出融合模块通过以下步骤,实现两幅图像中图像1和图像2融合后图像平滑,视觉上分辨不出差异:In the above technical solution, the fade-in and fade-out fusion module realizes the fusion of image 1 and image 2 in the two images through the following steps to smooth the image, and the difference cannot be distinguished visually:

(1)、在图像1上下加入零矩阵,以此来模拟图像的垂直平移;(1), adding a zero matrix up and down the image 1 to simulate the vertical translation of the image;

(2)、在图像1后面加入零矩阵,以此来模拟图像的水平平移;(2), adding a zero matrix behind the image 1 to simulate the horizontal translation of the image;

(3)、通过循环实现图像的渐入渐出拼接;(3) Realize the gradual in and gradual out splicing of images by looping;

(3.1)、对于重叠部分之后的内容,直接复制图像2的内容;(3.1), for the content after the overlapping part, directly copy the content of image 2;

(3.2)、对于重叠区域内,图像2有数据,图像1没数据的,等于图像2数据;(3.2), for the overlapping area, image 2 has data, and image 1 has no data, it is equal to image 2 data;

(3.3)、对于重叠部分的区域,采用渐入渐出的方法:(3.3), for the area of the overlapping part, the gradual in and out method is adopted:

(3.31)、假设图像重叠部分是W个单位;(3.31), assuming that the overlapping part of the image is W units;

(3.32)、第一个单位灰度值:图像1*(1/W)+图像2*[1-(1/W)];(3.32), the first unit gray value: image 1*(1/W)+image 2*[1-(1/W)];

(3.33)、此后系数的分布分别改变一个单位即可。(3.33), after that, the distribution of the coefficients can be changed by one unit respectively.

本发明中的摄像镜头的路数不定,可以是2-16路,多路摄像镜头从不同的角度采集图像信息,从视频中读取某帧,进行畸变校正,并将图像与图像之间建立在同一个参考系下,以圆柱面作为参考系,实现圆柱投影,基于模板匹配的方法实现图像的匹配,将图像中空白无用区域去除,并灰度化图像来减少计算量,加快运行速度。图像位置匹配后,图像之间会由于曝光等原因,使图像的亮度差异较大,直接融合图像,会带来明显的差异,所以采用渐入渐出的方式来融合,使图像平滑,视觉上分辨不出差异,得到完全反应实物的全方位清晰画面。The number of channels of the camera lens in the present invention is indeterminate, it can be 2-16 channels, and the multi-channel camera lens collects image information from different angles, reads a certain frame from the video, performs distortion correction, and establishes a link between the image and the image. Under the same reference system, the cylindrical surface is used as the reference system to realize cylindrical projection, and the image matching is realized based on the template matching method, the blank and useless areas in the image are removed, and the image is grayed to reduce the amount of calculation and speed up the operation. After the image positions are matched, there will be a large difference in the brightness of the images due to exposure and other reasons. Direct fusion of images will bring obvious differences. Therefore, the gradual in and gradual out method is used to fuse to make the image smooth and visually Can't tell the difference, get a full range of clear pictures that fully reflect the real thing.

本发明监控器得到的图像为监控区域内全方位图像无死角,一个监控器可以代替多个从不同角度拍摄的监控器,节约监控成本,同时可方便获取同一个区域内的全方位清晰视频图像。The images obtained by the monitor of the present invention are all-round images without dead angles in the monitoring area, and one monitor can replace multiple monitors taken from different angles, saving monitoring costs, and at the same time, it is convenient to obtain all-round clear video images in the same area .

附图说明Description of drawings

图1是本发明原理框图;Fig. 1 is a schematic block diagram of the present invention;

图2是本发明的图像处理器(2)原理框图;Fig. 2 is a functional block diagram of an image processor (2) of the present invention;

图中:1-摄像镜头;2-图像处理器;3-图像显示器;In the figure: 1-camera lens; 2-image processor; 3-image display;

2.1-图像读取及预处理模块;2.2-图像畸变校正变换模块;2.3-索引图像畸变校正模块;2.4-图像投影柱面模块;2.5-基于模板匹配算法模块;2.6-灰度化及剔除空白模块;2.7-渐入渐出融合模块。2.1- Image reading and preprocessing module; 2.2- Image distortion correction transformation module; 2.3- Index image distortion correction module; 2.4- Image projection cylinder module; 2.5- Template matching algorithm module; 2.6- Grayscale and blank removal module; 2.7 - Ease in and out fusion module.

具体实施方式Detailed ways

以下结合附图和具体实施例对本发明作进一步的详细描述:Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

如图1的柱状全景监控装置,包括多路图像采集单元(1)、一个图像处理器(2)、一个图像显示器(3),多路图像采集单元(1)的输出端连接图像处理器(2)的输入端,图像处理器(2)的输出端连接图像显示器(3)的输入端;多路图像采集单元(1)为2-16路分层布置的图像采集设备,2-16路图像采集设备均匀分布在上下分层的圆周上;图像处理器(2)包括图像读取及预处理模块(2.1)、图像畸变校正变换模块(2.2)、索引图像畸变校正模块(2.3)、图像投影柱面模块(2.4)、基于模板匹配算法模块(2.5)、灰度化及剔除空白模块(2.6)、渐入渐出融合模块(2.7),如图2所示,图像读取及预处理模块(2.1)的输出端连接图像畸变校正变换模块(2.2)的输入端,图像畸变校正变换模块(2.2)的输出端连接索引图像畸变校正模块(2.3)的输入端,索引图像畸变校正模块(2.3)的输出端连接图像投影柱面模块(2.4)的输入端,图像投影柱面模块(2.4)的输出端连接基于模板匹配算法模块(2.5)的输入端,基于模板匹配算法模块(2.5)的输出端连接灰度化及剔除空白模块(2.6)的输入端,灰度化及剔除空白模块(2.6)的输出端连接渐入渐出融合模块(2.7)的输入端。The columnar panoramic monitoring device as shown in Fig. 1 comprises a multi-channel image acquisition unit (1), an image processor (2), an image display (3), and the output end of the multi-channel image acquisition unit (1) is connected to the image processor ( 2), the output end of the image processor (2) is connected to the input end of the image display (3); the multi-channel image acquisition unit (1) is an image acquisition device arranged in layers of 2-16 roads, and the 2-16 roads The image acquisition equipment is evenly distributed on the upper and lower layers of the circle; the image processor (2) includes an image reading and preprocessing module (2.1), an image distortion correction transformation module (2.2), an index image distortion correction module (2.3), an image Projection cylinder module (2.4), template-based matching algorithm module (2.5), grayscale and blank elimination module (2.6), fade-in and fade-out fusion module (2.7), as shown in Figure 2, image reading and preprocessing The output end of the module (2.1) is connected to the input end of the image distortion correction transformation module (2.2), the output end of the image distortion correction transformation module (2.2) is connected to the input end of the index image distortion correction module (2.3), and the index image distortion correction module ( The output end of 2.3) is connected to the input end of the image projection cylinder module (2.4), and the output end of the image projection cylinder module (2.4) is connected to the input end based on the template matching algorithm module (2.5), based on the template matching algorithm module (2.5) The output end of the grayscale and blank elimination module (2.6) is connected to the input end of the grayscale and blank elimination module (2.6), and the output end of the grayscale and blank elimination module (2.6) is connected to the input end of the fade-in and fade-out fusion module (2.7).

图像畸变校正变换模块(2.2)包括畸变校正正变换模块、结果存放矩阵模块和畸变校正逆变模块,所述畸变校正正变换模块内含有畸变校正正变换算法,通过畸变校正正变换公式计算出校正图像的大小,所述畸变校正正变换公式:The image distortion correction transformation module (2.2) includes a distortion correction transformation module, a result storage matrix module and a distortion correction inversion module. The distortion correction transformation module contains a distortion correction transformation algorithm, and the correction is calculated by the distortion correction transformation formula. Image size, the distortion correction forward transformation formula:

xx == uu [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]] ythe y == vv [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]]

结果存放矩阵模块为畸变校正正变换后创建的两个矩阵,用于存放上述畸变校正正变换结果;The result storage matrix module is two matrices created after the distortion correction forward transformation, which are used to store the above distortion correction forward transformation results;

畸变校正逆变模块内含有逆变算法,通过逆变换公式计算得到图像校正后的坐标点(x,y)→(u,v),逆变换公式为:The distortion correction inverter module contains an inversion algorithm, and the coordinate point (x, y)→(u, v) after image correction is calculated by the inverse transformation formula. The inverse transformation formula is:

uu == xx 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33 vv == ythe y 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33

畸变校正正变换公式和逆变换公式中,x、y为图像读取及预处理模块(2.1)获取的图像中点的横坐标和纵坐标,u、v为图像校正后点的横坐标和纵坐标,k为摄像镜头(1)路数确定后的平均畸变系数,坐标的对应关系储存后输入至索引图像畸变校正模块(2.3)用于索引图像畸变校正。In the distortion correction forward transformation formula and inverse transformation formula, x and y are the abscissa and ordinate of the image midpoint acquired by the image reading and preprocessing module (2.1), and u and v are the abscissa and ordinate of the point after image correction Coordinates, k is the average distortion coefficient after the camera lens (1) has been determined, and the corresponding relationship of the coordinates is stored and input to the index image distortion correction module (2.3) for index image distortion correction.

索引图像畸变校正模块(2.3)获取结果存放矩阵模块中两个索引矩阵,使用索引的方法加快畸变校正速度。The index image distortion correction module (2.3) obtains two index matrices in the result storage matrix module, and uses the index method to speed up the distortion correction speed.

图像投影柱面模块(2.4)用于将畸变校正后的图像投影至同一参考坐标圆柱面上,投影变换公式:The image projection cylinder module (2.4) is used to project the distortion-corrected image onto the same reference coordinate cylinder surface, and the projection transformation formula is:

uu == rr sinsin (( ωω 22 )) ++ rr sinsin [[ arctanarctan (( xx -- WW // 22 rr )) ]] vv == Hh 22 -- rr (( ythe y -- Hh // 22 )) dd

其中:x、y为畸变校正后的图像上像素点的横坐标和纵坐标,u、v为投影变换后像素点的横坐标和纵坐标,r为焦距,W为每路图像采集单元的像素宽度,H为每路图像采集单元的像素高度,Among them: x, y are the abscissa and ordinate of the pixel point on the image after distortion correction, u, v are the abscissa and ordinate of the pixel point after projection transformation, r is the focal length, W is the pixel of each image acquisition unit Width, H is the pixel height of each image acquisition unit,

d = r 2 + ( W / 2 - x ) 2 , ω=2arctan(W/2f)。 d = r 2 + ( W / 2 - x ) 2 , ω=2arctan(W/2f).

柱状全景监控装置进行图像匹配的方法,基于模板匹配算法模块(2.5)实现图像的匹配:The method for the image matching of the columnar panoramic monitoring device is based on the template matching algorithm module (2.5) to realize the image matching:

(一)、两幅图像的水平位移TempDsplyX和垂直位移TempDsplyY通过两层循环来模拟;(1), the horizontal displacement TempDsplyX and the vertical displacement TempDsplyY of the two images are simulated through two layers of circulation;

(二)、模板大小参数TemplateX和TemplateY;(2), template size parameters TemplateX and TemplateY;

(三)、然后在图像重叠部分选取一块固定的大小区域进行灰度值差异统计存入TempDifference与初值为0的Difference变量进行比较,保存数值较小的值于Difference中,并同时将当前的TemplateX和TemplateY值分别保存于DsplyX、DsplyY中;因为是固定区域,所以循环条件TempDsplyX初值不能小于模板宽度;(3), and then select a fixed size area in the overlapping part of the image for gray value difference statistics and store it in TempDifference and compare it with the Difference variable with an initial value of 0, save the value with a smaller value in Difference, and at the same time save the current TemplateX and TemplateY values are stored in DsplyX and DsplyY respectively; because it is a fixed area, the initial value of the loop condition TempDsplyX cannot be less than the width of the template;

灰度化及剔除空白模块(2.6)用于将图像中空白无用区域去除,并灰度化图像来减少计算量,加快运行速度。The grayscale and blank elimination module (2.6) is used to remove blank useless areas in the image, and grayscale the image to reduce the amount of calculation and speed up the operation.

(四)、循环结束后,变量DsplyX、DsplyY中存储的值就是所需的两图位置关系值,从而实现图像的配准。(4) After the loop ends, the values stored in the variables DsplyX and DsplyY are the required positional relationship values of the two images, thereby realizing image registration.

渐入渐出融合模块(2.7)通过以下步骤,实现两幅图像中图像1和图像2融合后图像平滑,视觉上分辨不出差异:The fade-in and fade-out fusion module (2.7) realizes image smoothness after fusion of image 1 and image 2 in the two images through the following steps, and no difference can be distinguished visually:

(1)、在图像1上下加入零矩阵,以此来模拟图像的垂直平移;(1), adding a zero matrix up and down the image 1 to simulate the vertical translation of the image;

(2)、在图像1后面加入零矩阵,以此来模拟图像的水平平移;(2), adding a zero matrix behind the image 1 to simulate the horizontal translation of the image;

(3)、通过循环实现图像的渐入渐出拼接;(3) Realize the gradual in and gradual out splicing of images by looping;

(3.1)、对于重叠部分之后的内容,直接复制图像2的内容;(3.1), for the content after the overlapping part, directly copy the content of image 2;

(3.2)、对于重叠区域内,图像2有数据,图像1没数据的,等于图像2数据;(3.2), for the overlapping area, image 2 has data, and image 1 has no data, it is equal to image 2 data;

(3.3)、对于重叠部分的区域,采用渐入渐出的方法:(3.3), for the area of the overlapping part, the gradual in and out method is adopted:

(3.31)、假设图像重叠部分是W个单位;(3.31), assuming that the overlapping part of the image is W units;

(3.32)、第一个单位灰度值:图像1*[1/W]+图像2*[1-1/W];(3.32), the first unit gray value: image 1*[1/W]+image 2*[1-1/W];

(3.33)、此后系数的分布分别改变一个单位即可。(3.33), after that, the distribution of the coefficients can be changed by one unit respectively.

经过上述处理后,监控器得到的图像为监控区域内全方位图像无死角,一个监控器可以代替多个从不同角度拍摄的监控器,节约监控成本,同时可方便获取同一个区域内的全方位清晰视频图像。After the above processing, the image obtained by the monitor is an omni-directional image without dead angles in the monitoring area. One monitor can replace multiple monitors taken from different angles, saving monitoring costs, and at the same time, it is convenient to obtain all-round images in the same area. Clear video image.

以上实施例仅用于说明本发明的技术方案,而非对其限制。其他参照前述实施例对本发明进行结构技术或原理方案的修改,或者对于部分内容进行修改替换或组装,并不使相应技术方案的本质脱离本发明涉及的技术方案的精神和范围。The above embodiments are only used to illustrate the technical solution of the present invention, not to limit it. Other modifications to the structural technology or principle solutions of the present invention with reference to the foregoing embodiments, or modification, replacement or assembly of part of the content will not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions involved in the present invention.

本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。The content not described in detail in this specification belongs to the prior art known to those skilled in the art.

Claims (7)

1.一种柱状全景监控装置,其特征在于:包括多路图像采集单元(1)、一个图像处理器(2)、一个图像显示器(3),所述多路图像采集单元(1)的输出端连接图像处理器(2)的输入端,所述图像处理器(2)的输出端连接图像显示器(3)的输入端;1. A cylindrical panoramic monitoring device, characterized in that: comprise a multi-channel image acquisition unit (1), an image processor (2), an image display (3), the output of the multi-channel image acquisition unit (1) end is connected to the input end of the image processor (2), and the output end of the image processor (2) is connected to the input end of the image display (3); 所述多路图像采集单元(1)有2-16路分层布置图像采集设备,所述2-16路图像采集设备均匀分布在上下分层的圆周上;The multi-channel image acquisition unit (1) has 2-16 road layered image acquisition devices, and the 2-16 road image acquisition devices are evenly distributed on the circumference of the upper and lower layers; 所述图像处理器(2)包括图像读取及预处理模块(2.1)、图像畸变校正变换模块(2.2)、索引图像畸变校正模块(2.3)、图像投影柱面模块(2.4)、基于模板匹配算法模块(2.5)、灰度化及剔除空白模块(2.6)、渐入渐出融合模块(2.7);所述图像读取及预处理模块(2.1)的输出端连接图像畸变校正变换模块(2.2)的输入端,所述图像畸变校正变换模块(2.2)的输出端连接索引图像畸变校正模块(2.3)的输入端,所述索引图像畸变校正模块(2.3)的输出端连接图像投影柱面模块(2.4)的输入端,所述图像投影柱面模块(2.4)的输出端连接基于模板匹配算法模块(2.5)的输入端,所述基于模板匹配算法模块(2.5)的输出端连接灰度化及剔除空白模块(2.6)的输入端,所述灰度化及剔除空白模块(2.6)的输出端连接渐入渐出融合模块(2.7)的输入端。The image processor (2) includes an image reading and preprocessing module (2.1), an image distortion correction transformation module (2.2), an index image distortion correction module (2.3), an image projection cylinder module (2.4), and a template matching-based Algorithm module (2.5), grayscale and blank removal module (2.6), fade-in and fade-out fusion module (2.7); the output end of the image reading and preprocessing module (2.1) is connected to the image distortion correction transformation module (2.2 ), the output of the image distortion correction transformation module (2.2) is connected to the input of the index image distortion correction module (2.3), and the output of the index image distortion correction module (2.3) is connected to the image projection cylinder module (2.4), the output end of the image projection cylinder module (2.4) is connected based on the input end of the template matching algorithm module (2.5), and the output end of the template matching algorithm module (2.5) is connected to gray scale and the input end of the blank elimination module (2.6), the output end of the grayscale and blank elimination module (2.6) is connected to the input end of the fade-in and fade-out fusion module (2.7). 2.根据权利要求1所述的柱状全景监控装置,其特征在于:所述图像畸变校正变换模块(2.2)包括畸变校正正变换模块、结果存放矩阵模块和畸变校正逆变模块,所述畸变校正正变换模块内含有畸变校正正变换算法,通过畸变校正正变换公式计算出校正图像的大小,所述畸变校正正变换公式:2. The columnar panoramic monitoring device according to claim 1, characterized in that: the image distortion correction transformation module (2.2) includes a distortion correction forward transformation module, a result storage matrix module and a distortion correction inverter module, and the distortion correction The forward transformation module contains a distortion correction forward transformation algorithm, and the size of the corrected image is calculated through the distortion correction forward transformation formula, and the distortion correction forward transformation formula is: xx == uu [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]] ythe y == vv [[ 11 ++ kk (( uu 22 ++ vv 22 )) ]] 上述结果存放矩阵模块为畸变校正正变换后创建的两个矩阵,用于存放上述畸变校正正变换结果;The above result storage matrix module is two matrices created after the distortion correction forward transformation, and is used to store the above distortion correction forward transformation results; 所述畸变校正逆变模块内含有逆变算法,通过逆变换公式计算得到图像校正后的坐标点(x,y)→(u,v),逆变换公式为:The distortion correction inverter module contains an inversion algorithm, and the coordinate point (x, y)→(u, v) after the image correction is obtained by calculating the inverse transformation formula, and the inverse transformation formula is: uu == xx 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33 vv == ythe y 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 ++ -- 11 44 -- 11 2727 kk (( xx 22 ++ ythe y 22 )) -- 11 22 33 kk (( xx 22 ++ ythe y 22 )) 33 上述畸变校正正变换公式和逆变换公式中,x、y为图像读取及预处理模块(2.1)获取的图像中点的横坐标和纵坐标,u、v为图像校正后点的横坐标和纵坐标,k为摄像镜头(1)路数确定后的平均畸变系数,坐标的对应关系储存后输入至索引图像畸变校正模块(2.3)用于索引图像畸变校正。In the above-mentioned distortion correction forward transformation formula and inverse transformation formula, x, y are the abscissa and ordinate of the image midpoint acquired by the image reading and preprocessing module (2.1), u, v are the abscissa and the ordinate of the point after image correction On the ordinate, k is the average distortion coefficient after the camera lens (1) has been determined, and the corresponding relationship of the coordinates is stored and then input to the index image distortion correction module (2.3) for index image distortion correction. 3.根据权利要求2所述的柱状全景监控装置,其特征在于:所述索引图像畸变校正模块(2.3)获取结果存放矩阵模块中两个索引矩阵,使用索引的方法加快畸变校正速度。3. The columnar panoramic monitoring device according to claim 2, characterized in that: the index image distortion correction module (2.3) acquires two index matrices in the result storage matrix module, and uses indexing to speed up the distortion correction speed. 4.根据权利要求3所述的柱状全景监控装置,其特征在于:所述图像投影柱面模块(2.4)用于将畸变校正后的图像投影至同一参考坐标系圆柱面上,投影变换公式:4. The columnar panoramic monitoring device according to claim 3, characterized in that: the image projection cylinder module (2.4) is used to project the distortion-corrected image onto the same reference coordinate system cylinder, and the projection transformation formula is: uu == rr sinsin (( ωω 22 )) ++ rr sinsin [[ arctanarctan (( xx -- WW // 22 rr )) ]] vv == Hh 22 -- rr (( ythe y -- Hh // 22 )) dd 其中:x、y为畸变校正后的图像上像素点的横坐标和纵坐标,u、v为投影变换后像素点的横坐标和纵坐标,r为焦距,W为每路图像采集单元的像素宽度,H为每路图像采集单元的像素高度,Among them: x, y are the abscissa and ordinate of the pixel point on the image after distortion correction, u, v are the abscissa and ordinate of the pixel point after projection transformation, r is the focal length, W is the pixel of each image acquisition unit Width, H is the pixel height of each image acquisition unit, dd == rr 22 ++ (( WW // 22 -- xx )) 22 ,, ωω == 22 arctanarctan (( WW // 22 ff )) .. 5.根据权利要求1所述的柱状全景监控装置,其特征在于:所述灰度化及剔除空白模块(2.6)用于将图像中空白无用区域去除,并灰度化图像来减少计算量,加快运行速度。5. The columnar panoramic monitoring device according to claim 1, characterized in that: the grayscale and blank removal module (2.6) is used to remove blank useless areas in the image, and grayscale the image to reduce the amount of calculation, Run faster. 6.一种权利要求1所述的柱状全景监控装置进行图像匹配的方法,其特征在于:所述基于模板匹配算法模块(2.5)通过以下步骤,实现图像的匹配:6. a method that the columnar panoramic monitoring device according to claim 1 carries out image matching, is characterized in that: described template-based matching algorithm module (2.5) realizes the matching of image through the following steps: (一)、两幅图像的水平位移TempDsplyX和垂直位移TempDsplyY通过两层循环来模拟;(1), the horizontal displacement TempDsplyX and the vertical displacement TempDsplyY of the two images are simulated through two layers of circulation; (二)、模板大小参数TemplateX和TemplateY;(2), template size parameters TemplateX and TemplateY; (三)、然后在图像重叠部分选取一块固定的大小区域进行灰度值差异统计存入TempDifference与初值为0的Difference变量进行比较,保存数值较小的值于Difference中,并同时将当前的TemplateX和TemplateY值分别保存于DsplyX、DsplyY中;因为是固定区域,所以循环条件TempDsplyX初值不能小于模板宽度;(3), and then select a fixed size area in the overlapping part of the image for gray value difference statistics and store it in TempDifference and compare it with the Difference variable with an initial value of 0, save the value with a smaller value in Difference, and at the same time save the current TemplateX and TemplateY values are stored in DsplyX and DsplyY respectively; because it is a fixed area, the initial value of the loop condition TempDsplyX cannot be less than the width of the template; (四)、循环结束后,变量DsplyX、DsplyY中存储的值就是所需的两图位置关系值,从而实现图像的配准。(4) After the loop ends, the values stored in the variables DsplyX and DsplyY are the required positional relationship values of the two images, thereby realizing image registration. 7.根据权利要求6所述的柱状全景监控装置进行图像匹配的方法,其特征在于:所述渐入渐出融合模块(2.7)通过以下步骤,实现两幅图像中图像1和图像2融合后图像平滑,视觉上分辨不出差异:7. The method for image matching performed by the columnar panoramic monitoring device according to claim 6, characterized in that: the fade-in and fade-out fusion module (2.7) realizes the fusion of image 1 and image 2 in the two images through the following steps The image is smooth and visually indistinguishable from the difference: (1)、在图像1上下加入零矩阵,以此来模拟图像的垂直平移;(1), adding a zero matrix up and down the image 1 to simulate the vertical translation of the image; (2)、在图像1后面加入零矩阵,以此来模拟图像的水平平移;(2), adding a zero matrix behind the image 1 to simulate the horizontal translation of the image; (3)、通过循环实现图像的渐入渐出拼接;(3) Realize the gradual in and gradual out splicing of images by looping; (3.1)、对于重叠部分之后的内容,直接复制图像2的内容;(3.1), for the content after the overlapping part, directly copy the content of image 2; (3.2)、对于重叠区域内,图像2有数据,图像1没数据的,等于图像2数据;(3.2), for the overlapping area, image 2 has data, and image 1 has no data, it is equal to image 2 data; (3.3)、对于重叠部分的区域,采用渐入渐出的方法:(3.3), for the area of the overlapping part, the gradual in and out method is adopted: (3.31)、假设图像重叠部分是W个单位;(3.31), assuming that the overlapping part of the image is W units; (3.32)、第一个单位灰度值:图像1*(1/W)+图像2*[1-(1/W)];(3.32), the first unit gray value: image 1*(1/W)+image 2*[1-(1/W)]; (3.33)、此后系数的分布分别改变一个单位即可。(3.33), after that, the distribution of the coefficients can be changed by one unit respectively.
CN201510586263.XA 2015-09-16 2015-09-16 Wide-angle lens omnidirectional monitor and image matching method Pending CN105120229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510586263.XA CN105120229A (en) 2015-09-16 2015-09-16 Wide-angle lens omnidirectional monitor and image matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510586263.XA CN105120229A (en) 2015-09-16 2015-09-16 Wide-angle lens omnidirectional monitor and image matching method

Publications (1)

Publication Number Publication Date
CN105120229A true CN105120229A (en) 2015-12-02

Family

ID=54668101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510586263.XA Pending CN105120229A (en) 2015-09-16 2015-09-16 Wide-angle lens omnidirectional monitor and image matching method

Country Status (1)

Country Link
CN (1) CN105120229A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08249492A (en) * 1995-03-08 1996-09-27 Hitachi Medical Corp Panorama projction method
US20090058991A1 (en) * 2007-08-27 2009-03-05 Soo-Kyun Kim Method for photographing panoramic picture
CN102243432A (en) * 2011-06-28 2011-11-16 浙江工业大学 Panoramic three-dimensional photographing device
CN102497539A (en) * 2011-12-15 2012-06-13 航天科工哈尔滨风华有限公司 Panoramic monitoring system and monitoring method of the same based on improved SIFT feature matching
CN103325110A (en) * 2013-05-29 2013-09-25 山西绿色光电产业科学技术研究院(有限公司) Panoramic image correction algorithm based on panoramic all-in-one speed dome camera
CN104036279A (en) * 2014-06-12 2014-09-10 北京联合大学 Intelligent vehicle running control method and system
CN104657940A (en) * 2013-11-22 2015-05-27 中兴通讯股份有限公司 Method and device for correction remediation and analysis alarm of distorted image

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08249492A (en) * 1995-03-08 1996-09-27 Hitachi Medical Corp Panorama projction method
US20090058991A1 (en) * 2007-08-27 2009-03-05 Soo-Kyun Kim Method for photographing panoramic picture
CN102243432A (en) * 2011-06-28 2011-11-16 浙江工业大学 Panoramic three-dimensional photographing device
CN102497539A (en) * 2011-12-15 2012-06-13 航天科工哈尔滨风华有限公司 Panoramic monitoring system and monitoring method of the same based on improved SIFT feature matching
CN103325110A (en) * 2013-05-29 2013-09-25 山西绿色光电产业科学技术研究院(有限公司) Panoramic image correction algorithm based on panoramic all-in-one speed dome camera
CN104657940A (en) * 2013-11-22 2015-05-27 中兴通讯股份有限公司 Method and device for correction remediation and analysis alarm of distorted image
CN104036279A (en) * 2014-06-12 2014-09-10 北京联合大学 Intelligent vehicle running control method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RUI ZHANG: "Fusion Image Quality Assessment Based on Modulation Transfer Function", 《2011 INTERNATIONAL SYMPOSIUM ON IMAGE AND DATA FUSION》 *
赵聪: "多镜头文档图像拼接技术研究", 《中国优秀硕士学位论文全文数据库 (基础科学辑)》 *

Similar Documents

Publication Publication Date Title
CN115147723B (en) Method, system, medium, equipment and terminal for identification and ranging of inland ships
CN108122191B (en) Method and device for splicing fisheye images into panoramic image and panoramic video
CN107659774B (en) Video imaging system and video processing method based on multi-scale camera array
JP6847718B2 (en) How and devices to handle light field data
CN110889829B (en) A monocular distance measurement method based on fisheye lens
US9734427B2 (en) Surveillance systems and image processing methods thereof
CN108769578B (en) Real-time panoramic imaging system and method based on multiple cameras
CN103501409B (en) Ultrahigh resolution panorama speed dome AIO (All-In-One) system
CN103516995A (en) A real time panorama video splicing method based on ORB characteristics and an apparatus
US10063792B1 (en) Formatting stitched panoramic frames for transmission
CN107154014A (en) A kind of real-time color and depth Panorama Mosaic method
CN102903101B (en) Method for carrying out water-surface data acquisition and reconstruction by using multiple cameras
CN104318604A (en) 3D image stitching method and apparatus
CN111652937B (en) Vehicle-mounted camera calibration method and device
CN106157246A (en) A kind of full automatic quick cylinder panoramic image joining method
CN105469412B (en) A kind of scaling method of Pan/Tilt/Zoom camera rigging error
CN103533235A (en) Quick digital panoramic device based on linear array charge coupled device (CCD) for great case/event scene
CN114897684B (en) Vehicle image stitching method, device, computer equipment and storage medium
CN106952219B (en) Image generation method for correcting fisheye camera based on external parameters
CN103247020A (en) Fisheye image spread method based on radial characteristics
CN115239820A (en) A real-time splicing and parking space detection method for aerial views of split flying vehicles
CN106709894A (en) Real-time image splicing method and system
CN102236790B (en) Image processing method and device
CN111461963A (en) Fisheye image splicing method and device
CN104320565B (en) A kind of more shot detection device array curved surface image planes joining methods

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination