数字图像表示
数字图像有两种表示方式,一是矢量图像(Vector Image),二是位图图像
(Bitmap/raster Image)。
矢量图像(Vector Image),使用点、线、曲线、多边形等几何形状,加上它们的
位置、尺寸等属性信息表示图像。显示图像时要转换成位图图像,这个过程称为
栅格化(rasterization)。矢量图像的优点是放大、缩小不会影响图像质量,多
用于表示字体, Logo等图像。
位图图像(Bitmap/raster Image)是一个数组,每个元素是一个像素 (pixel),
像素值对应的是该像素点的颜色。位图也是图像在计算机内存中的表达方式。
颜色深度,最多支持多少种颜色,一般是用“位”来描述的。如 1位、2位、4位、
8位(索引)、16位(565或者655)、24位(RGB)、32位(RGBA)等。
辅助分析工具
用多种方式可视化图像数据会为数字图像处理带来很大的帮助,常用的辅助工具
有直方图 (Histogram)、色品图 (Chromaticity Diagram) 和 亮度图
(Luminance Profile)。
直方图 (Histogram)
A histogram shows the distribution of low/high (dark/light) samples
within an image.
The bars in the left portion of the histogram shows the amount of
dark/shadow samples in the image, in the middle the mid-tones are
shown and to the right the highlights.
A low contrast image will have a histogram concentrated around the middle. A dark image will have most of the histogram to the right, a bright image uses mostly the right hand side of the histogram, while a high contrast image will have few mid-tone values; making the histogram have an U shape.
色品图 (Chromaticity Diagram)
A chromaticity diagram tells us about the color distribution and saturation in an image. All pixels are plotted inside a color circle, distance to center gives saturation and angle to center specifies hue. If the white balance of an image is wrong it can most often be seen by a non centered chromaticity diagram.
亮度图 (Luminance Profile)
A luminiosity profile is the visualization of the luminance along a straight line in the image. The luminance plot allows a more direct way to inspect the values of an image than a histogram does.
点操作
- 阈值(Threshold)
- 亮度(Brightness)
- 对比度(Contrast)
- 亮度+对比度(Brightness + Contrast)
- 反转(Invert)
- Gamma
- 色阶(Levels)
- Curves
区域操作
- 卷积矩阵(Convolution Matrix)
- 模糊(blur)
重采样
仿射变换(Affine transform)
- 平移(Translation)
- 旋转(Rotation)
- 缩放(Scaling)
扭曲(distort)
- 布(cloth)
- 水波(wave)
- 翻页(page turn)
插值(Interpolation)
- 双线性插值(Bilinear interpolation)
- 双三次插值(Bicubic interpolation)
- 三线性插值(Trilinear interpolation)。
自动颜色调整
- 对比度拉伸 (Contrast stretching)
- 自动白平衡 (Automatic white balance)
- 自动色阶 (auto level)
Reference
- Image Processing with gluas - introduction to pixel molding
|