Main Page | Data Structures | File List | Data Fields | Globals

mr_elements_detector.h

Go to the documentation of this file.
00001 /* The Partitions Musics Recognition System project.
00002  * (c)2003 by Fabien Pelisson (fabien dot pelisson at wanadoo dot fr)
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef MR_ELEMENTS_DETECTOR
00020 #define MR_ELEMENTS_DETECTOR
00021 
00022 #include <mr_vector.h>
00023 #include <mr_image.h>
00024 #include <mr_score.h>
00025 
00026 #ifdef __cplusplus
00027 extern              "C"
00028 {
00029 #endif                          /* __cplusplus */
00030 
00031 typedef struct MrElementsDetector MrElementsDetector;
00032 
00036 struct MrElementsDetector
00037 {
00039   MrImage* pattern;
00041   MrImage* partition;
00043   int px;
00045   int px_end;
00047   int py;
00049   float MaxEnergy;
00051   MrVector* elements;
00053   float MinEnergy;
00055   float WidthScaling;
00057   float HeightScaling;
00058 };
00059 
00061 MrElementsDetector* mr_elements_detector_new();
00062 
00064 void mr_elements_detector_free(void* o);
00065 
00067 void mr_elements_detector_clear(MrElementsDetector* ed);
00068 
00070 unsigned int mr_elements_detector_size(MrElementsDetector* ed, unsigned int pos);
00071 
00074 short int mr_elements_detector_origin(MrElementsDetector* ed, unsigned int pos);
00075 
00079 short int mr_elements_detector(MrImage* image, MrScore* score, MrElementsDetector* ed);
00080 
00083 float mr_elements_detector_match(MrElementsDetector* model, unsigned int posm, 
00084                                  MrElementsDetector* object, unsigned int poo, 
00085                                  float scale_factor);
00086 
00087 #ifdef __cplusplus
00088 }
00089 #endif                          /* __cplusplus */
00090 
00091 #endif /* MR_ELEMENTS_DETECTOR */

Generated on Sun Apr 9 17:29:40 2006 for MusicReco by  doxygen 1.4.4