PDA

View Full Version : doubts in live mode...



abdul_khathar
November 9, 2007, 13:16:41
hi

i have linked the DFx 31F03 camera in my MFC dialog based project.

if i set the camera in live mode, whether its taking snap and converting into image buffer? i mean the frame ready function is called contineously?

the reason im asking this question is.. if i need to save the image only if i press any button.. how its possible?

i need just one frame of image when i press the button. but the live mode shud be always in running mode in dialog..

pls let me know.

thanks in advance..

AK :)

Sascha Schmidt
November 9, 2007, 13:54:58
Hallo abdul_khathar,

In order to get the last acquired membuffer, you need the following function:


smart_ptr<MemBuffer> getLastAcqMemBuffer() const;

Afterwards you can use "MemBuffer::save ", to sava the image.
This can be implemented as follows, for example:


CFileDialog dlg(
false, // SaveAs
"bmp", // bitmap-files
0,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Windows Bitmap-File (*.bmp)|*.bmp|All Files (*.*)|*.*||",
this
);

if( IDOK == dlg.DoModal() )
{
m_pSink->getLastAcqMemBuffer()->save( (LPCTSTR)dlg.GetPathName() );
}

abdul_khathar
November 19, 2007, 10:56:36
dear Sascha,

thank u for your valuable reply.

my problem is cleared nw.

thanks.

regards


AK:)