![](https://csdnimg.cn/release/download_crawler_static/86282412/bg1.jpg)
The First assignment of Imaging Procesing
Yuyl-2016210426
March 13, 2017
1 Input the test images to the MATLAB
For solving this task, all we need to do is just simply using the imread() function.
For example im = imread(’strawberry’);
2 Counting and representing the pixels for dif-
ferent intensities or different colors
I will directly get to solve the color images, the core of the implementation is to
use find() and length() functions. By taking advantage of loop instruction, we
can realize the algorithm:
for ii = 1:3
for jj = 1:256
...
end
end
3 Implementing the interpolation functions for
a gray-scale images
The principle is just to use linear interpolation twice, and the formula is like:
f(x, 0) =
x − 1
0 − 1
∗ f(0, 0) +
x − 0
1 − 0
∗ f(1, 0) (1)
f(x, 1) =
x − 1
0 − 1
∗ f(0, 1) +
x − 0
1 − 0
∗ f(1, 1) (2)
Conbine two formula above:
f(x, y) =
y − 1
0 − 1
∗ f(x, 0) +
y − 0
1 − 0
∗ f(x, 1)
1
评论0
最新资源