Programa para el testeo de algunas funciones de la biblioteca.
- Autor
- Fernando Pujaico Rivera
- Fecha
- 18-07-2018 Este programa solo hace una prueba simple de las funciones que hice mas al tun tun.
#include <stdlib.h>
#include <pds/pdsra.h>
#include <pds/pdsdic.h>
#include <time.h>
int main(int argc, char** argv)
{
int ID=0;
PdsMatrix *M0=pds_matrix_new_rand(600,800);
PdsMatrix *M1=pds_matrix_new_rand(600,800);
PdsRegionRect R0=pds_region_rect(50,250,48,64);
PdsRegionRect R1=pds_region_rect_transfer(R0,64,64);
pds_matrix_init_region(M0,R0,0.0);
pds_matrix_init_region(M1,R1,0.0);
pds_region_rect_stylized_printf(R0);
pds_region_rect_stylized_printf(R1);
if(DIC==NULL) return EXIT_FAILURE;
PdsRegionRect R;
int N=10;
clock_t time_init = clock ();
clock_t time_end = clock ();
printf("Calculating using %f seconds by point\n",(time_end-time_init)/(N*CLOCKS_PER_SEC*1.0));
pds_matrix_mul_value(DIC->
M0,255.0);
pds_matrix_mul_value(DIC->
M1,255.0);
pds_matrix_save_bmp_with_grayscale(DIC->
M0,
"imagedicm0.bmp");
pds_matrix_save_bmp_with_grayscale(DIC->
M1,
"imagedicm1.bmp");
return EXIT_SUCCESS;
}