P
ProtossLee
Hi,
I am currently working on a project for image processing.
a double matrix m1(1300X1000) need to be converted into bitmap and
displayed on screen.
so far I've made the following code:
For i = 1 To 1300
For j = 1 To 1000
Sgl = Matrix(i, j)
color = CInt(255 * (Sgl - SglMin) / (SglMax - SglMin))
bmp.SetPixel(i, j,
System.Drawing.Color.FromArgb(color, color, color))
Next j
Next i
Basically, I rescale each element of the matrix into [0,255] and draw
the pixel of the corresponding bitmap.
However, this takes too much time (more than 1sec).
Is there any better way to do this?
I am currently working on a project for image processing.
a double matrix m1(1300X1000) need to be converted into bitmap and
displayed on screen.
so far I've made the following code:
For i = 1 To 1300
For j = 1 To 1000
Sgl = Matrix(i, j)
color = CInt(255 * (Sgl - SglMin) / (SglMax - SglMin))
bmp.SetPixel(i, j,
System.Drawing.Color.FromArgb(color, color, color))
Next j
Next i
Basically, I rescale each element of the matrix into [0,255] and draw
the pixel of the corresponding bitmap.
However, this takes too much time (more than 1sec).
Is there any better way to do this?