Saturday, 17 August 2013

Flipping image causes massive RAM/CPU uses with AForge.net

Flipping image causes massive RAM/CPU uses with AForge.net

Hey all i am trying to figure out why when i flip the image it uses a LOT
of RAM and CPU (its an quad core i7)
I use this code:
Dim filter As New RotateBilinear(180, True)
image = Filter.Apply(image)
If bIsToRecord Then
If writer Is Nothing Then
Dim [date] As DateTime = DateTime.Now
Dim fileName As [String] =
[String].Format("{0},{1}.avi",[date].Minute, [date].Second)
Try
OpenWriter(fileName, image.Width, image.Height)
Catch ex As Exception
If writer IsNot Nothing Then
writer.Dispose()
writer = Nothing
End If
End Try
End If
Try
If radioButton1.Checked Then
writer.AddFrame(image)
Else
mVideoFileWriter.WriteVideoFrame(image)
End If
Catch ex As Exception
System.Diagnostics.Trace.WriteLine(ex.ToString())
End Try
End If
That is WITHOUT flipping the images
WITH the flipping...
Each screenshot was for 30 seconds.
What could be causing this?

No comments:

Post a Comment