Leptonica 1.68
C Image Processing Library
|
00001 /*====================================================================* 00002 - Copyright (C) 2001 Leptonica. All rights reserved. 00003 - This software is distributed in the hope that it will be 00004 - useful, but with NO WARRANTY OF ANY KIND. 00005 - No author or distributor accepts responsibility to anyone for the 00006 - consequences of using this software, or for whether it serves any 00007 - particular purpose or works at all, unless he or she says so in 00008 - writing. Everyone is granted permission to copy, modify and 00009 - redistribute this source code, for commercial or non-commercial 00010 - purposes, with the following restrictions: (1) the origin of this 00011 - source code must not be misrepresented; (2) modified versions must 00012 - be plainly marked as such; and (3) this notice may not be removed 00013 - or altered from any source or modified source distribution. 00014 *====================================================================*/ 00015 00016 /* 00017 * numa_reg.c 00018 * 00019 * Tests: 00020 * * histograms 00021 * * interpolation 00022 * * integration/differentiation 00023 * * rank extraction 00024 * * numa-morphology 00025 * * numa windowed stats 00026 * * numa extraction from pix on a line 00027 */ 00028 00029 #include <math.h> 00030 #ifndef _WIN32 00031 #include <unistd.h> 00032 #else 00033 #include <windows.h> /* for Sleep() */ 00034 #endif /* _WIN32 */ 00035 #include "allheaders.h" 00036 00037 #define DO_ALL 1 00038 00039 00040 main(int argc, 00041 char **argv) 00042 { 00043 l_int32 i, j, n, binsize, binstart, nbins, size; 00044 l_int32 w, h, wpls, rval, gval, bval; 00045 l_uint32 pixel; 00046 l_uint32 *lines, *datas; 00047 l_float32 pi, val, angle, xval, yval, x0, y0, rank, startval, fbinsize; 00048 l_float32 minval, maxval, meanval, median, variance, rankval; 00049 GPLOT *gplot; 00050 NUMA *na, *nahisto, *nax, *nay, *nap, *nasx, *nasy; 00051 NUMA *nadx, *nady, *nafx, *nafy, *na1, *na2, *na3, *na4; 00052 PIX *pixs, *pixt1, *pixt2, *pixt3, *pixt4, *pixt5, *pixg, *pixd; 00053 PIXA *pixa; 00054 static char mainName[] = "numa_reg"; 00055 00056 if (argc != 1) 00057 exit(ERROR_INT(" Syntax: numa_reg", mainName, 1)); 00058 00059 /* -------------------------------------------------------------------* 00060 * Histograms * 00061 * -------------------------------------------------------------------*/ 00062 #if DO_ALL 00063 pi = 3.1415926535; 00064 na = numaCreate(5000); 00065 for (i = 0; i < 500000; i++) { 00066 angle = 0.02293 * i * pi; 00067 val = (l_float32)(999. * sin(angle)); 00068 numaAddNumber(na, val); 00069 } 00070 00071 nahisto = numaMakeHistogramClipped(na, 6, 2000); 00072 nbins = numaGetCount(nahisto); 00073 nax = numaMakeSequence(0, 1, nbins); 00074 gplot = gplotCreate("/tmp/historoot1", GPLOT_X11, "example histo 1", 00075 "i", "histo[i]"); 00076 gplotAddPlot(gplot, nax, nahisto, GPLOT_LINES, "sine"); 00077 gplotMakeOutput(gplot); 00078 gplotDestroy(&gplot); 00079 numaDestroy(&nax); 00080 numaDestroy(&nahisto); 00081 00082 nahisto = numaMakeHistogram(na, 1000, &binsize, &binstart); 00083 nbins = numaGetCount(nahisto); 00084 nax = numaMakeSequence(binstart, binsize, nbins); 00085 fprintf(stderr, " binsize = %d, binstart = %d\n", binsize, binstart); 00086 gplot = gplotCreate("/tmp/historoot2", GPLOT_X11, "example histo 2", 00087 "i", "histo[i]"); 00088 gplotAddPlot(gplot, nax, nahisto, GPLOT_LINES, "sine"); 00089 gplotMakeOutput(gplot); 00090 gplotDestroy(&gplot); 00091 numaDestroy(&nax); 00092 numaDestroy(&nahisto); 00093 00094 nahisto = numaMakeHistogram(na, 1000, &binsize, NULL); 00095 nbins = numaGetCount(nahisto); 00096 nax = numaMakeSequence(0, binsize, nbins); 00097 fprintf(stderr, " binsize = %d, binstart = %d\n", binsize, 0); 00098 gplot = gplotCreate("/tmp/historoot3", GPLOT_X11, "example histo 3", 00099 "i", "histo[i]"); 00100 gplotAddPlot(gplot, nax, nahisto, GPLOT_LINES, "sine"); 00101 gplotMakeOutput(gplot); 00102 gplotDestroy(&gplot); 00103 numaDestroy(&nax); 00104 numaDestroy(&nahisto); 00105 00106 nahisto = numaMakeHistogramAuto(na, 1000); 00107 nbins = numaGetCount(nahisto); 00108 numaGetXParameters(nahisto, &startval, &fbinsize); 00109 nax = numaMakeSequence(startval, fbinsize, nbins); 00110 fprintf(stderr, " binsize = %7.4f, binstart = %8.3f\n", 00111 fbinsize, startval); 00112 gplot = gplotCreate("/tmp/historoot4", GPLOT_X11, "example histo 4", 00113 "i", "histo[i]"); 00114 gplotAddPlot(gplot, nax, nahisto, GPLOT_LINES, "sine"); 00115 gplotMakeOutput(gplot); 00116 gplotDestroy(&gplot); 00117 numaDestroy(&nax); 00118 numaDestroy(&nahisto); 00119 00120 numaGetStatsUsingHistogram(na, 2000, &minval, &maxval, &meanval, 00121 &variance, &median, 0.80, &rankval, &nahisto); 00122 fprintf(stderr, "Sin histogram: \n" 00123 " min val = %7.2f -- should be -999.00\n" 00124 " max val = %7.2f -- should be 999.00\n" 00125 " mean val = %7.2f -- should be 0.06\n" 00126 " median = %7.2f -- should be 0.30\n" 00127 " rmsdev = %7.2f -- should be 706.41\n" 00128 " rank val = %7.2f -- should be 808.15\n", 00129 minval, maxval, meanval, median, sqrt((l_float64)variance), 00130 rankval); 00131 numaHistogramGetRankFromVal(nahisto, 808.15, &rank); 00132 fprintf(stderr, " rank = %7.3f -- should be 0.800\n", rank); 00133 numaDestroy(&nahisto); 00134 numaDestroy(&na); 00135 #endif 00136 00137 /* -------------------------------------------------------------------* 00138 * Interpolation * 00139 * -------------------------------------------------------------------*/ 00140 #if DO_ALL 00141 /* Test numaInterpolateEqxInterval() */ 00142 pixs = pixRead("test8.jpg"); 00143 na = pixGetGrayHistogramMasked(pixs, NULL, 0, 0, 1); 00144 /* numaWriteStream(stderr, na); */ 00145 nasy = numaGetPartialSums(na); 00146 gplotSimple1(nasy, GPLOT_X11, "/tmp/introot1", "partial sums"); 00147 gplotSimple1(na, GPLOT_X11, "/tmp/introot2", "simple test"); 00148 numaInterpolateEqxInterval(0.0, 1.0, na, L_LINEAR_INTERP, 00149 0.0, 255.0, 15, &nax, &nay); 00150 gplot = gplotCreate("/tmp/introot3", GPLOT_X11, "test interpolation", 00151 "pix val", "num pix"); 00152 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1"); 00153 gplotMakeOutput(gplot); 00154 gplotDestroy(&gplot); 00155 numaDestroy(&na); 00156 numaDestroy(&nasy); 00157 numaDestroy(&nax); 00158 numaDestroy(&nay); 00159 pixDestroy(&pixs); 00160 #endif 00161 00162 #if DO_ALL 00163 /* Test numaInterpolateArbxInterval() */ 00164 pixs = pixRead("test8.jpg"); 00165 na = pixGetGrayHistogramMasked(pixs, NULL, 0, 0, 1); 00166 nasy = numaGetPartialSums(na); 00167 numaInsertNumber(nasy, 0, 0.0); 00168 nasx = numaMakeSequence(0.0, 1.0, 257); 00169 /* gplotSimple1(nasy, GPLOT_X11, "/tmp/nasyroot", "partial sums"); */ 00170 numaInterpolateArbxInterval(nasx, nasy, L_LINEAR_INTERP, 00171 10.0, 250.0, 23, &nax, &nay); 00172 gplot = gplotCreate("/tmp/introot4", GPLOT_X11, "arbx interpolation", 00173 "pix val", "cum num pix"); 00174 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1"); 00175 gplotMakeOutput(gplot); 00176 gplotDestroy(&gplot); 00177 numaDestroy(&na); 00178 numaDestroy(&nasx); 00179 numaDestroy(&nasy); 00180 numaDestroy(&nax); 00181 numaDestroy(&nay); 00182 pixDestroy(&pixs); 00183 #endif 00184 00185 #if DO_ALL 00186 /* Test numaInterpolateArbxVal() */ 00187 pixs = pixRead("test8.jpg"); 00188 na = pixGetGrayHistogramMasked(pixs, NULL, 0, 0, 1); 00189 nasy = numaGetPartialSums(na); 00190 numaInsertNumber(nasy, 0, 0.0); 00191 nasx = numaMakeSequence(0.0, 1.0, 257); 00192 /* gplotSimple1(nasy, GPLOT_X11, "/tmp/nasyroot", "partial sums"); */ 00193 nax = numaMakeSequence(15.0, (250.0 - 15.0) / 23.0, 24); 00194 n = numaGetCount(nax); 00195 nay = numaCreate(n); 00196 for (i = 0; i < n; i++) { 00197 numaGetFValue(nax, i, &xval); 00198 numaInterpolateArbxVal(nasx, nasy, L_QUADRATIC_INTERP, xval, &yval); 00199 numaAddNumber(nay, yval); 00200 } 00201 gplot = gplotCreate("/tmp/introot5", GPLOT_X11, "arbx interpolation", 00202 "pix val", "cum num pix"); 00203 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1"); 00204 gplotMakeOutput(gplot); 00205 gplotDestroy(&gplot); 00206 numaDestroy(&na); 00207 numaDestroy(&nasx); 00208 numaDestroy(&nasy); 00209 numaDestroy(&nax); 00210 numaDestroy(&nay); 00211 pixDestroy(&pixs); 00212 #endif 00213 00214 #if DO_ALL 00215 /* Test interpolation */ 00216 nasx = numaRead("testangle.numa"); 00217 nasy = numaRead("testscore.numa"); 00218 gplot = gplotCreate("/tmp/introot6", GPLOT_X11, "arbx interpolation", 00219 "angle", "score"); 00220 numaInterpolateArbxInterval(nasx, nasy, L_LINEAR_INTERP, 00221 -2.00, 0.0, 50, &nax, &nay); 00222 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "linear"); 00223 numaDestroy(&nax); 00224 numaDestroy(&nay); 00225 numaInterpolateArbxInterval(nasx, nasy, L_QUADRATIC_INTERP, 00226 -2.00, 0.0, 50, &nax, &nay); 00227 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "quadratic"); 00228 numaDestroy(&nax); 00229 numaDestroy(&nay); 00230 gplotMakeOutput(gplot); 00231 gplotDestroy(&gplot); 00232 gplot = gplotCreate("/tmp/introot7", GPLOT_X11, "arbx interpolation", 00233 "angle", "score"); 00234 numaInterpolateArbxInterval(nasx, nasy, L_LINEAR_INTERP, 00235 -1.2, -0.8, 50, &nax, &nay); 00236 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "quadratic"); 00237 gplotMakeOutput(gplot); 00238 gplotDestroy(&gplot); 00239 numaFitMax(nay, &yval, nax, &xval); 00240 fprintf(stderr, "max = %f at loc = %f\n", yval, xval); 00241 numaDestroy(&nasx); 00242 numaDestroy(&nasy); 00243 numaDestroy(&nax); 00244 numaDestroy(&nay); 00245 #endif 00246 00247 /* -------------------------------------------------------------------* 00248 * Integration and differentiation * 00249 * -------------------------------------------------------------------*/ 00250 #if DO_ALL 00251 /* Test integration and differentiation */ 00252 nasx = numaRead("testangle.numa"); 00253 nasy = numaRead("testscore.numa"); 00254 /* ---------- Plot the derivative ---------- */ 00255 numaDifferentiateInterval(nasx, nasy, -2.0, 0.0, 50, &nadx, &nady); 00256 gplot = gplotCreate("/tmp/diffroot1", GPLOT_X11, "derivative", 00257 "angle", "slope"); 00258 gplotAddPlot(gplot, nadx, nady, GPLOT_LINES, "derivative"); 00259 gplotMakeOutput(gplot); 00260 gplotDestroy(&gplot); 00261 /* ---------- Plot the original function ----------- */ 00262 /* and the integral of the derivative; the two */ 00263 /* should be approximately the same. */ 00264 gplot = gplotCreate("/tmp/diffroot2", GPLOT_X11, "integ-diff", 00265 "angle", "val"); 00266 numaInterpolateArbxInterval(nasx, nasy, L_LINEAR_INTERP, 00267 -2.00, 0.0, 50, &nafx, &nafy); 00268 gplotAddPlot(gplot, nafx, nafy, GPLOT_LINES, "function"); 00269 n = numaGetCount(nadx); 00270 numaGetFValue(nafx, 0, &x0); 00271 numaGetFValue(nafy, 0, &y0); 00272 nay = numaCreate(n); 00273 /* (Note: this tests robustness of the integrator: we go from 00274 * i = 0, and choose to have only 1 point in the interpolation 00275 * there, which is too small and causes the function to bomb out.) */ 00276 for (i = 0; i < n; i++) { 00277 numaGetFValue(nadx, i, &xval); 00278 numaIntegrateInterval(nadx, nady, x0, xval, 2 * i + 1, &yval); 00279 numaAddNumber(nay, y0 + yval); 00280 } 00281 fprintf(stderr, "It's required to get a 'npts < 2' error here!\n"); 00282 gplotAddPlot(gplot, nafx, nay, GPLOT_LINES, "anti-derivative"); 00283 gplotMakeOutput(gplot); 00284 gplotDestroy(&gplot); 00285 numaDestroy(&nasx); 00286 numaDestroy(&nasy); 00287 numaDestroy(&nafx); 00288 numaDestroy(&nafy); 00289 numaDestroy(&nadx); 00290 numaDestroy(&nady); 00291 numaDestroy(&nay); 00292 #endif 00293 00294 /* -------------------------------------------------------------------* 00295 * Rank extraction * 00296 * -------------------------------------------------------------------*/ 00297 #if DO_ALL 00298 /* Rank extraction with interpolation */ 00299 pixs = pixRead("test8.jpg"); 00300 nasy= pixGetGrayHistogramMasked(pixs, NULL, 0, 0, 1); 00301 numaMakeRankFromHistogram(0.0, 1.0, nasy, 350, &nax, &nay); 00302 gplot = gplotCreate("/tmp/rankroot1", GPLOT_X11, "test rank extractor", 00303 "pix val", "rank val"); 00304 gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1"); 00305 gplotMakeOutput(gplot); 00306 gplotDestroy(&gplot); 00307 numaDestroy(&nasy); 00308 numaDestroy(&nax); 00309 numaDestroy(&nay); 00310 pixDestroy(&pixs); 00311 #endif 00312 00313 #if DO_ALL 00314 /* Rank extraction, point by point */ 00315 pixs = pixRead("test8.jpg"); 00316 nap = numaCreate(200); 00317 pixGetRankValueMasked(pixs, NULL, 0, 0, 2, 0.0, &val, &na); 00318 for (i = 0; i < 101; i++) { 00319 rank = 0.01 * i; 00320 numaHistogramGetValFromRank(na, rank, &val); 00321 numaAddNumber(nap, val); 00322 } 00323 gplotSimple1(nap, GPLOT_X11, "/tmp/rankroot2", "rank value"); 00324 numaDestroy(&na); 00325 numaDestroy(&nap); 00326 pixDestroy(&pixs); 00327 #endif 00328 00329 /* -------------------------------------------------------------------* 00330 * Numa-morphology * 00331 * -------------------------------------------------------------------*/ 00332 #if DO_ALL 00333 na = numaRead("lyra-5.numa"); 00334 gplotSimple1(na, GPLOT_PNG, "/tmp/lyraroot1", "Original"); 00335 na1 = numaErode(na, 21); 00336 gplotSimple1(na1, GPLOT_PNG, "/tmp/lyraroot2", "Erosion"); 00337 na2 = numaDilate(na, 21); 00338 gplotSimple1(na2, GPLOT_PNG, "/tmp/lyraroot3", "Dilation"); 00339 na3 = numaOpen(na, 21); 00340 gplotSimple1(na3, GPLOT_PNG, "/tmp/lyraroot4", "Opening"); 00341 na4 = numaClose(na, 21); 00342 gplotSimple1(na4, GPLOT_PNG, "/tmp/lyraroot5", "Closing"); 00343 #ifndef _WIN32 00344 sleep(1); 00345 #else 00346 Sleep(1000); 00347 #endif /* _WIN32 */ 00348 pixa = pixaCreate(5); 00349 pixt1 = pixRead("/tmp/lyraroot1.png"); 00350 pixt2 = pixRead("/tmp/lyraroot2.png"); 00351 pixt3 = pixRead("/tmp/lyraroot3.png"); 00352 pixt4 = pixRead("/tmp/lyraroot4.png"); 00353 pixt5 = pixRead("/tmp/lyraroot5.png"); 00354 pixSaveTiled(pixt1, pixa, 1, 1, 25, 32); 00355 pixSaveTiled(pixt2, pixa, 1, 1, 25, 32); 00356 pixSaveTiled(pixt3, pixa, 1, 0, 25, 32); 00357 pixSaveTiled(pixt4, pixa, 1, 1, 25, 32); 00358 pixSaveTiled(pixt5, pixa, 1, 0, 25, 32); 00359 pixd = pixaDisplay(pixa, 0, 0); 00360 pixDisplay(pixd, 100, 100); 00361 pixWrite("/tmp/numamorph.png", pixd, IFF_PNG); 00362 numaDestroy(&na); 00363 numaDestroy(&na1); 00364 numaDestroy(&na2); 00365 numaDestroy(&na3); 00366 numaDestroy(&na4); 00367 pixaDestroy(&pixa); 00368 pixDestroy(&pixt1); 00369 pixDestroy(&pixt2); 00370 pixDestroy(&pixt3); 00371 pixDestroy(&pixt4); 00372 pixDestroy(&pixt5); 00373 pixDestroy(&pixd); 00374 #endif 00375 00376 /* -------------------------------------------------------------------* 00377 * Numa-windowed stats * 00378 * -------------------------------------------------------------------*/ 00379 #if DO_ALL 00380 na = numaRead("lyra-5.numa"); 00381 numaWindowedStats(na, 5, &na1, &na2, &na3, &na4); 00382 gplotSimple1(na, GPLOT_PNG, "/tmp/lyraroot6", "Original"); 00383 gplotSimple1(na1, GPLOT_PNG, "/tmp/lyraroot7", "Mean"); 00384 gplotSimple1(na2, GPLOT_PNG, "/tmp/lyraroot8", "Mean Square"); 00385 gplotSimple1(na3, GPLOT_PNG, "/tmp/lyraroot9", "Variance"); 00386 gplotSimple1(na4, GPLOT_PNG, "/tmp/lyraroot10", "RMS Difference"); 00387 #ifndef _WIN32 00388 sleep(1); 00389 #else 00390 Sleep(1000); 00391 #endif /* _WIN32 */ 00392 pixa = pixaCreate(5); 00393 pixt1 = pixRead("/tmp/lyraroot6.png"); 00394 pixt2 = pixRead("/tmp/lyraroot7.png"); 00395 pixt3 = pixRead("/tmp/lyraroot8.png"); 00396 pixt4 = pixRead("/tmp/lyraroot9.png"); 00397 pixt5 = pixRead("/tmp/lyraroot10.png"); 00398 pixSaveTiled(pixt1, pixa, 1, 1, 25, 32); 00399 pixSaveTiled(pixt2, pixa, 1, 1, 25, 32); 00400 pixSaveTiled(pixt3, pixa, 1, 0, 25, 32); 00401 pixSaveTiled(pixt4, pixa, 1, 1, 25, 32); 00402 pixSaveTiled(pixt5, pixa, 1, 0, 25, 32); 00403 pixd = pixaDisplay(pixa, 0, 0); 00404 pixDisplay(pixd, 100, 100); 00405 pixWrite("/tmp/numawindow.png", pixd, IFF_PNG); 00406 numaDestroy(&na); 00407 numaDestroy(&na1); 00408 numaDestroy(&na2); 00409 numaDestroy(&na3); 00410 numaDestroy(&na4); 00411 pixaDestroy(&pixa); 00412 pixDestroy(&pixt1); 00413 pixDestroy(&pixt2); 00414 pixDestroy(&pixt3); 00415 pixDestroy(&pixt4); 00416 pixDestroy(&pixt5); 00417 pixDestroy(&pixd); 00418 #endif 00419 00420 /* -------------------------------------------------------------------* 00421 * Extraction on a line * 00422 * -------------------------------------------------------------------*/ 00423 #if DO_ALL 00424 /* First, make a pretty image */ 00425 w = h = 200; 00426 pixs = pixCreate(w, h, 32); 00427 wpls = pixGetWpl(pixs); 00428 datas = pixGetData(pixs); 00429 for (i = 0; i < 200; i++) { 00430 lines = datas + i * wpls; 00431 for (j = 0; j < 200; j++) { 00432 rval = (l_int32)((255. * j) / w + (255. * i) / h); 00433 gval = (l_int32)((255. * 2 * j) / w + (255. * 2 * i) / h) % 255; 00434 bval = (l_int32)((255. * 4 * j) / w + (255. * 4 * i) / h) % 255; 00435 composeRGBPixel(rval, gval, bval, &pixel); 00436 lines[j] = pixel; 00437 } 00438 } 00439 pixg = pixConvertTo8(pixs, 0); /* and a grayscale version */ 00440 pixWrite("/tmp/junkpixg", pixg, IFF_PNG); 00441 pixDisplay(pixg, 850, 100); 00442 00443 na1 = pixExtractOnLine(pixg, 20, 20, 180, 20, 1); 00444 na2 = pixExtractOnLine(pixg, 40, 30, 40, 170, 1); 00445 na3 = pixExtractOnLine(pixg, 20, 170, 180, 30, 1); 00446 na4 = pixExtractOnLine(pixg, 20, 190, 180, 10, 1); 00447 gplotSimple1(na1, GPLOT_PNG, "/tmp/extroot1", "Horizontal"); 00448 gplotSimple1(na2, GPLOT_PNG, "/tmp/extroot2", "Vertical"); 00449 gplotSimple1(na3, GPLOT_PNG, "/tmp/extroot3", 00450 "Slightly more horizontal than vertical"); 00451 gplotSimple1(na4, GPLOT_PNG, "/tmp/extroot4", 00452 "Slightly more vertical than horizontal"); 00453 #ifndef _WIN32 00454 sleep(1); 00455 #else 00456 Sleep(1000); 00457 #endif /* _WIN32 */ 00458 pixa = pixaCreate(4); 00459 pixt1 = pixRead("/tmp/extroot1.png"); 00460 pixt2 = pixRead("/tmp/extroot2.png"); 00461 pixt3 = pixRead("/tmp/extroot3.png"); 00462 pixt4 = pixRead("/tmp/extroot4.png"); 00463 pixSaveTiled(pixt1, pixa, 1, 1, 25, 32); 00464 pixSaveTiled(pixt2, pixa, 1, 0, 25, 32); 00465 pixSaveTiled(pixt3, pixa, 1, 1, 25, 32); 00466 pixSaveTiled(pixt4, pixa, 1, 0, 25, 32); 00467 pixd = pixaDisplay(pixa, 0, 0); 00468 pixDisplay(pixd, 100, 100); 00469 pixWrite("/tmp/numaextract.png", pixd, IFF_PNG); 00470 numaDestroy(&na1); 00471 numaDestroy(&na2); 00472 numaDestroy(&na3); 00473 numaDestroy(&na4); 00474 pixaDestroy(&pixa); 00475 pixDestroy(&pixt1); 00476 pixDestroy(&pixt2); 00477 pixDestroy(&pixt3); 00478 pixDestroy(&pixt4); 00479 pixDestroy(&pixt5); 00480 pixDestroy(&pixs); 00481 pixDestroy(&pixg); 00482 pixDestroy(&pixd); 00483 #endif 00484 00485 return 0; 00486 }