Monday, March 12. 2007Time-frequency shifts of a 2D-Gaussian
The modulated Gaussian I showed previously was just illustratory and did not consider mathematical properties such as FT-invariance. For that, it has to be periodized, normalized and centered at the borders. The MATLAB script gaussnk.m by N. Kaiblinger from the NuHAG toolbox implements this by evaluating the Gauss function on a wider interval and then wrapping it into the desired signal length. I tried to do that for the 2D case, but here I’m not sure about the term “signal length”, it should actually be the number of pixels. I wrote a first gauss2.m which creates a 2D-Gaussian on a square with almost all desired properties. However, the normalization seems to be wrong, as it does not fulfill What I was trying to do was doing localized FFT2’s on a test image. I shifted an arbitrarily selected Gaussian like a spotlight aver an image and did FFT2’s of that. However, on white walls the result didn’t show the desired FT-invariance of the Gaussian. So I had to think of the aforementioned normalizing tasks. Then I was confused that shifts of a Gaussian actually result in modulations on the FT-side. But shouldn’t we want to stay the FT all the same while shifting the Gaussian over a white wall in the input image (and having an unchanged Gaussian at every spot)? Yes, but only as long as we don’t want to be able to invert the FT! Here, we’d need the modulations to get back to the corresponding shifts on the input image. So, if only the spectra are interesting, one should look at the absolute values of the FT which will make the modulation factors disappear (because they have an absolute value of 1). Another thing I came over was this; look at the following example image: On the left half is the input, and the right half shows the absolute values of the FFT2. The input almost looks like a modulated Gaussian. Why doesn’t it simply shift on the output image? Because in the input, the black values of the surroundings match the black values of the line pattern! If the input should represent a modulated Gaussian, the black lines should have value -1, and the surroundings a gray level of 0. I’ll correct this soon.
![]() ![]() I like to rotate the output by 90° to match the orientation of the shifts with that of the lines in the input. Notice that I shifted the mid tones in the output image and that I always get another Gaussian in the center. This is the one I have to get rid of. Also, I get some kind of symmetry, the cause of which I haven’t found out yet but might also be due to the scaling issue. For that, I visualized the TF- and FT-behavior of my 2D-Gaussian: Continue reading "Time-frequency shifts of a 2D-Gaussian" Saturday, March 10. 2007Modulating a 2D-Gaussian
I tell a little about what I did with Octave during the last days. This is the first part and it's about creating a video of a modulated Gaussian. The second part is about doing FFT's of time-frequency shifted Gaussians. I figured out how to merge images into a video stream. I rely on Linux tools rather than trying to do it from within Octave, because I don't know whether libraries for creating videos are somehow available there. However, I wrote an M-file which creates images of a modulated 2D-Gaussian. The 2D-frequency changes by going on a spiral in the complex plane starting from the origin. This yields a modulation which is rotating while the line-pattern gets narrower: I merged the bunch of 900 images to a video by using MEncoder, the open-source encoder from the MPlayer suite. I did it this way:
$ mencoder mf://out*png -ovc lavc -mf fps=25 -o rotgauss.avi
I know, the usage of a proprietary container format is a contradiction to using open-source tools, but I only want to care about such details later. I won't publish the M-file here, as it's too basic. Haft
Der Arzt befindet sich in Untersuchungshaft.1
Reineke Fuchs befindet sich in Fabelhaft. Das Wetter befindet sich in Wechselhaft. Der Sträfling befindet sich in Musterhaft.2 Der Gefangene befindet sich in Gefangensc-Haft. Der Lehrer befindet sich in Vorbildhaft. Die Spinnerin am Kreuz befindet sich in Sagenhaft. Der Gläubige befindet sich in Sündhaft. Der Gottlose befindet sich in Glaubhaft. Das Leben befindet sich in Sinnhaft. Das Exemplar befindet sich in Beispielhaft. Der Sponsor befindet sich in Gönnerhaft. Der Repetent befindet sich in Mangelhaft. Der Sänger befindet sich in Stimmhaft. Der Wagen befindet sich in Schadhaft. Schneewittchen befindet sich in Märchenhaft. Der Kämpfer befindet sich in Heldenhaft. Die Elfe befindet sich in Zauberhaft. Barbie befindet sich in Puppenhaft. Der Hundefreund befindet sich in Katzenhaft. (Naja) Der Geistliche befindet sich in Geisterhaft. Der Ängstliche befindet sich in Gespensterhaft. Die Gräser befinden sich in Frühlingshaft. Der Clown befindet sich in Lachhaft. Die Tratschtante befindet sich in Schwatzhaft. Der Korrektor befindet sich in Fehlerhaft. Die Braut befindet sich in Schleierhaft. Der Wachposten befindet sich in Standhaft. Der Maler befindet sich in Bildhaft. Die Fettleibigen befinden sich in Massenhaft. Der Karateka befindet sich in Wehrhaft. 1 Wo er gezwungen wird, Untersuchungen zu machen.
2 Streifenmuster! Monday, March 5. 2007Strange connections to Apache from 127.0.0.1I posted my question to comp.os.linux.security and continued the discussion on the Serendipity mailing list. For the sake of documentation and to provide another spot in the net with a solution, I repeat the posting here: I wondered about strange HTTP connections from 127.0.0.1 appearing in my access.log at irregular times:
127.0.0.1 - - [16/Jan/2007:17:25:23 +0100] "GET /" 400 584 "-" "-"
127.0.0.1 - - [16/Jan/2007:17:25:26 +0100] "GET /" 400 584 "-" "-"
What irritated me was that those requests originate locally, are invalid (400 = Bad Request) and have no User-Agent identification string. [...] I finally found out that this ought to be Apache-2.2’s internal dummy connections. They had the above form as long as my Apache-SSL config looked like
NameVirtualHost *:443
<VirtualHost *:443>
...
</VirtualHost>
Now, I use the IP instead of the ‘*’ and—lo and behold—the requests transform into
127.0.0.1 - - [21/Feb/2007:19:08:52 +0100] "GET / HTTP/1.0" 200
3202 "-" "Apache/2.2.3 (Debian) PHP/5.2.0-8 mod_ssl/2.2.3
OpenSSL/0.9.8c (internal dummy connection)"
I didn’t want to spend much time trying to understand what that dummy connections are good for. It seems like Apache2 kills some of its children such that the number of MaxSpareServers isn’t exceeded. And I wasn’t aware that the Apache syntax ‘*:443’ is somehow deprecated.
Posted by Stephan Paukner
in GNU/Linux
at
15:28
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: apache
Sunday, March 4. 2007What next?
HGFei is leaving Austria in summer 2007 to go to Australia until Christmas 2007. I’d have to have my thesis finished by the end of June 2007. He asked me to give a schedule to be able to finish it by the end of the current term. Of course, regarding my scholarship, I should have finished it by July 2007 anyway. But I currently don’t know what the schedule could look like. I don’t know what my thesis could or should look like in the end, and therefore I don’t know what path to take to go there, and therefore I don’t really know my next steps. He said I shouldn’t be too ambitious and should produce a spate of demos now. But I don’t actually know what these should demonstrate. Maybe that kind of panic is somehow natural, but I’m not comfortable with that. Sure, I have time now for doing my thesis, and I really have to make use of it. I still have plenty of literature to read. What I had done in February was starting to write the introductory chapter with LaTeX. That was a step what had to be done anyway, I can concentrate mostly on the content now. I wrote some pages about the foundations of TF-analysis, including some more side notes that are usually not mentioned in the other Master’s theses at my institute. As one of the next things I want to get familiar with the computing language of MATLAB/Octave. During the last days I did some experiments with FFT2, and I might write down some results here in the blog. Now I know how to do different things in Octave, I produced some pictures and rendered them to videos. This might provide some munition for doing 2D-Gabor Analysis. Now I should look how to finally do image processing using Gabor Analysis methods. In our last conversation at the end of December 2006, HGFei told me some results on how to use the 1D-algorithms for higher dimensions, because their tools actually only provide algorithms for 1D-signals. I’d be the first to actually use that in the 2D-case. To understand how this is obtained I’d have to be familiar with the basics of GA on groups—a rather abstract approach. And mapping 1D to 2D implies that I can do it in the 1D case also. At least, if I can’t provide a schedule and don’t know how to be done by the end of this term, I know what my next steps are. He also mentioned that I simply should do some basic experminents such as thresholding, i.e., doing reconstructions by leaving out coefficients with low contribution; this is a leering to the task of image compression. Tomorrow, the summer term is starting, and I’ll attend HGFei’s project seminar on numerical harmonic analysis, where we’ll have to approach different problems using MATLAB. Friday, February 23. 2007What the hell is rotating my mail.log?I want to keep track of the spam scores that show up in my /var/log/mail.log on my Debian Etch machine. My idea was to run a shell script grep’ing the wanted info out of the mail.log right before that file is to be rotated. logrotate provides configuration options for how and when log files should be rotated. This includes a possibility to run a script right before and after the rotation is done. So, I created a configuration /etc/logrotate.d/mail like
/var/log/mail.log /var/log/mail.info {
...
sharedscripts
prerotate
/usr/local/sbin/extract-spamscores
endscript
postrotate
/etc/init.d/sysklogd reload-or-restart
endscript
}
sysklogd is Debian’s package containing syslogd and klogd. The syslog itself already cares for rotating the basic log files, and this includes /var/log/mail.{log,info,warn,err}. sysklogd contains the cron-jobs /etc/cron.daily/sysklogd and /etc/cron.weekly/sysklogd, both of which contain logic for rotating the system’s log files. To obtain the list of the log files, the command syslogd-listfiles is issued in both of the scripts—the weekly script uses the option --weekly. When I issue syslogd-listfiles, I only get /var/log/syslog as answer, whereas with --weekly I get:
# syslogd-listfiles --weekly
/var/log/mail.warn
/var/log/uucp.log
/var/log/user.log
/var/log/daemon.log
/var/log/messages
/var/log/debug
/var/log/auth.log
/var/log/mail.err
/var/log/mail.log
/var/log/kern.log
/var/log/lpr.log
/var/log/mail.info
So I have to use the -s switch to exclude mail.log and mail.info such that logrotate can take care of them. As I also have a separate config for /var/log/messages in /etc/logrotate.d/messages, I modified the call of syslogd-listfiles --weekly in /etc/cron.weekly/sysklogd to
syslogd-listfiles --weekly -s "(messages|mail.(log|info))"
Continue reading "What the hell is rotating my mail.log?"
Posted by Stephan Paukner
in GNU/Linux
at
16:06
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: debian
Wednesday, February 21. 2007192.168.0.951Recently, on the SpamAssassin mailing list, someone was reporting that a newbie spammer seemed to have forgotten to replace variables with values. Someone else noted that the construction
Received: from 192.168.0.%RND_DIGIT
might lead to weird and impossible IP addresses. Now, I really found that in my spam quarantine:
Received: from unknown (HELO service3.colo.trueswitch.com) \
([192.168.0.951]) (envelope-sender <rvadur@minermail.com>) \
by mail.trueswitch.com (qmail-ldap-1.03) with SMTP for \
<info@xxxxxxxxxxx.com>; Sun, 14 Jan 2007 22:54:12 -0000
Friday, February 16. 2007Counteracting the spammersSpamAssassin is doing a good job on my site. It successfully protects my users’ mailboxes for some years now. However, during the last months spamming has increased significantly around the world. Luckily, only few spam is getting through, but a handful of spam mails a day is already too much for the pampered user. So I searched for current enhancements. So far I had only used Debian Etch’s standard spamassassin and amavisd-new packages. I consider greylisting as a solution for days where I see no other choice. I can imagine my users being confused because they receive an expected mail not immediately. So I installed three enhancements for SpamAssassin: The first one is available from Debian ‘unstable’, whereas the other two simply go into /etc/spamassassin. The SpamAssassin Rules Emporium provides a lot of other rules I haven’t tried yet. The rules are already having some hits adding a lot to the spam score of messages. Here are examples from within 24 hours: FUZZY_OCR=7.000 (twice), FUZZY_OCR=8.000, FUZZY_OCR=9.000 (5 times), FUZZY_OCR=10.000 (twice), BOTNET_OCNNEJP=5 (3 times), BOTNET_SHAWCABLE=5, SARE_STOCK_MSG_ID2=2.22 (5 times), SARE_GIF_ATTACH=0.75 (16 times), SARE_GIF_STOX=1.66 (6 times), SARE_PROLOSTOCK_SYM3=1.66 (8 times), SARE_MLH_Stock1=1.66 (12 times), SARE_RMML_Stock26=1.12, SARE_MLB_Stock1=1.66 (3 times), SARE_MLB_Stock3=0.794 (7 times), SARE_LWOILCO=0.388 (twice), SARE_LWSYMFMT=1.66, SARE_PROLOSTOCK_SYM4=2.66, SARE_PROLOSTOCK_SYM1=1.66, SARE_LWSHORTT=0.794. So, it was worth the no effort. For those who wonder why there are only few hits, Postfix is already doing most of the job by rejecting bad connections.
Posted by Stephan Paukner
in Information Technology
at
09:13
| Comments (0)
| Trackback (1)
Defined tags for this entry: anti-spam
« previous page
(Page 17 of 52, totaling 413 entries)
» next page
|
AboutCalendarArchivesCategoriesShow tagged entriesandroid anti-spam apache astronomy austria automobile ballooning bash bluetooth bug career cloud collecting comic cooking crypto cw debian diy dreams education electronics event fail fashion finance flickr fuerteventura fun gentoo geography german gnu-linux google google earth guitar hardware history image processing internet kernel kids language lanzarote lhc lifestyle linkroll literature ltd machine learning making mallorca mathematics matlab microsoft migration movies munich music nautilus octave pdf perl philately philosophy phone photo gear photography podcast politics postfix private programming public transport rant religion review salzburg samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet venice video virtualization wordplay work www yahoo
Syndicate This BlogFollow meBookmarksPowered by |