MATLAB implementation of SPIHT algorithm for image compression

Chhavi Agarwal

Chhavi Agarwal

@chhavi-agarwal-m2TCsq Oct 26, 2024
Hii all


I am facing problems in debugging codes for image compression using SPIHT algorithm in MATLAB.

Can anybody help? Its urgent!

Please reply for the codes.

Thanks in advance.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Mar 8, 2014

    @#-Link-Snipped-# - I think the question isn't very clear. Could you post the code and describe the exact problem?
  • Chhavi Agarwal

    Chhavi Agarwal

    @chhavi-agarwal-m2TCsq Mar 8, 2014

    @#-Link-Snipped-# : Sure sir! can i have your email id so that i can mail them to you the codes as CE doesn't support this file format. (.m format)

    Info:
    test_spiht.m is the main file that calls the function SPIHT (SPIHT.m) and algorithm follows.

    Right now i have tested the codes for lena.bmp image (256x256) and the code is getting stuck in the decodeSPIHT.m. The LIPtemp in line 107 in decodeSPIHT.m is taking zero value thus violating the for loop. I tried to check the values of size_x and size_y as computed in this file for input "in" but it is blank.

    Also, i would like to understand how to find an appropriate value of "level" for an image as i think that the input values while calling function SPIHT() is creating problem due to which the code is displaying the string "error, bandsize is too small" from the decodeSPIHT function as the same was executed successfully in the encodeSPIHT function with the current values.


    imfinfo() function provided the following information about the image:

    Filename: 'C:\Program Files\MATLAB\R2011a\spiht-matlab\lena256.bmp'
    FileModDate: '18-Jun-2010 10:52:36'
    FileSize: 196662
    Format: 'bmp'
    FormatVersion: 'Version 3 (Microsoft Windows 3.x)'
    Width: 256
    Height: 256
    BitDepth: 24
    ColorType: 'truecolor'
    FormatSignature: 'BM'
    NumColormapEntries: 0
    Colormap: [ ]
    RedMask: [ ]
    GreenMask: [ ]
    BlueMask: [ ]
    ImageDataOffset: 54
    BitmapHeaderSize: 40
    NumPlanes: 1
    CompressionType: 'none'
    BitmapSize: 0
    HorzResolution: 3790
    VertResolution: 3790
    NumColorsUsed: 0
    NumImportantColors: 0
  • Nana Klinton

    Nana Klinton

    @nana-klinton-2tlWum Mar 11, 2014

    Hi there
    Do you mean to do the image compressing using a code?
    If that so ,i'd like to suggest you just refer to some <a href="https://www.rasteredge.com/how-to/csharp-imaging/" target="_blank" rel="nofollow noopener noreferrer">How to C#: Overview of Using XImage.Raster</a> add-on tool which empowers with multiple capabilities for a better image compression generating
  • vasavichowdary

    vasavichowdary

    @vasavichowdary-20IrfN Feb 6, 2017

    sir, can i get that code(SPIHT ALGORITHM FOR IMAGE COMPRESSION) as i m doing final year project.
    Thanks in advance
    mail id: #-Link-Snipped-#