PDA

View Full Version : Denoise Filter and D7



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

procedure TForm1.Denoise1Click(Sender: TObject);

var
DeNoiseFilter: FrameFilter;
level : OleVariant;
begin
ICImagingControl1.LiveStop;
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);
ICImagingControl1.LiveStart;

end;


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, 10:11:32
Hello,

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);

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

Stefan Geissler
August 22, 2006, 09: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:
http://www.imagingcontrol.com/ic/docs/html/activex/stdfilterDeNoise.htm

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

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

Stefan Geissler
August 23, 2006, 10:40:52
Hello,

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);
var
level : OleVariant;
begin
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) ;
end;

It works fine with Delphi 6.

brüll
August 28, 2006, 16:44:29
It works, thanks. Do you post some new frame filters??

Stefan Geissler
August 29, 2006, 09: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).