Related to my work, I divided an image into a number of overlapping blocks and for each blocks dct coefficients are calculated. The dct coefficients of each block are stored in a cell-array. Next I want to retrieve the values form one cell. How can I retrieve the values from the cell?
1 Answers
0
votes
As an answer. I assume following your question: "And am stored each dct coefficient blocks into a cell". That you have e.g. 20 blocks each containing the dct of 100*100 pixel(double). So that your data is stored in a 20x1 cell array where each cell has 100x100 (double) entries.
To adress a block (1 cell argument) use:
block_data=cell_data{k,l};
To adress one element of those elements inside your block_data use "normal" adressing:
element_data=block_data(m,n);
k,l,m,n are the indices of the respective data. I assume that your dct-block-data is numeric (e.g. double)
{}instead of()when adressing the element. E.G.data{1,1}returns the first cell-element value. You can use all commands which you can use normally, e.g.:,endor logical indexing. - The Minion