Algorithm to compute Basis images of an image

Click For Summary
The discussion revolves around the representation of images as summations of basis images, drawing parallels to Fourier Analysis. Participants suggest exploring MPEG and JPEG code libraries for algorithms that compute basis images, highlighting the significance of eigenvectors and Singular Value Decomposition (SVD) in image decomposition. One user shares their MATLAB code for computing the magnitude and phase spectrum of an image using the "fft2" function but expresses uncertainty about the next steps. Suggestions include focusing on frequency information, averaging RGB values for grayscale conversion, and reconstructing the signal with specific bandwidths for further analysis. Overall, the conversation emphasizes practical coding approaches and theoretical foundations in image processing.
ramdas
Messages
78
Reaction score
0
I know from the Fourier Analysis
that any signal can be represented
as summation of elementary
signals i.e. basis functions
.Likewise,any image can be
represented as summation of Basis images.

Is there any available code, or
even an algorithm, that would
allow me to compute Basis images
of an image?
 
Technology news on Phys.org
Hey ramdas.

I think you should search for MPEG and JPEG code libraries and look at the source code for an open source project.

That should give you a good lot of code to start off with.
 
You have basis image from fourrier analysis and basis image from other function decomposition. Good basis images used in Computer vision are the eigen vector of the image. You can find explanation by looking to SVD, SVD compression, SVD image decomposition. This method give pertinent ortogonal basis to explain images.
 
@kroni ,@chiro Sir ,I have done basic programming in MATLAB. I have computed magnitude and phase spectrum using "fft2 "function in MATLAB.I am adding my code .But i don't know how to move forward
Code:
clc;
clear all;
close all;

i=imread('C:\Users\RK\Desktop\cameraman.gif');
%i=rgb2gray(i);
i=uint8(i);

figure,
subplot(1,3,1);imshow(i);
%title('\alpha^2 and X_1')
%title('\ite^-1000*|t|');
%title('e^{-1000|t|}');
title('\ite^{-1000 |t|}','Color','b')
%title('Cameraman Gray scale Image');

f1=fft2(i);
f2=log(1+fftshift(f1));

m=abs(f2);
subplot(1,3,2);
imshow(m,[]);
title('Magnitude Spectrum');

phase=angle(f2);
subplot(1,3,3);
imshow(phase,[]);
title('Phase Spectrum');
 
what do you want to obtain ?
 
I think he is trying to get the frequency information of a two-dimensional signal (since I noticed ff2 function there).

If you want to get the gray-scale information you should either do an average function of the RGB values or use a transform like they do in NTSC images.

Also try and plot the image based on re-constructing the signal with a specific bandwidth by creating a bitmap file and passing it to MATLAB for rendering.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

Replies
4
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
13
Views
2K
  • · Replies 139 ·
5
Replies
139
Views
10K
Replies
14
Views
3K
  • · Replies 30 ·
2
Replies
30
Views
6K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K