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 a program that will input a group of floating point

Create a program that will input a group of floating point values, storing them as double values in an array. This array will then be sent to three functions.

  Write Relational Algebra queries

Attributes cid and fid in Reservation are foreign keys referencing homonymous attributes in Customer and Flight, respectively. Write Relational Algebra queries

  Write your own testing program to test the modified class

Write your own testing program to test the modified class - Doubly Linked List code to include index (rank) based access operations

  Write a program that uses a structure to store

It should ask the user how many test scores there are to be and how many students there are in addition to any that have been read (if any).

  Declare a pointer vptr that points to an object

Declare a pointer vPtr that points to an object of type unsigned int

  Create a front­end system for a vending machine

Create a front­end system for a vending machine written in C. The vending machine serves all kinds of pastry treats. The company's name is Penelope's Pastry Delights and as such, the executable you are creating will be called "ppd"

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Show the result of inserting all of the elements

Show the result of inserting all of the elements using quadratic probing to resolve collisions. (Place null in the unused locations.)

  Write a program which asks the user to enter an integer

Write a program which asks the user to enter an integer. The program will then print out all the numbers between 1 and the entered numberas well as the total.

  Write a c program that outputs a table of values of t

Write a C program that outputs a table of values of t and l!C , The user enters the range of time desired in seconds and the incre­ ment in fractions of a second, the source current Us) in amperes, the resistance (R) in ohms, the initial voltage ..

  Write a code for ludo game

Write a C++ code ludo game C++ is a statically typed, compiled, general-purpose, case -sensitive, free -form programming language that supports procedural, object -oriented, and generic programming.

  Write a program to perform statistics calculation

The results should add the sums, the lengths and determine which of the two are the largest and the smallest of the new statisticians form the two inputs. ex statistician3 largest is the

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