当前位置:网站首页>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
边栏推荐
- 简单解决redis cluster中从节点读取不了数据(error) MOVED
- Halcon template matching actual code (I)
- Open3D 欧式聚类
- [calculation of loss in yolov3]
- Vscode shortcut key
- [singleshotmultiboxdetector (SSD, single step multi frame target detection)]
- Application of a class of identities (vandermond convolution and hypergeometric functions)
- [loss functions of L1, L2 and smooth L1]
- Simply solve the problem that the node in the redis cluster cannot read data (error) moved
- Splunk configuration 163 mailbox alarm
猜你喜欢
【使用TensorRT通过ONNX部署Pytorch项目】
【主流Nivida显卡深度学习/强化学习/AI算力汇总】
Mmclassification training custom data
[configuration method of win11 multi-user simultaneous login remote desktop]
redis主从中的Master自动选举之Sentinel哨兵机制
13. (map data) conversion between Baidu coordinate (bd09), national survey of China coordinate (Mars coordinate, gcj02), and WGS84 coordinate system
1 plug-in to handle advertisements in web pages
Multi table operation - sub query
[pytorch pre training model modification, addition and deletion of specific layers]
互联网公司实习岗位选择与简易版职业发展规划
随机推荐
COMSOL -- 3D casual painting -- sweeping
Multi table operation - sub query
【TFLite, ONNX, CoreML, TensorRT Export】
Is investment and finance suitable for girls? What financial products can girls buy?
[mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
【上采样方式-OpenCV插值】
Liunx prohibit Ping explain the different usage of traceroute
Multi table operation - Auto Association query
ACID事务理论
Hash tag usage in redis cluster
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
你做自动化测试为什么总是失败?
Acid transaction theory
C # implements WinForm DataGridView control to support overlay data binding
Principle of redis cluster mode
中非 钻石副石怎么镶嵌,才能既安全又好看?
【主流Nivida显卡深度学习/强化学习/AI算力汇总】
【TFLite, ONNX, CoreML, TensorRT Export】
无线WIFI学习型8路发射遥控模块