diff options
Diffstat (limited to 'analyzer/pgmtexture.c')
-rw-r--r-- | analyzer/pgmtexture.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c index ea0db9b0..4e0dd4d5 100644 --- a/analyzer/pgmtexture.c +++ b/analyzer/pgmtexture.c @@ -34,9 +34,9 @@ ** ANY SUCH ITEM. LICENSEE AND/OR USER AGREES TO INDEMNIFY AND HOLD ** TAES AND TAMUS HARMLESS FROM ANY CLAIMS ARISING OUT OF THE USE OR ** POSSESSION OF SUCH ITEMS. -** +** ** Modification History: -** 24 Jun 91 - J. Michael Carstensen <jmc@imsor.dth.dk> supplied fix for +** 24 Jun 91 - J. Michael Carstensen <jmc@imsor.dth.dk> supplied fix for ** correlation function. ** ** 05 Oct 05 - Marc Breithecker <Marc.Breithecker@informatik.uni-erlangen.de> @@ -154,7 +154,7 @@ matrix (unsigned int const nrl, -static void +static void results (const char * const name, const float * const a) { @@ -170,7 +170,7 @@ results (const char * const name, -static void +static void simplesrt (unsigned int const n, float * const arr) { @@ -193,7 +193,7 @@ simplesrt (unsigned int const n, -static void +static void mkbalanced (float ** const a, unsigned int const n) { @@ -243,7 +243,7 @@ mkbalanced (float ** const a, -static void +static void reduction (float ** const a, unsigned int const n) { @@ -265,7 +265,7 @@ reduction (float ** const a, for (j = m - 1; j <= n; ++j) SWAP(a[i][j], a[m][j]); for (j = 1; j <= n; j++) - SWAP(a[j][i], a[j][m]); + SWAP(a[j][i], a[j][m]); a[j][i] = a[j][i]; } if (x != 0.0) { @@ -305,7 +305,7 @@ norm(float ** const a, -static void +static void hessenberg(float ** const a, unsigned int const n, float * const wr, @@ -347,7 +347,7 @@ hessenberg(float ** const a, float const z = sqrt(fabs(q)); x += t; if (q >= 0.0) { - float const z2 = p + sign(z, p); + float const z2 = p + sign(z, p); wr[nn - 1] = wr[nn] = x + z2; if (z2) wr[nn] = x - w / z2; @@ -389,7 +389,7 @@ hessenberg(float ** const a, if (m == l) break; u = fabs(a[m][m - 1]) * (fabs(q) + fabs(r)); - v = fabs(p) * (fabs(a[m - 1][m - 1]) + fabs(z) + + v = fabs(p) * (fabs(a[m - 1][m - 1]) + fabs(z) + fabs(a[m + 1][m + 1])); if (u + v == v) break; @@ -457,7 +457,7 @@ hessenberg(float ** const a, -static float +static float f1_a2m(float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -481,12 +481,12 @@ f1_a2m(float ** const p, -static float +static float f2_contrast(float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- Contrast - + The contrast feature is a difference moment of the P matrix and is a measure of the contrast or the amount of local variations present in an image. @@ -511,7 +511,7 @@ f2_contrast(float ** const p, -static float +static float f3_corr(float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -521,11 +521,12 @@ f3_corr(float ** const p, the image. -----------------------------------------------------------------------------*/ unsigned int i; - float sumSqrx, sumSqry, tmp; + float sumSqrx; + float tmp; float * px; float meanx, meany, stddevx, stddevy; - sumSqrx = 0.0; sumSqry = 0.0; + sumSqrx = 0.0; meanx = 0.0; meany = 0.0; px = vector(0, ng); @@ -548,7 +549,6 @@ f3_corr(float ** const p, } meany = meanx; - sumSqry = sumSqrx; stddevx = sqrt(sumSqrx - (SQR(meanx))); stddevy = stddevx; @@ -563,7 +563,7 @@ f3_corr(float ** const p, -static float +static float f4_var (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -587,7 +587,7 @@ f4_var (float ** const p, -static float +static float f5_idm (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -606,7 +606,7 @@ f5_idm (float ** const p, -static float +static float f6_savg (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -634,7 +634,7 @@ f6_savg (float ** const p, -static float +static float f7_svar (float ** const p, unsigned int const ng, float const s) { @@ -663,7 +663,7 @@ f7_svar (float ** const p, -static float +static float f8_sentropy (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -691,7 +691,7 @@ f8_sentropy (float ** const p, -static float +static float f9_entropy (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -710,9 +710,9 @@ f9_entropy (float ** const p, -static float -f10_dvar (float ** const p, - unsigned int const ng) { +static float +f10_dvar(float ** const p, + unsigned int const ng) { /*---------------------------------------------------------------------------- Difference Variance -----------------------------------------------------------------------------*/ @@ -731,7 +731,7 @@ f10_dvar (float ** const p, for (i = 0; i < ng; ++i) { unsigned int j; for (j = 0; j < ng; ++j) - pxpy[abs(i - j)] += p[i][j]; + pxpy[abs((int)i - (int)j)] += p[i][j]; } /* Now calculate the variance of Pxpy (Px-y) */ for (i = 0, sum = 0.0, sumSqr = 0.0; i < ng; ++i) { @@ -746,7 +746,7 @@ f10_dvar (float ** const p, -static float +static float f11_dentropy (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -764,7 +764,7 @@ f11_dentropy (float ** const p, for (i = 0; i < ng; ++i) { unsigned int j; for (j = 0; j < ng; ++j) - pxpy[abs(i - j)] += p[i][j]; + pxpy[abs((int)i - (int)j)] += p[i][j]; } for (i = 0, sum = 0.0; i < ng; ++i) sum += pxpy[i] * log10(pxpy[i] + EPSILON); @@ -774,7 +774,7 @@ f11_dentropy (float ** const p, -static float +static float f12_icorr (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- @@ -820,8 +820,8 @@ f12_icorr (float ** const p, -static float -f13_icorr (float ** const p, +static float +f13_icorr (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- Information Measures of Correlation @@ -866,7 +866,7 @@ f13_icorr (float ** const p, -static float +static float f14_maxcorr (float ** const p, unsigned int const ng) { /*---------------------------------------------------------------------------- |