View Full Version : Denoise Filter and D7

August 3, 2006, 00:37:46
Hi, I want to use the Frame Filter for Denoising and got following code in Delphi 7:

procedure TForm1.Denoise1Click(Sender: TObject);

DeNoiseFilter: FrameFilter;
level : OleVariant;
DeNoiseFilter:= ICImagingControl1.FrameFilterCreateString('DeNoise ', 'stdfilters.ftf');

level:= DeNoiseFilter.Get_Parameter('DeNoise Level');

// Set a new denoise level.
level:= 8;
If not ICImagingControl1.LiveVideoRunning then
// A new denoise level can only be set, while the live video is stopped.
DeNoiseFilter.Set_Parameter('DeNoise Level2',level);


Now the line DeNoiseFilter.Set_Parameter('DeNoise Level2',level); causes trouble by running the function. Has anyone any solution. Thanks.

Johannes Vogel
August 3, 2006, 09:11:32

I am so sorry, there is a typo in the documentation. The sample code for setting the parameter uses a wrong paramter name. It is, of course, the same for both setting an getting parameter values. The correct name is 'DeNoise Leve' and NOT 'DeNoise Lvel2'. I am very sorry for that. The coorect code would look like this:

DeNoiseFilter.Set_Parameter('DeNoise Level',level);

August 19, 2006, 18:58:57
Doesn't work as said above. Any solution??

Stefan Geissler
August 22, 2006, 08:07:38
I think the correct syntax is (like documented):

DeNoiseFilter.Set_Parameter('DeNoise Level') := level;

But I am not sure whether this works in Delphi, I never tested this in Delphi anyway.

The link to the documentation is:

August 22, 2006, 22:00:44
if you try, you'llm see the compiler doesn't agree!

Stefan Geissler
August 23, 2006, 07:59:59
I will try it, but I have no Delphi 7.

Stefan Geissler
August 23, 2006, 09:40:52

Got it now. We simply forgot to add the frame filter to the imaging control, we only created it. Please try following code:

procedure TForm1.FormCreate(Sender: TObject);
level : OleVariant;
ICImagingControl31.Device := ICImagingControl31.Devices.Item[1].Name;
DeNoiseFilter:= ICImagingControl31.FrameFilterCreateString('DeNois e', '');

ICImagingControl31.DeviceFrameFilters.Add(DeNoiseF ilter);

level := 4;
DeNoiseFilter.Set_Parameter('DeNoise Level',level) ;

It works fine with Delphi 6.

August 28, 2006, 15:44:29
It works, thanks. Do you post some new frame filters??

Stefan Geissler
August 29, 2006, 08:00:15
Fine to hear that it works.
I am not sure whether we create new filters, because I have only a little time for creating new filters.
But IC comes with frame filter wizards for .NET 2003, so it is easy to create new one (if you have .NET 2003).