|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:28
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/correlation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/hsvcm/features/correlation Added Files: Makefile.am correlation.cpp correlation.h kimageprocess_hsvcm_correlation.desktop Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) --- NEW FILE: correlation.h --- /*************************************************************************** * Copyright (C) 2004 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef KIMAGEPROCESS_HSVCM_CORRELATION_H #define KIMAGEPROCESS_HSVCM_CORRELATION_H #include <ktfeature.h> class KAction; class KTImage; /** * Correlation calculation * @author Gustavo Pichorim Boiko * */ class KTHSVCMCorrelation : public KTFeature { Q_OBJECT public: KTHSVCMCorrelation(QObject *parent, const char *name, const QStringList&); ~KTHSVCMCorrelation(); float calculate(KTImage *img, int direction); }; #endif --- NEW FILE: correlation.cpp --- /*************************************************************************** * Copyright (C) 2004 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "correlation.h" #include <kgenericfactory.h> #include <kaction.h> #include <klocale.h> #include <kdebug.h> #include <ktimage.h> #include <ktfeaturemanager.h> K_EXPORT_COMPONENT_FACTORY( kimageprocess_hsvcm_correlation, KGenericFactory<KTHSVCMCorrelation>( "kimageprocess_hsvcm_correlation" ) ) KTHSVCMCorrelation::KTHSVCMCorrelation(QObject *parent, const char* name, const QStringList&) : KTFeature() { //check dependencies m_featureName = i18n("Correlation"); m_longName = i18n("Correlation"); } KTHSVCMCorrelation::~KTHSVCMCorrelation() { } float KTHSVCMCorrelation::calculate(KTImage *img, int direction) { int cmSize[3]; float ***cm = (float***) method()->data(direction); KTMethod *method = method(); cmSize[0] = method->dataSize(0); cmSize[1] = method->dataSize(1); cmSize[2] = method->dataSize(2); return 0.0; } #include "correlation.moc" --- NEW FILE: kimageprocess_hsvcm_correlation.desktop --- [Desktop Entry] Name=Correlation Comment=Correlation calculation over HSV CO-Occurrence Matrix ServiceTypes=KImageProcess/Feature Type=Service X-KDE-Library=kimageprocess_hsvcm_correlation X-Category=hsvcm --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) -I$(srcdir)/../../../libkimageprocess METASOURCES = AUTO kde_module_LTLIBRARIES = kimageprocess_hsvcm_correlation.la kimageprocess_hsvcm_correlation_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) noinst_HEADERS = correlation.h kimageprocess_hsvcm_correlation_la_SOURCES = correlation.cpp kde_services_DATA = kimageprocess_hsvcm_correlation.desktop kimageprocess_hsvcm_correlation_la_LIBADD = $(top_builddir)/src/libkimageprocess/libkimageprocess.la \ -lkdeui |