Hacker News new | past | comments | ask | show | jobs | submit login

The very strong 45º lines in the rotated image are probably mostly artifacts caused by the image edges seen in the rotated version. A rotation in real-space is equivalent to one in reciprocal space, so the two transforms should look the same (barring the interpolation differences, etc.) but rotated.



I wonder whether one could show this. maybe by pretending the image is actually a cell in a periodic grid, then transform this grid, and rotate this grid. The periodicity would make roation possible without getting empty spots.


That's a good idea. The condition implicitly assumed to get the result mentioned ("A rotation in real-space is equivalent to one in reciprocal space") is that the original image is periodically tiled in all directions. Your suggestion mimics this condition.

Since your other comment mentioned limitations of optical apertures, maybe it's worth noting that the way the 45 degree rotation was done here (plunking the rotated image into a black background) mimics the action of an optical aperture -- that is, clipping the observed image along that rectangle.

This causes 45 degree spikes, similar to: https://en.wikipedia.org/wiki/Diffraction_spike#Diffraction_....


Yes. I was going to add that the lines in the original image are more likely due to the discontinuity between the top, bottom, left, right edges. The other comment wasn’t mine, but is right that an aperture in the back focal plane of a lens would cut out image information at higher resolution.


Something I find interesting is that, although on the surface this seems like a way to deal with rotations in general, it only works for certain angles. For instance, with a 45 degree rotation, you have to scale the image, too, and the resulting tile contains two of the original image.

Topologically, an underlying problem is that there is not a continuous family of rotations for a torus (the topological space corresponding to two independent periodic dimensions).


> The very strong 45º lines in the rotated image are probably mostly artifacts caused by the image edges seen in the rotated version.

I think this is correct, and there are also some (more subtle) artifacts in the unrotated version for the same reason. The thing I don't understand is why this occurs for 2D images, but there are no artifacts created by the "edges" of a 1D sound (i.e. the start and end of the clip).


When you do a Fourier transform of sound, you'd usually apply a windowing function: multiply the sound with a function that descends continuously to zero at the boundary of the "window", so that there is no discontinuity there. That function is chosen in such a way that it should affect frequencies of interest in the transform's output only mildly.


(Off-topic for OP, on-topic for the above interesting comment..)

I've looked at the windowing options on a typical oscilloscope. (The Tektronix MSO 3014 is the one we happen to use in our lab.) Hanning window, Hamming window, Blackman-Harris, etc.

I'm wondering how much of the off-frequency noise in a typical signal is due to the discontinuity at the end/beginning of the fragment of the signal captured by the scope.

If it turns out that the discontinuity is the dominant source, there may be a straightforward way to avoid it.

A way to eliminate the discontinuity is to capture the data from the scope, transfer it to a computer, and trim the file so that it is a multiple of the fundamental frequency in length.

Then, use a mixed-radix FFT algorithm on the resulting file.

(It may be necessary to add or subtract a few lines from the file to ensure that the length of the file does not have large prime factors. Mixed-radix FFT is quadratic in the largest prime factor of the size of the input.)

Is this common practice? Or, are there reasons other than masking the effect of the boundary discontinuity that people typically use windowing functions?


What fundamental frequency? If your signal is a mixture of frequency you care about and some other random ones, the random ones will generate lot of discontinuity if you tune the period to the interesting one. Also, if you're slightly off with your estimation of the interesting frequency, your signal will not match up.

Using a window trades off sensitivity for low frequencies and a slight bit of frequency resolution against these problems.


That makes sense. Seems like the same technique could be used with images, yes?


Yes, although not with very low-resolution images (8x8 or 16x16), because then you run out of frequency gap between interesting frequencies and ones that are contributed to by the windowing function. EDIT: Another facet of the same issue viewed from pixel space is that you lose a lot of contribution of pixels close to the edge, and in such small images majority of pixels are close to the edge.

There's also an interesting alternative for images, if you don't care about inverting the transform to get the original image: you can express an image as a sum of a periodic component and a very slowly changing one. The periodic component looks like the original to the human eye, so taking DFT of it is usually sufficient for analysis. The paper that discovered that technique: https://hal.archives-ouvertes.fr/hal-00388020v1/document




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: