- trackeye_src.zip
- TrackEye_SourceCode
- trackeye_demo.zip
- TrackEye_Executable
- Avis
- Sample.avi
- cv.dll
- cvaux.dll
- cvcam.dll
- EyeDatabase
- eye0.jpg
- eye1.jpg
- eye10.jpg
- eye11.jpg
- eye12.jpg
- eye13.jpg
- eye14.jpg
- eye15.jpg
- eye16.jpg
- eye2.jpg
- eye3.jpg
- eye4.jpg
- eye5.jpg
- eye6.jpg
- eye7.jpg
- eye8.jpg
- eye9.jpg
- highgui.dll
- Readme.txt
- SampleEye.jpg
- SampleHUE.jpg
- Thumbs.db
- TrackEye_636.exe
|
// USBCam.cpp : implementation file
//
#include "stdafx.h"
#include "TrackEye.h"
#include "USBCam.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// USBCam dialog
USBCam::USBCam(CWnd* pParent /*=NULL*/)
: CDialog(USBCam::IDD, pParent)
{
numOfCameras = 0;
//{{AFX_DATA_INIT(USBCam)
m_cameraName = _T("");
//}}AFX_DATA_INIT
}
void USBCam::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(USBCam)
DDX_Text(pDX, IDC_EDIT1, m_cameraName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(USBCam, CDialog)
//{{AFX_MSG_MAP(USBCam)
ON_BN_CLICKED(IDC_BUTTON1, OnAdjust)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// USBCam message handlers
BOOL USBCam::OnInitDialog()
{
CDialog::OnInitDialog();
// ** Select Camera
numOfCameras = cvcamGetCamerasCount( );
if (numOfCameras != 0)
{
// ** Display USB Camera Name
CameraDescription ptr;
cvcamGetProperty(0, CVCAM_DESCRIPTION, &ptr);
m_cameraName = ptr.DeviceDescription;
}
else
m_cameraName = "No capture device available";
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void USBCam::OnAdjust()
{
cvcamSelectCamera(NULL);
if (numOfCameras != 0)
{
cvcamInit();
cvcamGetProperty(0, CVCAM_CAMERAPROPS, NULL);
}
}
void USBCam::OnClose()
{
cvcamExit();
CDialog::OnClose();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Zafer is an electronics engineer living in Ankara/Turkey and working for ASELSAN A.S./TMM.
He has been coding for about 12 years, and can't think a life without C/C++.
He likes
- MS Visual C++ 6.0 and MFC
- .NET C#
- All kinds of electronics stuff
- Machine Vision projects
Also he enjoys
- Listening to "The Cranberries" & "The Glorious Dolores"
- Travelling
E-mail : zafersavas@yahoo.com