Code a simulation of image compression , Programming Languages

Assignment Help:

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'),


Related Discussions:- Code a simulation of image compression

What is linear programming problem, QUESTION 1 (a) (i) What is linear p...

QUESTION 1 (a) (i) What is linear programming problem? (ii) Define and explain the following terms: (1) objective function, (2) decision variable, (3) constraints, (4) feasi

Java event delegation model, Expertsmind brings you unique solution in jav...

Expertsmind brings you unique solution in java assignments Event Delegation Model The Delegation Model with java assignment help Version 1.1 of the Java TM foundation

What is jvm-java virtual machine, What is JVM-Java Virtual Machine  A J...

What is JVM-Java Virtual Machine  A JVM stands for java virtual machine. This is virtual computer or an abstract computer that runs the complied java programs. In fact JVM is

Find max and min no.from numbers passed through command line, Normal 0 ...

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

Retrive unicode text using vb.net ado.net, How Can I Retrive Unicode CSV Fi...

How Can I Retrive Unicode CSV File the ADO.net VB.net

Triple eigenvalue with 3 linearly independent eigenvectors, 1 Triple Eigenv...

1 Triple Eigenvalue with 3 Linearly Independent Eigenvectors In this case we will have the eigenvalue l with the three linearly independent eigenvectors  ?h 1 , ?h 2 and  ?h

Provide example of function, Provide Example of Function? An illustrati...

Provide Example of Function? An illustration of a function definition main() { message(); } /* header */ message() { /*bodystarts here*/ printf ("Example for function

Shell script to display system time in words, Normal 0 false ...

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

determine if dna sequence is periodic or not, A string s is said to be per...

A string s is said to be periodic with a period α, if s is α k for some k > 2. (Note that α k is the string formed by concatenating k times.) A DNA sequence s is called a tande

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

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

Write Your Message!

Captcha
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