主要内容

视觉

组合图像,覆盖图像或突出显示选定的像素

描述

The字母系统对象™ combines two images, overlays one image over another, or highlights selected pixels.

To combine two images, overlay one image over another, or highlight selected pixels:

  1. 创建视觉OBJect and set its properties.

  2. Call the object with arguments, as if it were a function.

要了解有关系统对象如何工作的更多信息,请参阅What Are System Objects?

Creation

描述

example

Alphablend = Vision.Alphablender创建Alpha Blender系统对象,alphablend, which combines two images, overlays one image over another, or highlights selected pixels.

alphablend= vision.AlphaBlender(名称,价值)sets properties using one or more name-value pairs. Enclose each property name in quotes. For example,Alphablend = Vision.Alphablender('Operation','Blend')

Properties

展开全部

Unless otherwise indicated, properties are不可否认,这意味着您在调用对象后不能更改其值。呼叫时锁定对象,然后发布功能解锁它们。

If a property istunable, you can change its value at any time.

For more information on changing property values, seeSystem Design in MATLAB Using System Objects

操作,指定为'混合','二进制面具', or'Highlight selected pixels'

手术 描述
'混合' 将一个图像的像素与另一个图像进行线性结合。
'二进制面具' Overwrite the pixel values of one image with the pixel values of another image.
'Highlight selected pixels' 使用maskbinary image input to determine which pixels are set to the maximum value supported by their data type.

不透明因素的来源,specified as'财产'或者'Input port'。当您设置该属性时,此属性将适用手术property to混合

像素量表值,指定为标量或矩阵。对象在组合图像之前先缩放每个像素。当您设置该属性时,此属性将适用OpacitySourceproperty to财产

Tunable:Yes

二进制掩码源, specified as'财产'或者'Input port'。当您设置该属性时,此属性将适用手术property toBinary mask

覆盖标量,指定为0或者1对于每个像素,或0s and1s. This property applies when you set the面具Sourceproperty to财产

Tunable:Yes

第二输入图像的左上角的位置来源

第二个输入图像的左上角位置的来源,指定为财产或者Input port

第二个输入图像相对于第一个输入图像的位置的位置,该位置在格式[x y]中指定为两元素向量。当您设置该属性时,此属性将适用位置资源property to财产

SeeCoordinate Systemsfor a discussion on pixel coordinates and spatial coordinates, which are the two main coordinate systems used in the Computer Vision Toolbox™.

Tunable:Yes

定点属性

舍入方法,指定为'Ceiling','Convergent','Floor',“最近”,'Round','Simplest','零', or'Floor'

Overflow action for fixed-point operations, specified as'Wrap'或者'Saturate'

定点操作的不透明词和分数长度,指定为'Same word length as input'或者'风俗'

定点操作的不透明词和分数长度因子,指定为未量的数字型(定点设计师)带有A的对象签名汽车。当您设置该属性时,此属性将适用OpacityDataTypeproperty to风俗

产品字和分数长度,指定为'风俗'或者'Same as first input'

产品字和分数长度,指定为a scaled数字型(定点设计师)带有A的对象'Signedness''Auto'。当您设置该属性时,此属性将适用'ProductDataType'property to'风俗'

累加器单词和分数长度,指定为'Same as product','Same as first input', or'风俗'

累加器单词和分数长度,指定为缩放数字型(定点设计师)带有A的对象'Signedness''Auto'

输出单词和分数长度,指定为'Same as first input'或者'风俗'

输出单词和分数长度,指定为缩放数字型(定点设计师)带有A的对象'Signedness''Auto'

用法

描述

ab= alphablend(I1,i2)返回融合图像的alpha搅拌器对象I1i2

ab= alphablend(I1,i2,opacity)uses theopacity结合像素值的输入I1i2。To use theopacityinput, you must set the手术property to '混合' and theOpacitySourceproperty to 'Input port'

ab= alphablend(I1,i2,mask)uses themaskinput to overlayI1overi2。To use themask带有覆盖的输入,您必须设置手术property to'二进制面具'和the面具Sourceproperty to'Input port'

ab= alphablend(I1,mask)uses themask输入以确定哪些像素I1are set to the maximum value supported by their data type. To use themask带有覆盖的输入,您必须设置手术property to'Highlight selected pixels'和the面具Sourceproperty to'Input port'

ab= alphablend(I1,i2,___,地点)另外设置了左上角地点fori2。To use the地点input, you must set the位置资源property to'Input port'

输入参数

展开全部

输入图像,在TrueColor或2-D灰度中指定。

Data Types:single|双倍的|INT16|uint8|UINT16

输入图像,在TrueColor或2-D灰度中指定。

Data Types:single|双倍的|INT16|uint8|UINT16

像素量表值,指定为标量或矩阵。对象在组合图像之前先缩放每个像素。

覆盖标量,指定为0或者1对于每个像素,或0s and1s.

第二个输入图像相对于第一个输入图像的位置的位置,该位置在格式[x y]中指定为两元素向量。

Tunable:Yes

Output Arguments

展开全部

Output blended image, returned as a combined image, overlayed image, or an image with selected pixels highlighted.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object namedOBJ,使用此语法:

释放(OBJ)

展开全部

Run系统对象算法
发布 Release resources and allow changes to系统对象property values and input characteristics
重置 重置内部状态系统对象

例子

全部收缩

Display the two images.

i1 = im2single(imread('blobs.png')); I2 = im2single(imread('Circles.png')); subplot(1,2,1); imshow(I1); subplot(1,2,2); imshow(I2);

Figure contains 2 axes objects. Axes object 1 contains an object of type image. Axes object 2 contains an object of type image.

混合两个图像并显示结果。

Blender = Vision.alphablender;J = Blender(I1,I2);数字;imshow(j);

Figure contains an axes object. The axes object contains an object of type image.

Extended Capabilities

Version History

在R2012a中引入

See Also