img1 = img1(1:f:end,1:f:end);我认为是分别从行列两个方向,分别是从1到最后,然后步长是f的慢慢移动。
我是遇到这个问题才查的冒号问题,知道这个是使图像尺寸减小。
在这个链接里面可以看出来https://blog.csdn.net/kungChang/article/details/51669677
https://blog.csdn.net/zhangliaobet/article/details/80712165
下面是在MATLAB中help查到的冒号的用法。
Using the colon with integers,
D = 1:4
results in
D =
1 2 3 4
Using two colons to create a vector with arbitrary real increments between the elements,
E = 0:.1:.5
results in
E =
0 0.1000 0.2000 0.3000 0.4000 0.5000
The command
A(:,:,2) = pascal(3)
generates a three-dimensional array whose first page is all zeros.
A(:,:,1) =
0 0 0
0 0 0
0 0 0
A(:,:,2) =
1 1 1
1 2 3
1 3 6
Using a colon with characters to iterate a for-loop,
for x='a':'d',x,end
results in
x =
a
x =
b
x =
c
x =
d