背景差分法

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

% 图像反
O = a .* I + b/255;
figure(1);subplot(1,5,5);imshow(O); title('a=-1,b=255,图像反色','fontsize
8
Linear Transformation Functions
d
g
(
x,
y)

d b
c a
Hale Waihona Puke Baidu
[
I=imread('eight.tif');
%读取一幅图片
I = im2double(I);
% 转换数据类型为double
figure(1);subplot(1,5,1);
imshow(I); title('原图像','fontsize',7); % 显示原图像
a = 2; b = -50;
% 增加对比度
(a)Form of transformation function
(b)A low-contrast image (c)Result of contrast stretching (d)Result of thresholding
11
原始图象 (Original image)
12
灰度倒置 底片效果
比如:显微镜下看到的图像,将其值扩大到可见范围
4
3.2 点运算 (Point Operation)
点运算的分类 线性变换(Linear transformation) 非线性变换(Non-linear transformation)
5
rs ar b
3.2.1线性变换(Linear Transformation)
2
3.1 概述(Introduction)
Background
Categories
Operation in spatial domain 根据输入图像得到输出图像处理运算的数学特征进行 如下分类。
点运算(Point operation):对每个像素点的像素值进行变换。 代数运算(Algebra operation):对二幅或多幅图像像素
title('a=0.5,b=-50,减小对比度','fontsize',7);
a = 1; b = 50;
% 线性增
O = a .* I + b/255;
figure(1);subplot(1,5,4);imshow(O);
title('a=1,b=50,线性平移增加亮度',
a = -1; b = 255;
(Image negative)
13
3.2.1非线性变换(Linear Transformation)
非线性变换(Non-linear transformation)
典型的非线性变换函数有:对数函数、指数函数、幂函数、 阈值函数、多值量化函数、窗口函数等。
对数变换(log transformation)
线性变换(Linear transformation)
输入图像的灰度级与输出图像的灰度级呈线性
关系,即
s ar b
r 为输入图像点的灰度值
s 为相应输出点的灰度值
Figure 3.1 Linear transformation
6
(1)a=1,b=0,则只需将输入图像复制到输出图像即可。
f
(x,
y)

a]

c
c
g(x,y) d
f (x, y) b a f (x, y) b f (x, y) a
c
0
a
b
9
f(x,y)
Piecewise Linear Transformation
Mg

M
f
d b
[
f
( x,
y)
b]
d
g ( x,
y)

d

O = a .* I + b/255;
figure(1);subplot(1,5,2);
imshow(O);title('a=2,b=-50,增加对比度','fontsize',7);
a = 0.5; b = -50;
% 减小对比度
O = a .* I + b/255;
figure(1);subplot(1,5,3); imshow(O);
s = c log(1 + r)
r
s =log(1+r) s
r
Figur1e43.2 log transformation
b
c a
[
f
( x,
y)

a]

c
c

a
f
(x, y)
g(x,y) Mg
d
b f (x, y) M f a f (x, y) b 0 f (x, y) a
c
0
a
b
Mf 10 f(x,y)
me Example of Piecewise Linear transformation
若a=1,而b 0,则操作结果是仅使所有像素的灰度值
上移或下移,其效果是使整个图像在显示时更亮或更暗。 (2)如果 a>1,则输出图像对比度增大。 (3)如果 a<1,则输出图像对比度降低。 (4)如果 a<0,即为负值,则暗区域将变亮,亮区域将
变暗,点运算完成了图像求补。
7
线性变换Matlab实现示例:
Point operation—像素值变换
对图像的每个像素点的像素值按照一定的映射关系进行
运算,得到一幅新图像的过程。
有规律地改变像素点的像素值。
对比度增强或拉伸(Contrast stretching)
改变图像灰度值所占据的范围,将关注部分的灰度级范 围扩大。
点运算--变换像素值的单位
值进行加、减、乘、除。
逻辑运算(Logical operation):对二幅二值图像像素值进 行逻辑与、或、非。
几何运算(Geometric operation):不改变像素的像素值, 而改变像素所在的位置。如:平移、镜像、旋转、缩小、放大等。
3
3.2 点运算 (Point Operation)
数字图像处理
Digital Image Processing
信息工程学院 School of Information Engineering
第3章 图像基本运算
(Basic Operation in Digital Image Processing )
3.1 概述(Introduction) 3.2 点运算 (Point Operation) 3.3 代数与逻辑运算 (Algebra and Logical Operation) 3.4几何运算 (Geometric Operation)
相关文档
最新文档