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: Update palette proj.
* inim/classif/src/iccvg04.cc: Fix warning.
* inim/classif/src/proj.hh: Update palette prj.
* inim/classif/Makefile: Add warning flag.
Makefile | 8 ++++----
src/iccvg04.cc | 2 --
src/proj.hh | 10 +++++++---
3 files changed, 11 insertions(+), 9 deletions(-)
Index: inim/classif/src/iccvg04.cc
--- inim/classif/src/iccvg04.cc (revision 2828)
+++ inim/classif/src/iccvg04.cc (working copy)
@@ -53,7 +53,6 @@
const value::int_u8 v = 255 / f; // FIXME
image3d<unsigned> histo(v,v,v);
level::fill(histo, 0);
- unsigned i = 0;
mln_piter(I) p(ima.domain());
for_all(p)
@@ -163,7 +162,6 @@
image3d<unsigned> histo_filtered(histo.domain());
morpho::opening_volume(histo, c6(), lambda, histo_filtered);
-
//watershed over histo_closure
unsigned nbasins = 0;
image3d<unsigned> ws = morpho::meyer_wst(arith::revert(histo_filtered),
Index: inim/classif/src/proj.hh
--- inim/classif/src/proj.hh (revision 2828)
+++ inim/classif/src/proj.hh (working copy)
@@ -40,7 +40,7 @@
template <typename T, typename A>
image2d<mln_result(A)>
- proj(const image3d<T>& input, A a)
+ proj(const image3d<T>& input, A)
{
image2d<A> acc(geom::nslis(input), geom::nrows(input));
mln_piter(image3d<T>) p(input.domain());
@@ -69,11 +69,15 @@
image2d<value::rgb8> out(proj_class.domain());
level::fill(out, literal::white);
- mln_piter(image2d<value::int_u8>) p(hproj.domain());
+ mln_piter(image2d<value::int_u8>) p(proj_class.domain());
for_all(p)
if (hproj(p) > 0)
+ {
+ if (proj_class(p) > 0)
out(p) = convert::to<value::rgb8>(mean[proj_class(p)]);
-
+ else
+ out(p) = literal::red;
+ }
io::ppm::save(out, fn);
}
Index: inim/classif/Makefile
--- inim/classif/Makefile (revision 2828)
+++ inim/classif/Makefile (working copy)
@@ -21,18 +21,18 @@
$(ICCVG): $(ICCVG_SRC)
- g++ $(ICCVG_INCLUDES) -O1 -DNDEBUG $(ICCVG_SRC) -o $(ICCVG)
+ g++ $(ICCVG_INCLUDES) -Wall -W -O1 -DNDEBUG $(ICCVG_SRC) -o $(ICCVG)
$(ICCVG_DBG): $(ICCVG_SRC)
- g++ $(ICCVG_INCLUDES) -O0 -g3 -ggdb3 $(ICCVG_SRC) -o $(ICCVG_DBG)
+ g++ $(ICCVG_INCLUDES) -Wall -W -O0 -g3 -ggdb3 $(ICCVG_SRC) -o $(ICCVG_DBG)
$(V2): $(V2_SRC)
- g++ $(V2_INCLUDES) -O1 -DNDEBUG $(V2_SRC) -o $(V2)
+ g++ $(V2_INCLUDES) -Wall -W -O1 -DNDEBUG $(V2_SRC) -o $(V2)
$(V2_DBG): $(V2_SRC) .dep_v2
- g++ $(V2_INCLUDES) -O0 -g3 -ggdb3 $(V2_SRC) -o $(V2_DBG)
+ g++ $(V2_INCLUDES) -Wall -W -O0 -g3 -ggdb3 $(V2_SRC) -o $(V2_DBG)
.PHONY:clean check check-debug valgrind .dep_iccvg .dep_v2