CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: JPEG comparison

  1. #1
    Join Date
    Sep 2000
    Posts
    109

    JPEG comparison

    Hi guys,
    In my application I’m capturing desktop images and send it over the net. Before to send it I do comparison new buffer with old one and if images are different I do send it. Still it is a lot of data should be send. So right know I’m thinking abut some improvement. Idea is to divide whole image into small pieces, save it and then compare with new. In this case I’m looking for some docs that will help me to design more efficient way of doing this. May be some one know it? Any suggestion, links, examples welcome.

    Regards,



  2. #2
    Join Date
    Dec 2001
    Location
    Russian Federation
    Posts
    30

    Re: JPEG comparison

    Hi,

    your idea about dividing whole image into small piecies is goog enough. And I can suggest you to do comparing of DCT coefficients (and probably only DC coefficient will enough) instead of image pixel values. Moreover, I think it will be enough to compare DCT coefficients for Luminance component only. It will decrease number of data to compare.


    Vladimir Dudnik

  3. #3
    Join Date
    Sep 2000
    Posts
    109

    Re: JPEG comparison

    Hi Vladimir,
    thanks for your suggestions. I was looking for some docs you mantioned, sorry I could not find any references to DCT. May be you could write what you ment by that. I looked refernce to DC and could not fined any DCT one.

    Regards,
    Genady


  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: JPEG comparison

    Search the intenet for DCT (Discrete Cosine Transform).

    http://www.ece.purdue.edu/~ace/jpeg-tut/jpegtut1.html

    If you're handling JPEG's, then you should know what this means.

    Regards,

    Paul McKenzie


  5. #5
    Join Date
    Sep 2000
    Posts
    109

    Re: JPEG comparison

    hi Paul McKenzie,
    thanks for your suggestion. I'll look at it.

    Regards,
    Genady

    P.S.
    If you did not specify to which area DCT belong to (as you did) it even could be Device Context Types –still DCT but from DC contents. Also it never late to learn.
    Thanks



  6. #6
    Join Date
    Dec 2001
    Location
    Russian Federation
    Posts
    30

    Re: JPEG comparison

    According JPEG standard,
    compression technique consist from several steps:
    color conversion (optional)
    DC level shift (for 8-bit images it is substraction 128)
    DCT (discrete cosine transform for blocks 8x8)
    quantization
    lossless entropy coding (huffman or arithmetic)
    packing to the bitstream


    Vladimir Dudnik

  7. #7
    Join Date
    Jan 2009
    Posts
    20

    Re: JPEG comparison

    Hi,


    Can u give some sample code or method how to derive and compare DCT of two JPEG images?

    I am struggling for it .


    Thanks in advance for any help.


    Thanks n Regards,

    Hema.

  8. #8
    Join Date
    Jan 2009
    Posts
    20

    Re:Above post

    It would be more helpful for me if it is in win32.

    Regards,

    Hema.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured