This is a static copy of a profile reportHome
imresize>resizeAlongDim (165640 calls, 19.677 sec)
Generated 05-Nov-2014 07:53:48 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/imresize.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
imresize | function | 165640 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
742 | out = resizeAlongDimUsingNeare... | 82820 | 5.708 s | 29.0% |  |
741 | if isPureNearestNeighborComput... | 165640 | 4.797 s | 24.4% |  |
762 | out = imresizemex(in, weights'... | 82820 | 4.456 s | 22.6% |  |
749 | size_in((end + 1) : dim) = 1; | 82820 | 0.581 s | 3.0% |  |
751 | if (ndims(in) > 3) | 82820 | 0.481 s | 2.4% |  |
All other lines | | | 3.655 s | 18.6% |  |
Totals | | | 19.677 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 37 |
Non-code lines (comments, blank lines) | 20 |
Code lines (lines that can run) | 17 |
Code lines that did run | 9 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 52.94 % |
Function listing
time calls line
733 function out = resizeAlongDim(in, dim, weights, indices)
734 % Resize along a specified dimension
735 %
736 % in - input array to be resized
737 % dim - dimension along which to resize
738 % weights - weight matrix; row k is weights for k-th output pixel
739 % indices - indices matrix; row k is indices for k-th output pixel
740
4.80 165640 741 if isPureNearestNeighborComputation(weights)
5.71 82820 742 out = resizeAlongDimUsingNearestNeighbor(in, dim, indices);
0.26 82820 743 return
744 end
745
0.24 82820 746 out_length = size(weights, 1);
747
0.41 82820 748 size_in = size(in);
0.58 82820 749 size_in((end + 1) : dim) = 1;
750
0.48 82820 751 if (ndims(in) > 3)
752 % Reshape in to be a three-dimensional array. The size of this
753 % three-dimensional array is the variable pseudo_size_in below.
754 %
755 % Final output will be consistent with the original input.
756 pseudo_size_in = [size_in(1:2) prod(size_in(3:end))];
757 in = reshape(in, pseudo_size_in);
758 end
759
760 % The 'out' will be uint8 if 'in' is logical
761 % Otherwise 'out' datatype will be same as 'in' datatype
4.46 82820 762 out = imresizemex(in, weights', indices', dim);
763
0.40 82820 764 if (ndims(in) > 3)
765 % Restoring final output to expected size
766 size_out = size_in;
767 size_out(dim) = out_length;
768 out = reshape(out, size_out);
769 end
Other subfunctions in this file are not included in this listing.