图像处理的有用资料
y(i,j)=bmap(I(i,j)+1); end end
y=uint8(y); figure; imshow(y);
VB
来自 VB图像处理之图像的色彩纠正
Private Type ColorChart
ColorCount(255) As Long '统计原来图片中的亮度出现次数 PixcelCount As Long '记录图片的像素个数
ColRatio(255) As Single '记录每一个亮度的出现比例 NewVal(255) As Byte '存放新的亮度索引 End Type
Dim ColChart As ColorChart
Public Sub StatisticsChart() Dim R As Byte Dim G As Byte Dim B As Byte
Dim Gray As Integer Dim X As Long Dim Y As Long Dim I As Long Dim L As Long Dim M As Long Dim C As Double
On Error GoTo ErrLine
Done = False
TimeFilter = timeGetTime With ColChart
For X = 0 To 255 '先把数组清零 .ColorCount(X) = 0 Next
For X = 0 To OutPutWid '这两个循环用来扫描图片数据,记录每个点的灰度和出现次数
For Y = 0 To OutPutHei