Compression

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • JPEG problems :p part2

    3 answers - 837 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    As I've introduced my self previously here on comp.compression, the one's
    who've read it, know that I'm busy writing a JPEG decoder.
    I want you to take a look at the following images. The first one is the
    input jpeg image and the second one is the output I get in a .bmp file.
    http://home.scarlet.be/~ad049105/eindwerk/testorig.jpg
    http://home.scarlet.be/~ad049105/eindwerk/output.bmp
    As you can see most of the image is correct (the output image), but still in
    the leaves of the rose/tulip (not really a botanicus) have these blue like
    distortions, also in the white below there are some yellow/green dots.
    Does anyone know a probable cause of these artifacts and a solution to
    remove them?
    Many thanks in advance
    Arne Demmers
  • No.1 | | 1451 bytes | |


    "Arne Demmers" <arne.demmers@scarlet.bewrote in message
    @scarlet.biz
    Hi,

    As I've introduced my self previously here on comp.compression, the one's
    who've read it, know that I'm busy writing a JPEG decoder.

    I want you to take a look at the following images. The first one is the
    input jpeg image and the second one is the output I get in a .bmp file.

    http://home.scarlet.be/~ad049105/eindwerk/testorig.jpg
    http://home.scarlet.be/~ad049105/eindwerk/output.bmp

    As you can see most of the image is correct (the output image), but still
    in the leaves of the rose/tulip (not really a botanicus) have these blue
    like distortions, also in the white below there are some yellow/green
    dots.

    Does anyone know a probable cause of these artifacts and a solution to
    remove them?

    I'm not sure what's going on, but it looks like some sort of overflow
    in your arithmetic. Perhaps your matrix or idct doesn't have an
    adequate range to support the output, or perhaps a limiter is not
    working correctly. Have you tried it with a variety of simple horizontal
    gradients (both black to white, and various colors). If you can get
    it to break on these it might make debugging easier.

    You only mentioned a decoder. If you're also working on an encoder
    you could try matrix -matrix, hbf -hbf, then dct -idct and so on.

  • No.2 | | 398 bytes | |

    Arne Demmers wrote:
    http://home.scarlet.be/~ad049105/eindwerk/testorig.jpg
    http://home.scarlet.be/~ad049105/eindwerk/output.bmp

    It looks like the blue channel of the RGB image is wrapping around from
    0->255 (red->purple) and from 255->0 (white->yellow). Check that you're
    handling saturation correctly when you convert from YCbCr to RGB.
    -- Ben
  • No.3 | | 220 bytes | |

    Thanks both for your help.
    The blue channel indeed was the problem -I had forgotten to change a
    variable to the right one after copy pasting a piece of code.
    Greets
    Arne Demmers

Re: JPEG problems :p part2


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Compression"

EMSDN.COM