This is a static copy of a profile reportHome
imresize>fixupSizeAndScale (82820 calls, 19.587 sec)
Generated 05-Nov-2014 07:53:34 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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
652 | [params.output_size, params.si... | 82820 | 6.749 s | 34.5% |  |
655 | params.scale = deriveScaleFrom... | 82820 | 5.127 s | 26.2% |  |
650 | params.scale = fixupScale(para... | 82820 | 3.785 s | 19.3% |  |
654 | if isempty(params.scale) | 82820 | 0.851 s | 4.3% |  |
658 | if isempty(params.output_size) | 82820 | 0.841 s | 4.3% |  |
All other lines | | | 2.233 s | 11.4% |  |
Totals | | | 19.587 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 26 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 12 |
Code lines that did run | 8 |
Code lines that did not run | 4 |
Coverage (did run/can run) | 66.67 % |
Function listing
time calls line
635 function params = fixupSizeAndScale(params_in)
636 % If the scale factor was specified as a scalar, turn it into a
637 % two-element vector. If the scale factor wasn't specified, derive it
638 % from the specified output size.
639 %
640 % If the output size has a NaN in it, fill in the value
641 % automatically. If the output size wasn't specified, derive it from
642 % the specified scale factor.
643
0.56 82820 644 params = params_in;
645
0.43 82820 646 if isempty(params.scale) && isempty(params.output_size)
647 error(message('images:imresize:missingScaleAndSize'));
648 end
649
3.79 82820 650 params.scale = fixupScale(params.scale);
651
6.75 82820 652 [params.output_size, params.size_dim] = fixupSize(params);
653
0.85 82820 654 if isempty(params.scale)
5.13 82820 655 params.scale = deriveScaleFromSize(params);
0.19 82820 656 end
657
0.84 82820 658 if isempty(params.output_size)
659 params.output_size = deriveSizeFromScale(params);
660 end
Other subfunctions in this file are not included in this listing.