0

我必须在矩阵中输入什么值?

Dim clMatriz As Imaging.ColorMatrix = New Imaging.ColorMatrix(New Single()() _
{New Single() {¿?, 0, 0, 0, 0}, _
 New Single() {0, ¿?, 0, 0, 0}, _
 New Single() {0, 0, ¿?, 0, 0}, _
 New Single() {0, 0, 0, ¿?, 0}, _
 New Single() {0, 0, 0, 0, ¿?})
4

1 回答 1

1

虽然我不确定你的颜色矩阵的特定版本是如何工作的,如果你的像素值在 0-255 或 0-1 范围内,那么它应该如何工作:

如果您的像素范围是 0-255:

Dim clMatriz As Imaging.ColorMatrix = New Imaging.ColorMatrix(New Single()() _ {New Single() {-1, 0, 0, 0, 255}, _ New Single() {0, -1, 0, 0, 255}, _ New Single() {0, 0, -1, 0, 255}, _ New Single() {0, 0, 0, 1, 0}, _ New Single() {0, 0, 0, 0, 1})

如果是 0-1:

Dim clMatriz As Imaging.ColorMatrix = New Imaging.ColorMatrix(New Single()() _ {New Single() {-1, 0, 0, 0, 1}, _ New Single() {0, -1, 0, 0, 1}, _ New Single() {0, 0, -1, 0, 1}, _ New Single() {0, 0, 0, 1, 0}, _ New Single() {0, 0, 0, 0, 1})
于 2011-06-20T12:31:39.603 回答