Compute dct coefficients for each block

Assignment Help C/C++ Programming
Reference no: EM132164753

1. Description

In this assignment, you are going to integrate all your previous assignments. To do so, you should follow the following steps.

1. Read command line arguments
a. -c indicates compression and -d indicates decompression
b. input filename
c. output filename
d. quality (0 - 100); no quality argument for decompression

./compress -c girl.pgm output.dat 50
./compress -d output.dat output.pgm

2. If compression
a. Open and Read the PGM file
b. Divide the data into 8x8 blocks
c. Compute DCT coefficients for each block
d. Write header to the output file (image-width, image-height, quality, channel, and tag)
e. For each block
i. Append the DCT average (round to integer) to the output file
ii. Encode the DCT coefficients (a 8x8 block) using 10 bits (K=10) runlength encoding (Assignment 3)
iii. Append the encoded data to the output file.
f. Repeat step (e) for all 8x8 blocks
g. Close the files and release memory
3. If decompression
a. Open and Read the compressed file
b. Read the header information and return the file position using
ftell(fp)
c. For each block
i. Read the DCT average
ii. Decode the file and restore the data into a 8x8 block
iii. Inverse the DCT coefficient and add the average back to data
d. Convert the 8x8 blocks to a single buffer
e. Write the buffer back to a PGM file.
f. Close the files and release memory

Attachment:- Assignment.rar

Reference no: EM132164753

Questions Cloud

Found telnet in use by their network administrators : During onsite visit with Chief Information Security Officer, he tells you how upset he is that they found Telnet in use by their network administrators.
Create an outline to help structure your information : To explore the use of visual aids and nonverbal and verbal communication, you will either demonstrate a task or explain an event or phenomenon.
Compute the number of units sold : Naylor Company had $155,200 of net income in 2016 when the selling price per unit was $153, Compute the number of units sold in 2016
Dimension of race appears to further impact these gaps : Your supervisor is concerned about the gendered wage gap your organization is not closing, and the added dimension of race appears to further impact these gaps.
Compute dct coefficients for each block : Compute DCT coefficients for each block - Convert the 8x8 blocks to a single buffer - Write the buffer back to a PGM file
Symbolic frame and improving leadership practice : This is critical and explanatory question about the course readings on The Symbolic Frame and Improving Leadership Practice such as reframing leadership
Compute ending inventory at cost using lifo retail method : Net markups were $9,200, net markdowns were $6,700, and sales revenue was $143,600. Compute ending inventory at cost using the LIFO retail method
Find article about company that is undergoing : Using the internet, find an article about a company that is undergoing, or has undergone, large-scale change.
Compute ending inventory at cost using the dollar-value : Splish Inc. had beginning inventory of $13,392 at cost and $21,600 at retail. Compute ending inventory at cost using the dollar-value LIFO retail method

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd