You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(28) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(11) |
Feb
(51) |
Mar
(219) |
Apr
(63) |
May
(7) |
Jun
(91) |
Jul
(97) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|
From: Herton R. K. <he...@us...> - 2005-07-08 23:38:49
|
Update of /cvsroot/kimageprocess/kimageprocess/testclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10598 Modified Files: testclass.c Log Message: - Duh: I forgot that activation functions can be modified also in run process, so fixing this now. Index: testclass.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/testclass.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- testclass.c 8 Jul 2005 22:57:36 -0000 1.19 +++ testclass.c 8 Jul 2005 23:38:36 -0000 1.20 @@ -27,16 +27,16 @@ fprintf(stderr, " Gustavo Pichorim Boiko <gus...@kd...>\n"); fprintf(stderr, " Herton Ronaldo Krzesinski <he...@my...>\n\n"); fprintf(stderr, "Usage: %s [options]\n", progname); - fprintf(stderr, "Options: -t,--train-pattern trainpatternfile\n"); - fprintf(stderr, " -c,--classify-pattern classifypatternfile\n"); - fprintf(stderr, " -r,--res-file resfile\n"); - fprintf(stderr, " -h,--activation-function-hidden, FANN_THRESHOLD\n"); - fprintf(stderr, " -o,--activation-function-output FANN_THRESHOLD_SYMMETRIC\n"); - fprintf(stderr, " FANN_LINEAR\n"); - fprintf(stderr, " FANN_SIGMOID\n"); - fprintf(stderr, " FANN_SIGMOID_STEPWISE\n"); - fprintf(stderr, " FANN_SIGMOID_SYMMETRIC\n"); - fprintf(stderr, " FANN_SIGMOID_SYMMETRIC_STEPWISE\n"); + fprintf(stderr, "Options: -t,--train-pattern trainpatternfile\n"); + fprintf(stderr, " -c,--classify-pattern classifypatternfile\n"); + fprintf(stderr, " -r,--res-file resfile\n"); + fprintf(stderr, " -h,--activation-function-hidden-t, FANN_THRESHOLD\n"); + fprintf(stderr, " -o,--activation-function-output-t, FANN_THRESHOLD_SYMMETRIC\n"); + fprintf(stderr, " -s,--activation-function-hidden-c, FANN_LINEAR\n"); + fprintf(stderr, " -p,--activation-function-output-c FANN_SIGMOID\n"); + fprintf(stderr, " FANN_SIGMOID_STEPWISE\n"); + fprintf(stderr, " FANN_SIGMOID_SYMMETRIC\n"); + fprintf(stderr, " FANN_SIGMOID_SYMMETRIC_STEPWISE\n"); exit(1); } @@ -174,8 +174,10 @@ {"train-pattern", 1, NULL, 't'}, {"classify-pattern", 1, NULL, 'c'}, {"res-file", 1, NULL, 'r'}, - {"activation-function-hidden", 1, NULL, 'h'}, - {"activation-function-output", 1, NULL, 'o'}, + {"activation-function-hidden-t", 1, NULL, 'h'}, + {"activation-function-output-t", 1, NULL, 'o'}, + {"activation-function-hidden-c", 1, NULL, 's'}, + {"activation-function-output-c", 1, NULL, 'p'}, {0, 0, 0, 0} }; opterr = 0; @@ -188,7 +190,7 @@ float connection_rate = 1; float learning_rate = 0.7; float *result; - int npat, _func, h_func, o_func; + int npat, _func, h_func, o_func, s_func, p_func; time_t tempTime; if (argc == 1) @@ -199,6 +201,8 @@ r_file = NULL; h_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; o_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; + s_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; + p_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; while (1) { c = getopt_long (argc, argv, "+t:c:r:a:", long_options, &option_index); @@ -219,6 +223,8 @@ break; case 'h': case 'o': + case 's': + case 'p': if (!strncmp(optarg, "FANN_THRESHOLD_SYMMETRIC", strlen("FANN_THRESHOLD_SYMMETRIC"))) { _func = FANN_THRESHOLD_SYMMETRIC; goto assign_function; @@ -251,11 +257,18 @@ usage(argv[0]); break; assign_function: - if (c == 'h' && _func != FANN_THRESHOLD_SYMMETRIC - && _func != FANN_THRESHOLD) - h_func = _func; - else if (c == 'o') - o_func = _func; + /* training activation functions cannot be of THRESHOLD type */ + if (c == 'h' || c == 'o' && _func != FANN_THRESHOLD_SYMMETRIC + && _func != FANN_THRESHOLD) { + if (c == 'h') + h_func = _func; + else + o_func = _func; + } + else if (c == 's') + s_func = _func; + else if (c == 'p') + p_func = _func; break; case ':': case '?': @@ -293,7 +306,9 @@ tfanndata.input = t_patData.inputValues; tfanndata.output = t_patData.outputValues; fann_init_weights(tfann, &tfanndata); - fann_train_on_data(tfann, &tfanndata, 300000, 1000, 0.001); + fann_train_on_data(tfann, &tfanndata, 46000, 460, 0.001); + fann_set_activation_function_hidden(tfann, s_func); + fann_set_activation_function_output(tfann, p_func); if (fprintf(pr_file, "SNNS result file V1.4-3D\n") < 0) fatal(errno); tempTime = time(NULL); |
|
From: Herton R. K. <he...@us...> - 2005-07-08 22:57:46
|
Update of /cvsroot/kimageprocess/kimageprocess/testclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21167 Modified Files: testclass.c Log Message: - Added options to select different activation functions for hidden and output layers. Index: testclass.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/testclass.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- testclass.c 23 Jun 2005 22:38:08 -0000 1.18 +++ testclass.c 8 Jul 2005 22:57:36 -0000 1.19 @@ -27,16 +27,16 @@ fprintf(stderr, " Gustavo Pichorim Boiko <gus...@kd...>\n"); fprintf(stderr, " Herton Ronaldo Krzesinski <he...@my...>\n\n"); fprintf(stderr, "Usage: %s [options]\n", progname); - fprintf(stderr, "Options: -t,--train-pattern trainpatternfile\n"); - fprintf(stderr, " -c,--classify-pattern classifypatternfile\n"); - fprintf(stderr, " -r,--res-file resfile\n"); - fprintf(stderr, " -a,--activation-function FANN_THRESHOLD\n"); - fprintf(stderr, " FANN_THRESHOLD_SYMMETRIC\n"); - fprintf(stderr, " FANN_LINEAR\n"); - fprintf(stderr, " FANN_SIGMOID\n"); - fprintf(stderr, " FANN_SIGMOID_STEPWISE\n"); - fprintf(stderr, " FANN_SIGMOID_SYMMETRIC\n"); - fprintf(stderr, " FANN_SIGMOID_SYMMETRIC_STEPWISE\n"); + fprintf(stderr, "Options: -t,--train-pattern trainpatternfile\n"); + fprintf(stderr, " -c,--classify-pattern classifypatternfile\n"); + fprintf(stderr, " -r,--res-file resfile\n"); + fprintf(stderr, " -h,--activation-function-hidden, FANN_THRESHOLD\n"); + fprintf(stderr, " -o,--activation-function-output FANN_THRESHOLD_SYMMETRIC\n"); + fprintf(stderr, " FANN_LINEAR\n"); + fprintf(stderr, " FANN_SIGMOID\n"); + fprintf(stderr, " FANN_SIGMOID_STEPWISE\n"); + fprintf(stderr, " FANN_SIGMOID_SYMMETRIC\n"); + fprintf(stderr, " FANN_SIGMOID_SYMMETRIC_STEPWISE\n"); exit(1); } @@ -174,7 +174,8 @@ {"train-pattern", 1, NULL, 't'}, {"classify-pattern", 1, NULL, 'c'}, {"res-file", 1, NULL, 'r'}, - {"activation-function", 1, NULL, 'a'}, + {"activation-function-hidden", 1, NULL, 'h'}, + {"activation-function-output", 1, NULL, 'o'}, {0, 0, 0, 0} }; opterr = 0; @@ -187,7 +188,7 @@ float connection_rate = 1; float learning_rate = 0.7; float *result; - int npat, a_func; + int npat, _func, h_func, o_func; time_t tempTime; if (argc == 1) @@ -196,7 +197,8 @@ t_file = NULL; c_file = NULL; r_file = NULL; - a_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; + h_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; + o_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; while (1) { c = getopt_long (argc, argv, "+t:c:r:a:", long_options, &option_index); @@ -215,38 +217,46 @@ case 'r': r_file = optarg; break; - case 'a': + case 'h': + case 'o': if (!strncmp(optarg, "FANN_THRESHOLD_SYMMETRIC", strlen("FANN_THRESHOLD_SYMMETRIC"))) { - a_func = FANN_THRESHOLD_SYMMETRIC; - break; + _func = FANN_THRESHOLD_SYMMETRIC; + goto assign_function; } if (!strncmp(optarg, "FANN_THRESHOLD", strlen("FANN_THRESHOLD"))) { - a_func = FANN_THRESHOLD; - break; + _func = FANN_THRESHOLD; + goto assign_function; } if (!strncmp(optarg, "FANN_LINEAR", strlen("FANN_LINEAR"))) { - a_func = FANN_LINEAR; - break; + _func = FANN_LINEAR; + goto assign_function; } if (!strncmp(optarg, "FANN_SIGMOID_SYMMETRIC_STEPWISE", strlen("FANN_SIGMOID_SYMMETRIC_STEPWISE"))) { - a_func = FANN_SIGMOID_SYMMETRIC_STEPWISE; - break; + _func = FANN_SIGMOID_SYMMETRIC_STEPWISE; + goto assign_function; } if (!strncmp(optarg, "FANN_SIGMOID_SYMMETRIC", strlen("FANN_SIGMOID_SYMMETRIC"))) { - a_func = FANN_SIGMOID_SYMMETRIC; - break; + _func = FANN_SIGMOID_SYMMETRIC; + goto assign_function; } if (!strncmp(optarg, "FANN_SIGMOID_STEPWISE", strlen("FANN_SIGMOID_STEPWISE"))) { - a_func = FANN_SIGMOID_STEPWISE; - break; + _func = FANN_SIGMOID_STEPWISE; + goto assign_function; } if (!strncmp(optarg, "FANN_SIGMOID", strlen("FANN_SIGMOID"))) { - a_func = FANN_SIGMOID; - break; + _func = FANN_SIGMOID; + goto assign_function; } usage(argv[0]); break; + assign_function: + if (c == 'h' && _func != FANN_THRESHOLD_SYMMETRIC + && _func != FANN_THRESHOLD) + h_func = _func; + else if (c == 'o') + o_func = _func; + break; case ':': case '?': usage(argv[0]); @@ -275,8 +285,8 @@ t_patData.numOutputUnits); fann_set_activation_steepness_hidden(tfann, 1.0); fann_set_activation_steepness_output(tfann, 1.0); - fann_set_activation_function_hidden(tfann, a_func); - fann_set_activation_function_output(tfann, a_func); + fann_set_activation_function_hidden(tfann, h_func); + fann_set_activation_function_output(tfann, o_func); tfanndata.num_data = t_patData.numPatterns; tfanndata.num_input = t_patData.numInputUnits; tfanndata.num_output = t_patData.numOutputUnits; |
|
From: Herton R. K. <he...@us...> - 2005-07-08 22:56:08
|
Update of /cvsroot/kimageprocess/kimageprocess/src/kimagecmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20527 Modified Files: kimagecmd.cpp Log Message: - Added about info to kimagecmd. Index: kimagecmd.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kimagecmd/kimagecmd.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- kimagecmd.cpp 8 Jul 2005 21:59:14 -0000 1.1 +++ kimagecmd.cpp 8 Jul 2005 22:55:57 -0000 1.2 @@ -4,6 +4,7 @@ #include <ktfeaturemanager.h> #include <ktproject.h> +#include <kaboutdata.h> #include <kapplication.h> #include <kcmdlineargs.h> #include <klocale.h> @@ -16,8 +17,21 @@ int main(int argc, char **argv) { - KCmdLineArgs::init(argc, argv, "kimagecmd", "kimagecmd", "0.1"); - KCmdLineArgs::addCmdLineOptions( options ); + KAboutData about("kimagecmd", + "KImageCmd", + "0.1", + "Command line version of kimageprocess", + KAboutData::License_GPL, + "(C) 2005", + "", + "http://kimageprocess.sf.net", + "kim...@li..."); + + about.addAuthor("Gustavo Pichorim Boiko", "Author", "gus...@kd..."); + about.addAuthor("Herton Ronaldo Krzesinski", "Author", "he...@my..."); + + KCmdLineArgs::init(argc, argv, &about); + KCmdLineArgs::addCmdLineOptions(options); KApplication app(argc, argv); |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 21:59:22
|
Update of /cvsroot/kimageprocess/kimageprocess/src/kimagecmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24238/src/kimagecmd Added Files: Makefile.am kimagecmd.cpp Log Message: Started implementing a command line tool --- NEW FILE: Makefile.am --- ## Makefile.am for kimageprocess # this is the program that gets installed. it's name is used for all # of the other Makefile.am variables bin_PROGRAMS = kimagecmd # set the include path for X, qt and KDE INCLUDES = $(all_includes) -I$(top_srcdir)/src/libkimageprocess -I$(top_srcdir)/src/libktimgview # the library search path. kimagecmd_LDFLAGS = $(KDE_RPATH) $(all_libraries) # the libraries to link against. kimagecmd_LDADD = ../libkimageprocess/libkimageprocess.la \ $(LIB_KFILE) # which sources should be compiled for kimageprocess kimagecmd_SOURCES = kimagecmd.cpp # these are the headers for your project noinst_HEADERS = # let automoc handle all of the meta source files (moc) METASOURCES = AUTO messages: rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kimageprocess.pot --- NEW FILE: kimagecmd.cpp --- #include <ktmethodmanager.h> #include <ktpluginmanager.h> #include <ktpatternmanager.h> #include <ktfeaturemanager.h> #include <ktproject.h> #include <kapplication.h> #include <kcmdlineargs.h> #include <klocale.h> static const KCmdLineOptions options[] = { { "+project_file", I18N_NOOP("The project to be used"), 0 }, KCmdLineLastOption // End of options. }; int main(int argc, char **argv) { KCmdLineArgs::init(argc, argv, "kimagecmd", "kimagecmd", "0.1"); KCmdLineArgs::addCmdLineOptions( options ); KApplication app(argc, argv); //Create the managers KTPluginManager::self(); KTFeatureManager::self(); KTMethodManager::self(); KTProject::self(); KTImageManager::self(); KTFeatureManager *featmng = KTFeatureManager::self(); KTProject *prj = KTProject::self(); QObject::connect(prj, SIGNAL(aboutToLoad(QDomElement*)), featmng, SLOT(slotLoad(QDomElement*))); QObject::connect(prj, SIGNAL(aboutToSave(QDomDocument*, QDomElement*)), featmng, SLOT(slotSave(QDomDocument*, QDomElement*))); //load all plugins KTPluginManager::self()->loadPlugins(); KTMethodManager::self()->loadMethods(); KTFeatureManager::self()->loadFeatures(); } |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 21:59:22
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24238/src Modified Files: Makefile.am Log Message: Started implementing a command line tool Index: Makefile.am =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 23 Jun 2005 04:26:46 -0000 1.7 +++ Makefile.am 8 Jul 2005 21:59:14 -0000 1.8 @@ -1,5 +1,5 @@ ## Makefile.am for kimageprocess -SUBDIRS = libkimageprocess libktimgview . libktimgview plugins methods +SUBDIRS = libkimageprocess libktimgview . libktimgview plugins methods kimagecmd # this is the program that gets installed. it's name is used for all # of the other Makefile.am variables bin_PROGRAMS = kimageprocess |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 20:28:23
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/mindist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2201 Modified Files: mindist.cpp mindist.h Log Message: Cleanup Index: mindist.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/mindist/mindist.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mindist.cpp 3 Jul 2005 01:35:24 -0000 1.1 +++ mindist.cpp 8 Jul 2005 20:28:14 -0000 1.2 @@ -73,10 +73,7 @@ } for (int i=0; i < outputs; ++i) for (int j=0; j < inputs; ++j) - { m_mean[i][j] /= count[i]; - //kdDebug() << "MINDIST: m_mean[" << i << "][" << j << "] = " << m_mean[i][j] << endl; - } } @@ -121,12 +118,10 @@ minClass = j; } } - //kdDebug() << "MINDIST_CLASS: Pixel is of class " << minClass << endl; level = minClass * colorStep; img->setPixel(x, y++, qRgb(level, level, level)); if (y >= c_img->height()) { - kdDebug() << "y = " << y << endl; y = 0; x++; } Index: mindist.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/mindist/mindist.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mindist.h 3 Jul 2005 01:35:24 -0000 1.1 +++ mindist.h 8 Jul 2005 20:28:14 -0000 1.2 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 20:06:07
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23715/fann Modified Files: fann.cpp fann.h Log Message: - Use less iterations (50k) - Use two hidden layers by default - Using FANN_TRAIN_BATCH algorith Index: fann.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fann.h 3 Jul 2005 02:14:33 -0000 1.6 +++ fann.h 8 Jul 2005 20:05:54 -0000 1.7 @@ -59,6 +59,7 @@ float m_steepnessOutput; int m_iterations; float m_desiredError; + unsigned int m_trainingAlgorithm; }; #endif Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- fann.cpp 6 Jul 2005 01:34:43 -0000 1.12 +++ fann.cpp 8 Jul 2005 20:05:54 -0000 1.13 @@ -36,12 +36,13 @@ : KTClassifBackend(parent, name) { m_network = 0; - m_iterations = 300000; - m_hiddenLayers = 1; + m_iterations = 50000; + m_hiddenLayers = 2; m_connectionRate = 1.0; m_learningRate = 0.7; m_activationFunctionHidden = FANN_SIGMOID_SYMMETRIC; m_activationFunctionOutput = FANN_SIGMOID_SYMMETRIC; + m_trainingAlgorithm = FANN_TRAIN_BATCH; m_steepnessHidden = 1.0; m_steepnessOutput = 1.0; m_desiredError = 0.0001; @@ -71,6 +72,10 @@ fann_set_activation_function_hidden(m_network, m_activationFunctionHidden); fann_set_activation_function_output(m_network, m_activationFunctionOutput); + fann_set_training_algorithm(m_network, m_trainingAlgorithm); + + fann_print_parameters(m_network); + struct fann_train_data fanndata; float *in, *out; int n = data.count(); @@ -103,7 +108,7 @@ c++; } fann_init_weights(m_network, &fanndata); - fann_train_on_data(m_network, &fanndata, m_iterations, m_iterations / 100, m_desiredError); + fann_train_on_data(m_network, &fanndata, m_iterations, 500, m_desiredError); //clear data delete in; |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 20:03:44
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23069 Modified Files: ktcalculation.cpp Log Message: - Don't use normalization by default - Normalize between -1 and 1 Index: ktcalculation.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktcalculation.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ktcalculation.cpp 7 Jul 2005 14:54:34 -0000 1.13 +++ ktcalculation.cpp 8 Jul 2005 20:03:19 -0000 1.14 @@ -43,6 +43,8 @@ m_window_size.width = 5; m_window_size.height = 5; m_iterations = 0; + + m_normalize = false; } KTCalculation::~KTCalculation() @@ -237,7 +239,6 @@ } m_first = false; } - else { for (int j=0; j < m_inputs; ++j) { @@ -269,8 +270,9 @@ void KTCalculation::normalize() { //the upper limit - float uplimit = 1000.; - + float uplimit = 1.; + float lowlimit = -1.; + QValueList<dataEntry>::iterator end = m_data.end(); float dif[m_inputs]; for (int i=0; i < m_inputs; ++i) @@ -279,7 +281,7 @@ for (QValueList<dataEntry>::iterator it = m_data.begin(); it != end; ++it) { for ( int i=0; i < m_inputs; ++i ) - (*it).inputs[i] = ( ((*it).inputs[i] - m_min[i]) * uplimit ) / dif[i]; + (*it).inputs[i] = ( ((*it).inputs[i] - m_min[i]) * (uplimit-lowlimit) ) / dif[i] + lowlimit; } } |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-08 19:49:35
|
Update of /cvsroot/kimageprocess/kimageprocess/src/kimagecmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16321/kimagecmd Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/kimagecmd added to the repository |
|
From: Herton R. K. <he...@us...> - 2005-07-08 01:26:12
|
Update of /cvsroot/kimageprocess/kimageprocess/batchtests/2texturas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6573 Removed Files: 2texturas.kimageprocess 2texturas.png class.pat img.size train.pat Log Message: - Removing 2texturas test, it isn't very good. --- class.pat DELETED --- --- train.pat DELETED --- --- 2texturas.png DELETED --- --- 2texturas.kimageprocess DELETED --- --- img.size DELETED --- |
|
From: Tatiane S. <ste...@ya...> - 2005-07-07 19:33:15
|
hauhuhahu Massa... Devíamos ter feito isso na primeira semana q começamos a trabalhar juntos :-D Mas antes tarde do que nunca :-) Até mais, Tati ----- Original Message ----- From: "Gustavo Pichorim Boiko" <gus...@kd...> To: <kim...@li...> Sent: Thursday, July 07, 2005 4:31 PM Subject: [kimageprocess-devel] Teste Olá Como estamos todos inscritos na lista, podemos usá-la como meio de comunicação. O histórico da lista está como privado, então não há problemas. Para mandar mensagens, é só usar o endereço: kim...@li... []'s -- Gustavo Pichorim Boiko ----------------------------------------------------- KDE Developer Ciência da Computação - UFPR Mandriva Labs gustavo . boiko @ kdemail . net ----------------------------------------------------- ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick _______________________________________________ kimageprocess-devel mailing list kim...@li... https://lists.sourceforge.net/lists/listinfo/kimageprocess-devel _______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ |
|
From: Gustavo P. B. <gus...@kd...> - 2005-07-07 19:28:03
|
Ol=E1 Como estamos todos inscritos na lista, podemos us=E1-la como meio de=20 comunica=E7=E3o. O hist=F3rico da lista est=E1 como privado, ent=E3o n=E3o = h=E1 problemas. Para mandar mensagens, =E9 s=F3 usar o endere=E7o: kim...@li... []'s =2D-=20 Gustavo Pichorim Boiko ----------------------------------------------------- KDE Developer Ci=EAncia da Computa=E7=E3o - UFPR =20 Mandriva Labs gustavo . boiko @ kdemail . net=20 ----------------------------------------------------- |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-07 14:54:45
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/src/libkimageprocess Modified Files: ktcalculation.cpp ktcalculation.h Log Message: - Now it is possible to choose wheter to use normalization Index: ktcalculation.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktcalculation.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ktcalculation.h 2 Jul 2005 23:42:52 -0000 1.7 +++ ktcalculation.h 7 Jul 2005 14:54:34 -0000 1.8 @@ -73,7 +73,9 @@ void parseResults(const QValueList<float> &results, int sampleClass); void normalize(); - + bool useNormalization() { return m_normalize; } + void setUseNormalization(bool use) { m_normalize = use; } + public slots: void calculateSampleData(); @@ -82,7 +84,7 @@ signals: void updateProgress(); void finished(); - + private: /** * generate and write results for the current window settings @@ -95,6 +97,7 @@ int m_outputs; bool m_first; bool m_testing; + bool m_normalize; QValueList<dataEntry> m_data; QValueVector<float> m_min; QValueVector<float> m_max; Index: ktcalculation.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktcalculation.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ktcalculation.cpp 6 Jul 2005 01:34:43 -0000 1.12 +++ ktcalculation.cpp 7 Jul 2005 14:54:34 -0000 1.13 @@ -86,7 +86,8 @@ generateWindowResults((*it), imgClass++); //normalize the values - normalize(); + if (m_normalize) + normalize(); KTPluginManager::self()->classifier()->doTraining(m_data, m_inputs, m_outputs); emit finished(); @@ -120,7 +121,8 @@ m_window_type = winType; //normalize the values - normalize(); + if (m_normalize) + normalize(); KTPluginManager::self()->classifier()->doClassify(m_data, m_inputs, m_outputs); |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-07 14:54:44
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/src Modified Files: kimageprocessoptions_ui.ui kttextureoptions.cpp Log Message: - Now it is possible to choose wheter to use normalization Index: kimageprocessoptions_ui.ui =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kimageprocessoptions_ui.ui,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- kimageprocessoptions_ui.ui 27 Jun 2005 19:51:04 -0000 1.3 +++ kimageprocessoptions_ui.ui 7 Jul 2005 14:54:33 -0000 1.4 @@ -72,6 +72,17 @@ </sizepolicy> </property> </widget> + <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>chkNormalize</cstring> + </property> + <property name="text"> + <string>Normali&ze Results</string> + </property> + <property name="accel"> + <string>Alt+Z</string> + </property> + </widget> </grid> </widget> <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2"> @@ -133,7 +144,7 @@ <cstring>rbnSame</cstring> </property> <property name="text"> - <string>Same as image</string> + <string>Same &as image</string> </property> <property name="checked"> <bool>true</bool> Index: kttextureoptions.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kttextureoptions.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- kttextureoptions.cpp 7 Jul 2005 03:19:54 -0000 1.8 +++ kttextureoptions.cpp 7 Jul 2005 14:54:34 -0000 1.9 @@ -27,6 +27,7 @@ #include <qlayout.h> #include <qcombobox.h> #include <qregexp.h> +#include <qcheckbox.h> #include <kconfig.h> #include <klocale.h> @@ -123,6 +124,9 @@ if (itClassifier.current() == activeClassifier) m_ui->cmbClassifier->setCurrentItem(m_ui->cmbClassifier->count()-1); } + + //normalization + m_ui->chkNormalize->setChecked(KTCalculation::self()->useNormalization()); } void KTTextureOptions::save() @@ -145,6 +149,8 @@ QString classifier = m_ui->cmbClassifier->currentText(); KTPluginManager::self()->setClassifier(classifier); + + KTCalculation::self()->setUseNormalization(m_ui->chkNormalize->isChecked()); } void KTTextureOptions::enableIterations(bool on) |
|
From: Herton R. K. <he...@us...> - 2005-07-07 03:20:04
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22048/src/libkimageprocess Modified Files: ktclassifbackend.cpp ktfeaturemanager.cpp ktfeaturemanager.h ktmethodmanager.h ktpluginmanager.cpp ktpluginmanager.h ktproject.cpp ktproject.h Log Message: - Added support to select different classifiers. - Cosmetics. - Remove some debug. - Fix warning (variable j not used). Index: ktproject.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktproject.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ktproject.cpp 6 Jul 2005 01:34:43 -0000 1.19 +++ ktproject.cpp 7 Jul 2005 03:19:54 -0000 1.20 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -32,6 +32,9 @@ #include <qfile.h> #include "ktcalculation.h" +#include "ktmethod.h" +#include "ktmethodmanager.h" +#include "ktpluginmanager.h" KTProject::KTProject(QObject *parent, const char *name) : QObject(parent, name)/*, @@ -73,21 +76,21 @@ { // close the current project closeProject(); - + // load the project from a XML file if (!KIO::NetAccess::download(project, m_tmpfile, 0)) return; - + QFile file(m_tmpfile); - + if (file.open(IO_ReadOnly)) { QDomDocument doc; - + doc.setContent(&file); - + QDomElement root = doc.documentElement(); - + if (root.nodeName() != "kimageprocess") { KMessageBox::error(0, i18n("This file is not a valid kimageprocess project"), @@ -136,7 +139,7 @@ KTImageManager::self()->clear(); m_isSaved = false; m_changed = false; - m_url = ""; + m_url = ""; } bool KTProject::isSaved() @@ -156,7 +159,7 @@ } void KTProject::addSampleImage(const KURL &url) -{ +{ m_changed = true; KTImageManager::self()->addSampleImage(url); } @@ -180,7 +183,17 @@ QDomElement rootElem = m_doc.createElement("kimageprocess"); m_doc.appendChild(rootElem); - emit aboutToSave(&m_doc, &rootElem); + emit aboutToSave(&m_doc, &rootElem); + + //saving the current method + QDomElement activeMethod = m_doc.createElement("selected_method"); + rootElem.appendChild(activeMethod); + activeMethod.setAttribute("name", KTMethodManager::self()->activeMethod()->methodName()); + + //saving the current classifier + QDomElement activeClassifier = m_doc.createElement("selected_classifier"); + rootElem.appendChild(activeClassifier); + activeClassifier.setAttribute("name", KTPluginManager::self()->classifier()->classifierName()); //saving the sample images QDomElement samplesGroup = m_doc.createElement("sample_images"); @@ -233,7 +246,7 @@ void KTProject::loadProject(QDomElement *rootElem) { bool ok; - unsigned int i, j; + unsigned int i; QDomNodeList nodes = rootElem->childNodes(); QDomElement samplesGroup; @@ -243,13 +256,23 @@ for (i=0; i < nodes.count(); i++) { QString nodeName = nodes.item(i).nodeName(); - + if (nodeName == "sample_images") samplesGroup = nodes.item(i).toElement(); else if (nodeName == "testing_images") testingGroup = nodes.item(i).toElement(); else if (nodeName == "texture_options") trOptions = nodes.item(i).toElement(); + else if (nodeName == "selected_method") + { + QDomElement activeMethod = nodes.item(i).toElement(); + KTMethodManager::self()->setActiveMethod(activeMethod.attribute("name", "glcm")); + } + else if (nodeName == "selected_classifier") + { + QDomElement activeClassifier = nodes.item(i).toElement(); + KTPluginManager::self()->setClassifier(activeClassifier.attribute("name", "fann")); + } } emit aboutToLoad(rootElem); @@ -263,14 +286,14 @@ if (samples.item(i).nodeName() == "sample") { QDomElement sample = samples.item(i).toElement(); - + QString filename = sample.attribute("url", QString::null); - + if (filename != QString::null) addSampleImage(KURL(filename)); } } - + // load the sample images from the project QDomNodeList images = testingGroup.childNodes(); for (i=0; i < images.count(); i++) @@ -278,14 +301,14 @@ if (images.item(i).nodeName() == "image") { QDomElement image = images.item(i).toElement(); - + QString filename = image.attribute("url", QString::null); - + if (filename != QString::null) addTestingImage(KURL(filename)); } } - + //load the texture options QDomNodeList options = trOptions.childNodes(); for (i=0; i < options.count(); i++) Index: ktproject.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktproject.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktproject.h 1 Jul 2005 22:15:13 -0000 1.6 +++ ktproject.h 7 Jul 2005 03:19:54 -0000 1.7 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -44,64 +44,64 @@ KTProject(QObject *parent = 0, const char *name = 0); ~KTProject(); - + /** Create a new project */ void newProject(); - + /** Open an existent project */ void openProject(const KURL &project); - + /** Open an URL */ void openURL(QString url); - + /** Save the current project */ void saveProject(const KURL &url = 0); - + /** Close the currently opened project */ void closeProject(); - + /** Return true if the project has benn saved, otherwise, return false */ bool isSaved(); - + /** Return true if the project has changed */ bool changed(); void setChanged() { m_changed = true; } - + /** Remove a training sample image */ void removeSampleImage(KTImage *image); - + /** Add a training sample image */ void addSampleImage(const KURL &url); - + /** Remove a training sample image */ void removeTestingImage(KTImage *image); - + /** Add a training sample image */ void addTestingImage(const KURL &url); - + /** Return the url of the project */ KURL url() { return m_url; } - + static KTProject *self(); - + signals: void addToRecent(const KURL &url); - void aboutToSave(QDomDocument *doc, QDomElement *rootElem); - void aboutToLoad(QDomElement *elem); - + void aboutToSave(QDomDocument *doc, QDomElement *rootElem); + void aboutToLoad(QDomElement *elem); + private: /** Generate the XML document in a QString */ QString generateDoc(); - + /** Load the project from a root element */ void loadProject(QDomElement *rootElem); - + KURL m_url; QString m_tmpfile; bool m_isSaved; bool m_changed; - + static KTProject *s_self; }; Index: ktpluginmanager.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktpluginmanager.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktpluginmanager.h 3 Jul 2005 01:42:13 -0000 1.6 +++ ktpluginmanager.h 7 Jul 2005 03:19:54 -0000 1.7 @@ -47,21 +47,22 @@ ~KTPluginManager(); void setPatternManager(KTImageManager *pm); - + void loadPlugins(); - + static KTPluginManager *self(); - + KTClassifBackend *classifier(); - + ClassifierList availableClassifiers() const { return m_backends; } - + void setClassifier(const QString &classif); - + private: //KMainWindow *m_window; ClassifierList m_backends; static KTPluginManager *s_self; + QString m_classif; }; #endif Index: ktmethodmanager.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktmethodmanager.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktmethodmanager.h 1 Jul 2005 00:37:20 -0000 1.6 +++ ktmethodmanager.h 7 Jul 2005 03:19:54 -0000 1.7 @@ -47,7 +47,7 @@ MethodList methods(); - KTMethod *activeMethod(); + KTMethod *activeMethod(); void setActiveMethod(const QString &method); static KTMethodManager *self(); Index: ktclassifbackend.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktclassifbackend.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktclassifbackend.cpp 23 Jun 2005 23:19:41 -0000 1.6 +++ ktclassifbackend.cpp 7 Jul 2005 03:19:54 -0000 1.7 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -41,7 +41,7 @@ { Q_UNUSED(data); Q_UNUSED(inputs); - Q_UNUSED(outputs); + Q_UNUSED(outputs); } QString KTClassifBackend::classifierName() Index: ktfeaturemanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeaturemanager.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ktfeaturemanager.cpp 6 Jul 2005 01:34:43 -0000 1.12 +++ ktfeaturemanager.cpp 7 Jul 2005 03:19:54 -0000 1.13 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -91,7 +91,7 @@ if (list) return *list; - return FeatureList(); + return FeatureList(); } void KTFeatureManager::resolveDeps() @@ -152,12 +152,10 @@ void KTFeatureManager::slotSave(QDomDocument *doc, QDomElement *elem) { - kdDebug() << "BLABLABLABLABLABLA" << endl; QDomElement rootElem = doc->createElement("Features"); QDomElement featElem; QDictIterator<FeatureList> features(m_features); - kdDebug() << "ASDF" << endl; for (; features.current(); ++features) { QDictIterator<KTFeature> it(*features.current()); @@ -205,7 +203,6 @@ (*list)[*it]->setEnabled(true); } } - } } } Index: ktfeaturemanager.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeaturemanager.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktfeaturemanager.h 23 Jun 2005 18:33:51 -0000 1.6 +++ ktfeaturemanager.h 7 Jul 2005 03:19:54 -0000 1.7 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -44,7 +44,7 @@ ~KTFeatureManager(); static KTFeatureManager *self(); - + void loadFeatures(); FeatureList features(const QString &type); @@ -53,17 +53,17 @@ KTFeature *getFeature(const QString &type, const QString &feature); - void disableFeatures(const QString &type); + void disableFeatures(const QString &type); QDict<FeatureList> *allFeatures(); - + public slots: - void slotSave(QDomDocument *doc, QDomElement *elem); - void slotLoad(QDomElement *elem); + void slotSave(QDomDocument *doc, QDomElement *elem); + void slotLoad(QDomElement *elem); private: void resolveDeps(); - + QDict<FeatureList> m_features; static KTFeatureManager *s_self; Index: ktpluginmanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktpluginmanager.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktpluginmanager.cpp 23 Jun 2005 23:19:41 -0000 1.6 +++ ktpluginmanager.cpp 7 Jul 2005 03:19:54 -0000 1.7 @@ -32,7 +32,6 @@ { } - KTPluginManager::~KTPluginManager() { } @@ -56,12 +55,24 @@ void KTPluginManager::loadPlugins() { KTClassifBackend *plugin; - + KTrader::OfferList offers = KTrader::self()->query("KImageProcess/Plugin"); - + KTrader::OfferList::ConstIterator iter; - + kdDebug() << "Loading plugins..." << endl; + + iter = offers.begin(); + if (iter != offers.end()) + { + KService::Ptr service = *iter; + int errCode = 0; + plugin = KParts::ComponentFactory::createInstanceFromService<KTClassifBackend> + ( service, this, 0, QStringList(), &errCode); + if (plugin) + m_classif = plugin->classifierName(); + } + for(iter = offers.begin(); iter != offers.end(); ++iter) { KService::Ptr service = *iter; @@ -70,7 +81,7 @@ ( service, this, 0, QStringList(), &errCode); // here we ought to check the error code. - if (plugin) + if (plugin) { //m_window->guiFactory()->addClient(plugin); kdDebug() << "Loaded classifier: " << plugin->classifierName() << endl; @@ -82,7 +93,13 @@ KTClassifBackend *KTPluginManager::classifier() { - //FIXME: hardcoded to snns - return m_backends["snns"]; + return m_backends[m_classif]; } + +void KTPluginManager::setClassifier(const QString &classif) +{ + if (m_backends[classif]) + m_classif = classif; +} + #include "ktpluginmanager.moc" |
|
From: Herton R. K. <he...@us...> - 2005-07-07 03:20:03
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22048/src Modified Files: kimageprocess.cpp kttextureoptions.cpp Log Message: - Added support to select different classifiers. - Cosmetics. - Remove some debug. - Fix warning (variable j not used). Index: kttextureoptions.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kttextureoptions.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- kttextureoptions.cpp 27 Jun 2005 19:51:04 -0000 1.7 +++ kttextureoptions.cpp 7 Jul 2005 03:19:54 -0000 1.8 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -39,19 +39,18 @@ #include <ktpluginmanager.h> #include <ktclassifbackend.h> - KTTextureOptions::KTTextureOptions( QWidget * parent, const char *name) : QFrame(parent, name) { QHBoxLayout *layout = new QHBoxLayout(this); layout->setAutoAdd(true); - + m_ui = new TextureOptionsUI(this); - + m_project = KTProject::self(); - + readConfig(); - + connect(m_ui->rbnRandom, SIGNAL(toggled(bool)), this, SLOT(enableIterations(bool))); connect(m_ui->rbnSame, SIGNAL(toggled(bool)), this, SLOT(enableWindowSliding(bool))); connect(m_ui->rbnSlideAll, SIGNAL(toggled(bool)), this, SLOT(enableSlideAll(bool))); @@ -64,7 +63,7 @@ void KTTextureOptions::readConfig() { window_size temp; - + switch (KTCalculation::self()->windowType()) { case WIN_SEQ: @@ -92,7 +91,7 @@ } m_ui->spbX->setValue(temp.width); m_ui->spbY->setValue(temp.height); - if (KTCalculation::self()->numberIterations() == 0) + if (KTCalculation::self()->numberIterations() == 0) { m_ui->rbnSlideAll->setChecked(true); m_ui->spbIterations->setDisabled(true); @@ -100,18 +99,30 @@ else m_ui->rbnSlideIterations->setChecked(true); m_ui->spbIterations->setValue(KTCalculation::self()->numberIterations()); - + //List methods and set the active one as selected MethodList methods = KTMethodManager::self()->methods(); - KTMethod *active = KTMethodManager::self()->activeMethod(); - QDictIterator<KTMethod> it(methods); - for (; it.current(); ++it) + KTMethod *activeMethod = KTMethodManager::self()->activeMethod(); + QDictIterator<KTMethod> itMethod(methods); + for (; itMethod.current(); ++itMethod) { - QString name = it.current()->methodName() + " - " + it.current()->longName(); + QString name = itMethod.current()->methodName() + " - " + itMethod.current()->longName(); m_ui->cmbMethod->insertItem(name); - if (it.current() == active) + if (itMethod.current() == activeMethod) m_ui->cmbMethod->setCurrentItem(m_ui->cmbMethod->count()-1); } + + //List classifiers and set the active one as selected + ClassifierList classifiers = KTPluginManager::self()->availableClassifiers(); + KTClassifBackend *activeClassifier = KTPluginManager::self()->classifier(); + QDictIterator<KTClassifBackend> itClassifier(classifiers); + for (; itClassifier.current(); ++itClassifier) + { + QString name = itClassifier.current()->classifierName(); + m_ui->cmbClassifier->insertItem(name); + if (itClassifier.current() == activeClassifier) + m_ui->cmbClassifier->setCurrentItem(m_ui->cmbClassifier->count()-1); + } } void KTTextureOptions::save() @@ -122,7 +133,7 @@ KTCalculation::self()->setWindowType(WIN_CASC); if (m_ui->rbnRandom->isChecked()) KTCalculation::self()->setWindowType(WIN_RAND); - + KTCalculation::self()->setWindowSize(m_ui->rbnCustom->isChecked(), m_ui->spbY->value(), m_ui->spbX->value()); if (m_ui->rbnSlideAll->isChecked()) KTCalculation::self()->setNumberIterations(0); @@ -131,24 +142,25 @@ QString method = m_ui->cmbMethod->currentText(); KTMethodManager::self()->setActiveMethod(method.remove(QRegExp(" - .*"))); + + QString classifier = m_ui->cmbClassifier->currentText(); + KTPluginManager::self()->setClassifier(classifier); } void KTTextureOptions::enableIterations(bool on) { - - if (on) + if (on) { m_ui->rbnSlideAll->setDisabled(true); m_ui->rbnSlideIterations->setChecked(true); } else m_ui->rbnSlideAll->setEnabled(true); - } void KTTextureOptions::enableWindowSliding(bool on) { - if (on) + if (on) { m_ui->qbgWindowType->setDisabled(true); m_ui->qbgNumberSliding->setDisabled(true); @@ -162,7 +174,6 @@ m_ui->spbX->setEnabled(true); m_ui->spbY->setEnabled(true); } - } void KTTextureOptions::enableSlideAll(bool on) Index: kimageprocess.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kimageprocess.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- kimageprocess.cpp 6 Jul 2005 01:34:43 -0000 1.27 +++ kimageprocess.cpp 7 Jul 2005 03:19:54 -0000 1.28 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004-2005 by * + * Copyright (C) 2004-2005 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * @@ -19,7 +19,6 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ - #include "kimageprocess.h" #include "ktfeaturechooser.h" #include "kttextureoptions.h" @@ -75,21 +74,21 @@ QVBoxLayout *layout = new QVBoxLayout(this); layout->setAutoAdd( true ); - + /*********************** Interface Stuff *************************************/ QSplitter *splitter = new QSplitter(QSplitter::Horizontal,this); - + splitter->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding, true); // create our sidebar m_sideBar = new KTSideBar(splitter); m_sideBar->sizePolicy().setHorStretch( 1 ); - + m_view = new KImageProcessView(splitter); m_view->sizePolicy().setHorStretch( 4 ); m_view->sizePolicy().setHorData(QSizePolicy::Expanding); - + m_progressBar = new KTProgressBar(); - + // accept dnd setAcceptDrops(true); @@ -100,42 +99,42 @@ setupActions(); KConfig cfg("kimageprocessrc"); - + m_recentFiles->loadEntries(&cfg); - + // apply the saved mainwindow settings, if any, and ask the mainwindow // to automatically save settings if changed: window size, toolbar // position, icon size, etc. setAutoSaveSettings(); - + KTImageManager *imgmng = KTImageManager::self(); connect(imgmng, SIGNAL(trPatternAdded(KTImage* )), m_sideBar, SLOT(slotSampleAdded(KTImage* ))); - + connect(imgmng, SIGNAL(aboutToRemoveTrPattern(KTImage* )), m_sideBar, SLOT(slotAboutToRemoveSample(KTImage* ))); - + connect(imgmng, SIGNAL(testingImageAdded(KTImage* )), m_sideBar, SLOT(slotTestImageAdded(KTImage* ))); - + connect(imgmng, SIGNAL(aboutToRemoveTestingImage(KTImage* )), m_sideBar, SLOT(slotAboutToRemoveTestImage(KTImage* ))); - + connect(m_sideBar, SIGNAL(showImage(KTImage* )), m_view, SLOT(showImage(KTImage* ))); - + KTFeatureManager *featmng = KTFeatureManager::self(); KTProject *prj = KTProject::self(); - + connect(prj, SIGNAL(aboutToLoad(QDomElement*)), featmng, SLOT(slotLoad(QDomElement*))); connect(prj, SIGNAL(aboutToSave(QDomDocument*, QDomElement*)), featmng, SLOT(slotSave(QDomDocument*, QDomElement*))); - + //load all plugins KTPluginManager::self()->loadPlugins(); - + KTMethodManager::self()->loadMethods(); KTFeatureManager::self()->loadFeatures(); |
|
From: Herton R. K. <he...@us...> - 2005-07-07 03:20:03
|
Update of /cvsroot/kimageprocess/kimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22048 Modified Files: kimageprocess.kdevelop Log Message: - Added support to select different classifiers. - Cosmetics. - Remove some debug. - Fix warning (variable j not used). Index: kimageprocess.kdevelop =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/kimageprocess.kdevelop,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- kimageprocess.kdevelop 6 Jul 2005 01:34:42 -0000 1.16 +++ kimageprocess.kdevelop 7 Jul 2005 03:19:54 -0000 1.17 @@ -188,9 +188,7 @@ <dest>/home/gustavo/textura/texture/kimageprocess</dest> </substmap> <kdevcppsupport> - <references> - <pcs>Qt</pcs> - </references> + <references/> <codecompletion> <includeGlobalFunctions>true</includeGlobalFunctions> <includeTypes>true</includeTypes> |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-06 01:34:55
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8751/src/libkimageprocess Modified Files: ktcalculation.cpp ktfeature.cpp ktfeature.h ktfeaturemanager.cpp ktpatternmanager.cpp ktpatternmanager.h ktproject.cpp Log Message: "The Hitchhickers Guide to the Galaxy says that the more stupid is the bug you have the more time it takes for you to fix. And also that the more time it takes to fix and stupid it is, the more you get pissed when you fix it." Now the changes: - Remember to never do checks using memory addresses (see ktfeature.cpp changes) - removed QPtrLists<type> (they are evil) - replaced by QValueLists<type*> - removed duplicated signal connections (causing duplication in the project file) - increased a bit the desired error on fann (Herton, you should try and see a result ;) Index: ktproject.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktproject.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ktproject.cpp 1 Jul 2005 23:21:50 -0000 1.18 +++ ktproject.cpp 6 Jul 2005 01:34:43 -0000 1.19 @@ -98,9 +98,9 @@ loadProject(&root); m_isSaved = true; m_changed = false; - m_url = project; + m_url = project; } - } + } addToRecent(project); } Index: ktpatternmanager.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktpatternmanager.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ktpatternmanager.h 29 Jun 2005 03:03:00 -0000 1.16 +++ ktpatternmanager.h 6 Jul 2005 01:34:43 -0000 1.17 @@ -22,8 +22,8 @@ #define KTPATTERNMANAGER_H #include <qobject.h> -#include <qptrlist.h> #include <qstringlist.h> +#include <qvaluelist.h> #include <kurl.h> @@ -33,7 +33,7 @@ class KTClassifBackend; -typedef QPtrList<KTImage> KTImageList; +typedef QValueList<KTImage*> KTImageList; /** * This class manages all the opened pattern images. Index: ktfeature.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeature.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ktfeature.h 23 Jun 2005 18:33:50 -0000 1.5 +++ ktfeature.h 6 Jul 2005 01:34:43 -0000 1.6 @@ -50,22 +50,19 @@ QString featureName(); QString longName(); - void setManager(KTFeatureManager *manager) { m_manager = manager; } - bool enabled() { return m_enabled; } void setEnabled(bool enable) { m_enabled = enable; } protected: QString m_featureName; QString m_longName; - KTFeatureManager *manager() const { return m_manager; } + KTFeatureManager *manager(); KTMethod *method() const { return m_method; } ///must be reimplemented by child classes virtual float _calculate(KTImage *img, int direction); private: - KTFeatureManager *m_manager; KTMethod *m_method; bool m_enabled; Index: ktpatternmanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktpatternmanager.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ktpatternmanager.cpp 23 Jun 2005 23:19:41 -0000 1.32 +++ ktpatternmanager.cpp 6 Jul 2005 01:34:43 -0000 1.33 @@ -40,9 +40,6 @@ KTImageManager::KTImageManager(QObject *parent, const char *name) : QObject(parent, name) { - // auto-destroy items on delete - m_sampleImages.setAutoDelete(true); - m_testingData = false; } @@ -84,7 +81,12 @@ { emit aboutToRemoveTrPattern(image); - m_sampleImages.remove(image); + KTImageList::iterator it = m_sampleImages.find(image); + if (it != m_sampleImages.end()) + { + delete (*it); + m_sampleImages.remove(it); + } } void KTImageManager::addTestingImage(const KURL &url) @@ -104,15 +106,20 @@ { emit aboutToRemoveTestingImage(image); - m_testingImages.remove(image); + KTImageList::iterator it = m_testingImages.find(image); + if (it != m_testingImages.end()) + { + delete (*it); + m_testingImages.remove(it); + } } QStringList KTImageManager::sampleFileNames() { QStringList list; - KTImage *it; - for ( it = m_sampleImages.first(); it; it = m_sampleImages.next()) - list.append(it->url().url()); + KTImageList::iterator it; + for ( it = m_sampleImages.begin(); it != m_sampleImages.end(); ++it) + list.append((*it)->url().url()); return list; } @@ -120,9 +127,9 @@ QStringList KTImageManager::testingFileNames() { QStringList list; - KTImage *it; - for ( it = m_testingImages.first(); it; it = m_testingImages.next()) - list.append(it->url().url()); + KTImageList::iterator it; + for ( it = m_testingImages.begin(); it != m_testingImages.end(); ++it) + list.append((*it)->url().url()); return list; } Index: ktfeature.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeature.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ktfeature.cpp 30 Jun 2005 02:37:47 -0000 1.8 +++ ktfeature.cpp 6 Jul 2005 01:34:43 -0000 1.9 @@ -54,7 +54,7 @@ float KTFeature::calculate( KTImage *img, int direction ) { - if (img == m_img) + /*if (img == m_img) { Cache::iterator value = m_cacheValue.find(direction); if (value != m_cacheValue.end()) @@ -65,9 +65,9 @@ m_img = img; m_cacheValue.clear(); } - + */ float result = _calculate(img, direction); - m_cacheValue[direction] = result; + //m_cacheValue[direction] = result; return result; } @@ -79,4 +79,9 @@ return 0.0; } +KTFeatureManager *KTFeature::manager() +{ + return KTFeatureManager::self(); +} + #include "ktfeature.moc" Index: ktfeaturemanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeaturemanager.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ktfeaturemanager.cpp 1 Jul 2005 00:37:19 -0000 1.11 +++ ktfeaturemanager.cpp 6 Jul 2005 01:34:43 -0000 1.12 @@ -77,7 +77,6 @@ list = new FeatureList; m_features.insert(category, list); } - feature->setManager(this); list->insert(feature->featureName(),feature); kdDebug() << "Loaded " << category << " feature: " << feature->featureName() << endl; } @@ -136,7 +135,7 @@ void KTFeatureManager::disableFeatures(const QString &type) { - FeatureList *features = m_features[type]; + FeatureList *features = m_features[type]; if (features) { @@ -153,59 +152,61 @@ void KTFeatureManager::slotSave(QDomDocument *doc, QDomElement *elem) { - QDomElement rootElem = doc->createElement("Features"); + kdDebug() << "BLABLABLABLABLABLA" << endl; + QDomElement rootElem = doc->createElement("Features"); - QDomElement featElem; - QDictIterator<FeatureList> features(m_features); + QDomElement featElem; + QDictIterator<FeatureList> features(m_features); + kdDebug() << "ASDF" << endl; for (; features.current(); ++features) { QDictIterator<KTFeature> it(*features.current()); - featElem = doc->createElement("FeatureGroup"); - featElem.setAttribute("Name",features.currentKey()); + featElem = doc->createElement("FeatureGroup"); + featElem.setAttribute("Name",features.currentKey()); - QString enabledFeatures; + QString enabledFeatures; for (; it.current(); ++it) - { + { if (it.current()->enabled()) - enabledFeatures += it.currentKey() + ","; - } - //remove the extra comma - enabledFeatures.remove(enabledFeatures.length()-1,1); - featElem.setAttribute("EnabledFeatures",enabledFeatures); - rootElem.appendChild(featElem); - } - elem->appendChild(rootElem); + enabledFeatures += it.currentKey() + ","; + } + //remove the extra comma + enabledFeatures.remove(enabledFeatures.length()-1,1); + featElem.setAttribute("EnabledFeatures",enabledFeatures); + rootElem.appendChild(featElem); + } + elem->appendChild(rootElem); } void KTFeatureManager::slotLoad(QDomElement *elem) { - QDomNode node = elem->namedItem("Features"); + QDomNode node = elem->namedItem("Features"); - if (node.isNull()) - return; + if (node.isNull()) + return; - QDomNodeList groups = node.childNodes(); + QDomNodeList groups = node.childNodes(); - for (unsigned int i=0; i < groups.count(); ++i) - { - if (groups.item(i).nodeName() == "FeatureGroup") - { - QDomElement current = groups.item(i).toElement(); - QString groupName = current.attribute("Name"); - FeatureList *list = m_features[groupName]; - if (list) - { - disableFeatures(groupName); - QStringList features = QStringList::split(',', current.attribute("EnabledFeatures")); - for (QStringList::Iterator it = features.begin(); it != features.end(); ++it ) - { - if ((*list)[*it]) - (*list)[*it]->setEnabled(true); - } - } - - } - } + for (unsigned int i=0; i < groups.count(); ++i) + { + if (groups.item(i).nodeName() == "FeatureGroup") + { + QDomElement current = groups.item(i).toElement(); + QString groupName = current.attribute("Name"); + FeatureList *list = m_features[groupName]; + if (list) + { + disableFeatures(groupName); + QStringList features = QStringList::split(',', current.attribute("EnabledFeatures")); + for (QStringList::Iterator it = features.begin(); it != features.end(); ++it ) + { + if ((*list)[*it]) + (*list)[*it]->setEnabled(true); + } + } + + } + } } #include "ktfeaturemanager.moc" Index: ktcalculation.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktcalculation.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ktcalculation.cpp 2 Jul 2005 23:42:52 -0000 1.11 +++ ktcalculation.cpp 6 Jul 2005 01:34:43 -0000 1.12 @@ -80,10 +80,10 @@ m_first = true; int imgClass = 1; - KTImage *it; + KTImageList::iterator it; KTImageList list = KTImageManager::self()->sampleImages(); - for ( it = list.first(); it; it = list.next()) - generateWindowResults(it, imgClass++); + for ( it = list.begin(); it != list.end(); ++it) + generateWindowResults((*it), imgClass++); //normalize the values normalize(); @@ -235,16 +235,17 @@ } m_first = false; } - - //prepare the input - for (int i=0; i < m_inputs; ++i) + else { - if (results[i] > m_max[i]) - m_max[i] = results[i]; - else if (results[i] < m_min[i]) - m_min[i] = results[i]; + for (int j=0; j < m_inputs; ++j) + { + if (results[j] > m_max[j]) + m_max[j] = results[j]; + else if (results[j] < m_min[j]) + m_min[j] = results[j]; + } } - + //prepare the input dataEntry entry; entry.inputs = results; entry.sampleClass = sampleClass; @@ -271,12 +272,12 @@ QValueList<dataEntry>::iterator end = m_data.end(); float dif[m_inputs]; for (int i=0; i < m_inputs; ++i) - dif[i] = m_max[i] - m_min[i]; + dif[i] = m_max[i] - m_min[i] + 0.0000000000001; for (QValueList<dataEntry>::iterator it = m_data.begin(); it != end; ++it) { for ( int i=0; i < m_inputs; ++i ) - (*it).inputs[i] = ((*it).inputs[i] - m_min[i]) * uplimit / dif[i]; + (*it).inputs[i] = ( ((*it).inputs[i] - m_min[i]) * uplimit ) / dif[i]; } } |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-06 01:34:55
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8751/src/plugins/fann Modified Files: fann.cpp Log Message: "The Hitchhickers Guide to the Galaxy says that the more stupid is the bug you have the more time it takes for you to fix. And also that the more time it takes to fix and stupid it is, the more you get pissed when you fix it." Now the changes: - Remember to never do checks using memory addresses (see ktfeature.cpp changes) - removed QPtrLists<type> (they are evil) - replaced by QValueLists<type*> - removed duplicated signal connections (causing duplication in the project file) - increased a bit the desired error on fann (Herton, you should try and see a result ;) Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- fann.cpp 3 Jul 2005 02:47:19 -0000 1.11 +++ fann.cpp 6 Jul 2005 01:34:43 -0000 1.12 @@ -44,7 +44,7 @@ m_activationFunctionOutput = FANN_SIGMOID_SYMMETRIC; m_steepnessHidden = 1.0; m_steepnessOutput = 1.0; - m_desiredError = 0.001; + m_desiredError = 0.0001; } KTFANNPlugin::~KTFANNPlugin() |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-06 01:34:55
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8751/src Modified Files: kimageprocess.cpp Log Message: "The Hitchhickers Guide to the Galaxy says that the more stupid is the bug you have the more time it takes for you to fix. And also that the more time it takes to fix and stupid it is, the more you get pissed when you fix it." Now the changes: - Remember to never do checks using memory addresses (see ktfeature.cpp changes) - removed QPtrLists<type> (they are evil) - replaced by QValueLists<type*> - removed duplicated signal connections (causing duplication in the project file) - increased a bit the desired error on fann (Herton, you should try and see a result ;) Index: kimageprocess.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/kimageprocess.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- kimageprocess.cpp 1 Jul 2005 23:21:50 -0000 1.26 +++ kimageprocess.cpp 6 Jul 2005 01:34:43 -0000 1.27 @@ -71,6 +71,7 @@ KTFeatureManager::self(); KTMethodManager::self(); KTProject::self(); + KTImageManager::self(); QVBoxLayout *layout = new QVBoxLayout(this); layout->setAutoAdd( true ); @@ -126,18 +127,12 @@ KTFeatureManager *featmng = KTFeatureManager::self(); KTProject *prj = KTProject::self(); - connect(prj, SIGNAL(aboutToSave(QDomDocument*, QDomElement*)), - featmng, SLOT(slotSave(QDomDocument*, QDomElement*))); - connect(prj, SIGNAL(aboutToLoad(QDomElement*)), featmng, SLOT(slotLoad(QDomElement*))); connect(prj, SIGNAL(aboutToSave(QDomDocument*, QDomElement*)), featmng, SLOT(slotSave(QDomDocument*, QDomElement*))); - connect(prj, SIGNAL(aboutToLoad(QDomElement*)), - featmng, SLOT(slotLoad(QDomElement*))); - //load all plugins KTPluginManager::self()->loadPlugins(); @@ -413,7 +408,7 @@ void KImageProcess::projectCalculateTestData() { - m_progressBar->startAction(KTImageManager::self()->testingImage()->height(), i18n("Calculating testing data...")); + m_progressBar->startAction(KTImageManager::self()->testingImage()->width(), i18n("Calculating testing data...")); m_progressBar->show(); QTimer::singleShot(0, KTCalculation::self(), SLOT(calculateTestData())); |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-06 01:34:52
|
Update of /cvsroot/kimageprocess/kimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8751 Modified Files: kimageprocess.kdevelop Log Message: "The Hitchhickers Guide to the Galaxy says that the more stupid is the bug you have the more time it takes for you to fix. And also that the more time it takes to fix and stupid it is, the more you get pissed when you fix it." Now the changes: - Remember to never do checks using memory addresses (see ktfeature.cpp changes) - removed QPtrLists<type> (they are evil) - replaced by QValueLists<type*> - removed duplicated signal connections (causing duplication in the project file) - increased a bit the desired error on fann (Herton, you should try and see a result ;) Index: kimageprocess.kdevelop =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/kimageprocess.kdevelop,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- kimageprocess.kdevelop 2 Jul 2005 19:11:07 -0000 1.15 +++ kimageprocess.kdevelop 6 Jul 2005 01:34:42 -0000 1.16 @@ -14,7 +14,7 @@ </keywords> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> - <description></description> + <description/> <ignoreparts/> <secondaryLanguages/> </general> @@ -120,15 +120,15 @@ <kdevdebugger> <general> <dbgshell>libtool</dbgshell> - <programargs></programargs> - <gdbpath></gdbpath> + <programargs/> + <gdbpath/> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>false</floatingtoolbar> <runappinappdirectory>true</runappinappdirectory> - <configGdbScript></configGdbScript> - <runShellScript></runShellScript> - <runGdbScript></runGdbScript> + <configGdbScript/> + <runShellScript/> + <runGdbScript/> </general> <display> <staticmembers>false</staticmembers> @@ -209,7 +209,7 @@ </qtdesigner> </designerintegration> <creategettersetter> - <prefixGet></prefixGet> + <prefixGet/> <prefixSet>set</prefixSet> <prefixVariable>m_,_</prefixVariable> <parameterName>theValue</parameterName> |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-03 02:47:29
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19811 Modified Files: fann.cpp Log Message: Complementing my previous change Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- fann.cpp 3 Jul 2005 02:41:49 -0000 1.10 +++ fann.cpp 3 Jul 2005 02:47:19 -0000 1.11 @@ -143,7 +143,7 @@ } level = maxclass * colorStep; img->setPixel(x, y++, qRgb(level, level, level)); - if (x >= c_img->width()) + if (y >= c_img->height()) { y = 0; x++; |
|
From: Gustavo P. B. <gb...@us...> - 2005-07-03 02:42:00
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16977 Modified Files: fann.cpp Log Message: The image is parsed inverted Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fann.cpp 3 Jul 2005 02:18:37 -0000 1.9 +++ fann.cpp 3 Jul 2005 02:41:49 -0000 1.10 @@ -142,11 +142,11 @@ } } level = maxclass * colorStep; - img->setPixel(x++, y, qRgb(level, level, level)); + img->setPixel(x, y++, qRgb(level, level, level)); if (x >= c_img->width()) { - x = 0; - y++; + y = 0; + x++; } i++; } |
|
From: Herton R. K. <he...@us...> - 2005-07-03 02:18:45
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5649 Modified Files: fann.cpp Log Message: - Optimization fixes. Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- fann.cpp 3 Jul 2005 02:14:32 -0000 1.8 +++ fann.cpp 3 Jul 2005 02:18:37 -0000 1.9 @@ -73,15 +73,16 @@ struct fann_train_data fanndata; float *in, *out; + int n = data.count(); - in = new float[data.count() * inputs]; - out = new float[data.count() * outputs]; - fanndata.num_data = data.count(); + in = new float[n * inputs]; + out = new float[n * outputs]; + fanndata.num_data = n; fanndata.num_input = inputs; fanndata.num_output = outputs; - fanndata.input = new float*[data.count()]; - fanndata.output = new float*[data.count()]; - for ( unsigned int i=0; i < data.count(); ++i ) + fanndata.input = new float*[n]; + fanndata.output = new float*[n]; + for ( unsigned int i=0; i < n; ++i ) { fanndata.input[i] = in + i * inputs; fanndata.output[i] = out + i * outputs; |
|
From: Herton R. K. <he...@us...> - 2005-07-03 02:14:46
|
Update of /cvsroot/kimageprocess/kimageprocess/src/plugins/fann In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3318/plugins/fann Modified Files: fann.cpp fann.h Log Message: - Fixing more bugs. Index: fann.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fann.h 3 Jul 2005 00:31:40 -0000 1.5 +++ fann.h 3 Jul 2005 02:14:33 -0000 1.6 @@ -46,6 +46,8 @@ void doTraining(const QValueList<dataEntry>& data, int inputs, int outputs); void doClassify(const QValueList<dataEntry>& data, int inputs, int outputs); + QString classifierName() { return "fann"; } + private: struct fann *m_network; int m_hiddenLayers; Index: fann.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/plugins/fann/fann.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fann.cpp 3 Jul 2005 01:09:17 -0000 1.7 +++ fann.cpp 3 Jul 2005 02:14:32 -0000 1.8 @@ -61,7 +61,7 @@ //create the network unsigned int neurons[m_hiddenLayers + 2]; neurons[0] = inputs; - for ( int i=1; i < m_hiddenLayers; ++i ) { + for ( int i=1; i < m_hiddenLayers + 1; ++i ) { neurons[i] = inputs; } neurons[m_hiddenLayers + 1] = outputs; @@ -161,6 +161,8 @@ KIO::NetAccess::upload(tmpImg.name(), dest, 0); KIO::NetAccess::removeTempFile(tmpImg.name()); } + + delete img; } void KTFANNPlugin::setupPlugin() |