www.pudn.com > src.rar   To Read all the content


[file head]:
/*---------------------------------------------------------------------------
* logistic transformation
* ---------------------------------------------------------------------------*/
#include <tina/all_tina.h>
#include "bmp.h"

#define MAXPATHLEN 64
static char directory_name[MAXPATHLEN];
static char file_name[MAXPATHLEN];
static char pathname[MAXPATHLEN];
static void *pdir=0, *pfile=0;

static int SCRAM_n = 1;
//static int INIT = 3;
static Tv *tv = NULL;
static Tv *tv1=NULL;

/*---------------------------------------------------------------------------
To generate the scrambling mapping-matrix of logistic transformation.
---------------------------------------------------------------------------*/
void logistic_matrix(int** r, int** c, int height, int width)
{
int i, j, u, v, t;

printf("\nLogistic transform\n");
int **flag;
flag = int_matrix(height, width);
for (i = 0; i < height; i++)
{
for(j = 0; j < width; j++)
{
flag[i]
... ...

[file tail]:
... ...
l = (void *)tw_tool("Logistic Scrambling tool", x, y);
/* Initialise pathname from environment variable (or #define) */
(void) environ_pathname_get(directory_name, file_name,
"TINA_IMAGE_DEFAULT",
"/home/wzz/newimscramdegree/result/Logistic/gRGB.gif");

tv = tv_create("Logistic original");
tv1 = tv_create("Logistic scrambled");
tw_choice("Tv choice", tv_choice_proc, 0, "original","scrambled", NULL);
tw_newrow();
tw_newrow();

/*---------------------------*/
pdir = (void *) tw_sglobal("Directory:", directory_name, 32);
tw_button("scan", scan_proc, NULL);
tw_newrow();
pfile = (void*) tw_sglobal("File:", file_name, 32);
tw_newrow();
/*---------------------------*/
//tw_iglobal("Initialization = 0. ", &amt;INIT, 5);
tw_newrow();
tw_iglobal("Scrambling times = ", &amt;SCRAM_n, 5);
tw_newrow();
tw_button("Logistic", Logistic_Trans,NULL);
tw_button("R_Logistic", R_Logistic_Trans,NULL);
tw_newrow();
tw_newrow();
tw_end_tool();
}