Code a simulation of image compression , Programming Languages

Your task will be to code a simulation of image compression based on the approximate low rank structure of the set of image patches. You will write functions .code = my block compress(I, B, nz); .I = my block reconstruct(code, B,m,n);

The function my block compress takes as input an m×n image grayscale I, extracts all the distinct 8 × 8 blocks from the image using the matlab command im2col, and finds the representation of each block in the (64× 64) orthogonal basis B, and then discards all but the nz largest magnitude coefficients over all the blocks in the image. The output code is a nz × 3 array which gives the nz most valuable coefficients for reconstructing all the patches, and the locations. It should be structured as follows: each entry of the first column of the variable code contains a coefficient. Each entry in the second column specifies which block that coefficient belongs to. Each entry in the third column specifies which basis element the coefficient belongs to1.

The function my block reconstructs takes as input a coded array code, a 64 × 64 basis B, and output size parameters m and n. It outputs an m× n image I reconstructed from the coefficients in code; you may use the function col2im if you find it convenient.

For example, suppose I is a 24×24 image. We can write I in block form:
I =0@
I1 I4 I7
I2 I5 I8
I3 I6 I9
1A
,
where Ik is a 8×8 matrix for k 2 {1, 2, ..., 9}. Using im2col on I, we obtain
J = (J1 J2 J3 J4 J5 J6 J7 J8 J9) = im2col(I, [8 8], 'distinct'),

Posted Date: 4/1/2013 2:09:14 AM | Location : United States







Related Discussions:- Code a simulation of image compression , Assignment Help, Ask Question on Code a simulation of image compression , Get Answer, Expert's Help, Code a simulation of image compression Discussions

Write discussion on Code a simulation of image compression
Your posts are moderated
Related Questions

The Maze Game from Laboratory 7 loads its maze directly in the program's code. This should be avoided as it requires the program to be recreated if the maze needs to be changed. In

Assignment is to create hijara game on any plate form, you can use any plate form you like or easy to you. For instance let's say you can use visual studio, game studio (Prefer to

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Write a script called 'prob1.m' that solves for the variables y, and z in terms of a user inputed x. The variables y and z are defined as follows: y = x - 30                when

Write your own version of the strcmp function string_compare. Supply a main program that will test each of the 3 differing outcomes. int string_compare(char *s, char *t); retu

JSP QUIZ ASSIGNMENT SHOULD BE FUNCTIONAL ON ECLIPSE QUIZ HAS TOTAL 20 QUESTIONS REGARDING VARIOUS CAPITALS OF COUNTRIES. WELCOME PAGE OFFERS USER TO ENTER HIS NAME. THEN USER C

A large logistics company requires a software system to support the business processes associated with managing shift patterns of employees and making the associated payments. The

Write a program that inputs two positive integers of, at most, 20 digits and outputs the sum of the numbers. If the sum of the numbers has more than 20 digits, output the sum with

Question 1 What is CISC & RISC? Explain their addressing modes Question 2 Discuss the following- Design Specification of Assembler Design of Single Pass Assembler