www.pudn.com > src.rar
To Read all the content
[file head]:
/********************************************************************
*
* image repaired tool
*
********************************************************************/
#include <tina/all_tina.h>
#include "bmp.h"
static int iminarg1,iminarg2;
#define IMIN(a,b) (iminarg1 = (a),iminarg2 = (b),(iminarg1) < (iminarg2) ? (iminarg1) : (iminarg2))
#define nMAX 256*256
static double gdata[nMAX];
static Tv *tv = NULL;
static Tv *tv1=NULL;
#define MAXPATHLEN 64
static char directory_name[MAXPATHLEN];
static char file_name[MAXPATHLEN];
static char pathname[MAXPATHLEN];
static void *pdir=0, *pfile=0;
static Imrect *read_image(void)
{
Imrect *srcIm;
/*----------------Read the image---------------------------*/
(void) strip_spaces(file_name);
(void) strip_spaces(directory_name);
(void) string_append(pathname, directory_name, "/", file_name, NULL);
srcIm = BmpToImrect(pathname);
/*------------------------------------------------*/
return(srcIm);
}
/*
static void denoise_3sigma
... ...
[file tail]:
... ...
****/
void denoise_3sigma_tool(int x, int y)
{
static void *tool = NULL;
if (tool)
{
tw_show_tool(tool);
return;
}
tool = (void *)tw_tool("Image 3sigma denoise", x, y);
/* Initialise pathname from environment variable (or #define) */
(void) environ_pathname_get(directory_name, file_name,
"TINA_IMAGE_DEFAULT",
"/home/wzz/newimscramdegree/result/Lena.bmp");
//tw_button("3sigma",denoise_3sigma_proc,NULL);
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_button("Ave_Var",Get_ave_var_proc);
tw_button("Gauss",Gauss_proc);
tw_button("FFT",FFT_proc);
tw_newrow();
tw_button("Motion",Motion_proc);
//tw_button("Ave_3sigma",Ave_3sigma_proc);
//tw_button("Med_3sigma",Med_3sigma_proc);
tw_newrow();
tw_end_tool();
}