Get 1 week of unlimited access
Class Notes (1,033,382)
US (405,786)
U of M (6,980)
ENGR (63)
Lecture 5

# ENGR 101 Lecture Notes - Lecture 5: Grayscale, Matlab, Heat Map

4 pages44 viewsFall 2017

Department
Engineering
Course Code
ENGR 101
Professor
Jeffrey Ringenberg
Lecture
5

This preview shows page 1. to view the full 4 pages of the document.
There%are%two%ways%to%represent%intensity:%an%unsigned%integer%between%0%and%
255%or%a%real%number%(a%double)%between%0.0%and%1.0
o
Grayscale)image)representation)
A%grayscale%image%is%just%a%grid%of%intensity%values,%in%MATLAB%%it’s%a%matrix%
r = cat_gray([end:-1:1], :);
hf = cat_gray(:, [end:-1:1]);
vf = cat_gray([end:-1:1], :);
t = cat_gray';
Mat3d(4,%:%,%2)%-fourth%row,%all%columns,%second%layer
RGB:%red,%green%and%blue%
Hue%"which%color?"%(refers%to%the%first%layer)%
o
Saturation%"how%strong%is%the%color?"%(refers%to%the%second%layer)%
o
Value%"how%bright?"%(third%layer)%
o
HSV%is%an%alternate%that%works%well%for%certain%applications%
Channel%values%ranges%from%0%to%1
o
HSV%are%stored%as%3D%array
hsvImg%=%rgb2hsv(img);%
o
To%convert%between%RGB%to%HSV%
Img%=%hsv2rgb(hsvimg);%
o
To%convert%from%HSV%back%to%RGB%
Use%averages%to%make%is%"smoother"
o
To%reduce%the%"noise",%apply%filter%using%imfilter
Start%the%dome_are%picture
Convert%ro%HSV%
Set%the%saturation%=%1%
Convert%back%to%RGB%
Write%a%function%called% heatmap%that%makes%a%heatmap%of%the%area%around%the%
dome%
o
Grayscale)images)
Wednesday,% September% 27,%2017
9:50%AM