资源简介
基于c++和opencv开源版本,用来虹膜定位和虹膜识别,这个是linux环境下的
代码片段和文件信息
/*******************************************************
* Open Source for Iris : OSIRIS
* Version : 4.0
* Date : 2011
* Author : Guillaume Sutra Telecom SudParis France
* License : BSD
********************************************************/
#include
#include “OsiCircle.h“
using namespace std ;
namespace osiris
{
// CONSTRUCTORS & DESTRUCTORS
/////////////////////////////
OsiCircle::OsiCircle()
{
// Do nothing
}
OsiCircle::~OsiCircle()
{
// Do nothing
}
OsiCircle::OsiCircle ( const CvPoint & rCenter int rRadius )
{
setCenter(rCenter) ;
setRadius(rRadius) ;
}
// ACCESSORS
////////////
CvPoint OsiCircle::getCenter ( ) const
{
return mCenter ;
}
int OsiCircle::getRadius ( ) const
{
return mRadius ;
}
void OsiCircle::setCenter(const CvPoint & rCenter )
{
mCenter = rCenter ;
}
void OsiCircle::setRadius ( int rRadius )
{
if ( rRadius < 0 )
{
throw runtime_error(“Circle with negative radius : “ + rRadius) ;
}
mRadius = rRadius ;
}
void OsiCircle::setCircle ( const CvPoint & rCenter int rRadius )
{
setCenter(rCenter) ;
setRadius(rRadius) ;
}
void OsiCircle::setCircle ( int rCenterX int rCenterY int rRadius )
{
setCircle(cvPoint(rCenterXrCenterY)rRadius) ;
}
// OPERATORS
////////////
void OsiCircle::drawCircle ( IplImage * pImage const CvScalar & rColor int thickness )
{
cvCircle(pImagemCentermRadiusrColorthickness) ;
}
void OsiCircle::computeCircleFitting ( const vector & rPoints )
{
// Compute the averages mx and my
float mx = 0 my = 0 ;
for ( int p = 0 ; p < rPoints.size() ; p++ )
{
mx += rPoints[p].x ;
my += rPoints[p].y ;
}
mx = mx / rPoints.size() ;
my = my / rPoints.size() ;
// Work in (uv) space with u = x-mx and v = y-my
float u = 0 v = 0 suu = 0 svv = 0 suv = 0 suuu = 0 svvv = 0 suuv = 0 suvv = 0 ;
// Build some sums
for ( int p = 0 ; p < rPoints.size() ; p++ )
{
u = rPoints[p].x - mx ;
v = rPoints[p].y - my ;
suu += u * u ;
svv += v * v ;
suv += u * v ;
suuu += u * u * u ;
svvv += v * v * v ;
suuv += u * u * v ;
suvv += u * v * v ;
}
// These equations are demonstrated in paper from R.Bullock (2006)
float uc = 0.5 * ( suv * ( svvv + suuv ) - svv * ( suuu + suvv ) ) / ( suv * suv - suu * svv ) ;
float vc = 0.5 * ( suv * ( suuu + suvv ) - suu * ( svvv + suuv ) ) / ( suv * suv - suu * svv ) ;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-11 15:34 Iris_Osiris_v4.1\
文件 1607855 2016-12-30 13:56 Iris_Osiris_v4.1\Documentation_OSIRIS_v4.1.pdf
目录 0 2017-11-11 15:33 Iris_Osiris_v4.1\Iris_Osiris_v4.1\
目录 0 2013-05-02 18:04 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\
文件 116 2013-04-30 20:12 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\AUTHORS
文件 17987 2010-03-23 20:53 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\COPYING
目录 0 2013-05-02 17:59 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\doc\
文件 1607182 2013-05-02 17:58 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\doc\Documentation_OSIRIS_v4.1.pdf
目录 0 2013-05-02 18:04 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\download\
目录 0 2013-04-22 20:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\OsirisParam\
文件 9450 2010-12-14 20:51 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\OsirisParam\filters.txt
文件 1708 2010-12-23 19:46 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\OsirisParam\points.txt
文件 1583 2013-04-25 21:54 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\README
目录 0 2013-04-22 20:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\scores\
文件 7204179 2013-04-20 22:09 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\scores\list_result_matching_inter.txt
文件 253020 2013-04-20 21:46 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\scores\list_result_matching_intra.txt
目录 0 2013-05-02 17:54 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
目录 0 2013-04-22 20:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
文件 2651 2013-05-02 17:57 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
文件 5261520 2013-04-20 20:48 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
文件 184872 2013-04-20 20:46 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
目录 0 2013-04-22 20:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
文件 2502 2013-05-02 17:56 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
文件 35436 2013-04-20 05:08 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\sc
目录 0 2013-05-02 18:00 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\
文件 323 2013-04-20 19:56 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\makefile
文件 3180 2011-07-20 23:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\OsiCircle.cpp
文件 3087 2011-07-20 23:42 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\OsiCircle.h
文件 12898 2013-04-23 21:20 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\OsiEye.cpp
文件 8384 2013-04-23 21:27 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\OsiEye.h
文件 3634 2013-04-25 22:44 Iris_Osiris_v4.1\Iris_Osiris_v4.1\Iris_Osiris_v4.1\src\OsiMain.cpp
............此处省略6个文件信息
- 上一篇:是DBSCAN聚类算法的C++实现代码可以运行
- 下一篇:Moravec算子
评论
共有 条评论