Code covered by the BSD License  

Highlights from
Quadtree decomposition (Encoding) and Decoding of RGB Image

image thumbnail
from Quadtree decomposition (Encoding) and Decoding of RGB Image by Dr. Murtaza Khan
Quadtree decomposition (Encoding) and Decoding of RGB Image of size M-by-N-by-3.

S=trimsparse(S)
% % trim sparse matrix by removing extra rows/columns that have all elements zeros.

function S=trimsparse(S)

[i,j,v] = find(S);
S=S(1:max(i),1:max(j)); 

Contact us at files@mathworks.com