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
specify the function of the instruction and also specify whether its right or wrong-: (5) 1) MOV [BX],AX? Register Indirect addressing 2) MOV CX,[BX+DI]?Base plus index add

This assignment will just focus on NookyKindle eBook orders.  That is, we'll be keeping track of the titles of eBooks and the number of orders for that particular eBook during a pa

.NET Windows Services But Enthusiasm has an amazing record of beginning overdue but finding up easily. This is real in situation of .NET too. Enthusiasm put their best men at

hi, can you help me with testing java classes I have wrote using java and jsp and servlet in eclipse ? I want to use JUnit for testing

Expertsmind brings you unique solution in java assignments Networking The term system selection represents composing applications that do across several gadgets (computers

What are program visible and invisible resisters? A4) Program visible is those registers that can be programmed by the users, or which are customizable, whereas Program invisible

Objective: to show if the sizes of the clusters influence the communication cost among a set on nodes Write a K-Means  program  for a set of M points randomly distributed on an

WRITE A FORTRAN PROGRAMME TO GENERATE PRIME NUMBERS BETWEEN 1 AND 100.

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

In this portion of the lab you will analyze a problem and create a Raptor program to solve it.  Make sure you use a class in Raptor and in Python to solve the problem.  Read the fo