当前位置:网站首页>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
边栏推荐
- [calculation of loss in yolov3]
- [crawler] bugs encountered by wasm
- Sentinel sentinel mechanism of master automatic election in redis master-slave
- Which domestic cloud management platform manufacturer is good in 2022? Why?
- [mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
- 【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
- Linux Installation and deployment lamp (apache+mysql+php)
- 【Win11 多用户同时登录远程桌面配置方法】
- 【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
- Open3d European clustering
猜你喜欢
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
Liunx prohibit Ping explain the different usage of traceroute
一次生产环境redis内存占用居高不下问题排查
【Win11 多用户同时登录远程桌面配置方法】
Multi table operation - Auto Association query
Error modulenotfounderror: no module named 'cv2 aruco‘
【使用TensorRT通过ONNX部署Pytorch项目】
自动化测试生命周期
abap查表程序
pytorch-权重衰退(weight decay)和丢弃法(dropout)
随机推荐
【SingleShotMultiBoxDetector(SSD,单步多框目标检测)】
【yolov5.yaml解析】
Yolov5 target detection neural network -- calculation principle of loss function
How to make your products as expensive as possible
pytorch-多层感知机MLP
查看多台机器所有进程
多表操作-子查询
iTOP-3568开发板NPU使用安装RKNN Toolkit Lite2
Linux Installation and deployment lamp (apache+mysql+php)
【云原生 | Kubernetes篇】Ingress案例实战(十三)
vscode快捷键
Programmers are involved and maintain industry competitiveness
JS for循环 循环次数异常
COMSOL -- 3D casual painting -- sweeping
HiEngine:可媲美本地的云原生内存数据库引擎
石油化工企业安全生产智能化管控系统平台建设思考和建议
报错ModuleNotFoundError: No module named ‘cv2.aruco‘
ACID事务理论
Pytorch softmax regression
pytorch-softmax回归