Thread: Algorithm for compressing-please solve the problem till 20th of November

  1. #1

    Algorithm for compressing-please solve the problem till 20th of November

    I'm a student and I was given a problem.
    It is:
    The problem is about compression of image which contains decimal numbers.The compression must be bigger,so the result is better.Every number can be written with different type.Every digit is written with black on white background with sizes 32x32 pixels.You have to write a programm CODE.EXE which compresses the image of one number,and a programm DECODE.EXE,which decompresses the compressed image with CODE.EXE .The result of the decompressed image mustn't have difference with the image before the compression by 16 pixels.
    The file NUM.INP contains on it's first row N-decimal digit(1<=N<=100).The next N*32 rows serially contain the description of the image of every of the digits of the number.Every of the rows contains 32 symbols-0(white)or 1(black).The compressing programm reads the file NUM.INP and creates a file NUM.COD,which have to contain the compressed image of the number.The decompressing programm must read the file NUM.COD,created by the compressing programm and to create a file NUM.OUT,which contains N*32 rows-analogically of the input file(without the first row,where is the given number).Every test is solved when NUM.INP and NUM.OUT are almost identical and there is a difference between them less than 16 pixels.The file NUM.COD should be smaller,because if someone have the smallest file NUM.COD he'll get the maximum points.Every other will get part of the maximum points.
    Can you help me solving this problem.
    PLEASE HELP ME:solve the problem or give me some directions how to do it.Everybody can send me the source (c or c++) on my

  2. #2
    Join Date
    Aug 2001
    Groningen (NL)
    This site it's about compression in general, but there's also a section on image compression. The site has also image compression code and other things available for download:

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help solve linking problem, thanks
    By Raison in forum Windows Programming
    Replies: 8
    Last Post: 05-29-2004, 11:14 AM
  2. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  3. Plz solve my problem !
    By pankaj8096 in forum C Programming
    Replies: 12
    Last Post: 01-16-2003, 12:59 AM
  4. Help to solve this problem
    By Romashka in forum C++ Programming
    Replies: 3
    Last Post: 04-16-2002, 09:32 AM