main Content

block Matching

estimate motion between images or video frames

  • 图书馆:
  • 计算机视觉工具箱/ Analysis & Enhancement

  • block Matching block

description

The Block Matching block estimates motion between two images or two video frames by comparing blocks of pixels. The block matches the block of pixels between frames by moving the block of pixels over a search region.

Ports

Input

展开全部

图像或视频框架,指定为标量,向量或矩阵。如果将参数之间的估计运动设置为两个图像,则此端口的名称更改为I1

数据类型:单身的||int8|int16|int32|INT64|UINT8|你int16|UINT32|Uint64|fixed point

图像或视频框架,指定为标量,向量或矩阵。

依赖性

要启用此端口,请设置estimate motion between参数为两个图像

数据类型:单身的||int8|int16|int32|INT64|UINT8|你int16|UINT32|Uint64|fixed point

输出

展开全部

速度幅度,作为标量,矢量或矩阵返回。

数据类型:单身的||int8|int16|int32|INT64|UINT8|你int16|UINT32|Uint64|fixed point

复杂形式的速度成分,作为标量,向量或矩阵返回。

依赖性

要公开此端口,请设置速度输出参数为复杂形式的水平和垂直组件

数据类型:单身的||int8|int16|int32|INT64|UINT8|你int16|UINT32|Uint64|fixed point

参数

展开全部

main Tab

specify whether to estimate the motion between two images or two video frames. Select两个图像估计两个图像之间的运动。选择当前的框架和n帧返回估计两个视频帧之间的运动。

依赖性

将此参数设置为当前的框架和n帧返回to expose then范围。

specify a scalar value that represents the number of frames between the reference frame and the current frame.

依赖性

To enable this parameter, set theestimate motion between参数为当前的框架和n帧返回

specify how the block locates the block of pixels in the current frame and the next frame that best matches the block of pixels.

  • exhaustive- 块通过一次将块移到搜索区域一个像素时,选择了下一帧中像素块的位置。这个过程在计算上很昂贵。

  • Three-step- 通过使用稳定减小的步长,该块在下一个帧中搜索了下一帧中最能匹配当前帧中像素块的块。该块以大约等于最大搜索范围的一半的步长开始。在每个步骤中,块将搜索区域的中心点与位于该区域边界上的八个搜索点进行比较,并将中心点移至搜索点其值最接近中心点的搜索点。然后,块将步长降低了一半,然后重新开始过程。该选项在计算上的昂贵较不那么昂贵,尽管它可能找不到最佳解决方案。

指定块如何测量当前帧中像素块与下一帧中像素块的相似性。

如果您选择卑鄙的方误差(MSE),块估计块的中心像素的位移为 (( d 1 ,,,, d 2 最小化此MSE方程的值:

m s e (( d 1 ,,,, d 2 = 1 n 1 × n 2 (( n 1 ,,,, n 2 ,,,, b [[ s (( n 1 ,,,, n 2 ,,,, k - s (( n 1 + d 1 ,,,, n 2 + d 2 ,,,, k + 1 这是给予的 2

In the previous equation,b是一个 n 1 × n 2 block of pixels, ands((X,Y,K)denotes a pixel location at (x,y)in framek

如果您选择mean absolute difference (MAD),块匹配块估计块的中心像素的位移为 (( d 1 ,,,, d 2 values that minimize this MAD equation:

m 一种 d (( d 1 ,,,, d 2 = 1 n 1 × n 2 (( n 1 ,,,, n 2 ,,,, b | s (( n 1 ,,,, n 2 ,,,, k - s (( n 1 + d 1 ,,,, n 2 + d 2 ,,,, k + 1 |

指定像素块的大小。

specify the overlap (in pixels) of two subdivisions of the input image.

specify the maximum number of pixels any center pixel in a block of pixels might move from image to image or frame to frame. The block uses this value to determine the size of the search region.

指定输出。如果您选择magnitude-squared,该块输出一个光流矩阵,每个元素处于形式2+v2。如果您选择复杂形式的水平和垂直组件,该块输出一个光流矩阵,每个元素处于形式 + j v 。每个值的实际部分是水平速度分量,每个值的虚构部分是垂直速度分量。

数据类型选项卡

有关定点块参数的详细信息,请参阅指定块的定点属性

block Characteristics

数据类型

|fixed point|integer|单身的

多维信号

no

可变大小信号

no

一种lgorithms

展开全部

扩展功能

C/C++ Code Generation
使用Simulink®Coder™生成C和C ++代码。金宝app

定点转换
design and simulate fixed-point systems using Fixed-Point Designer™.

版本历史记录

Introduced before R2006a