https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena/sandbox
Index: ChangeLog
from Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
INIM: Classif: Make use of maj_h. Fix Makefile.
* classif/proj.hh: Make use of majority.
* classif/Makefile: Proper dependencies.
Makefile | 21 ++++++++++++++++++---
proj.hh | 10 ++++++----
2 files changed, 24 insertions(+), 7 deletions(-)
Index: classif/proj.hh
--- classif/proj.hh (revision 2739)
+++ classif/proj.hh (working copy)
@@ -32,7 +32,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/level/paste.hh>
#include <mln/accu/mean.hh>
-#include <mln/accu/max.hh>
+#include <mln/accu/maj_h.hh>
#include <mln/literal/white.hh>
namespace mln
@@ -59,11 +59,13 @@
{
//accu::mean<unsigned, unsigned long, value::int_u8> mean_accu;
- accu::max<value::int_u8> max_1;//FIXME: use majoritaire accu
+ accu::maj_h<value::int_u8> max_1;
image2d<value::int_u8> hproj = proj(histo, max_1);
- accu::max<U> max_2;//FIXME: use majoritaire accu
- image2d<U> proj_class = proj(ws, max_2);
+ accu::maj_h<value::int_u8> max_2;
+ image2d<value::int_u8> proj_class = proj(ws, max_2);
+
+ //std::cout << histo;
image2d<value::rgb8> out(proj_class.domain());
Index: classif/Makefile
--- classif/Makefile (revision 2739)
+++ classif/Makefile (working copy)
@@ -12,7 +12,7 @@
# V2
-V2_INCLUDES=-I../.. -I../garrigues/fllt
+V2_INCLUDES=-I../..
V2_SRC=v2.cc max_tree.hh
V2=v2
V2_DBG=v2_dbg
@@ -32,11 +32,11 @@
g++ $(V2_INCLUDES) -O1 -DNDEBUG $(V2_SRC) -o $(V2)
-$(V2_DBG): $(V2_SRC)
+$(V2_DBG): $(V2_SRC) .dep_v2
g++ $(V2_INCLUDES) -O0 -g3 -ggdb3 $(V2_SRC) -o $(V2_DBG)
-.PHONY:clean check check-debug valgrind
+.PHONY:clean check check-debug valgrind .dep_iccvg .dep_v2
clean:
rm -f $(ICCVG)
@@ -44,6 +44,7 @@
rm -f $(V2)
rm -f $(V2_DBG)
rm -f *.log
+ rm -f .dep_iccvg .dep_v2
check-debug: $(ICCVG_DBG)
./iccvg_dbg $(IMG) $(DIV) $(LAMBDA) $(LOG)
@@ -70,3 +71,17 @@
v2-gdb: $(V2_DBG)
echo "run ../../img/lena.ppm $(DIV) $(LAMBDA) $(LOG)" > gdb.cmd
gdb $(V2_DBG) -x gdb.cmd
+
+
+.dep_iccvg:
+ g++ $(ICCVG_INCLUDES) -MM iccvg04.cc > $@
+ @sed -ir s/iccvg04.cc// .dep_iccvg
+ @sed -ir s/iccvg04.o/iccvg/ .dep_iccvg
+
+.dep_v2:
+ g++ $(V2_INCLUDES) -MM v2.cc > $@
+ @sed -ir s/v2.cc// .dep_v2
+ @sed -ir s/v2.o/v2/ .dep_v2
+
+-include .dep_iccvg
+-include .dep_v2
\ No newline at end of file