亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? totacd.cpp

?? 圖像處理軟件,功能比較基礎
?? CPP
字號:
#include <stdafx.h>
#include <windows.h>
#include <stdio.h>
#include "common.h"
#include "basic.h"

#include "totacd.h"

/* TOTACD(unsigned char**,unsigned char**,int,int,unsigned char**,int,int,int*,int*,double)*/
void TOTACD(unsigned char** img,int imgrow,int imgcol,unsigned char** subimg,
       unsigned char** map,int maprow,int mapcol,int* lur,int* luc,double w)
/*unsigned char** img;     /*  the current frame image  */
/*int imgrow;              /*  the image's row size     */
/*int imgcol;              /*  the image's column size  */
/*unsigned char** subimg;  /*  the subregion on the previous frame's gate position */  
/*unsigned char** map;     /*  the template used on the previous frame */
/*int maprow;              /*  the template's row size  */
/*int mapcol;              /*  the template's column size */
/*int* lur;            /*  the previous frame's gate position  */
/*int* luc;            /*  the previous frame's gate position  */
/*double w;            /*  weigthing coefficent                */
{
   int i,j;
   double dr;  /* the track error along row direction */
   double dc;  /* the track error along column direction */
   
   /* Update the template with the subregion of the previous frame image  */
   /* the template and the subregion have the same size                   */
   for(i=0; i<maprow; i++)
   for(j=0; j<mapcol; j++)
   {
      map[i][j] = (unsigned char)((1-w)*map[i][j] + w*subimg[i][j]);
   }

   /* get the subregion on the current frame image */
   GetSubimg(img,imgrow,imgcol,subimg,map,maprow,mapcol,*lur,*luc);
   
   /* calculate the track error   */
   LocateXY(subimg,map,maprow,mapcol,&dr,&dc);
   TRACE("dr=%f, dc=%f\n",dr,dc);
   /* update the current frame's gate position   */      
   *lur = (int)(*lur-dr);
   *luc = (int)(*luc-dc);
   
}

void GetSubimg(unsigned char** img,int imgrow,int imgcol,unsigned char** subimg,
       unsigned char** map,int maprow,int mapcol,int lur,int luc)
/*unsigned char** img;
int imgrow;
int imgcol;
unsigned char** subimg;
unsigned char** map;
int maprow;
int mapcol;
int lur;
int luc;   */
{
   int i,j;
   
   for(i=0; i<maprow; i++)
   for(j=0; j<mapcol; j++)
   {
      subimg[i][j] = img[i+lur][j+luc];
   }
}

/* Update the template(map) with the subregion(subimg) of the image  */
/* the template and the subregion have the same size                 */
void UpdateTemplate(unsigned char** map,unsigned char** subimg,int row,int col,double w)
/*unsigned char** map;      /* the template            */
/*unsigned char** subimg;   /* the subregion from which the update information come */
/*int row;                  /* template's row size     */
/*int col;                  /* template's column size  */
/*double w;                  /* weighting coefficent    */
{
   int i,j;             /* repetition variable   */
   
   /* update the template    */
   for(i=0; i<row; i++)
   for(j=0; j<col; j++)
   {
      map[i][j] = (unsigned char)((1-w)*map[i][j] + w*subimg[i][j]);
   }
}
  
int LocateXY(unsigned char** map,unsigned char** subimg,int row,int col,double *dr,double *dc)
/*unsigned char** map;    /* the template of the current frame */
/*unsigned char** subimg; /* the iamge signal to be locate accurately */
/*int row;   /* the template and image signal's row size  */
/*int col;    /* column size  */
/*double *dr;  /* the track error along row direction */
/*double *dc;  /* the track error along column direction */
{
   double** Wer; /* the derivative of the template along row direction */
   double** Wec; /* the derivative of the template along column direction */
   double Cer,Cec;   /* the Ce correspond to row & column direction respectively */
   int i,j;
   double tem;    /* temporary variable  */

   /* calculate the template's derivative along the two direction respectively */
   /* allocate the memmory to the array Wer&Wec  */
   Wer = (double**)fspace_2d(row,col,sizeof(double));
   if(!Wer) return 0;
   Wec = (double**)fspace_2d(row,col,sizeof(double));
   if(!Wec) return 0;
   Derivative(map,Wer,Wec,row,col);

   /* calculate the Ce  */
   Cer = Cec = 0.0;
   for(i=0; i<row; i++)
   for(j=0; j<col; j++)
   {
      Cer += Wer[i][j]*Wer[i][j];
      Cec += Wec[i][j]*Wec[i][j];
   }
   
   /* calculate the track error  */
   *dr = *dc = 0.0;
   for(i=0; i<row; i++)   
   for(j=0; j<col; j++)
   {
      tem = subimg[i][j]-map[i][j];
      *dr += -Wer[i][j]*tem;
      *dc += -Wec[i][j]*tem;
   }
   *dr = *dr/Cer;
   *dc = *dc/Cec;

   return 1;
}


void Derivative(unsigned char** img,double** Der,double** Dec,int row,int col)
/*unsigned char** img; /* the input image  */
/*double** Der;  /* the derivative of image along row direction */
/*double** Dec;  /* the derivative of image along column direction */
/*int row;       /* the image's row size */
/*int col;        /* the image's column size */
{
   int i,j;  /* the repetition vriables  */
   
   /* reset Der&Dec to zero  */
   for(i=0; i<row; i++)
   for(j=0; j<col; j++)
   {
      Der[i][j] = Dec[i][j] = 0.0;
   }
   
   /* calculate the derivative  */
   /* row direction.... */
   for(j=0; j<col; j++)
   {
      for(i=1; i<row-1; i++) Der[i][j] = img[i+1][j] - img[i][j];
   }
   /* column direction.... */
   for(i=0; i<row; i++)
   {
      for(j=1; j<col-1; j++) Dec[i][j] = img[i][j+1] - img[i][j];
   }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合一区二区| 国产乱码精品一品二品| 久久精品99久久久| 欧美日韩一区二区三区四区| 欧美成人一级视频| 艳妇臀荡乳欲伦亚洲一区| 亚洲一区在线免费观看| 韩国女主播一区二区三区| 亚洲人成在线观看一区二区| 国产精品私人影院| 欧美精三区欧美精三区| 亚洲精品视频在线看| 国产成人一区二区精品非洲| 91色porny| 极品少妇xxxx精品少妇| 亚洲欧美另类久久久精品2019| 五月天精品一区二区三区| 国产精品456露脸| 九九热在线视频观看这里只有精品| 性感美女极品91精品| 久久精品国产网站| 欧美一区二区三区男人的天堂| 亚洲欧洲国产日本综合| 成人午夜短视频| 亚洲精品欧美综合四区| 日韩欧美成人午夜| 欧美午夜片在线看| 国产91丝袜在线播放0| 欧美激情一二三区| 视频一区二区三区在线| 精品国产91洋老外米糕| 秋霞成人午夜伦在线观看| 欧美精品国产精品| 狠狠网亚洲精品| 精品少妇一区二区三区视频免付费 | 黄色日韩三级电影| 欧美一级理论性理论a| 精品国产免费视频| 国产99一区视频免费| 91精品视频网| 国产精品一区免费在线观看| 欧美日韩激情在线| 久久国产欧美日韩精品| 美女在线观看视频一区二区| 欧美一区二区三区在线观看 | 亚洲在线一区二区三区| 美国av一区二区| 调教+趴+乳夹+国产+精品| 欧美日韩国产精品成人| 亚洲免费资源在线播放| 91精品国产综合久久精品麻豆| 91在线无精精品入口| 粉嫩一区二区三区在线看| 狠狠色丁香婷婷综合| 图片区小说区区亚洲影院| 亚洲美女视频一区| 亚洲乱码一区二区三区在线观看| 欧美一级一级性生活免费录像| 欧美日韩另类国产亚洲欧美一级| 日本高清不卡视频| 91久久精品国产91性色tv| 欧美三级视频在线观看| 欧美写真视频网站| 欧美日韩电影在线播放| 日韩一区二区麻豆国产| 日韩视频永久免费| 精品嫩草影院久久| 国产精品人妖ts系列视频| 国产精品美女久久福利网站| 国产精品国产三级国产aⅴ原创| 欧美本精品男人aⅴ天堂| 国产日韩欧美精品在线| 国产欧美一区二区精品久导航| 中文字幕av一区二区三区免费看| 亚洲欧美欧美一区二区三区| 亚洲一区二区三区四区不卡| 亚洲一区在线视频观看| 久久激五月天综合精品| 国产福利一区二区三区视频在线| 国产ts人妖一区二区| 一本色道久久综合亚洲aⅴ蜜桃 | 丁香桃色午夜亚洲一区二区三区| 韩国三级在线一区| 黄一区二区三区| 日韩二区三区四区| 久久国产精品区| 91精品国产综合久久福利软件| 国产乱码精品一区二区三区五月婷| 精品欧美一区二区在线观看| 日本麻豆一区二区三区视频| 97se亚洲国产综合自在线观| 波多野洁衣一区| 91福利视频久久久久| 精品久久久久久久人人人人传媒| 中文字幕在线免费不卡| 国产欧美日韩另类视频免费观看| 日韩一区中文字幕| 日本免费在线视频不卡一不卡二| 午夜精品一区在线观看| 亚洲va韩国va欧美va| 日本va欧美va瓶| 国内精品国产三级国产a久久| 国产a区久久久| 欧美精品久久天天躁| 久久久亚洲精品石原莉奈| 久久精品视频一区二区三区| 免费成人美女在线观看.| 色欧美片视频在线观看| 7799精品视频| 亚洲午夜久久久| eeuss鲁片一区二区三区 | 97超碰欧美中文字幕| 久久精品欧美一区二区三区麻豆| 亚洲超碰97人人做人人爱| 久久国产人妖系列| 波多野结衣91| 337p粉嫩大胆噜噜噜噜噜91av| 伊人性伊人情综合网| a4yy欧美一区二区三区| 久久久国产精华| 国产精品一二三四| av在线不卡观看免费观看| 在线综合视频播放| 午夜精品国产更新| 欧美色精品天天在线观看视频| 亚洲成a人在线观看| 91蜜桃在线观看| 亚洲成人av一区二区三区| 成人听书哪个软件好| 久久夜色精品国产噜噜av| 亚洲国产精品自拍| 欧美tickling网站挠脚心| 国产99久久久精品| 1000部国产精品成人观看| 在线亚洲欧美专区二区| 亚洲成人免费视| 欧美麻豆精品久久久久久| 麻豆国产精品视频| 亚洲网友自拍偷拍| 日韩欧美一级特黄在线播放| 欧美人动与zoxxxx乱| 久久精品国产**网站演员| 精品福利一二区| 美腿丝袜一区二区三区| 欧美日韩一区在线| 免费看欧美女人艹b| 亚洲综合精品久久| 中文字幕亚洲综合久久菠萝蜜| 麻豆精品一二三| 91一区二区三区在线播放| 中文字幕亚洲精品在线观看| 国产91在线看| 亚洲色图视频网| 欧美日韩在线播放一区| 午夜久久久影院| 日韩一卡二卡三卡四卡| 久久精品国产亚洲a| 精品国精品国产尤物美女| 黄网站免费久久| 国产精品久久久久天堂| 色婷婷av一区二区三区大白胸| 亚洲成人在线观看视频| 欧美一二三区在线| 国产精品一级二级三级| 亚洲婷婷综合久久一本伊一区| 91久久精品国产91性色tv| 日韩国产一二三区| 精品精品欲导航| 波多野结衣中文一区| 一区二区三区欧美日韩| 欧美大片一区二区三区| 成人免费毛片片v| 亚洲一区免费观看| 欧美mv和日韩mv的网站| 91免费精品国自产拍在线不卡| 亚洲不卡av一区二区三区| 国产丝袜美腿一区二区三区| 色综合久久88色综合天天| 美女高潮久久久| |精品福利一区二区三区| 91精品国产综合久久香蕉的特点| 成人精品免费视频| 日韩电影一区二区三区四区| 欧美色视频在线| 欧美一区二区在线看| 日韩欧美一级二级三级久久久| 亚洲欧美偷拍三级| 亚洲成av人片一区二区| 国产一区在线观看视频| 免费不卡在线视频| 成人国产精品免费网站| 成人黄色片在线观看| 欧美吻胸吃奶大尺度电影 | 欧美精选在线播放| 日韩精品一区二区三区四区| 亚洲欧美另类久久久精品| 欧美变态tickling挠脚心| 色婷婷一区二区三区四区| 国产一区二区三区免费在线观看| 亚洲老司机在线|