diff options
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/kurt2.m')
| -rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/kurt2.m | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/kurt2.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/kurt2.m deleted file mode 100755 index 8351eb4..0000000 --- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/kurt2.m +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | % K = KURT2(MTX,MEAN,VAR) | ||
| 2 | % | ||
| 3 | % Sample kurtosis (fourth moment divided by squared variance) | ||
| 4 | % of a matrix. Kurtosis of a Gaussian distribution is 3. | ||
| 5 | % MEAN (optional) and VAR (optional) make the computation faster. | ||
| 6 | |||
| 7 | % Eero Simoncelli, 6/96. | ||
| 8 | |||
| 9 | function res = kurt2(mtx, mn, v) | ||
| 10 | |||
| 11 | if (exist('mn') ~= 1) | ||
| 12 | mn = mean(mean(mtx)); | ||
| 13 | end | ||
| 14 | |||
| 15 | if (exist('v') ~= 1) | ||
| 16 | v = var2(mtx,mn); | ||
| 17 | end | ||
| 18 | |||
| 19 | if (isreal(mtx)) | ||
| 20 | res = mean(mean(abs(mtx-mn).^4)) / (v^2); | ||
| 21 | else | ||
| 22 | res = mean(mean(real(mtx-mn).^4)) / (real(v)^2) + ... | ||
| 23 | i*mean(mean(imag(mtx-mn).^4)) / (imag(v)^2); | ||
| 24 | end | ||
