My initial image is a medical image and my main objective is finding directionality. The original size of my image was 8X8 and I have rescaled the image to 32X32 to increase my accuracy. My input image is Fourier Transform Power Spectrum and my main objective is finding directionality. I want to window my image of size 32X32 as an image pre-processing approach. I want to implement the circularly symmetric window in Java. My main concern is that which window should I use and how can I implement? I tried to use the Gaussian window for my image. But, as I apply the Gaussian window, the whole meaning of my image changes. Am I doing something wrong?
I have implemented my Gaussian Window in Java as:
double value = 0;
double distance = 0;
double x_center = (imageWidth - 1) * 0.5;
double y_center = (imageHeight - 1) * 0.5;
double cutoff = 2;
double dc_level = 255;
for (int i = 0; i < image.getWidth(); i++) {
for (int j = 0; j < image.getHeight(); j++) {
distance = Math.sqrt(Math.pow(Math.abs(i - x_center), 2)
+ Math.pow(Math.abs(j - y_center), 2));
value = dc_level * Math.exp(-1 * distance * distance)
/ (1.442695 * cutoff * cutoff);
powerspectrum[i][j] = (int) value;
}
}
Thank you so much for your help.