Cirrus Logic CS485 Specifiche Pagina 252

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 319
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 251
Intel
®
Image Processing Library Reference Manual
11-30
11
Example 11-4 Re-mapping an Image (continued)
/// allocate memory destination with zero data
iplAllocateImage( dst, 1, 0 );
/// provide the x and y coordinates
/// these coords map the image to an identical one
for( y=0; y<height; ++y ) {
float yy = (float)y;
for( x=0; x<width; ++x ) {
float xx = (float)x;
iplPutPixel( xmap, x, y, &xx );
iplPutPixel( ymap, x, y, &yy );
}
}
/// now remap to get the same image
iplRemap( src, xmap, ymap, dst, IPL_INTER_LINEAR );
/// find max abs difference, should be 0
norm = (float)iplNorm( src, dst, IPL_C );
/// deallocate images
iplDeallocate( xmap, IPL_IMAGE_ALL );
iplDeallocate( ymap, IPL_IMAGE_ALL );
iplDeallocate( src, IPL_IMAGE_ALL );
iplDeallocate( dst, IPL_IMAGE_ALL );
return IPL_StsOk == iplGetErrStatus() && norm == 0;
}
Vedere la pagina 251
1 2 ... 247 248 249 250 251 252 253 254 255 256 257 ... 318 319

Commenti su questo manuale

Nessun commento