Vampyre Imaging Library Forum

Imaging Category => Suggestions, Feature Requests, Contributions => Topic started by: jcarlos on 22 March 2008, 17:56:39

Title: New fiter
Post by: jcarlos on 22 March 2008, 17:56:39
Hi.
I think maybe could be included other filter to the file
ImagingCanvases.pas
I was needed to do it and I include 3 new filter, realy maybe two because the average filter for 3x3 and 5x5 is alredy included.

I send here the code for you. (I only send the segment of code that must to be put inside ImagingCanvases.pas like a methods of the "TImagingCanvas"  class)

You are free to use this code like you want. (The code is in the attach).
The code was tested in Lazarus for windows.

For make a test you can include it in the example named
LCLImager

And use the following code to call this methods.

procedure TMainForm.mnPromedioClick(Sender: TObject);
begin
if FImage.Format in FImageCanvas.GetSupportedFormats
      then Begin
              FImageCanvas.CreateForImage(FImage);
              FImageCanvas.ApplyAverage(3);
              UpdateView;
            End;

end;
Title: Re: New fiter
Post by: Galfar on 23 March 2008, 01:32:54
Thanks for the great contribution Juan!
I'll add Median and Threshold filters to Canvas (I'll see about the Avg).

I've wanted to add more filters (point and non-linear) to Canvas for ages but never had the time (working on other parts of library). If you ever add some more functions to Imaging, please don't hesitate to sen them.