当前位置:网站首页>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
边栏推荐
- 1. Laravel creation project of PHP
- ABAP table lookup program
- Linux Installation and deployment lamp (apache+mysql+php)
- Codeworks 5 questions per day (1700 average) - day 5
- Check the debug port information in rancher and do idea remote JVM debug
- Programmers are involved and maintain industry competitiveness
- Error modulenotfounderror: no module named 'cv2 aruco‘
- 阻止浏览器后退操作
- Open3d mesh (surface) coloring
- [cloud native | kubernetes] actual battle of ingress case (13)
猜你喜欢

一次生产环境redis内存占用居高不下问题排查
![[upsampling method opencv interpolation]](/img/6b/5e8f3c2844f0cbbbf03022e0efd5f0.png)
[upsampling method opencv interpolation]

Codeworks 5 questions per day (1700 average) - day 5
![[yolov3 loss function]](/img/79/87bcc408758403cf3993acc015381a.png)
[yolov3 loss function]

redis 集群模式原理

【PyTorch预训练模型修改、增删特定层】
![[crawler] bugs encountered by wasm](/img/29/6782bda4c149b7b2b334238936e211.png)
[crawler] bugs encountered by wasm

Splunk configuration 163 mailbox alarm

Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle

多表操作-子查询
随机推荐
yolov5目標檢測神經網絡——損失函數計算原理
XML parsing
liunx禁ping 详解traceroute的不同用法
11. (map data section) how to download and use OSM data
Uniapp + unicloud + Unipay realize wechat applet payment function
Solve readobjectstart: expect {or N, but found n, error found in 1 byte of
Simply solve the problem that the node in the redis cluster cannot read data (error) moved
Wireless WiFi learning 8-channel transmitting remote control module
How can China Africa diamond accessory stones be inlaid to be safe and beautiful?
1 plug-in to handle advertisements in web pages
Install esxi 6.0 interactively
pytorch-权重衰退(weight decay)和丢弃法(dropout)
Linux安装部署LAMP(Apache+MySQL+PHP)
[singleshotmultiboxdetector (SSD, single step multi frame target detection)]
Yolov5 target detection neural network -- calculation principle of loss function
Is investment and finance suitable for girls? What financial products can girls buy?
View all processes of multiple machines
C # implements WinForm DataGridView control to support overlay data binding
Network five whip
手机 CPU 架构类型了解