DIP Related Part

Filter

  1. Types of image
    • Binary: 图像中每个像素的灰度值仅可取0或1,即不是取黑,就是取白,二值图像可理解为黑白图像
    • Gray scale: 图像中每个像素的灰度值仅可取0或1,即不是取黑,就是取白,二值图像可理解为黑白图像
      • Gray=R0.299+G0.587+B0.114Gray = R*0.299 + G*0.587 + B*0.114
    • Color: 每幅图像是由三幅灰度图像组合而成,依次表示红绿蓝三通道的灰度值,即我们熟知的RGB,此时彩色图像要视为三维的[height,width, 3]
  2. Filters
    • Linear
      • Box filter
      • Gaussian filter
        • How to choose kernel width
        • rule of thumb: 设置滤波器的半宽度为3σ\sigma
    • Non-linear
      • Median filter
  3. Kernel
    • The kernel size should be odd, then it has a kernel center and a kernel radius
    • The sum of all the elements in the kernel should be 1, otherwise,
      • >1>1, the image becomes brighter
      • <1<1, the image becomes darker
      • After convolution, some values may be greater than 255 or less than 0, let the values be min(value,255)min(value,255) or max(value,0)max(value,0)
    • Property
      • 线性Linearity: filter(f1+f2)=filter(f1)+filter(f2)filter(f_1 + f_2) =filter(f_1) + filter(f_2)
      • Shift invariance: filter(shift(f))=shift(filter(f))filter(shift(f)) = shift(filter(f))
      • Separability
        • speed up
  4. Convolution
    • properties
      • Commutative
      • Associative
      • Distributes over addition
      • Scalars factor out
      • • Identity
  5. Matlab parameter:
    • edge padding method parameters
      • wrap around(copy image) circular
      • copy edge(extend) replicate
      • reflect acorss edge(symmetry) symmetric

Edge-texture

  1. Edge detection
    • Goal: Identify sudden changes (discontinuities) in an image.
    • edge
    • 梯度Gradient: 对图片求微分的本质就是差分,而差分进一步可以看作为kernel去卷积
      • 梯度的模: G[f(x,y)]=[fx2+fy2]12\|G[f(x,y)] \| = [\frac{\partial f}{\partial x}^2 + \frac{\partial f}{\partial y}^2]^{\frac{1}{2}}