Home | History | Annotate | Download | only in src

Lines Matching refs:cnn

47 /*---------------------- functions for the CNN classifier ------------------------------*/
69 /*------------------------- functions for the CNN network ------------------------------*/
448 CvCNNStatModel* cnn;
452 cnn = *(CvCNNStatModel**)cnn_model;
454 cvReleaseMat( &cnn->cls_labels );
455 cvReleaseMat( &cnn->etalons );
456 cnn->network->release( &cnn->network );
458 cvFree( &cnn );
553 CV_ERROR( CV_StsBadArg, "CNN is empty (does not contain any layer)" );
1406 * Read/Write CNN classifier *
1528 CV_CALL( cvStartWriteStruct( fs, NULL, CV_NODE_MAP, "opencv-ml-cnn-layer" ));
1563 CV_CALL( cvEndWriteStruct( fs )); //"opencv-ml-cnn-layer"
1571 CvCNNStatModel* cnn = 0;
1582 CV_CALL(cnn = (CvCNNStatModel*)cvCreateStatModel(
1586 CV_CALL(cnn->etalons = (CvMat*)cvReadByName( fs, root_node, "etalons" ));
1587 CV_CALL(cnn->cls_labels = (CvMat*)cvReadByName( fs, root_node, "cls_labels" ));
1589 if( !cnn->etalons || !cnn->cls_labels )
1590 CV_ERROR( CV_StsParseError, "No <etalons> or <cls_labels> in CNN model" );
1599 CV_CALL(cnn->network = cvCreateCNNetwork( layer ));
1605 CV_CALL(cnn->network->add_layer( cnn->network, layer ));
1612 if( cnn ) cnn->release( (CvStatModel**)&cnn );
1615 return (void*)cnn;
1627 CvCNNStatModel* cnn = (CvCNNStatModel*)struct_ptr;
1631 if( !CV_IS_CNN(cnn) )
1634 n_layers = cnn->network->n_layers;
1638 CV_CALL(cvWrite( fs, "etalons", cnn->etalons ));
1639 CV_CALL(cvWrite( fs, "cls_labels", cnn->cls_labels ));
1643 layer = cnn->network->layers;
1650 CV_CALL( cvEndWriteStruct( fs )); //"opencv-ml-cnn"
1671 static int cnn = icvRegisterCNNStatModelType();