当前位置:网站首页>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
边栏推荐
- Video networkState 属性
- Proof of the thinking of Hanoi Tower problem
- C # implements WinForm DataGridView control to support overlay data binding
- Mongodb replica set
- pytorch-多层感知机MLP
- 【Win11 多用户同时登录远程桌面配置方法】
- redis的持久化机制原理
- Empêcher le navigateur de reculer
- How can China Africa diamond accessory stones be inlaid to be safe and beautiful?
- Codeforces Round #804 (Div. 2)
猜你喜欢
![[crawler] bugs encountered by wasm](/img/29/6782bda4c149b7b2b334238936e211.png)
[crawler] bugs encountered by wasm

How can China Africa diamond accessory stones be inlaid to be safe and beautiful?

无线WIFI学习型8路发射遥控模块

网络五连鞭

redis主从中的Master自动选举之Sentinel哨兵机制

Multi table operation - Auto Association query

11. (map data section) how to download and use OSM data

Principle of redis cluster mode

Simply solve the problem that the node in the redis cluster cannot read data (error) moved

【yolov5.yaml解析】
随机推荐
yolov5目標檢測神經網絡——損失函數計算原理
redis主从中的Master自动选举之Sentinel哨兵机制
多表操作-子查询
Which domestic cloud management platform manufacturer is good in 2022? Why?
Reading notes of growth hacker
vscode快捷键
Thoughts and suggestions on the construction of intelligent management and control system platform for safe production in petrochemical enterprises
[deploy pytoch project through onnx using tensorrt]
Linux安装部署LAMP(Apache+MySQL+PHP)
Principle of redis cluster mode
Implementation of array hash function in PHP
1. Laravel creation project of PHP
你做自动化测试为什么总是失败?
【云原生 | Kubernetes篇】Ingress案例实战(十三)
[crawler] Charles unknown error
Hiengine: comparable to the local cloud native memory database engine
How can China Africa diamond accessory stones be inlaid to be safe and beautiful?
15 methods in "understand series after reading" teach you to play with strings
自动化测试生命周期
splunk配置163邮箱告警