当前位置:网站首页>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
边栏推荐
- [leetcode] wild card matching
- Redis master-slave mode
- 一类恒等式的应用(范德蒙德卷积与超几何函数)
- XML parsing
- Codeworks 5 questions per day (1700 average) - day 5
- [upsampling method opencv interpolation]
- 全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
- [cloud native | kubernetes] actual battle of ingress case (13)
- 11.(地图数据篇)OSM数据如何下载使用
- 无线WIFI学习型8路发射遥控模块
猜你喜欢
一次生产环境redis内存占用居高不下问题排查
Redis master-slave mode
《增长黑客》阅读笔记
pytorch-多层感知机MLP
Redis集群的重定向
HiEngine:可媲美本地的云原生内存数据库引擎
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
【TFLite, ONNX, CoreML, TensorRT Export】
yolov5目標檢測神經網絡——損失函數計算原理
[cloud native | kubernetes] actual battle of ingress case (13)
随机推荐
[singleshotmultiboxdetector (SSD, single step multi frame target detection)]
无线WIFI学习型8路发射遥控模块
Mongodb replica set
Redis集群(主从)脑裂及解决方案
C operation XML file
MySQL statistical skills: on duplicate key update usage
2048 game logic
Pytorch weight decay and dropout
【load dataset】
871. Minimum Number of Refueling Stops
Shell script file traversal STR to array string splicing
ABAP table lookup program
Idea set the number of open file windows
《增长黑客》阅读笔记
【云原生 | Kubernetes篇】Ingress案例实战(十三)
mmclassification 训练自定义数据
一次生产环境redis内存占用居高不下问题排查
Principle and performance analysis of lepton lossless compression
COMSOL -- establishment of geometric model -- establishment of two-dimensional graphics
Open3d mesh (surface) coloring