翻转图像会导致AForge.net使用大量RAM / CPU

时间:2013-08-18 00:12:04

标签: aforge

嘿所有我想弄清楚为什么当我翻转图像时它会使用大量的RAM和CPU(它的四核i7)

我使用此代码:

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

enter image description here 这是没有翻转图像

enter image description here 随着翻转...

每次截图持续30秒。

导致这种情况的原因是什么?

0 个答案:

没有答案