91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 264KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-30
  • 語言: C/C++
  • 標簽: VC++??USB??讀寫??

資源簡介

USB讀寫采集vc源碼, 數字界面,VC++ 6.0 MFC,libusb-win32應用

資源截圖

代碼片段和文件信息

//?Curvefit.cpp:?implementation?of?the?CBezierfit?class.
//
//////////////////////////////////////////////////////////////////////

#include?“stdafx.h“
#include?
#include?“Curvefit.h“

#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif

static?double?DistanceError(const?double?*x?const?double?*y?const?double?*Rawdata?int?n);
static?void?Bezier(double?u?const?double?*a?const?double?*b?
double?x4?double?y4?double?&z?double?&s);

void?CalcBezier(const?double?*Rawdata?int?n?double?*Control)
{
double?x[4];
double?y[4];
double?e1e2?e3;
int Retry;
double?x1ax2ay1ay2a;

x[0]?=?Rawdata[0];
y[0]?=?Rawdata[1];

x[1]?=?Rawdata[2];
y[1]?=?Rawdata[3];

x[2]?=?Rawdata[n-4];
y[2]?=?Rawdata[n-3];

x[3]?=?Rawdata[n-2];
y[3]?=?Rawdata[n-1];

//?seed?with?linear?interpolation...
x[1]?+=?x[1]?-?x[0];
y[1]?+=?y[1]?-?y[0];
x[2]?+=?x[2]?-?x[3];
y[2]?+=?y[2]?-?y[3];

e1?=?DistanceError(x?y?Rawdata?n);
for?(Retry?=?1;?Retry?<=?2;?Retry++)
{
// TRACE(“Retry?%d\n“?Retry);
// TRACE(“??????x1???????y2???????x2???????y2????error\n“);
e3?=?0.5;
x1a?=?x[1];
while?(fabs(e3)?>=?0.01)
{
x[1]?+=?(x[1]?-?x[0])*e3;
e2?=?DistanceError(x?y?Rawdata?n);
if?(e2?==?e1)
break;
if?(e2?>?e1)
{
x[1]?=?x1a;
e3?/=-3;
}
else
{
e1?=?e2;
x1a?=?x[1];
}
}

e3?=?0.5;
y1a?=?y[1];
while?(fabs(e3)?>=?0.01)
{
y[1]?+=?(y[1]?-?y[0])*e3;
e2?=?DistanceError(x?y?Rawdata?n);
if?(e2?==?e1)
break;
if?(e2?>?e1)
{
y[1]?=?y1a;
e3?/=-3;
}
else
{
e1?=?e2;
y1a?=?y[1];
}
}

e3?=?0.5;
x2a?=?x[2];
while?(fabs(e3)?>=?0.01)
{
x[2]?+=?(x[2]?-?x[3])*e3;
e2?=?DistanceError(x?y?Rawdata?n);
if?(e2?==?e1)
break;
if?(e2?>?e1)
{
x[2]?=?x2a;
e3?/=-3;
}
else
{
e1?=?e2;
x2a?=?x[2];
}
}

e3?=?0.5;
y2a?=?y[2];
while?(fabs(e3)?>=?0.01)
{
y[2]?+=?(y[2]?-?y[3])*e3;
e2?=?DistanceError(x?y?Rawdata?n);
if?(e2?==?e1)
break;
if?(e2?>?e1)
{
y[2]?=?y2a;
e3?/=-3;
}
else
{
e1?=?e2;
y2a?=?y[2];
}
}
}?//?for

Control[0]?=?x[1];
Control[1]?=?y[1];
Control[2]?=?x[2];
Control[3]?=?y[2];
}

double?DistanceError(const?double?*x?const?double?*y?
?const?double?*Rawdata?int?n)
{
int?i;
double?a[4];
double?b[4];
double?u?u1?u2;
double?z?z1?z2?s?s1;
double?temp;
double?totalerror;
double?stepsize;
double?x4?y4;

totalerror?=?0;
a[3]?=?(x[3]-x[0]+3*(x[1]-x[2]))/8;
b[3]?=?(y[3]-y[0]+3*(y[1]-y[2]))/8;
a[2]?=?(x[3]+x[0]-x[1]-x[2])*3/8;
b[2]?=?(y[3]+y[0]-y[1]-y[2])*3/8;
a[1]?=?(x[3]-x[0])/2?-a[3];
b[1]?=?(y[3]-y[0])/2?-b[3];
a[0]?=?(x[3]+x[0])/2?-a[2];
b[0]?=?(y[3]+y[0])/2?-b[2];

stepsize?=?2.0/(n);
s?=?u1?=?z1?=?s1?=?0;
for?(i?=?2;?i?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1078??2013-02-27?21:47??res\ICON_NOT.ICO

?????文件???????1078??2013-02-27?21:47??res\ICON_ON.ICO

?????文件???????1078??2013-02-27?21:57??res\ICON_ONB.ICO

????..A.SH.??????8704??2013-02-27?22:17??res\Thumbs.db

?????文件????????395??2013-01-17?09:53??res\wxh.rc2

?????文件????2698166??2012-04-17?14:18??res\xx.ico

?????文件???????4373??2001-01-23?21:20??Curvefit.cpp

?????文件????????504??2000-01-14?15:44??Curvefit.h

?????文件??????30214??2002-09-30?23:22??Digistatic.cpp

?????文件???????6864??2002-09-30?23:14??Digistatic.h

?????文件??????43520??2007-02-25?23:39??libusb0.dll

?????文件??????28672??2007-02-25?23:39??libusb0.sys

?????文件??????11062??2007-02-25?23:39??libusb.lib

?????文件???????2966??2002-09-03?13:09??MemDC.h

?????文件???????3525??2013-01-17?09:53??ReadMe.txt

?????文件???????1414??2013-02-28?09:45??resource.h

?????文件???????1532??2000-01-21?11:35??Rgbcolor.h

?????文件????????205??2013-01-17?09:53??StdAfx.cpp

?????文件???????1054??2013-01-17?09:53??StdAfx.h

?????文件??????10482??2007-02-25?23:39??usb.h

?????文件????2722868??2013-03-04?11:49??wxh.aps

?????文件???????2271??2013-03-04?11:50??wxh.clw

?????文件???????2021??2013-01-17?09:53??wxh.cpp

?????文件???????4879??2013-02-27?22:19??wxh.dsp

?????文件????????529??2013-01-17?09:53??wxh.dsw

?????文件???????1291??2013-01-17?09:53??wxh.h

?????文件?????148480??2013-03-04?11:50??wxh.ncb

?????文件??????56832??2013-03-04?11:50??wxh.opt

?????文件???????1323??2013-02-28?10:42??wxh.plg

?????文件???????6966??2013-02-28?10:03??wxh.rc

............此處省略7個文件信息

評論

共有 條評論