当前位置:网站首页>Matlab imoverlay function (burn binary mask into two-dimensional image)
Matlab imoverlay function (burn binary mask into two-dimensional image)
2022-07-05 11:58:00 【**inevitable**】
List of articles
grammar
B = imoverlay(A,BW)
B = imoverlay(A,BW,color)
explain
B = imoverlay(A,BW)
% Fill grayscale with solid color or RGB Images A, Where the binary mask is input BW by true.
B = imoverlay(A,BW,color)
% Appoint imoverlay The color used to fill the image .
Example
Burn binary images into grayscale images
% Read the grayscale image into the work area
A = imread('cameraman.tif');
figure(1)
imshow(A)

% Read binary image into work
BW = imread('text.png');
figure(2)
imshow(BW)

% Burn binary images into grayscale images , Specifies the color used for the binary mask .
B = imoverlay(A,BW,'yellow');
% Show results
figure(3)
imshow(B)

Burn binary images to RGB Images
% take RGB Image read into workspace
RGB = imread('peppers.png');
figure(1)
imshow(RGB)

% Read binary images into the workspace
BW = imread('text.png');
figure(2)
imshow(BW)

% tailoring RGB Images , Make it the same size as the binary mask
RGB_cropped = imcrop(RGB,[64,128,255,255]);
% Burn binary images as cropped RGB Images , Choose the color you want to use
B = imoverlay(RGB_cropped,BW,'red');
% Show results
figure(3)
imshow(B)

Cutting effect :
Input parameters
A : Input image
The input image , Specify as a two-dimensional grayscale image or two-dimensional RGB Images
data type :single | double | int16 | uint8 | uint16 | logical
BW: Mask image
Mask image , Specified two-dimensional binary matrix , Its size and image A The first two dimensions of are the same . For digital input , Any non-zero pixel is considered 1( really ).
data type : single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | logical
color: Color used for overlay
Color used for overlay , Designated as MATLAB Color specification . for example , If you want to specify red , You can use any of the following specifications :“ Red ”,“ r” or [1 0 0].
Output parameters
B: Output image
Output image , In two dimensions RGB Return in image form .
data type :uint8
边栏推荐
- 报错ModuleNotFoundError: No module named ‘cv2.aruco‘
- Is investment and finance suitable for girls? What financial products can girls buy?
- Multi table operation - sub query
- Hiengine: comparable to the local cloud native memory database engine
- 【Win11 多用户同时登录远程桌面配置方法】
- 13.(地图数据篇)百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换
- 12.(地图数据篇)cesium城市建筑物贴图
- Liunx prohibit Ping explain the different usage of traceroute
- 《看完就懂系列》15个方法教你玩转字符串
- 【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
猜你喜欢
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases

Redis master-slave mode

Thoughts and suggestions on the construction of intelligent management and control system platform for safe production in petrochemical enterprises

谜语1

Redis集群的重定向

如何让你的产品越贵越好卖
![[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]](/img/ad/b96e9319212cf2724e0a640109665d.png)
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]

简单解决redis cluster中从节点读取不了数据(error) MOVED

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

《增长黑客》阅读笔记
随机推荐
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]
自动化测试生命周期
多表操作-子查询
Check the debug port information in rancher and do idea remote JVM debug
871. Minimum Number of Refueling Stops
【主流Nivida显卡深度学习/强化学习/AI算力汇总】
Programmers are involved and maintain industry competitiveness
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
pytorch-多层感知机MLP
投资理财适合女生吗?女生可以买哪些理财产品?
XML parsing
【Win11 多用户同时登录远程桌面配置方法】
Pytorch softmax regression
Yolov5 target detection neural network -- calculation principle of loss function
Sentinel sentinel mechanism of master automatic election in redis master-slave
【 YOLOv3中Loss部分计算】
Mmclassification training custom data
mmclassification 训练自定义数据
redis的持久化机制原理
Hiengine: comparable to the local cloud native memory database engine