当前位置:网站首页>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
边栏推荐
- Check the debug port information in rancher and do idea remote JVM debug
- 谜语1
- 11. (map data section) how to download and use OSM data
- Redis master-slave mode
- 自动化测试生命周期
- 调查显示传统数据安全工具在60%情况下无法抵御勒索软件攻击
- Idea set the number of open file windows
- COMSOL -- establishment of geometric model -- establishment of two-dimensional graphics
- 【load dataset】
- POJ 3176 cow bowling (DP | memory search)
猜你喜欢
《增长黑客》阅读笔记
yolov5目标检测神经网络——损失函数计算原理
Sentinel sentinel mechanism of master automatic election in redis master-slave
你做自动化测试为什么总是失败?
【yolov3损失函数】
【SingleShotMultiBoxDetector(SSD,单步多框目标检测)】
COMSOL -- 3D casual painting -- sweeping
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
Use and install RkNN toolkit Lite2 on itop-3568 development board NPU
【PyTorch预训练模型修改、增删特定层】
随机推荐
Mongodb replica set
查看多台机器所有进程
[loss functions of L1, L2 and smooth L1]
Riddle 1
[yolov3 loss function]
查看rancher中debug端口信息,并做IDEA Remote Jvm Debug
Linux Installation and deployment lamp (apache+mysql+php)
Unity xlua monoproxy mono proxy class
How to get a token from tokenstream based on Lucene 3.5.0
Redis master-slave mode
无线WIFI学习型8路发射遥控模块
pytorch-权重衰退(weight decay)和丢弃法(dropout)
Liunx prohibit Ping explain the different usage of traceroute
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
15 methods in "understand series after reading" teach you to play with strings
mmclassification 训练自定义数据
Principle of persistence mechanism of redis
leetcode:1200. Minimum absolute difference
COMSOL -- three-dimensional graphics random drawing -- rotation
Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle