Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a memory leak in Algorithms.Rake function?

I am using NI Vision 2009 with VS2008. There appears to be about an 80kb memory leak when using the Algorithms.Rake function. It gets worse if I try to use it in a separate thread. Has anyone else discovered this?

 

My code:

Dim lineReport As New FitLineReport

Dim returnValue As Boolean = False

Dim roi As New Roi

Dim roiCenter As New PointContour(453.5, 240)

Dim roiRotatedRect As New RotatedRectangleContour(roiCenter, 321, 478, 0)

roi.Add(roiRotatedRect)

 

'find straight edge

Dim rakeOptions As New EdgeOptions

 

With rakeOptions

.ColumnProcessingMode = ColumnProcessingMode.Median

.InterpolationType = InterpolationMethod.Bilinear

.KernelSize = 37

.MinimumThreshold = 128

.Polarity = EdgePolaritySearchMode.Rising

.Width = 1

End With

 

Dim rakeReport As RakeReport = Algorithms.Rake(imgVwr.Image, roi, RakeDirection.RightToLeft, EdgeProcess.First, 13, rakeOptions)

0 Kudos
Message 1 of 5
(4,051 Views)

Hello Steve,

 

There has been a similar report on this. Let me investigate this further for you.

Andy Chang
National Instruments
0 Kudos
Message 2 of 5
(4,023 Views)
The previous CAR was closed but it was not well documented on the workaround or any fixes. I've reopened the CAR and will get in touch with our R&D personnel.
Andy Chang
National Instruments
0 Kudos
Message 3 of 5
(4,022 Views)

Can you post the CAR#?

0 Kudos
Message 4 of 5
(4,009 Views)

CAR#222280

 

The RD team is informed of this and there may be a fix in the future. The workaround for this is, since rake is looking for an edge, using SimpleEdge() instead. A way to improve execution time using Simple Edge() would be to increase the space between the Rake's.

Andy Chang
National Instruments
0 Kudos
Message 5 of 5
(3,969 Views)