Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Algorithm to compute Basis images of an image

  1. May 2, 2015 #1
    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?
     
  2. jcsd
  3. May 2, 2015 #2

    chiro

    User Avatar
    Science Advisor

    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.
     
  4. May 2, 2015 #3
    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 explaination by looking to SVD, SVD compression, SVD image decomposition. This method give pertinent ortogonal basis to explain images.
     
  5. May 2, 2015 #4
    @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 (Text):
    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');
     
     
  6. May 5, 2015 #5
    what do you want to obtain ?
     
  7. May 5, 2015 #6

    chiro

    User Avatar
    Science Advisor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Algorithm to compute Basis images of an image
Loading...