Log in

View Full Version : FQuiver a new plugin usage


vcmohan
23rd February 2006, 04:19
Some time back probably in FIZICK's defreq filter thread,some one suggested filtering in freq domain row by row with one dimensional transform instead of using 2d transform. Fizick replied that processing row by row introduces some artifacts. In oil exploration seismic data is routinely processed trace by trace with 1d fft equivalent to row by row process on the image. There artifacts cannot be tolerated. So I wanted to reply but clean forgot due to other work I was engaged in. Recently I came across kiss_fft by Mark Borgdering(and I am grateful for his source code ), and thought to try some ideas. I wrote a plugin FQuiver with two functions. One named 'FQ1Row' for processing row by row and the other 'FQ2d' to process 2d image data in freq domain. This was done so as to complement fizick's defreq. The FFT computation does not need any outside dll support.

I have processed an image which appeared in one of the threads and for which sometime back I developed FanFilter in time domain. The image below is the F1Row test output:
http://img84.imageshack.us/img84/5997/sg1fq1row09hh.th.jpg (http://img84.imageshack.us/my.php?image=sg1fq1row09hh.jpg)

In right top a gamma scaled freq spectrum and below an unscaled spectrum are present. The interfering freq is the sharp peak just a nick above the general freq level, but still clearly seen at 58 Hz. The grey line on top of the spectrum (barely visible as the filter is very gentle) is the filter profile. On left top is the filtered and below is unfiltered image which contains the first row used for spectral display. Using a gaussian notch reject filter ( seen in the right top of image above), gave the following output:

http://img99.imageshack.us/img99/3645/sg1fq1rowfiltered06ys.th.jpg (http://img99.imageshack.us/my.php?image=sg1fq1rowfiltered06ys.jpg)

Then I tried the same input in 2d fft using my new FQ2d filter function. The freq spectrum is on left and unfiltered image on right:

http://img99.imageshack.us/img99/5384/sg1fq2d05rp.th.jpg (http://img99.imageshack.us/my.php?image=sg1fq2d05rp.jpg)

The noise frequencies are overwhelmed by the spectral components of the logo, and can not be seen at all. After cropping the logo the following spectrum was obtained.:
http://img62.imageshack.us/img62/451/sg1fq2dcropped01as.th.jpg (http://img62.imageshack.us/my.php?image=sg1fq2dcropped01as.jpg)
Two specs symmetric at 58,-8 and -58,8 can be seen with some difficulty. Gauss notches at these points produced the following image:

http://img62.imageshack.us/img62/3153/sg1fq2dfiltered06bj.th.jpg (http://img62.imageshack.us/my.php?image=sg1fq2dfiltered06bj.jpg)

Filtering by these two proceedures gave almost equivalent images. As the logo is very strong, there are artifacts in both styles of process, but manifest differently. In case of row by row process the artifacts are seen strongly but only in the rows the logo appears, while in 2d case they are manifest as ghosting all over image. After Cropping out the logo, output of FQ1Row was sans artifacts while F2d processing still had ghosting artifacts. This may be as the vertical freq coordinate is close to the axis.

I tried another image, which has very strong overwhelming noise. FQ1Row worked well.

http://img51.imageshack.us/img51/6403/msintrofq1row00ie.th.jpg (http://img51.imageshack.us/my.php?image=msintrofq1row00ie.jpg)

In FQ2d the power spectrum for this image appears as:
http://img65.imageshack.us/img65/2792/msintrofq2d05fe.th.jpg (http://img65.imageshack.us/my.php?image=msintrofq2d05fe.jpg)

In FQ2d the power spectrum after filtering the vertical bars by notch filter (seen as black lines) is below:

http://img51.imageshack.us/img51/5001/msintrofq2dfiltered06tq.th.jpg (http://img51.imageshack.us/my.php?image=msintrofq2dfiltered06tq.jpg)

The vertical bars are the noise components. This required special filter design, which is included in dll.
Both the functions have the capability to effect homomorphic filtering.


A FQ2d Filter buffer display indicates some possible types of filters. All these operate simultaneously (cascaded).
http://img65.imageshack.us/img65/3136/fq2dfilterdisplay20gx.th.jpg (http://img65.imageshack.us/my.php?image=fq2dfilterdisplay20gx.jpg)

This plugin should be available for down loading in the warpenterprises page in a few days as I have uploaded it yesterday. The size of plugin zip file is a bit heavy at 500kb, due to the documentation. The dll unzipped will be about 104 kb only. This makes me to ask a question. Is it preferable to include illustrative images in documentation or provide links to online site such as imageshack?

foxyshadis
23rd February 2006, 04:34
Richard Berg is almost always willing to provide space for plugin documentation, as part of the avisynth wiki; or even separate webspace on the site, if you ask nicely.

Also, very cool stuff! I'd like to take a look at it in detail sometime.

Pookie
23rd February 2006, 09:26
Nice ! Good examples. I'll try it out the next time I need this.

Fizick
23rd February 2006, 14:24
vcmohan,
1) Thank for your works! It is nice to see improving of frequency filter!
I will try it later.
2) Why you do not use fftw? It is really fastest fft.
3) Really, you can ask Richard Berg for web space similar to "www.avisynth.org/vcmohan" or "vcmohan.avisynth.org", or create your own domain (free or not free).
You will have ftp access to your site and can update it content immediatly.
4) IMHO better to use html doc intead of MS Word doc, especially for pictures storing. There are some free html editors like NVU.

vcmohan
25th February 2006, 04:01
vcmohan,
Why you do not use fftw? It is really fastest fft.
Well I found that I could understand various intricacies of fft with Kiss_fft. FFTW was daunting. Therefore I used this. I will use fftw and transfer this fquiver on to that platform soon. Or may be keep both versions.
IMHO better to use html doc intead of MS Word doc, especially for pictures storing. There are some free html editors like NVU.
I used html documentation only for this plugin.

Thanks for the suggestions.

hartford
25th February 2006, 04:13
Thanks for the new filter.

I've used your's and fizick's to great effect.

Again, thanks.

AVIL
25th February 2006, 17:25
Hi,

I want test the new filter also, but I can`t found it. Not in

http://www.avisynth.org/warpenterprises/

nor in

http://www.avisynth.org/warpenterprises/files/

thanks

Fizick
25th February 2006, 17:49
that is why i suggest to use own homepage :)

vcmohan
26th February 2006, 03:59
Hi,

I want test the new filter also, but I can`t found it.
Hope warpenterprises posts the filter soon.

vcmohan
26th February 2006, 04:02
Hi,

I want test the new filter also, but I can`t found it.
Hope warpenterprises posts the filter soon.
@fizick
Hope Avisynth.org thinks of giving me a page

FredThompson
2nd March 2006, 00:14
The result of the face image is darker. It's hard to see the results in the man's neck because of this. Was this an oversight or is the filter changing the luma?

vcmohan
2nd March 2006, 04:31
The gauss filter is gentler but extends a lot (minutely) over a large area. The FQuiver works on Y plane only. So some effect on amplitude may be felt. I have not rescaled it. There is an option to rescale, but better rescaling options exist in Avisynth core filters. Also in this case the frequency of noise is low and image has also such frequencies. This is seen clearly in the one dimensional casse spectrum.

vcmohan
6th March 2006, 04:10
This plugin is now (atlast) available atFQuiver (http://www.avisynth.org/warpenterprises/#FQuiver) along with documentation.

danpos
6th March 2006, 04:18
@vcmohan

Thanks for sharing your work with us! :) I'll let it a try soon.

Keep up the filter development, fella!

See ya,

AVIL
7th March 2006, 21:13
Hi,

First try of your new quiver ("carcaj" or "aljuba" in spanish) of filters. I have access violations in Vdub. At present always with FQ2d and after cropping in FQ1row. I don't blame your filter though, could be my system. I will continue testing.

I prefer general filters over specialized ones. So I'm very interested in all new apportations to the toolbox.

When filter runs it does well the job.

BTW in FQ2d's documentation there is a mistake:
....
Homomorphic filtering:
FQ2d(last,"gcl",2,50,degree=4,rescale =true,hm=true)
...
parameter hm is rejected. I think it must be morph.

vcmohan
8th March 2006, 03:31
Hi,
I have access violations in Vdub. At present always with FQ2d and after cropping in FQ1row.
It is possible that there are bugs. Please give me details of frame size, color space, crop parameters used and the FQ1Row and FQ2d parameters used so that I can test.

BTW in FQ2d's documentation there is a mistake:
....
Homomorphic filtering:
FQ2d(last,"gcl",2,50,degree=4,rescale =true,hm=true)
parameter hm is rejected. I think it must be morph.

Thanks for pointing out. I will correct it very soon

AVIL
8th March 2006, 21:29
Hi,

I've got a solution for my access violation errors.

First, I have converted the test mov file to avi and used avisource instead qtinput.
Second, I crop before colorspace conversion instead of after.

That way, both filters FQ2d and FQ1row runs flawlessly

vcmohan
14th March 2006, 03:49
The result of the face image is darker. It's hard to see the results in the man's neck because of this. Was this an oversight or is the filter changing the luma?

This also bothered me and I did some tests. The rounding of floating point values to luma values of 0 to 255, introduceded an error of a maximum of 1. However this may be noticeable in very dark areas of image. The image of the post above is relatively dark. The additive noise of regular frequency increased the luma by about 5 and so gave an illusion that the original image was brighter. Eventhough on the minus side it decreased the brightness possibly our eyes do not take note of it. I have corrected for the 1 bit error by scaling with 256/255. (in new version to be posted). Otherwise the process does not change the luma.

DeathWolf
14th March 2006, 12:46
would it be possible to make a version working with a given mask?(even static)

vcmohan
15th March 2006, 04:17
would it be possible to make a version working with a given mask?(even static)
Yes. If it will be useful. The mask can be static or vary frame to frame. I will add another function for the Quiver. Incidentally now I started to use FFTW3.dll for speed and has developed a new plugin. I have named it FFTQuiver. The function you asked for will be in this newer one. As soon as I post the dll, I will announce.

vcmohan
15th March 2006, 12:54
I am ready with the mask function, named as F2QMask. Please see the image below. Left is output, center input and right is mask. Is that the way it should work?

http://img59.imageshack.us/img59/6011/masked02hi.th.jpg (http://img59.imageshack.us/my.php?image=masked02hi.jpg)

BruceL
15th March 2006, 13:02
@vcmohan
Thank you for your great work. I think the most widely used convention as in Virtual Dub is to have the input to the left of the output.

Forensic
19th June 2013, 21:49
I am working (as time and wisdom permits) on creating an automation AVS script for F2Quiver. My goal is to have the TEST output result in suggested settings. Is there any prior work in this area? Any suggestions or guidance?