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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fvscanny.cpp

?? 指紋識(shí)別程序 源代碼。。。。。 Vc開發(fā)
?? CPP
字號(hào):
// Taken from the canny.c file// Robot Vision Group// Dept. of Artifical Intelligence// University of Edinburgh//// Authors: Bob Fisher, Dave Craft, A Fitzgibbion// orginal date September 86// program: canny.c//// purpose: to apply a simple symmetric canny operator to any size image// // Revised September 2002// By Shivang Patel// Revisions made to work with Fingerprint Verification System (FVS)#include <math.h>#include <stdio.h>#include <stdlib.h>#include "fvsimage.h"#include "vector.h"#include "fvstypes.h"/*double hypotenuse(double x, double y);double gaussian(double x, double s);FvsError_t canny_core(double stddev, FvsImage<FVS_IMAGE_TYPE> & img, Vector<unsigned char> & derivative_mag, 					  Vector<unsigned char> & magnitude, Vector <unsigned char> & orientation);int follow(int i, int j, int low, FvsImage<FVS_IMAGE_TYPE> & img, Vector<unsigned char> & magnitude, Vector<unsigned char> & orientation);*/// Scales angles in radians to fit within the 0-255 range of unsigned// char variables#define ORIENT_SCALE 40.0// hypot can't cope when both it's arguments are zero, hence this hack...double hypotenuse(double x, double y){	if (x == 0.0 && y == 0.0) return 0.0;	else return hypot(x,y);}// gaussian function (centered at the origin and ignoring the factor of // 1/(s * sqrt(2 *PI))) double gaussian (double x, double s){	return (exp((-x*x)/(2*s*s)));}FvsError_t canny_core(double stddev, FvsImage<FVS_IMAGE_TYPE> & img, Vector<unsigned char> & derivative_mag, 					  Vector<unsigned char> & magnitude, Vector <unsigned char> & orientation){	int filter_width; // length of 1-D gaussian mask	Vector<float> gsmooth_x, gsmooth_y;	Vector<float> derivative_x, derivative_y;	int i, j, k, n; // counter	int t; // temp grad magnitude variable	double a, b, c, d, g0; // mask generation intermediate vars	double ux, uy;	double t1, t2;	double G[20], dG[20], D2G[20]; // gaussian & derivative filter masks	double gc, gn, gs, gw, ge, gnw, gne, gsw, gse; 	int jlimit, jstart;	int ilimit;	int jfactor;	int kfactor1, kfactor2;	int kfactor;	int cindex, nindex, sindex, windex, eindex, nwindex, neindex, swindex, seindex;	int low = 1, high = 255; // tracker hysteresis parameters	int col_plus, col_minus; // col + 1 and col-1 respectiably	int picsize;	int mag_overflow_count = 0; // used to measure how often mag array overflows	int man_underflow_count = 0; // used to measure how often mag array underflow	picsize = img.width() * img.height();	// calculate coefficents for 1-dimensional G, dG/dn and delta squared G filters	for (n = 0; n < 20; n++)	{		a = gaussian(((double)n), stddev);		if (a > 0.005 || n<2)		{			b = gaussian((double)n-0.5, stddev);			c = gaussian((double)n+0.5, stddev);			d = gaussian((double)n, stddev);			G[n] = (a + b + c)/3/(6.283185*stddev*stddev);			dG[n] = c - b;			D2G[n] = 1.6 * d - a; // DOG		}		else break;	} // for n	filter_width = n;		// allocate space for gaussian smoothing arrays	gsmooth_x.resize(picsize);	gsmooth_y.resize(picsize);	// produce x and y convolutions with gaussian	ilimit = img.width() - (filter_width - 1);	jstart = img.width() - (filter_width - 1);	jlimit = img.width() - (img.height() - (filter_width - 1));	for (i = filter_width - 1; i < ilimit; ++i)	{		for (jfactor = jstart; jstart < jlimit; jfactor += img.width())		{			cindex = i + jfactor;			t1 = img[i][cindex] * G[0];			t2 = t1;			for (k = 1, kfactor = cindex - img.width(), kfactor2 = cindex + img.width();			k < filter_width; k++, kfactor1 -= img.width(), kfactor2 += img.width())			{				t1 += G[k] * (img[kfactor1 - (kfactor1/img.width())][kfactor1/img.width()] +					img[kfactor2 - (kfactor2/img.width())][kfactor2/img.width()]);				t2 += G[k] * (img[(cindex - k) - ((cindex - k)/img.width())][((cindex - k)/					img.width())] + img[(cindex + k) - ((cindex + k)/img.width())][((cindex +k)/img.width())]);			} // for k			gsmooth_x[cindex] = t1;			gsmooth_y[cindex] = t2;		} // for jfactor	} // for i	// allocate space for gradient arrays 	derivative_x.resize(picsize);	derivative_y.resize(picsize);	// produce x and y convolutions with derivative of gaussian	for (i = filter_width - 1; i < ilimit; ++i)	{		for (jfactor = jstart; jfactor < jlimit; jfactor += img.width())		{			t1 = 0;			cindex = i + jfactor;			for (k = 1; k < filter_width; ++k)				t1 += dG[k] * (gsmooth_x[cindex - k] - gsmooth_x[cindex + k]);			derivative_x[cindex] = t1;		} // for jfactor	} // for i	for (i = n; i < img.width() - n; ++i)	{		for (jfactor = jstart; jfactor < jlimit; jfactor += img.width())		{			t2 = 0; 			cindex = i + jfactor;			for (k = 1, kfactor = img.width(); k < filter_width; k++, kfactor += img.width())				t2 += dG[k] * (gsmooth_y[cindex - kfactor] - gsmooth_y[cindex + kfactor]);			derivative_y[cindex] = t2;		} // for jfactor 	} // for i	// non-maximum suppression (4 cases for orientation of line of max slope)	ilimit = img.width() - filter_width;	jstart = img.width() - filter_width;	jlimit = img.width() * (img.height() - filter_width);		for (i = filter_width; i < ilimit; ++i)	{		for (jfactor = jstart; jfactor < jlimit; jfactor += img.width())		{			// calculate current indeces			cindex = i + jfactor;			nindex = cindex - img.width();			sindex = cindex + img.width();			windex = cindex - 1;			eindex = cindex + 1;			nwindex = nindex - 1;			neindex = nindex + 1;			swindex = sindex - 1;			seindex = sindex + 1;			ux = derivative_x[cindex];			uy = derivative_y[cindex];			gc = hypotenuse(ux, uy);						nwindex = (nwindex<0)?0:nwindex;			// scale fv to fit into an unsighed change arry			t = gc * 20.0;						derivative_mag[cindex] = (t < 256?t:255);			gn = hypotenuse(derivative_x[nindex], derivative_y[nindex]);			gs = hypotenuse(derivative_x[sindex], derivative_y[sindex]);			gw = hypotenuse(derivative_x[windex], derivative_y[windex]);			ge = hypotenuse(derivative_x[eindex], derivative_y[eindex]);			gne = hypotenuse(derivative_x[neindex], derivative_y[neindex]);			gnw = hypotenuse(derivative_x[nwindex], derivative_y[nwindex]);			gsw = hypotenuse(derivative_x[swindex], derivative_y[swindex]);			gse = hypotenuse(derivative_x[seindex], derivative_y[seindex]);			if (ux * uy > 0)			{				if (fabs(ux) < fabs(uy))				{					if ((g0 = fabs(uy * gc)) < fabs(ux * gse + (uy - ux) * gs) || 						g0 <= fabs(ux * gnw + (uy - ux)*gn))						continue;				} else {					if ((g0 = fabs(ux * gc)) < fabs(uy * gse + (ux - uy) * gc) || 						g0 <= fabs(uy * gnw + (ux - uy) * gw))						continue;				} 			} else {				if (fabs(ux) < fabs(uy))				{					if ((g0 = fabs(uy * gc)) < fabs(ux * gne - (uy + ux) * gn) || 						g0 <= fabs(ux * gsw - (uy + ux) * gs))						continue;				} else {					if ((g0 = fabs(ux * gc)) < fabs(uy * gne - (ux + uy) * gc) ||						g0 <= fabs(uy * gsw - (ux + uy) * gw))						continue;				}			}			// seems to be a good scale factor			magnitude [cindex] = derivative_mag[cindex];			// pi * 40 ~= 128 - direction is (thought of as ) a sign byte			orientation[cindex] = atan2(ux, uy) * ORIENT_SCALE;		}	}		//SP: vector class destructor will free all memory when function ends	return FvsOk;}// follow a connect edge int follow(int i, int j, int low, FvsImage<FVS_IMAGE_TYPE> & img, Vector<unsigned char> & magnitude, Vector<unsigned char> & orientation){	int k, l; // counters	int i_plus_1, i_minus_1, j_plus_1, j_minus_1;	long index, kindex;	char break_flag;	i_plus_1 = i + 1;	i_minus_1 = i - 1;	j_plus_1 = j + 1;	j_minus_1 = j - 1;	index = i + j * img.width();	if (j_plus_1 >= img.height()) j_plus_1 = img.height() - 1;	if (j_minus_1 < 0) j_minus_1 = 0;	if (i_plus_1 >= img.height()) i_plus_1 = img.height() - 1;	if (i_minus_1 < 0) i_minus_1 = 0;	if (!img[i][j])	{		// current point must be added to the list of tracked points		img[i][j] = magnitude[j * img.width() + i];		// now we check immediately adhacent points to see if they too 		// could be added to the track		break_flag = 0;		for (k = i_minus_1; k <= i_plus_1; k++)		{			for (l = j_minus_1; l <= j_plus_1; ++l)			{				kindex = k+l * img.width();				// SP: Threshold low value should be replaced by 1				if (!(l == j && k == i) && magnitude[kindex] >= 1) 				{					if (follow(k, l, low, img,magnitude,orientation)) 					{						break_flag = 1;						break;					} // if follow				} // if (!(l==j && k==i)			} // for l			if (break_flag) break;		} // for k		return 1;	} 	else return 0;}// Track the edges in the magnitude away, starting at points that exceed the "high"// threshold and continuing to track as long as point values don't duck below the "low"// threshold (yes it's hystercsis... I'm sure that hyster means "womb" (as in hysterical),// but I don't know what its doin in a common engineering term)void thresholding_tracker(int high, int low, FvsImage<FVS_IMAGE_TYPE> & img, Vector<unsigned char> & magnitude,						  Vector<unsigned char> & orientation){	int i, j, k; // counters	// clear data array before tracking/*	for (i = 0; i < img.height(); i++)	{		for (j = 0; j < img.width(); j++)		{			img[i][j] = 0;		}	}*/	// threshold image with hystersis: follow from each strong edge point	for (i = 0; i < img.width(); i++)	{		for (j = 0; j < img.height(); j++)		{			if (magnitude[i + img.width() * j] >= high)				follow(i, j, low, img, magnitude, orientation);		}	}}int FVSCannyEdgeDect(FvsImage<FVS_IMAGE_TYPE> & img, int low=1, int high=255){	double s = 1.0; // standard deviation of gaussian	Vector<unsigned char> derivative_mag; // mag of del G before non-maximum suppression	Vector<unsigned char> magnitude, orientation; // mag & orintation agter non-max suppression	// resize vectors	derivative_mag.resize(img.width() * img.height());	magnitude.resize(img.width() * img.height());	orientation.resize(img.width() * img.height());	// call canny core routines - these perform a gaussian smoothing, calculate a gradient	// array, and suppress non-maximal points in this array	canny_core(s, img, derivative_mag, magnitude, orientation);	// here write orientation and magnitude to a file to see how they look		// track edges 	thresholding_tracker(high, low, img, magnitude, orientation);	// to see the image output img to a file	return 0;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频一区二区| 国内久久婷婷综合| 欧美色偷偷大香| 丝袜亚洲另类欧美综合| 日韩欧美综合在线| 国产乱子伦视频一区二区三区| 久久精品一区蜜桃臀影院| 国产在线视视频有精品| 亚洲国产精品成人综合| 在线视频国内一区二区| 麻豆国产一区二区| 欧美经典一区二区三区| 色婷婷激情综合| 亚洲国产精品久久人人爱蜜臀| 日韩欧美在线一区二区三区| 国产91在线看| 亚洲一区二区精品3399| 欧美变态tickling挠脚心| 不卡的看片网站| 日韩av在线免费观看不卡| 久久久久久久久久久久久女国产乱| 97se亚洲国产综合自在线| 日本视频在线一区| 一区二区中文字幕在线| 这里是久久伊人| 成人精品小蝌蚪| 裸体在线国模精品偷拍| 中文字幕一区二区三区四区不卡| 在线不卡免费av| 93久久精品日日躁夜夜躁欧美| 美女视频黄 久久| 亚洲激情一二三区| 欧美经典一区二区| 欧美一区二区三区婷婷月色 | 首页综合国产亚洲丝袜| 国产午夜精品一区二区三区嫩草| 欧美日韩精品欧美日韩精品| 国产成人综合在线观看| 青青草国产精品亚洲专区无| 亚洲欧洲国产日本综合| 久久久亚洲高清| 欧美一区二区在线免费观看| 91官网在线观看| 粉嫩aⅴ一区二区三区四区| 日本免费新一区视频| 亚洲视频1区2区| 国产欧美精品一区| 日韩你懂的在线观看| 欧美色图在线观看| 一本到三区不卡视频| 国产99一区视频免费| 美国欧美日韩国产在线播放| 亚洲mv在线观看| 亚洲精品日韩一| 成人欧美一区二区三区黑人麻豆 | 国产亚洲欧洲997久久综合| 正在播放一区二区| 欧美日韩在线免费视频| 97精品电影院| 91丨九色丨黑人外教| 成人va在线观看| 国产福利精品导航| 国产精品亚洲一区二区三区在线| 久久精品国产精品亚洲精品 | 亚洲一区二区四区蜜桃| 亚洲精品ww久久久久久p站| 1024成人网色www| 成人欧美一区二区三区小说| 成人免费一区二区三区在线观看| 国产蜜臀av在线一区二区三区 | 国产日韩一级二级三级| 精品精品国产高清a毛片牛牛| 日韩欧美国产成人一区二区| 日韩午夜av一区| 精品国产乱码久久久久久久 | 亚洲天堂av一区| 国产精品短视频| 亚洲欧美另类小说| 亚洲欧美区自拍先锋| 亚洲欧美二区三区| 亚洲一区二区三区国产| 午夜精品一区在线观看| 热久久免费视频| 激情亚洲综合在线| 国产成人精品亚洲午夜麻豆| 成人免费毛片片v| 91免费观看国产| 欧美日韩在线综合| 欧美电影免费观看高清完整版 | 国产乱妇无码大片在线观看| 国产成人在线电影| 91日韩在线专区| 欧美日韩一区二区三区视频| 日韩一区二区免费高清| 久久精品亚洲国产奇米99| 国产精品欧美一级免费| 亚洲国产中文字幕| 蜜桃在线一区二区三区| 成人精品鲁一区一区二区| 色av一区二区| 日韩精品在线看片z| 国产女人水真多18毛片18精品视频| 国产精品久久一卡二卡| 亚洲超丰满肉感bbw| 国产乱一区二区| 欧美午夜精品一区二区三区| 日韩欧美的一区| 亚洲女同一区二区| 久久99蜜桃精品| 色综合天天综合网国产成人综合天| 欧美狂野另类xxxxoooo| 久久久精品国产99久久精品芒果| 亚洲精品国产一区二区三区四区在线| 日本中文一区二区三区| 99在线视频精品| 日韩一区二区免费电影| 亚洲色图一区二区三区| 国模套图日韩精品一区二区| 91麻豆免费观看| 亚洲精品在线观| 一区二区三国产精华液| 国产精品综合av一区二区国产馆| 欧美日韩一区在线| 欧美国产欧美综合| 免费成人美女在线观看.| 91麻豆福利精品推荐| 久久久久久97三级| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产精品麻豆99久久久久久| 亚洲a一区二区| thepron国产精品| 久久婷婷一区二区三区| 亚洲国产成人tv| 色综合夜色一区| 国产女主播一区| 国产综合久久久久影院| 91精品国产美女浴室洗澡无遮挡| 一区二区中文字幕在线| 国产盗摄一区二区三区| 精品久久人人做人人爱| 日日夜夜免费精品视频| 欧美最猛黑人xxxxx猛交| 国产精品每日更新在线播放网址| 久久超碰97人人做人人爱| 欧美日韩日日摸| 亚洲精品乱码久久久久久久久 | 久久婷婷国产综合国色天香| 天堂影院一区二区| 欧美丝袜丝nylons| 亚洲色图一区二区三区| jlzzjlzz亚洲日本少妇| 日本一区二区免费在线观看视频 | 捆绑调教美女网站视频一区| 欧美日韩国产123区| 亚洲成av人片观看| 欧美精选午夜久久久乱码6080| 亚洲影院久久精品| 欧美影院一区二区| 亚洲国产一区二区三区| 欧美在线不卡视频| 一区二区国产盗摄色噜噜| 日本韩国一区二区三区视频| 一区二区三区国产| 欧美日韩一区三区四区| 天天影视色香欲综合网老头| 69堂亚洲精品首页| 美女视频一区二区| 久久综合狠狠综合| 高潮精品一区videoshd| 国产精品欧美一区喷水| 97se亚洲国产综合在线| 亚洲亚洲人成综合网络| 欧美日韩精品欧美日韩精品一综合| 污片在线观看一区二区| 欧美精品在线观看播放| 久久成人久久鬼色| 国产亚洲精品久| 99久久久无码国产精品| 亚洲综合视频网| 欧美一区二区三区的| 激情欧美日韩一区二区| 国产精品久久久久永久免费观看| 91在线无精精品入口| 午夜激情一区二区三区| 日韩欧美国产精品一区| 国产成人免费高清| 一区二区三区色| 欧美一区二区三区播放老司机| 国产乱一区二区| 夜夜嗨av一区二区三区四季av| 欧美卡1卡2卡| 国产精品自拍av| 一区二区理论电影在线观看| 制服丝袜亚洲精品中文字幕| 激情小说亚洲一区| 亚洲男同1069视频| 欧美变态凌虐bdsm| 色综合一区二区| 国产综合色视频| 夜夜精品浪潮av一区二区三区|