void CHandGestureRecognitionSystemDlg::OnTimer(UINT_PTR nIDEvent)
{
    // TODO: Add your message handler code here and/or call default
    if(!InitCameraAndImage())
        return;
    // play image camera
    PlayImage(image_camera, IDC_IMAGE_CAMERA, rect_image_camera);
    // process
    image_preprocess = Preprocess(image_camera, image_preprocess);
    // segment
    image_segment = HandSegment(image_preprocess, image_segment);
    PlayImage(image_segment, IDC_IMAGE_SEGMENT, rect_image_segment);
    // feature detect
    image_feature = FeatureDetect(image_segment, image_feature);
    PlayImage(image_feature, IDC_IMAGE_FEATURE, rect_image_feature);
    // recognition
    image_recognition = Recognition(image_feature, image_recognition);
    PlayImage(image_recognition, IDC_IMAGE_RECOGNITION, rect_image_recognition);
#ifdef _DEBUG
    TRACE("image_camera channel = %d\n", image_camera.channels());
    TRACE("image_segment channel = %d\n", image_segment.channels());
    TRACE("image_feature channel = %d\n", image_feature.channels());
    TRACE("image_recognition channel = %d\n", image_recognition.channels());
#endif
    CDialogEx::OnTimer(nIDEvent);
}
Exemple #2
0
bool
re_match(Regex re, wchar_t *str)
{
    if (Recognition(re, str))
        return true;
    else
        return false;
}
string Train_main(Mat Input_image, vector<Data_set>* Training_data)
{
    string Final_result_string = "No Data";
    vector<float> Weight;
    Configure Input_data;
	int period_final=0;

    Input_data = Final_result(Input_image,&period_final);
	if (Input_data.period_ok == true)
	{
		Final_result_string = Recognition(*Training_data, Input_data);
		cout << Final_result_string << endl;
	}
	else
	{
		;
	}

	return Final_result_string;
}