当前位置:网站首页>Matlab boundarymask function (find the boundary of the divided area)
Matlab boundarymask function (find the boundary of the divided area)
2022-07-05 11:58:00 【**inevitable**】
List of articles
grammar
mask = boundarymask(L)
mask = boundarymask(BW)
mask = boundarymask(___,conn)
explain
mask = boundarymask(L)
% Calculation represents input label matrix L The mask of the area boundary .
% Output mask It's a logical image , The boundary position is true, At the non boundary position false
mask = boundarymask(BW)
% Calculate the input binary image BW Area boundary of
mask = boundarymask(___,conn)
% Use conn Calculate the area boundary by specifying the connectivity
Example
Create a rasterized mesh of area boundaries
% Read the image into the workspace
I = imread('kobi.png');
figure(1)
imshow(I)

% Create a super pixel representation of the image , Returns in the form of a label matrix
L = superpixels(I,100);
% Display images
figure(2)
imshow(label2rgb(L))

% Find the region boundary of the label matrix
mask = boundarymask(L);
% By using labeloverlay Function to display the boundary mask on the original image
% The area boundary of the label matrix is displayed as 1 Pixel wide cyan line
figure(3)
imshow(labeloverlay(I,mask,'Transparency',0))

Input parameters
L : Label matrix
Label matrix , A two-dimensional numeric matrix or a two-dimensional logical matrix specified as a non negative number .
data type :single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | logical
BW: Binary image
Binary image , Specify as and L Numbers or logical matrices of the same size .
data type :ingle | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | logical
conn: Pixel connection
Pixel connectivity , Designated as 4 or 8.
4 Connect :
8 Connect :
data type :single | double | int8 | int16 | int32 | uint8 | uint16 | uint32
Output parameters
mask: Grid the boundary of the region
Grid the boundary of the region , Specified as a two-dimensional logical matrix with the same size as the input image . When there is a value in the input image P The adjacent pixels of the corresponding pixels of have different characteristics from P The value of , Pixels in the mask are true .
data type : logical
边栏推荐
- 程序员内卷和保持行业竞争力
- The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
- XML parsing
- 1.php的laravel创建项目
- POJ 3176 cow bowling (DP | memory search)
- Open3d mesh (surface) coloring
- COMSOL -- three-dimensional graphics random drawing -- rotation
- 【load dataset】
- Shell script file traversal STR to array string splicing
- 阻止瀏覽器後退操作
猜你喜欢
随机推荐
Install esxi 6.0 interactively
12. (map data) cesium city building map
如何让你的产品越贵越好卖
无线WIFI学习型8路发射遥控模块
Unity Xlua MonoProxy Mono代理类
Halcon template matching actual code (I)
Yolov5 target detection neural network -- calculation principle of loss function
[cloud native | kubernetes] actual battle of ingress case (13)
XML解析
【yolov3损失函数】
C # implements WinForm DataGridView control to support overlay data binding
阻止浏览器后退操作
Multi table operation - sub query
13.(地图数据篇)百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换
【load dataset】
Vscode shortcut key
COMSOL -- establishment of geometric model -- establishment of two-dimensional graphics
Empêcher le navigateur de reculer
Linux Installation and deployment lamp (apache+mysql+php)
Principle of redis cluster mode









![[yolov5.yaml parsing]](/img/ae/934f69206190848ec3da10edbeb59a.png)