Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#21 | Link | |
|
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
Quote:
I assume you are talking about my try. Because I can't see any lines in VC's filter result. I did another pic for you. I just didn't process the top and bottom 100 lines. Looking at the problem in the origninal, it looks like the pattern is only in the middle. Not sure why this is. Maybe just this frame. I do want to repeat that I am goofing with this frequency stuff ... which is farily cool ... and VC is the one with the practical filter. Also, I believe I am doing the basic same thing that Fizick was doing. It might be that the parameters were not set well when defreq was used. @VC, Please feel honored that Wilbert is pestering you about the source code. I've been trying to get him to look at mine for months.
|
|
|
|
|
|
|
#22 | Link |
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
I thought that the interference frequencies being much smaller than the TV signal or scan line frequencies one will invariably notice the interference as being oriented vertical to diagonal. I calculated that the freq of interference in the example above to be around 40khz. I thought that a similar interference appearing horizontal was impossible.
Yesterday I was watching the History channel wherein in some scenes (flash backs) pure horizontally oriented interference is seen. May be they are deliberately done to give flash back impression. I am curious to know whether any one experienced a horizontal interference noise. What explanation will it have. May be the 40khz is a beat frequency? In any case I will make a function to deal with this type of interference also for possible use. |
|
|
|
|
|
#23 | Link | |
|
Useless idea generator
Join Date: Apr 2004
Location: Europe, Czech Republic, Brno
Posts: 332
|
Quote:
causing heavy electric regular noise/interference on power lines
__________________
Vista64 Premium SP2 / C2D E4700 2.6GHz/ 6GB RAM/ Intel GMA 3100 / DTV Leadtek DONGLE GOLD USB2 / focused to DVB-T MPEG2 PS capture -> ProjectX -> M2V/MP2 -> MeGUI/AVS -> MP4[AVC/AAC] |
|
|
|
|
|
|
#25 | Link |
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
Well thats a tough one. Can you give me the url for that virtualdub forum thread where it was posted?
I tried my FanFilter and found that it can hardly do any thing. Then I examined the pixelvalues using PixelValues plugin (incidentally for some image sizes this plugin gives access violation errors. I did not go deep into that.) I found that the interference amplitude is about 60 i.e. it swings from +60 to -60. Some places it is more. I realised that I need to formulate a filter on opposite princeples (opposite to my FanFilter). I also expect that in the process of removing such large value noise I will lose quite a bit of signal also. I changed my FanFilter into VFanFilter, HFanFilter to be effective in vertical and horizontal (these are seemingly Vertical and Horizontal but in reality they are reverse) directions. I also added to this plugin family of functions VFanPass and HFanPass functions. I also had to liberalise restrictions of values for parameters to be able to use in extreme cases but leave it to the user to use his judgement. The Filter is ready and I tested on the image above. After VFanPass I had to cleanup image of horizontal streaks with HFanFilter. The resulting image is : ![]() using subtract.levels the noise removed is below: ![]() As expected the image after processing is not as good as one likes it to be. Also I did not experiment with the filter params. This is a first cut. After updating the documentation, I plan to release this newer version of FanFilter Plugin shortly hopefully before my 71st birthday. |
|
|
|
|
|
#26 | Link |
|
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
I thought you'd like that one.
![]() I think it was here. http://forum.doom9.org/showthread.php?s=&threadid=91098 Not much was said ... and he removed the pictures. I had just saved that one because I thought it was nice. Your filter did well. Although from looking at the subtract, I see a few of the edges gone. I've recently been working on an image spectrum analyzer vdub plugin. Really just for learning purposes. It displays the 2D power spectrum. I did a small write up. Maybe you'd like to take a look? [edit] Updated url http://www.trevlac.us/FilterDocs/Filters.htm ------------------- 70 and learning new things every day? Well ... I've still got a few years to catch up. I'm 38.
Last edited by trevlac; 22nd April 2005 at 19:07. |
|
|
|
|
|
#27 | Link |
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
Thanks very much for the info. Infact I am looking to get hold of a fft plugin source, an inverse fft plugin source, from which i can get the coefficients to design some filters. Having a bit of aversion to all those mathematical symbols curls, matrix notations etc I can hardly understand those published software to be able to port to avisynth as a plugin for my use. I will study your source try understand.
Your plugin thru freq domain route did remove those noise freq except for a horizontal streak. Theoritically your approach is sounder than mine.Probably looks cleaner in result. But mine working in time domain works faster and does not require too much understanding of 2D fft. Very sharp edges are difficult to remove in freq domain. A short operator in time domain has a long spectrum in freq and vice versa. Please see the thread http://forum.doom9.org/showthread.php?s=&threadid=93229 . Freq domain filtering in this case may not work, I think. I have been trying to do a notch filter in time domain but got stuck as I could not get hold of the impulse response of a notch filter. These we were using in oil exploration to remove power line interference. I urge you to please devout some time on this plugin of yours and finish it early. Last edited by vcmohan; 22nd April 2005 at 04:31. |
|
|
|
|
|
#29 | Link | |
|
Alias fragger
Join Date: Jul 2003
Location: the Netherlands
Posts: 863
|
Quote:
See here especially the second bullit. I wonder in how far they can enforce the license (how many ways are there to program a bubble sort ?) but I thought I mention it anyway. |
|
|
|
|
|
|
#30 | Link | ||||
|
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
Quote:
Quote:
Quote:
Quote:
AVS is probably a better place for a real (and fast) FFT filter. Of course Fizick and tsp have really already done that.PS: I've recently been trying to figure out (phase) cross-correlation. I think they use this in the various deshake/depan plugins. The interesting area being motion estimation. |
||||
|
|
|
|
|
#31 | Link | ||
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
Quote:
Can you give a url for a place where I can get a 1D FFT routine that gives me coefficients. Quote:
I tried cross correlation on the first image in this thread to determine whether I can extract noise wavelength and its amplitude.I could get the wavelength to be between say 11 and 12. But could not proceed further when I realised that this much accuracy is not good enough unless I do a cross correlation continuously to determine best filtering position for each pixel. So I gave up. Last edited by vcmohan; 23rd April 2005 at 03:52. |
||
|
|
|
|
|
#32 | Link |
|
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
@VC
You know much more than I, my friend. ![]() But on the symmetrical bit ... yes. That helps quite a bit. To be specific on speed using FFTW ... and doing that bad pic takes .. - Copy all input luma to an array of doubles ... 640x480 values - FFT - Now you have an array of pairs (sin & cos) but only 1/2 the input 320x480x2 - process about a 20 pixel wide band 20x480x2 setting the doubles to zero - IFFT - Copy the luma back ... unfortunately you have to scale and clamp these values before you really have luma - done ------------------ www.fftw.org is the main place. http://www.fftw.org/#documentation is the doc. I used version 2 because I could not get a library for v3 nor could I compile it. It says 3 is faster. Here is v2 Doc and library / .h file info. http://www.fftw.org/fftw2_doc/ http://claymore.engineer.gvsu.edu/~s.../software.html 1D transform giving the power specturm ... basicly what I show. 2D has a little different format. Not really much code to do this. http://www.fftw.org/fftw2_doc/fftw_2.html#SEC5 Code:
#include <rfftw.h>
...
{
fftw_real in[N], out[N], power_spectrum[N/2+1];
rfftw_plan p;
int k;
...
p = rfftw_create_plan(N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);
...
rfftw_one(p, in, out);
power_spectrum[0] = out[0]*out[0]; /* DC component */
for (k = 1; k < (N+1)/2; ++k) /* (k < N/2 rounded up) */
power_spectrum[k] = out[k]*out[k] + out[N-k]*out[N-k];
if (N % 2 == 0) /* N is even */
power_spectrum[N/2] = out[N/2]*out[N/2]; /* Nyquist freq. */
...
rfftw_destroy_plan(p);
}
|
|
|
|
|
|
#33 | Link | |
|
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,182
|
trevlac,
Why Quote:
Do you see Defreq source? it used all needed parts of FFTW3 library. The lilrary is dll + def + include file. I did not use any fftw source.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
|
|
|
|
|
|
#34 | Link |
|
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
Fizick,
I did want to thank you. I don't know if you recall, but in a thread a while back ... I was interested in doing a full frame FFT and quite a few said it could not be done and was not worth it. You offered to help and pointed me in the right direction. I never did really look at your source. I didn't realize it was in the zip files. Once I saw you used FFTW, I just read their doc. It made getting one working quite easy. Understanding what I am looking at ... that's not as easy. ![]() I could not find the lib or def files for v3. I guess I should upgrade when ever I clean up my vdub filter. The format is a little different from v2 to v3. Thanks for the tip.
|
|
|
|
|
|
#35 | Link | |
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
Quote:
As most of the plugins did not carry the src tag I thought they do not have the source code. That was my mistake. About EffectsMany and TransAll the source code is large and I find that each time I update a small bit of a function code, I need to not only upload the full dll and documentation, now the source code also which adds to my metered time on net. The documentation for these two dlls is large due to examples which are necessary to get an idea as to what it does. I have to find a solution for it which does not force an user to be on net. |
|
|
|
|
|
|
#36 | Link |
|
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,182
|
So, now the most of rest fingers is my ...
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
|
|
|
|
|
#37 | Link | ||
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,390
|
Quote:
Quote:
|
||
|
|
|
|
|
#38 | Link | |
|
Registered User
Join Date: Jul 2003
Location: India
Posts: 916
|
Quote:
The examples are jpeg format. I resized them to about 250 X 200 but I lose some detail. For each of a transition function I need 3 or 4 of such pics. There are over 25 functions. In EffectsMany Plugin I have about 30 functions. |
|
|
|
|
|
|
#39 | Link |
|
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,182
|
vcmohan,
I think you must create your own simple website (webpages).
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
|
|
|
![]() |
|
|