Stereo vision algorithm of single pan-tilt-zoom camera

文档序号:1294038 发布日期:2020-08-07 浏览:29次 中文

阅读说明:本技术 单个云台摄像机的立体视觉算法 (Stereo vision algorithm of single pan-tilt-zoom camera ) 是由 刘瑜 于 2020-03-10 设计创作,主要内容包括:本专利涉及一种单个云台摄像机的立体视觉算法,包括云台摄像机,所述的云台摄像机设置水平360度旋转和垂直120度旋转的机构,内部设置图像处理器和进行图像采集的摄像头,所述的摄像头的焦距为f,所述的图像处理器设置立体视觉算法,包括以下步骤:(1)、所述的图像处理器通过所述的摄像头采集环境的图像图像f<Sub>1</Sub>(x,y);(2)、所述的云台摄像机在水平方向旋转θ度,旋转半径为L,所述的图像处理器通过所述的摄像头采集环境的图像f<Sub>2</Sub>(x,y);(3)、将图像f<Sub>1</Sub>(x,y)与f<Sub>2</Sub>(x,y)进行图像匹配,并计算视差d<Sub>x</Sub>(<I>i</I>,<I>j</I>),计算深度h=f·θ·L/(d<Sub>x</Sub>(<I>i</I>,<I>j</I>)-f·θ)。本专利通过单个云台摄像机的旋转构造出交叉光轴的双目立体视觉系统,实现环境深度信息的检测。(The patent relates to a stereoscopic vision algorithm of single cloud platform camera, including cloud platform camera, cloud platform camera set up the mechanism of 360 degrees rotations in level and perpendicular 120 degrees rotations, inside sets up image processor and the camera that carries out image acquisition, the focus of camera be f, image processor set up the stereoscopic vision algorithm, including following step: (1) the image processor acquires an image f of the environment through the camera 1 (x, y) the pan-tilt camera rotates by theta degrees in the horizontal direction, the rotation radius is L, and the image processor acquires an image f of the environment through the camera 2 (x, y); (3) and image f 1 (x, y) and f 2 (x, y) image matching and calculating the parallax d x ( i , j ) And the calculated depth h = f · θ · L/(d) x ( i , j ) -f.theta). This patent constructs the alternately optical axis through the rotation of single cloud platform cameraThe binocular stereo vision system realizes the detection of the environmental depth information.)

1. The stereoscopic vision algorithm of the single pan-tilt camera comprises the pan-tilt camera, the pan-tilt camera is provided with a horizontal 360-degree rotation mechanism and a vertical 120-degree rotation mechanism, an image processor and a camera for image acquisition are arranged inside the pan-tilt camera, and the focal length of the camera is f, which is characterized in that: the image processor sets a stereoscopic vision algorithm, and the stereoscopic vision algorithm comprises the following steps:

(1) the image processor acquires the image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2) the pan-tilt camera rotates by theta degrees in the horizontal direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

(3) And image f1(x, y) and f2(x, y) image matching and calculating the parallax dx(i,j) And the calculated depth h = f · θ · L/(d)x(i,j)-f·θ)。

2. The stereo vision algorithm for a single pan-tilt camera of claim 1, wherein: the image processor sets a stereoscopic vision algorithm, and the stereoscopic vision algorithm comprises the following steps:

(2-1) the image processor acquires an image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2-2) the pan-tilt camera rotates by theta degrees in the vertical direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

(2-3) image f1(x, y) and f2(x, y) image matching and calculating the parallax dy(i,j) And the calculated depth h = f · θ · L/(d)y(i,j)-f·θ)。

Technical Field

The invention relates to a stereoscopic vision algorithm of a single pan-tilt-zoom camera, belonging to the field of video monitoring.

Background

At present, a monitoring camera plays an increasingly important role in work and life, and the function of the monitoring camera is also increasingly powerful and more intelligent. The camera is monitored from a fixed visual angle and a fixed area, is developed into multi-visual angle and multi-area inspection and is based on a network camera of the Internet of things. With the development of computer technology and image processing technology, intelligent cameras begin to appear, and monitoring and semantic analysis of important targets are achieved. In order to obtain the best monitoring effect, the key target is required to be controlled to be always in the central area of the image, so that the distance of the key target needs to be measured, and the camera can track the target quickly and stably.

Disclosure of Invention

The invention aims to solve the technical problems and provides a stereoscopic vision algorithm of a single pan-tilt camera, which adopts the following technical scheme:

the stereoscopic vision algorithm of the single pan-tilt camera comprises the pan-tilt camera, the pan-tilt camera is provided with a mechanism which rotates by 360 degrees horizontally and 120 degrees vertically, an image processor and a camera for image acquisition are arranged inside the mechanism, the focal length of the camera is f, the image processor is provided with a stereoscopic vision algorithm, and the stereoscopic vision algorithm comprises the following steps:

(1) the image processor acquires the image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2) the pan-tilt camera rotates by theta degrees in the horizontal direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

(3) And image f1(x, y) and f2(x, y) image matching and calculating the parallax dx(i,j) And the calculated depth h = f · θ · L/(d)x(i,j)-f·θ)。

Optionally, the image processor sets a stereo vision algorithm, and the stereo vision algorithm includes the following steps:

(2-1) the image processor acquires an image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2-2) the pan-tilt camera rotates by theta degrees in the vertical direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

(2-3) image f1(x, y) and f2(x, y) image matching and calculating the parallax dy(i,j) The calculated depth h = f · θ · L(dy(i,j)-f·θ)。

The implementation of the invention has the positive effects that: through the two images shot before and after the rotation of the pan-tilt camera, a stereoscopic vision system with crossed optical axes is constructed, the depth information is measured, additional equipment is avoided, the system is simplified, and useful distance information is provided for intelligent function expansion.

Drawings

Fig. 1 is an external view of a pan-tilt camera;

fig. 2 is embodiment 1 of a stereoscopic vision calculation method;

fig. 3 is embodiment 2 of the stereoscopic vision calculation method.

Detailed Description

The invention will now be further described with reference to the accompanying drawings in which:

referring to fig. 1-3, the stereoscopic vision algorithm of a single pan-tilt camera comprises a pan-tilt camera, wherein the pan-tilt camera is provided with a mechanism rotating by 360 degrees horizontally and 120 degrees vertically, an image processor and a camera for image acquisition are arranged inside the pan-tilt camera, and the focal length of the camera is f.

The image processor sets a stereo vision algorithm, and when the pan-tilt camera needs to track a certain target or needs to determine the distance of the certain target, the stereo vision algorithm can be adopted. The stereo vision algorithm comprises the following steps:

(1) the image processor acquires the image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2) the pan-tilt camera rotates by theta degrees in the horizontal direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

And (3) finishing image acquisition at two positions in the steps (1) and (2), neglecting the movement of the target, and regarding the target as a binocular stereo vision system with crossed optical axes, wherein the intersection point of the optical axes is C.

(3) And image f1(x, y) and f2(x, y) image matching and calculating the parallax dx(i,j) And the calculated depth h = f · θ · L/(d)x(i,j)-f·θ)。

First, for an image f1(x, y), establishing a ratio according to the imaging geometry:

x1/f=X1/h1

then, for the image f2(x, y), establishing a ratio according to the imaging geometry:

x2/f=XR/h2

because the target is to the optical center O1Or O2I.e. the depth is relatively large, h can be reduced1And h2And performing approximate equality processing, and combining and expressing as h, then:

x1/f=X1/h,x2/f=X2/h

the two equations are subtracted to yield:

(x1-x2)/f=(X1-X2)/h

mixing X1-X2Approximated by the length X in fig. 2, X = θ · (L + h), and d according to the approximated triangle principlex(i,j)=x1-x2Bringing into the above formula yields:

dx(i,j)/f=θ·L/h+θ

finishing to obtain:

h=f·θ·L/(dx(i,j)-f·θ)。

optionally, the image processor sets a stereo vision algorithm, and the stereo vision algorithm includes the following steps:

(2-1) the image processor acquires an image of the environment through the camera to obtain an image f1(x, y), wherein x and y are pixel coordinates;

(2-2) the pan-tilt camera rotates by theta degrees in the vertical direction, the rotation radius is L, and the image processor acquires the image of the environment through the camera to obtain an image f2(x,y);

And (2-1) and (2-2) finishing image acquisition of two positions, neglecting movement of the target, and regarding the target as a binocular stereo vision system with crossed optical axes, wherein the target forms parallax in the y-axis direction, and the intersection point of the optical axes is C.

(2-3) image f1(x, y) and f2(x, y) image matching and calculating the parallax dy(i,j) And the calculated depth h = f · θ · L/(d)y(i,j)-f·θ)。

First, for an image f1(x, y), establishing a ratio according to the imaging geometry:

y1/f=Y1/h1

then, for the image f2(x, y), establishing a ratio according to the imaging geometry:

y2/f=Y2/h2

because the target is to the optical center O1Or O2I.e. the depth is relatively large, h can be reduced1And h2And performing approximate equality processing, and combining and expressing as h, then:

y1/f=Y1/h,y2/f=Y2/h

the two equations are subtracted to yield:

(y1-y2)/f=(Y1-Y2)/h

will Y1-Y2Approximately length Y in fig. 3, Y = θ · (L + h) according to the approximately triangular principle, and dy(i,j)=y1-y2Bringing into the above formula yields:

dy(i,j)/f=θ·L/h+θ

finishing to obtain:

h=f·θ·L/(dy(i,j)-f·θ)。

to sum up, this patent constructs the criss-cross stereoscopic vision system of optical axis through rotatory cloud platform camera, two images of shooting around rotatory, realizes the depth information and measures, provides useful distance information for intelligent function extension.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于单目视觉三维重建的装置及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!