in reply to GIF Image Processing

Please correct me if I'm wrong (it happens all the time) but GIF images are not compressed as such, instead they use an index map into a pallette of colours. I would have thought, then, that you can apply your image detection algorithm on the matrix of indices.

Update:Thanks to dws :). I forgot all about the Unisys patent and the compression algorithm wrangles.

I don't have my notes anymore but I did something similar on a raw binary file at University. Essentially the algorithm worked by taking a group ok3x3 matrices and applying them successively to a set of data. Depending on the final result, it recorded a 1 (an edge) or a 0.

My gut feeling is that you may not be able to get away without first changing the indices for the actual binary values. However, thats just a hunch :)

I still have the code somewhere but its in OCCAM and is designed to run on a transputer network so I don't know how useful it may be to you.

Replies are listed 'Best First'.
Re: Re: GIF Image Processing
by dws (Chancellor) on Jan 26, 2002 at 03:34 UTC
    Please correct me if I'm wrong (it happens all the time) but GIF images are not compressed as such, instead they use an index map into a pallette of colours.

    GIF uses the Lempel-Ziv-Welch (LZW) compression algorithm, for which Unisys has a patent. There's a reasonably good explanation of the compression scheme here.

    Once uncompressed, you get a matrix of indices into a color palette.

      You are correct in your statement - GIFs do use LZW compression. However, ideally I want to use an image to detect its edges in as few clock cycles as possible. I thouhgt that if "decompression" was skipped, then I could achieve this goal (or at least come to a rough approximation of the edges).
        As long as the image is compressed, there is no way to get useful information about any of it without decompressing it. Ideal compression looks like white noise and is about as informative.

        The decompression step is not optional.

        Are you using GIF because it's an outside decision or is it becaue of the compression? If you have a choice, you may be able to find a format that would better fit your needs.

        -Lee

        "To be civilized is to deny one's nature."
Re: Re: GIF Image Processing
by gri6507 (Deacon) on Jan 28, 2002 at 10:17 UTC
    I would be ver interested in some more details of that algorithm. Can you please post them or email them if you still remember it