⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cczoom.c

📁 image processing including fourier,wavelet,segmentation etc.
💻 C
字号:
/*----------------------------- MegaWave Module -----------------------------*//* mwcommand  name = {cczoom};  version = {"2.0"};  author = {"Lionel Moisan"};  function = {"Zoom of a color char image"};  usage = {'x'->x_flg          "to zoom only in the x direction", 'y'->y_flg          "to zoom only in the y direction",      'X':[zoom=2.]->zoom "zoom factor (default 2.0)",'o':[o=0]->o        "order: 0,1=linear,-3=cubic,3,5..11=spline, default 0",'i'->i_flg          "apply inverse zooming",in->in              "input Ccimage",out<-out            "output Ccimage"};*/#include <stdio.h>#include <math.h>#include "mw.h"extern Cimage czoom();/* NB : calling this module with out=in is possible */Ccimage cczoom(in,out,x_flg,y_flg,zoom,o,i_flg)     Ccimage in,out;     char *x_flg,*y_flg,*i_flg;     float *zoom;     int *o;{  Cimage aux_in,aux_out;  aux_in = mw_new_cimage();   aux_in->nrow = in->nrow;   aux_in->ncol = in->ncol;  /* red component */  aux_in->gray = in->red;  aux_out = czoom(aux_in,NULL,x_flg,y_flg,zoom,o,i_flg);  out = mw_change_ccimage(out,aux_out->nrow,aux_out->ncol);  memcpy(out->red,aux_out->gray,out->nrow*out->ncol*sizeof(unsigned char));  /* green component */  aux_in->gray = in->green;  aux_out = czoom(aux_in,aux_out,x_flg,y_flg,zoom,o,i_flg);  memcpy(out->green,aux_out->gray,out->nrow*out->ncol*sizeof(unsigned char));  /* blue component */  aux_in->gray = in->blue;  aux_out = czoom(aux_in,NULL,x_flg,y_flg,zoom,o,i_flg);  memcpy(out->blue,aux_out->gray,out->nrow*out->ncol*sizeof(unsigned char));  mw_delete_cimage(aux_out);  free(aux_in);   return(out);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -