| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Wavelet Toolbox |
| Contents | Index |
detcoef2 is a two-dimensional wavelet analysis function.
D = detcoef2(O,C,S,N) extracts from the wavelet decomposition structure [C,S] the horizontal, vertical, or diagonal detail coefficients for O = 'h'(or 'v' or 'd', respectively), at level N, where N must be an integer such that 1
N
size(S,1)-2. See wavedec2 for more information on C and S.
[H,V,D] = detcoef2('all',C,S,N) returns the horizontal H, vertical V, and diagonal D detail coefficients at level N.
D = detcoef2('compact',C,S,N) returns the detail coefficients at level N, stored row-wise.
detcoef2('a',C,S,N) is equivalent to detcoef2('all',C,S,N).
detcoef2('c',C,S,N) is equivalent to detcoef2('compact',C,S,N).
If C and S are obtained from an indexed image analysis or a truecolor image analysis, D is an m-by-n matrix or an m-by-n-by-3 array, respectively.
For more information on image formats, see the image and imfinfo reference pages.
% The current extension mode is zero-padding (see dwtmode). % Load original image. load woman; % X contains the loaded image. % Perform decomposition at level 2 % of X using db1. [c,s] = wavedec2(X,2,'db1'); sizex = size(X) sizex = 256 256 sizec = size(c) sizec = 1 65536 val_s = s val_s = 64 64 64 64 128 128 256 256 % Extract details coefficients at level 2 % in each orientation, from wavelet decomposition % structure [c,s]. [chd2,cvd2,cdd2] = detcoef2('all',c,s,2); sizecd2 = size(chd2) sizecd2 = 64 64 % Extract details coefficients at level 1 % in each orientation, from wavelet decomposition % structure [c,s]. [chd1,cvd1,cdd1] = detcoef2('all',c,s,1); sizecd1 = size(chd1) sizecd1 = 128 128
| Provide feedback about this page |
![]() | detcoef | disp | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |