2
$\begingroup$

I have been using Fourier Transform Power Spectrum for estimating the dominant direction in some images.

However, I am now working on extremely small images of size 8X8 pixel and I have found that even at this level there is some result regarding the dominant orientation of the image. As the image size is 8X8, the total number of pixel will be 64 and as shown in the figure below, there will be less number of angles.

I have simply done polar conversion of the Fourier Transform Power Spectrum of the image which will be of same size (8X8), then I have taken the summation of the intensity for each angle and plotted them against the angle.

An image with coordinate and angular information.

Now, from the plot I can find the maximum angle but I want to increase the accuracy of my result. I will first find the dominant direction of an image (a medical image) and then I will find the changes in the diseased state.

Thank you so much for your help.

$\endgroup$
  • 1
    $\begingroup$ Welcome to DSP.SE! I'm not sure why you have a down-vote, but your explanation is not clear to me. Can you explain what you're currently doing (with larger images) and what you're after with smaller images? Are you just choosing a single value from the bottom angles? $\endgroup$ – Peter K. Sep 22 '15 at 16:48
  • $\begingroup$ @PeterK. I have chosen small size of image because I have low resolution medical image. $\endgroup$ – Psi Lambda Delta Sep 22 '15 at 21:26
2
$\begingroup$
  1. Subtract from the 8x8 image the mean value of its pixels, which should not affect the dominant orientation. This will remove artifacts due to windowing in the next step.
  2. Window the image with a circularly symmetric window function that eliminates artifacts aligned with the image axes. Make sure you have chosen a window function that is sufficiently smooth to be sampled with a 8x8 grid without frequency domain aliasing.
  3. Pad the image to 32x32 with zeros to increase the image size and thus the discrete Fourier transform (DFT) resolution. This makes the DFT result smoother and thus easier to interpolate.
  4. Calculate for each angle an integral of the squared magnitude of the DFT result over a line corresponding to the angle. All angles must be treated equally; use same length lines. 4x4 piece-wise bicubic polynomial interpolation should suffice if you approximate the integral by a sum of point samples at the axis-aligned resolution of the DFT.

If you want to make the computation faster you can take advantage of that the integral will change quite smoothly as function of the angle, so you can first sample at the coarse resolution of at least $\text{atan}(1/8)\times 360\unicode{xb0}/(2\pi) \approx 7\unicode{xb0}$ to find where the highest peak might be, and then sample more finely around that angle.

$\endgroup$
  • $\begingroup$ Hey, thanks but being totally new to this field. I have been doing the calculation of Fourier Transform Power Spectrum in ImageJ and written a Java program for the angle estimation. Can you suggest me some ways to padding and windowing image in Java. $\endgroup$ – Psi Lambda Delta Sep 23 '15 at 16:08
  • $\begingroup$ Having seen in the other questions that your images have a solid black "background", it looks like subtracting the mean won't be useful. $\endgroup$ – Olli Niemitalo Sep 26 '15 at 7:33
1
$\begingroup$

A few things you need to take care of:

  • the borders: either window the images with a smooth function or try any transformation that removes discontinuity at the borders (e.g. periodic + smooth http://www.math-info.univ-paris5.fr/~moisan/p+s/)
  • the angles: you have much more points in some directions (e.g. 0° 45° etc.) than in others (like 10°). So for each direction, you need to renormalize your sums to make sure you don't favor directions where you have many points -- take the mean instead of the sum, or interpolate and always take the same number of samples.
  • the norm: the Fourier transform is a unitary transform, i.e. its preserves the L_2 norm, not the L_1 norm. Although they are related, I'd advise you to sum the squares of the moduli of coefficients.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.