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: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:27
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/dummy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/hsvcm/features/dummy Added Files: LOWER.cpp LOWER.h Makefile.am kimageprocess_hsvcm_LOWER.desktop Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) --- NEW FILE: kimageprocess_hsvcm_LOWER.desktop --- [Desktop Entry] Name=NAME Comment=LONG calculation over HSV CO-Occurrence Matrix ServiceTypes=KImageProcess/Feature Type=Service X-KDE-Library=kimageprocess_hsvcm_LOWER X-Category=hsvcm --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) -I$(srcdir)/../../../libkimageprocess METASOURCES = AUTO kde_module_LTLIBRARIES = kimageprocess_hsvcm_LOWER.la kimageprocess_hsvcm_LOWER_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) noinst_HEADERS = LOWER.h kimageprocess_hsvcm_LOWER_la_SOURCES = LOWER.cpp kde_services_DATA = kimageprocess_hsvcm_LOWER.desktop kimageprocess_hsvcm_LOWER_la_LIBADD = $(top_builddir)/src/libkimageprocess/libkimageprocess.la \ -lkdeui --- NEW FILE: LOWER.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_UPPER_H #define KIMAGEPROCESS_HSVCM_UPPER_H #include <ktfeature.h> class KAction; class KTImage; /** * NAME calculation * @author Gustavo Pichorim Boiko * */ class KTHSVCMNAME : public KTFeature { Q_OBJECT public: KTHSVCMNAME(QObject *parent, const char *name, const QStringList&); ~KTHSVCMNAME(); float calculate(KTImage *img, int direction); }; #endif --- NEW FILE: LOWER.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 "LOWER.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_LOWER, KGenericFactory<KTHSVCMNAME>( "kimageprocess_hsvcm_LOWER" ) ) KTHSVCMNAME::KTHSVCMNAME(QObject *parent, const char* name, const QStringList&) : KTFeature() { //check dependencies m_featureName = i18n("NAME"); m_longName = i18n("LONG"); } KTHSVCMNAME::~KTHSVCMNAME() { } float KTHSVCMNAME::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 "LOWER.moc" |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:17
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/glcm Modified Files: glcm.h Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) Index: glcm.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/glcm.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- glcm.h 24 Mar 2005 03:05:45 -0000 1.4 +++ glcm.h 5 Apr 2005 22:49:08 -0000 1.5 @@ -41,7 +41,7 @@ void *data(int direction) const; - int dataSize() { return m_glcmSize; } + int dataSize(int index = 0) { return m_glcmSize; } private: void calculateGLCM(); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:17
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/libkimageprocess Modified Files: ktmethod.h Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) Index: ktmethod.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktmethod.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ktmethod.h 24 Mar 2005 03:05:45 -0000 1.4 +++ ktmethod.h 5 Apr 2005 22:49:07 -0000 1.5 @@ -54,7 +54,7 @@ virtual void *data(int direction) const; - virtual int dataSize() { return 0; } + virtual int dataSize(int index = 0) { return 0; } protected: QString m_methodName; |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:46:16
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/entropy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4336/entropy Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/entropy added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:46:16
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/correlation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4336/correlation Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/correlation added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:46:16
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/angsecmom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4336/angsecmom Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/angsecmom added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:32:59
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/dummy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32541/dummy Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/dummy added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:32:58
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/contrast In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32541/contrast Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/contrast added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:32:36
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32471/features Log Message: Directory /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features added to the repository |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:26:34
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/dummy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30453/dummy Modified Files: LOWER.cpp Log Message: Fixed glcm template Index: LOWER.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/dummy/LOWER.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LOWER.cpp 23 Mar 2005 20:51:49 -0000 1.1 +++ LOWER.cpp 5 Apr 2005 22:26:24 -0000 1.2 @@ -47,8 +47,8 @@ float KTGLCMNAME::calculate(KTImage *img, int direction) { - int glcmSize = img->glcmSize(); - float **glcm = img->glcm(direction); + int glcmSize = method()->dataSize(); + float **glcm = (float**) method()->data(direction); return 0.0; } |
|
From: Herton R. K. <he...@us...> - 2005-04-05 06:55:07
|
Update of /cvsroot/kimageprocess/kimageprocess/testclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15787/testclass Modified Files: Makefile.am lex.yy.c pat.l testclass.c Log Message: - Fixing more bugs. Index: pat.l =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/pat.l,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- pat.l 31 Mar 2005 22:09:29 -0000 1.4 +++ pat.l 5 Apr 2005 06:54:56 -0000 1.5 @@ -1,9 +1,8 @@ -%option noyywrap %{ #include <stdio.h> #include <math.h> -#define DEBUG 0 +#define DEBUG 0 #define INTNUMBER 1 #define FLOATNUMBER 2 #define PATHEADER 3 @@ -11,7 +10,12 @@ #define NUMPAT 5 #define NUMIN 6 #define NUMOUT 7 +#define END 8 + int row=1, col=1; + +/* function prototypes */ +void yyerror(char *s); %} INTNUMBER [0-9]+ FLOATNUMBER [0-9]+"."[0-9]* @@ -25,28 +29,28 @@ %% \n ++row; col=1; {INTNUMBER} { - #ifdef DEBUG + #if DEBUG printf("INTNUMBER: %d\n", atoi(yytext)); #endif col += yyleng; return INTNUMBER; } {FLOATNUMBER} { - #ifdef DEBUG + #if DEBUG printf("FLOATNUMBER: %f\n", atof(yytext)); #endif col += yyleng; return FLOATNUMBER; } {PATHEADER} { - #ifdef DEBUG + #if DEBUG printf("PATHEADER\n"); #endif col += yyleng; return PATHEADER; } {PATDATE} { - #ifdef DEBUG + #if DEBUG printf("PATDATE\n"); #endif col = 1; @@ -54,39 +58,45 @@ return PATDATE; } {NUMPAT} { - #ifdef DEBUG + #if DEBUG printf("NUMPAT\n"); #endif col += yyleng; return NUMPAT; } {NUMIN} { - #ifdef DEBUG + #if DEBUG printf("NUMIN\n"); #endif col += yyleng; return NUMIN; } {NUMOUT} { - #ifdef DEBUG + #if DEBUG printf("NUMOUT\n"); #endif col += yyleng; return NUMOUT; } {WHITESPACE}+ { - #ifdef DEBUG + #if DEBUG printf("WHITESPACE\n"); #endif col += yyleng; } {COMMENT} { - #ifdef DEBUG + #if DEBUG printf("COMMENT\n"); #endif col = 1; row++; } +<<EOF>> { + #if DEBUG + printf("END\n"); + #endif + return END; +} . { ++col; } Index: lex.yy.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/lex.yy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lex.yy.c 31 Mar 2005 22:09:28 -0000 1.1 +++ lex.yy.c 5 Apr 2005 06:54:56 -0000 1.2 @@ -1,39 +1,84 @@ -/* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header$ - */ +#line 3 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ [...2187 lines suppressed...] +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL #endif -#line 93 "pat.l" +#line 103 "pat.l" + void yyerror(char *s) { fprintf(stderr, " %s at line: %d, column: %d.\n", s, row, col); } + Index: Makefile.am =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 1 Apr 2005 05:22:13 -0000 1.3 +++ Makefile.am 5 Apr 2005 06:54:55 -0000 1.4 @@ -12,10 +12,11 @@ # the libraries to link against. testclass_LDADD = $(top_builddir)/testclass/libfann/libfann.a \ - $(top_builddir)/testclass/libfann/libfloatfann.a + $(top_builddir)/testclass/libfann/libfloatfann.a \ + -lfl # which sources should be compiled for testclass testclass_SOURCES = testclass.c # these are the headers for your project -# noinst_HEADERS = +#noinst_HEADERS = Index: testclass.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/testclass.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- testclass.c 4 Apr 2005 23:54:02 -0000 1.11 +++ testclass.c 5 Apr 2005 06:54:56 -0000 1.12 @@ -10,6 +10,14 @@ #define PARSER_ERROR 1 #define CHECK_ERROR 2 +/* function prototypes */ +void usage(char *progname); +void fatal(int err); +void netLoadFail(int code, char *fileName); +void loadNetwork(float **inputValues, float **outputValues, int *numInputUnits, + int *numOutputUnits, int *numPatterns, FILE *patFile, + char *fileName); + void usage(char *progname) { fprintf(stderr, "testclass version %s\n", TESTCLASS_VERSION); @@ -34,7 +42,7 @@ switch(code) { case PARSER_ERROR: - fprintf(stderr, "Error: Invalid pattern file format.\n", fileName); + fprintf(stderr, "Error: Invalid pattern file format.\n"); yyerror(fileName); break; case CHECK_ERROR: @@ -51,7 +59,7 @@ char *fileName) { int tok, curPat = 0, i; - char *tokval; + float *tempp; yyin = patFile; tok = yylex(); if (tok != PATHEADER) @@ -64,8 +72,8 @@ *numPatterns = -1; inputValues = NULL; outputValues = NULL; - tok = yylex(); - while (tok != EOF) + tok = yylex(); + while (tok != END) { switch(tok) { @@ -93,37 +101,25 @@ netLoadFail(CHECK_ERROR, fileName); if (inputValues == NULL) { - inputValues = (float *) malloc(sizeof(float) * *numPatterns); + tempp = malloc(sizeof(float) * *numPatterns * *numInputUnits); + if (tempp == NULL) + fatal(errno); + inputValues = malloc(sizeof(float *) * *numPatterns); if (inputValues == NULL) fatal(errno); for (i = 0; i < *numPatterns; i++) - inputValues[i] = NULL; - if (*numInputUnits > 0) - { - for (i = 0; i < *numPatterns; i++) - { - inputValues[i] = (float *) malloc(sizeof(float) * *numInputUnits); - if (inputValues[i] == NULL) - fatal(errno); - } - } + inputValues[i] = tempp + (i * *numInputUnits); } if (outputValues == NULL) { - outputValues = (float *) malloc(sizeof(float) * *numPatterns); + tempp = malloc(sizeof(float) * *numPatterns * *numOutputUnits); + if (tempp == NULL) + fatal(errno); + outputValues = malloc(sizeof(float *) * *numPatterns); if (outputValues == NULL) fatal(errno); for (i = 0; i < *numPatterns; i++) - outputValues[i] = NULL; - if (*numOutputUnits > 0) - { - for (i = 0; i < *numPatterns; i++) - { - outputValues[i] = (float *) malloc(sizeof(float) * *numOutputUnits); - if (outputValues[i] == NULL) - fatal(errno); - } - } + outputValues[i] = tempp + (i * *numOutputUnits); } inputValues[curPat][0] = atof(yytext); for (i = 1; i < *numInputUnits; i++) @@ -145,13 +141,13 @@ default: netLoadFail(PARSER_ERROR, fileName); } - tok = yylex(); + tok = yylex(); } } int main(int argc, char **argv) { - int c; + int a, b, c; int option_index = 0; static struct option long_options[] = { @@ -206,14 +202,22 @@ pt_file = fopen(t_file, "r"); if (pt_file == NULL) fatal(errno); - loadNetwork(&in_tvalues, &out_tvalues, &in_tnum, &out_tnum, &pat_tnum, - pt_file, t_file); + loadNetwork(in_tvalues, out_tvalues, &in_tnum, &out_tnum, &pat_tnum, + pt_file, t_file); + for (a = 0; a < pat_tnum; a++) + { + for (b = 0; b < in_tnum; b++) + { + printf("%.5f", in_tvalues[a][b]); + } + for (b = 0; b < out_tnum; b++) + { + printf("%.5f", out_tvalues[a][b]); + } + } pc_file = fopen(c_file, "r"); if (pc_file == NULL) fatal(errno); - free(t_file); - free(c_file); - free(r_file); if (fclose(pt_file) != 0) fatal(errno); if (fclose(pc_file) != 0) |
|
From: Herton R. K. <he...@us...> - 2005-04-04 23:54:10
|
Update of /cvsroot/kimageprocess/kimageprocess/testclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14461/testclass Modified Files: testclass.c Log Message: - Fixing some more bugs. Index: testclass.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/testclass.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- testclass.c 4 Apr 2005 23:39:30 -0000 1.10 +++ testclass.c 4 Apr 2005 23:54:02 -0000 1.11 @@ -64,6 +64,7 @@ *numPatterns = -1; inputValues = NULL; outputValues = NULL; + tok = yylex(); while (tok != EOF) { switch(tok) @@ -92,7 +93,7 @@ netLoadFail(CHECK_ERROR, fileName); if (inputValues == NULL) { - inputValues = (void *) malloc(sizeof(void) * *numPatterns); + inputValues = (float *) malloc(sizeof(float) * *numPatterns); if (inputValues == NULL) fatal(errno); for (i = 0; i < *numPatterns; i++) @@ -109,7 +110,7 @@ } if (outputValues == NULL) { - outputValues = (void *) malloc(sizeof(void) * *numPatterns); + outputValues = (float *) malloc(sizeof(float) * *numPatterns); if (outputValues == NULL) fatal(errno); for (i = 0; i < *numPatterns; i++) @@ -144,6 +145,7 @@ default: netLoadFail(PARSER_ERROR, fileName); } + tok = yylex(); } } |
|
From: Herton R. K. <he...@us...> - 2005-04-04 23:39:41
|
Update of /cvsroot/kimageprocess/kimageprocess/testclass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10356/testclass Modified Files: testclass.c Log Message: - Fixing testclass compiling errors. Index: testclass.c =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/testclass/testclass.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- testclass.c 1 Apr 2005 05:22:13 -0000 1.9 +++ testclass.c 4 Apr 2005 23:39:30 -0000 1.10 @@ -110,7 +110,7 @@ if (outputValues == NULL) { outputValues = (void *) malloc(sizeof(void) * *numPatterns); - if (expected == NULL) + if (outputValues == NULL) fatal(errno); for (i = 0; i < *numPatterns; i++) outputValues[i] = NULL; @@ -119,7 +119,7 @@ for (i = 0; i < *numPatterns; i++) { outputValues[i] = (float *) malloc(sizeof(float) * *numOutputUnits); - if (expected[i] == NULL) + if (outputValues[i] == NULL) fatal(errno); } } |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:15:00
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17516/libkimageprocess Modified Files: ktfeaturemanager.cpp ktmethod.cpp ktmethodmanager.cpp Log Message: More compilation warnings removed. Index: ktmethodmanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktmethodmanager.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ktmethodmanager.cpp 2 Apr 2005 18:15:03 -0000 1.6 +++ ktmethodmanager.cpp 2 Apr 2005 20:14:52 -0000 1.7 @@ -122,7 +122,7 @@ QDomNodeList groups = node.childNodes(); - for (int i=0; i < groups.count(); ++i) + for (unsigned int i=0; i < groups.count(); ++i) { if (groups.item(i).nodeName() == "ActiveMethod") { Index: ktfeaturemanager.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktfeaturemanager.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ktfeaturemanager.cpp 2 Apr 2005 18:09:34 -0000 1.7 +++ ktfeaturemanager.cpp 2 Apr 2005 20:14:52 -0000 1.8 @@ -188,7 +188,7 @@ QDomNodeList groups = node.childNodes(); - for (int i=0; i < groups.count(); ++i) + for (unsigned int i=0; i < groups.count(); ++i) { if (groups.item(i).nodeName() == "FeatureGroup") { Index: ktmethod.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktmethod.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ktmethod.cpp 23 Mar 2005 20:50:35 -0000 1.3 +++ ktmethod.cpp 2 Apr 2005 20:14:52 -0000 1.4 @@ -54,6 +54,7 @@ void *KTMethod::data(int direction) const { + Q_UNUSED(direction); return 0; } |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:15:00
|
Update of /cvsroot/kimageprocess/kimageprocess/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17516 Modified Files: ktlistview.cpp Log Message: More compilation warnings removed. Index: ktlistview.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/ktlistview.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ktlistview.cpp 31 Mar 2005 02:59:12 -0000 1.4 +++ ktlistview.cpp 2 Apr 2005 20:14:51 -0000 1.5 @@ -145,6 +145,7 @@ void KTListView::slotContextMenu(KListView *lv, QListViewItem *itm, const QPoint &point) { + Q_UNUSED(point); Q_UNUSED(lv); KTListViewItem *item = dynamic_cast<KTListViewItem *> (itm); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:14:20
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16771 Modified Files: hsvcm.cpp hsvcm.h Log Message: - Implemented the HSV Co-Occurrence calculation. This is a big step in our efforts to use color textures to classify images. Index: hsvcm.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/hsvcm.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- hsvcm.cpp 2 Apr 2005 18:17:27 -0000 1.2 +++ hsvcm.cpp 2 Apr 2005 20:14:09 -0000 1.3 @@ -41,10 +41,16 @@ //check dependencies m_methodName = "hsvcm"; - m_longName = i18n("Hue Saturation and Value Co-Occurrence Matrix"); + m_longName = i18n("HSV Co-Occurrence Matrix"); //defaults + m_quantH = 8; + m_quantS = 4; + m_quantV = 4; + m_sizeH = 45; // 360 / 8 + m_sizeS = 64; // 256 / 4 + m_sizeV = 64; // 256 / 4 } @@ -55,19 +61,188 @@ void KTHSVCM::calculate(KTImage *img, KTClassifBackend *backend, int imgClass) { m_img = img; + + // create matrices + for (int d=0; d < 9; d++) + { + m_cm[d] = new float**[m_sizeV]; + for (int i=0;i < m_sizeV; i++) + { + m_cm[d][i] = new float*[m_sizeH]; + for (int j=0; j < m_sizeH; j++) + m_cm[d][i][j] = new float[m_sizeS]; + } + } + calculateHSVCM(); + + + //delete the GLCM's after calculating + for (int d=0; d < 9; d++) + { + for (int i=0;i < m_sizeV; i++) + { + for (int j=0;j < m_sizeH; j++) + delete [] m_cm[d][i][j]; + delete [] m_cm[d][i]; + } + delete m_cm[d]; + } } void KTHSVCM::calculateHSVCM() { QColor color; - for (int i = 0; i < m_img->width(); ++i) - for (int j = 0; j < m_img->height(); ++j) + + //initialize the matrices with zeros + for (int d=0; d < 9; d++) + for (int i=0; i < m_sizeV; i++) + for (int j=0; j < m_sizeH; j++) + for (int k=0; k < m_sizeS; k++) + m_cm[d][i][j][k] = 0; + + int width = m_img->width(); + int height = m_img->height(); + + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) { - int H, S, V; - color.setRgb(m_img->pixel(i, j)); - color.getHsv(&H,&S,&V); - kdDebug() << "H = " << H << " S = " << S << " V = " << V << endl; + //get the H component of the central pixel + int H, S, V, tmpH, tmpS, tmpV; + color.setRgb(m_img->pixel(x, y)); + color.getHsv(&H,&tmpS,&tmpV); + H = H / m_quantH; + + //nine directions + for (int d = 0; d < 9; d++) + { + int xs,ys,xv,yv; + switch (d) + { + case 0: + /** + * o -> H,S,V + * + * The pixels from the three planes are all in the same direction + */ + xs = xv = x; + ys = yv = y; + break; + case 1: + /** + * S + * / + * H + * / + * V + */ + xv = (x == 0 ? width-1 : x-1); + yv = (y == height-1 ? 0 : y+1); + + xs = (x == width-1 ? 0 : x+1); + ys = (y == 0 ? height-1 : y-1); + break; + case 2: + /** + * S + * | + * H + * | + * V + */ + xs = xv = x; + yv = (y == height-1 ? 0 : y+1); + ys = (y == 0 ? height-1 : y-1); + break; + case 3: + /** + * S + * \ + * H + * \ + * V + */ + xv = (x == width-1 ? 0 : x+1); + yv = (y == height-1 ? 0 : y+1); + + xs = (x == 0 ? width-1 : x-1); + ys = (y == 0 ? height-1 : y-1); + break; + case 4: + /** + * + * S - H - V + * + */ + yv = ys = y; + xv = (x == width-1 ? 0 : x+1); + xs = (x == 0 ? width-1 : x-1); + break; + case 5: + /** + * V + * / + * H + * / + * S + */ + xv = (x == width-1 ? 0 : x+1); + yv = (y == 0 ? height-1 : y-1); + + xs = (x == 0 ? width-1 : x-1); + ys = (y == height-1 ? 0 : y+1); + break; + case 6: + /** + * V + * | + * H + * | + * S + */ + xs = xv = x; + yv = (y == 0 ? height-1 : y-1); + ys = (y == height-1 ? 0 : y+1); + break; + case 7: + /** + * V + * \ + * H + * \ + * S + */ + xv = (x == 0 ? width-1 : x-1); + yv = (y == 0 ? height-1 : y-1); + + xs = (x == width-1 ? 0 : x+1); + ys = (y == height-1 ? 0 : y+1); + break; + case 8: + /** + * + * V - H - S + * + */ + yv = ys = y; + xv = (x == 0 ? width-1 : x-1); + xs = (x == width-1 ? 0 : x+1); + break; + } + //get the V component of the direction pixel + color.setRgb(m_img->pixel(xv,yv)); + color.getHsv(&tmpH, &tmpS, &V); + V = V / m_quantV; + + //get the S component of the direction pixel + color.setRgb(m_img->pixel(xs,ys)); + color.getHsv(&tmpH, &S, &tmpV); + S = S / m_quantS; + + m_cm[d][V][H][S]++; + kdDebug() << "Got H,S,V = " << H << " " << S << " " << V << endl; + } + } } Index: hsvcm.h =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/hsvcm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- hsvcm.h 2 Apr 2005 18:17:27 -0000 1.2 +++ hsvcm.h 2 Apr 2005 20:14:09 -0000 1.3 @@ -62,10 +62,15 @@ int m_sizeS; int m_sizeV; - float m_quantH; - float m_quantS; - float m_quantV; - + int m_quantH; + int m_quantS; + int m_quantV; + /** Co-occurrence matrix + * i -> V plane + * j -> H plane + * k -> S plane + */ + float ***m_cm[9]; }; |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:12:20
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15841 Modified Files: glcm.cpp Log Message: - Moved the glcm creating code from calculateGLCM() to calculate() - Identation fixes Index: glcm.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/glcm.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- glcm.cpp 1 Apr 2005 03:14:05 -0000 1.6 +++ glcm.cpp 2 Apr 2005 20:12:10 -0000 1.7 @@ -57,6 +57,15 @@ void KTGLCM::calculate(KTImage *img, KTClassifBackend *backend, int imgClass) { m_img = img; + + // create matrices + for (int i=0; i < 4; i++) + { + m_glcm[i] = new float*[m_glcmSize]; + for (int j=0;j < m_glcmSize; j++) + m_glcm[i][j] = new float[m_glcmSize]; + } + calculateGLCM(); int i,j,k; @@ -110,14 +119,6 @@ int R0, R45, R90, x, y, row, col, rows, cols, angle, itone, jtone; //d is the step size on checking the neighbor pixels int d = 1; - - // create matrices - for (int i=0; i < 4; i++) - { - m_glcm[i] = new float*[m_glcmSize]; - for (int j=0;j < m_glcmSize; j++) - m_glcm[i][j] = new float[m_glcmSize]; - } //initialize the matrices for (int i=0; i < 4; i++) @@ -134,27 +135,27 @@ x = m_img->gray(col,row) / m_quantization; if (angle == 0 && col + d < cols) { - y = m_img->gray(col+d,row) / m_quantization; + y = m_img->gray(col+d,row) / m_quantization; m_glcm[angle][x][y]++; - m_glcm[angle][y][x]++; + m_glcm[angle][y][x]++; } - else if (angle == 1 && row + d < rows) + else if (angle == 1 && row + d < rows) { - y = m_img->gray(col,row+d) / m_quantization; + y = m_img->gray(col,row+d) / m_quantization; m_glcm[angle][x][y]++; - m_glcm[angle][y][x]++; + m_glcm[angle][y][x]++; } - else if (angle == 2 && row + d < rows && col - d >= 0) + else if (angle == 2 && row + d < rows && col - d >= 0) { - y = m_img->gray(col-d, row+d) / m_quantization; + y = m_img->gray(col-d, row+d) / m_quantization; m_glcm[angle][x][y]++; - m_glcm[angle][y][x]++; + m_glcm[angle][y][x]++; } - else if (angle == 3 && row + d < rows && col + d < cols) + else if (angle == 3 && row + d < rows && col + d < cols) { - y = m_img->gray(col+d, row+d) / m_quantization; + y = m_img->gray(col+d, row+d) / m_quantization; m_glcm[angle][x][y]++; - m_glcm[angle][y][x]++; + m_glcm[angle][y][x]++; } } |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:11:13
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/invdiffmom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/invdiffmom Modified Files: invdiffmom.cpp Log Message: Removed some compilation warnings Index: invdiffmom.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/invdiffmom/invdiffmom.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- invdiffmom.cpp 24 Mar 2005 03:06:06 -0000 1.2 +++ invdiffmom.cpp 2 Apr 2005 20:10:23 -0000 1.3 @@ -51,6 +51,7 @@ float KTGLCMInvDiffMom::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int i, j, glcmSize = method()->dataSize(); float sum = 0; |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:11:13
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/dissimilarity In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/dissimilarity Modified Files: dissimilarity.cpp Log Message: Removed some compilation warnings Index: dissimilarity.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/dissimilarity/dissimilarity.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dissimilarity.cpp 24 Mar 2005 03:06:04 -0000 1.2 +++ dissimilarity.cpp 2 Apr 2005 20:10:21 -0000 1.3 @@ -51,6 +51,7 @@ float KTGLCMDissimilarity::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int i, j, glcmSize = method()->dataSize(); float sum = 0; float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:11:13
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/mean In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/mean Modified Files: mean.cpp Log Message: Removed some compilation warnings Index: mean.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/mean/mean.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mean.cpp 24 Mar 2005 03:06:06 -0000 1.2 +++ mean.cpp 2 Apr 2005 20:10:23 -0000 1.3 @@ -51,6 +51,7 @@ float KTGLCMMean::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:11:13
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/entropy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/entropy Modified Files: entropy.cpp Log Message: Removed some compilation warnings Index: entropy.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/entropy/entropy.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- entropy.cpp 24 Mar 2005 03:06:05 -0000 1.2 +++ entropy.cpp 2 Apr 2005 20:10:22 -0000 1.3 @@ -55,6 +55,7 @@ float KTGLCMEntropy::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:11:00
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/diffvariance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/diffvariance Modified Files: diffvariance.cpp Log Message: Removed some compilation warnings Index: diffvariance.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/diffvariance/diffvariance.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- diffvariance.cpp 24 Mar 2005 03:05:48 -0000 1.2 +++ diffvariance.cpp 2 Apr 2005 20:10:21 -0000 1.3 @@ -51,6 +51,7 @@ float KTGLCMDiffVariance::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:10:59
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/diffentropy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/diffentropy Modified Files: diffentropy.cpp Log Message: Removed some compilation warnings Index: diffentropy.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/diffentropy/diffentropy.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- diffentropy.cpp 24 Mar 2005 03:05:48 -0000 1.2 +++ diffentropy.cpp 2 Apr 2005 20:10:20 -0000 1.3 @@ -55,6 +55,7 @@ float KTGLCMDiffEntropy::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:10:59
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/correlation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/correlation Modified Files: correlation.cpp Log Message: Removed some compilation warnings Index: correlation.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/correlation/correlation.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- correlation.cpp 24 Mar 2005 03:05:47 -0000 1.2 +++ correlation.cpp 2 Apr 2005 20:10:07 -0000 1.3 @@ -53,6 +53,7 @@ float KTGLCMCorrelation::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |
|
From: Gustavo P. B. <gb...@us...> - 2005-04-02 20:10:52
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/angsecmom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14738/angsecmom Modified Files: angsecmom.cpp Log Message: Removed some compilation warnings Index: angsecmom.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/methods/glcm/features/angsecmom/angsecmom.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- angsecmom.cpp 31 Mar 2005 22:35:15 -0000 1.3 +++ angsecmom.cpp 2 Apr 2005 20:10:06 -0000 1.4 @@ -51,6 +51,7 @@ float KTGLCMAngSecMom::_calculate(KTImage *img, int direction) { + Q_UNUSED(img); int glcmSize = method()->dataSize(); float **glcm = (float**) method()->data(direction); |