-
August 14th, 2008, 05:03 AM
#1
How to use opencv library in visual C++?
Dear all,
I want to make a simple face recognition application with visual C++ and I want to use opencv library. Please tell me how to use opencv library in visual C++(detail,please).
Thanks.
-
August 14th, 2008, 05:36 AM
#2
Re: How to use opencv library in visual C++?
Please don't cross post...
Just add the library under project properties/linker/additional libraries.
-
April 10th, 2009, 04:58 AM
#3
Re: How to use opencv library in visual C++?
Slep.....1
* C:\Program Files\OpenCV\cv\include
* C:\Program Files\OpenCV\cxcore\include
* C:\Program Files\OpenCV\otherlibs\highgui
Give project properties/(C/C++)/General/aditional include Directories
Step2:
cxcore.lib
cv.lib
highgui.lib
Give project properties/linker/Input/additional dependence
Step3:
"C:\Program Files\OpenCV\lib"
Give project properties/linker/General/additional library directories
step4:
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
(OR)
http://www.site.uottawa.ca/~laganier...ow/cvision.htm
-
October 28th, 2009, 06:35 AM
#4
Re: How to use opencv library in visual C++?
I know this forum doesnt discuss about errors encountered while using opencv libraries in vs, but I am unable to find any related forum. It would be helpful if someone helps me out.
#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
int hsw = 0, hi = 0, lsw = 0, li = 0;
void swh(int p)
{
hi = p;
}
void swl(int p)
{
li = p;
}
int _tmain(int argc, _TCHAR* argv[])
{
int n = 7;
IplImage* img = cvLoadImage( "img1.jpeg", 0 );
IplImage* img_b = cvCreateImage( cvSize(img->width+n-1,img->height+n-1), img->depth, img->nChannels );
IplImage* out = cvCreateImage( cvGetSize(img_b), IPL_DEPTH_8U, img_b->nChannels );
CvPoint off = cvPoint((n-1)/2,(n-1)/2);
cvCopyMakeBorder(img,img_b,off,IPL_BORDER_REPLICATE,cvScalarAll(0));
cvNamedWindow("Canny Edge Detection",1);
int as = n;
double lt = 20;
double ht = 40;
cvCreateTrackbar( "High", "Canny Edge Detection", &hsw, 4, swh );
cvCreateTrackbar( "Low", "Canny Edge Detection", &lsw, 4, swl );
while( 1 ) {
switch( hi ){
case 0:
ht = 200;
break;
case 1:
ht = 400;
break;
case 2:
ht = 600;
break;
case 3:
ht = 800;
break;
case 4:
ht = 1000;
break;
}
switch( li ){
case 0:
lt = 0;
break;
case 1:
lt = 100;
break;
case 2:
lt = 200;
break;
case 3:
lt = 400;
break;
case 4:
lt = 600;
break;
}
// Edge Detection
cvCanny( img_b, out, lt*n*n, ht*n*n, as );
cvShowImage("Canny Edge Detection", out);
if( cvWaitKey( 15 ) == 27 )
break;
}
cvReleaseImage( &img );
cvReleaseImage( &img_b );
cvReleaseImage( &out );
cvDestroyWindow( "Canny Edge Detection" );
return 0;
}
This is my code. When I run it, I get the following error :
The procedure entry point cvCreateTrackbar could not be located in the dynamic link library libcv200.dll.
Where am I going wrong? How should I correct it
-
November 14th, 2009, 02:20 AM
#5
Re: How to use opencv library in visual C++?
Originally Posted by nauva
Dear all,
I want to make a simple face recognition application with visual C++ and I want to use opencv library. Please tell me how to use opencv library in visual C++(detail,please).
Thanks.
Include lib file
Project - Properties - Configuration Properties - Linker - Input - Additional Dependencies,
Add line
#include "libfile.h"
-
December 15th, 2009, 08:03 AM
#6
Find child nodes from Parent node in Asp.Net
This program helps to find out list of members/Nodes under each node.
For example: Tree Chart
A
B C D
E F G
H I
J
Answer:
The Total No. of Nodes under A is: 9
The Total No. of Nodes under B is: 5
The Total No. of Nodes under C is: 0
The Total No. of Nodes under D is: 1
The Total No. of Nodes under E is: 3
The Total No. of Nodes under F is: 0
The Total No. of Nodes under G is: 0
The Total No. of Nodes under H is: 0
The Total No. of Nodes under I is: 1
The Total No. of Nodes under J is: 0
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection ObjCon = new SqlConnection("server=localhost;uid=sa;pwd=garuda;
database=muthu");
SqlDataAdapter ObjDA = new SqlDataAdapter();
DataSet ObjDS = new DataSet();
int iDataCount = 0;
ObjCon.Open();
/**************For array length********************/
ObjDA = new SqlDataAdapter("select count(*) from tblmlmarketing ", ObjCon);
ObjDA.Fill(ObjDS);
foreach (DataRow ObjDR in ObjDS.Tables[0].Rows)
{
iDataCount = Int32.Parse(ObjDR[0].ToString());
//i++;
}
ObjDS.Tables.Clear();
int[] arr = new int[iDataCount*2];
int i = -1;
/**************For Find Parant child********************/
ObjDA = new SqlDataAdapter("select vcClientId from tblmlmarketing where vcMasterId='" +
DropDownList1.Text + "'", ObjCon); //.......................................... Input :
ObjDA.Fill(ObjDS);
foreach (DataRow ObjDR in ObjDS.Tables[0].Rows)
arr[++i] = Int32.Parse(ObjDR[0].ToString());
/**************For Find another Child********************/
for (int j = 0; j < arr.Length;j++)
{
ObjDS.Tables.Clear();
if (arr[j] == 0)
{
txtData.Text = j.ToString(); //.......................................... Output :
break;
}
string sData = arr[j].ToString();
ObjDA = new SqlDataAdapter("select vcClientId from tblmlmarketing where
vcMasterID='" + sData + "'", ObjCon);
ObjDA.Fill(ObjDS);
foreach (DataRow ObjDR in ObjDS.Tables[0].Rows)
{
arr[++i] = Int32.Parse(ObjDR[0].ToString());
}
}
-
January 13th, 2010, 05:35 AM
#7
Re: How to use opencv library in visual C++?
Many of the companies in business today are still following the traditional ins-outs system on paper. And this can create some problems for employees. You don’t need to note down your in time or out time if you implement employee time tracking software. This is software that can help you in maintaining the records of projects and employees’ working hours in an effective manner.
For more information about , visit on link: http://www.project-drive.net/
-
July 5th, 2011, 12:58 AM
#8
Timesheet management
Our telephone and web-based employee time clock system is totally optimized for the web (unlike typical client/server technology). As a result, our system is fast and very easy to use.
web time clock
-
November 4th, 2011, 12:45 AM
#9
Re: How to use opencv library in visual C++?
Originally Posted by sathya8819
I know this forum doesnt discuss about errors encountered while using opencv libraries in vs, but I am unable to find any related forum. It would be helpful if someone helps me out.
#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
int hsw = 0, hi = 0, lsw = 0, li = 0;
void swh(int p)
{
hi = p;
}
void swl(int p)
{
li = p;
}
int _tmain(int argc, _TCHAR* argv[])
{
int n = 7;
IplImage* img = cvLoadImage( "img1.jpeg", 0 );
IplImage* img_b = cvCreateImage( cvSize(img->width+n-1,img->height+n-1), img->depth, img->nChannels );
IplImage* out = cvCreateImage( cvGetSize(img_b), IPL_DEPTH_8U, img_b->nChannels );
CvPoint off = cvPoint((n-1)/2,(n-1)/2);
cvCopyMakeBorder(img,img_b,off,IPL_BORDER_REPLICATE,cvScalarAll(0));
cvNamedWindow("Canny Edge Detection",1);
int as = n;
double lt = 20;
double ht = 40;
cvCreateTrackbar( "High", "Canny Edge Detection", &hsw, 4, swh );
cvCreateTrackbar( "Low", "Canny Edge Detection", &lsw, 4, swl );
while( 1 ) {
switch( hi ){
case 0:
ht = 200;
break;
case 1:
ht = 400;
break;
case 2:
ht = 600;
break;
case 3:
ht = 800;
break;
case 4:
ht = 1000;
break;
}
switch( li ){
case 0:
lt = 0;
break;
case 1:
lt = 100;
break;
case 2:
lt = 200;
break;
case 3:
lt = 400;
break;
case 4:
lt = 600;
break;
}
// Edge Detection
cvCanny( img_b, out, lt*n*n, ht*n*n, as );
cvShowImage("Canny Edge Detection", out);
if( cvWaitKey( 15 ) == 27 )
break;
}
cvReleaseImage( &img );
cvReleaseImage( &img_b );
cvReleaseImage( &out );
cvDestroyWindow( "Canny Edge Detection" );
return 0;
}
This is my code. When I run it, I get the following error :
The procedure entry point cvCreateTrackbar could not be located in the dynamic link library libcv200.dll.
Where am I going wrong? How should I correct it
Thanks for sharing these codding, PHP Development India I have tired to find that finally I got it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|