c语言LNK2002错误,关于error LNK2001: unresolved external symbol "public: unsigned运行异常()结构光三维重建的程序...

关于error LNK2001: unresolved external symbol "public: unsigned运行错误(在线等)结构光三维重建的程序

结构光三维重建的程序有没有现成的啊?下面DoubleValueImage只是程序的一部分,而且其他的程序还有很多错误,想问一下有没有写好的,小弟是初学,入门发现很困难,求助各位了。

我的程序在运行时出现了下面的问题

--------------------Configuration: DoubleValueImage - Win32 Debug--------------------

Linking...

DoubleValueImage.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall CBmp::GetBits(void)const " (?GetBits@CBmp@@QBEPAEXZ)

DoubleValueImage.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBmp::GetWidth(void)const " (?GetWidth@CBmp@@QBEHXZ)

DoubleValueImage.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBmp::GetHeight(void)const " (?GetHeight@CBmp@@QBEHXZ)

DoubleValueImage.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall CBmp::GetImageSize(void)const " (?GetImageSize@CBmp@@QBEKXZ)

Debug/DoubleValueImage.exe : fatal error LNK1120: 4 unresolved externals

Error executing link.exe.

DoubleValueImage.exe - 5 error(s), 0 warning(s)

下面是我的程序。

#include "StdAfx.h"

#include "DoubleValueImage.h"

#define BOXSIZE 23

CDoubleValueImage::CDoubleValueImage(void)

{

m_edge=10;

}

CDoubleValueImage::~CDoubleValueImage(void)

{

}

/*************************************

org:原图数据指针

sob:Sobel 算子图形

w:判断点x方向坐标

h;判断点y方向坐标

r:正方形的边长

col:图形的列,以便确定图形位置。

*****

**

**

*****

这样一个正方体,边上的亮度的平均值

**************************************/

float CDoubleValueImage::cal_circle_ave(BYTE * org,BYTE * sob,UINT w,UINT h,UINT r,UINT col)

{

// 计算上边:

UINT index = 0;// 数组下标

UINT count = 0;

UINT sum_light = 0;//亮度之和

UINT num_of_care = 0;// 在sobel图像中,认为是有梯度的个数

// 顶边

for(index = ( h - r) * col + w - r, count = 0;

count < 2*r;count ++,index ++)

{

if(sob[index] < 255)

{

sum_light += org[index];// 加入亮度和

num_of_care ++;// 参考点个数增加

}

}

// 右边

for(index = (h - r)*col + w + r,count = 0;

count < 2*r;count ++,index += col)

{

if(sob[index] < 255)

{

sum_light += org[index];

num_of_care ++;

}

}

// 底边

for(index = (h+r)*col + w - r + 1,count = 0;count < 2*r;index ++,count++)

{

if(sob[index] < 255)

{

sum_light += org[index];

num_of_care ++;

}

}

// 左边

for(index = (h - r + 1)*col + w - r,count = 0;count < 2*r;index += col,count++)

{

if(sob[index] < 255)

{

sum_light += org[index];

num_of_care ++;

}

}

if( num_of_care == 0)

{

return 0; // 返回0,不参与亮度平均计算

}

//else

return (float) ( ((double)sum_light) / num_of_care);

}

bool CDoubleValueImage::judge_data(BYTE * org,BYTE * sobel,UINT w,UINT h,UINT col)

{

float sum_light = 0;

UINT num_of_care = 0;

float value = 0;

for(UINT i = 1; i <= this->m_edge;i++){

value = this->cal_circle_ave(org,sobel,w,h,i,col);

if(value == 0.0)

continue;

sum_light += value;

num_of_care ++;

}

if( 0 == num_of_care)

return false;

BYTE gap_ave = (BYTE)(sum_light / ((float)num_of_care));

if( org[h * col + w] <= gap_ave)

return false;

return true;

}

void CDoubleValueImage::deal_image(CBmp* org,CBmp* sobel,CBmp* result)

{

UINT gap = org->GetImageSize() / org->GetHeight();

UINT col = org->GetWidth();// 多少列

UINT row = org->GetHeight();// 多少行

BYTE *data_org = org->GetBits();

BYTE *data_sobel = sobel->GetBits();

BYTE *data_result = result->GetBits();

//first m_edge rows

for (UINT h=0;h

{

for (UINT w=0;w

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值