AMSS0815
19th February 2007, 22:05
Hi everybody,
finally I managed to create my first AviSynth plugin. This is the abstract (from the filter docu file):
This Shock Filter sharpens edges of images by applying erosions or dilations depending on the sign of the Laplacian (or the so called Haralick-Canny edge detector).
Common sharpening algorithms often evolve the heat equation backwards (so called Gabor algorithm). This is done by convoluting the image with a mask with negative weights (like AviSynths build-in Sharpen function does). As this method violates a so called maximum principle (values of pixels calculated may be outside the value range of the original image), instabilities arise after some iterations, which can be observed as high oscillations.
This filter uses a morphological approach: In each iterations step, pixels are replaced by one of their neighbors. To avoid sharpening noise, a blurred version of the image is used only for the choice of each neighbor. This way high oscillations can be avoided even on large scales.
Warning: It is likely that this plugin violates U.S. Patent 5.664.513 (http://www.patentstorm.us/patents/5644513.html). As a consequence, any distribution and/or use is prohibited in the U.S. For details see the documentation file coming with the plugin. Any infingement might be prosecuted by the patent holders.
Because of this I don't have the heart to publish this filter in this forum. Instead it is published in the German doom9 forum. I encourage everyone outside the U.S. to go to the Shock filter thread (http://forum.gleitz.info/showthread.php?p=321585#post321585) there and download and try it.
If you have some comments on this plugin (technically or legally), please don't hesitate and post it here - every comment is wellcome!
Here are some problems I came across during the development:
I'm using Kevin Atkinsons great C-Plugin-Interface, and the file AviSynth_C.dll is needed for the plugin to operate. As far as I understand this file isn't needed in newer versions of the C-Interface. When I simply replace AviSynth_C.lib with AviSynth.lib that comes with the latest AviSynth version (and modify the Makefile accordingly), gcc gives me a couple of errors like AVSShock.obj(.text+0x1e):AVSShock.c: undefined reference to `_imp__avs_add_function@20'. Has anyone any experiences in compiling plugins with gcc?
Is malloc/free the correct way to allocate/free memory needed inside the GetFrame function?
I hope publishing in the German forum and discussing in the English forum does not violate any forum rules. I apologize otherwise :o
Best regards,
AMSS
finally I managed to create my first AviSynth plugin. This is the abstract (from the filter docu file):
This Shock Filter sharpens edges of images by applying erosions or dilations depending on the sign of the Laplacian (or the so called Haralick-Canny edge detector).
Common sharpening algorithms often evolve the heat equation backwards (so called Gabor algorithm). This is done by convoluting the image with a mask with negative weights (like AviSynths build-in Sharpen function does). As this method violates a so called maximum principle (values of pixels calculated may be outside the value range of the original image), instabilities arise after some iterations, which can be observed as high oscillations.
This filter uses a morphological approach: In each iterations step, pixels are replaced by one of their neighbors. To avoid sharpening noise, a blurred version of the image is used only for the choice of each neighbor. This way high oscillations can be avoided even on large scales.
Warning: It is likely that this plugin violates U.S. Patent 5.664.513 (http://www.patentstorm.us/patents/5644513.html). As a consequence, any distribution and/or use is prohibited in the U.S. For details see the documentation file coming with the plugin. Any infingement might be prosecuted by the patent holders.
Because of this I don't have the heart to publish this filter in this forum. Instead it is published in the German doom9 forum. I encourage everyone outside the U.S. to go to the Shock filter thread (http://forum.gleitz.info/showthread.php?p=321585#post321585) there and download and try it.
If you have some comments on this plugin (technically or legally), please don't hesitate and post it here - every comment is wellcome!
Here are some problems I came across during the development:
I'm using Kevin Atkinsons great C-Plugin-Interface, and the file AviSynth_C.dll is needed for the plugin to operate. As far as I understand this file isn't needed in newer versions of the C-Interface. When I simply replace AviSynth_C.lib with AviSynth.lib that comes with the latest AviSynth version (and modify the Makefile accordingly), gcc gives me a couple of errors like AVSShock.obj(.text+0x1e):AVSShock.c: undefined reference to `_imp__avs_add_function@20'. Has anyone any experiences in compiling plugins with gcc?
Is malloc/free the correct way to allocate/free memory needed inside the GetFrame function?
I hope publishing in the German forum and discussing in the English forum does not violate any forum rules. I apologize otherwise :o
Best regards,
AMSS