i'm beginner in programming. I do a face detection project (detect a face, record its result, then save it into output file). I rather naming its result with date&time than with "MyVideo". But I dunno how, anyone can help me? Thanks b4.
Here is my code.
void rekamwajah(){
double nBaris = cap.get(CV_CAP_PROP_FRAME_HEIGHT);
double nKolom = cap.get(CV_CAP_PROP_FRAME_WIDTH);
cv::Size frameSize(static_cast<int>(nKolom), static_cast<int>(nBaris));
if (!rekam.isOpened()) //if not intialize the VideoWriter successfully
{
rekam.open ("K:\\MyVideo.avi", CV_FOURCC('M','J','P','G'), 20, frameSize, true);
}
bool bSuccess = cap.read(framewarna);
if (!bSuccess) //if not success, break loop
{
MessageBox::Show("ERROR: Cannot read a frame from video file");
return;
}
rekam.write(framewarna); //writer the frame into the file
timer1->Enabled = true;
}