* green/exp/annotating/saturation: New directory.
* green/exp/annotating/saturation/Makefile.am: New Makefile.
* green/exp/annotating/saturation/saturation.cc: New source file.
---
milena/sandbox/ChangeLog | 14 ++++++++-
.../{achromastism => saturation}/Makefile.am | 0
.../achromastism.cc => saturation/saturation.cc} | 30 ++++++++++++--------
.../{achromastism => saturation}/text-color.txt | 0
.../{achromastism => saturation}/text-img.txt | 0
.../{achromastism => saturation}/text-only.txt | 0
6 files changed, 31 insertions(+), 13 deletions(-)
copy milena/sandbox/green/exp/annotating/{achromastism => saturation}/Makefile.am
(100%)
copy milena/sandbox/green/exp/annotating/{achromastism/achromastism.cc =>
saturation/saturation.cc} (75%)
copy milena/sandbox/green/exp/annotating/{achromastism => saturation}/text-color.txt
(100%)
copy milena/sandbox/green/exp/annotating/{achromastism => saturation}/text-img.txt
(100%)
copy milena/sandbox/green/exp/annotating/{achromastism => saturation}/text-only.txt
(100%)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 0e7ac9c..15c6c4b 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,9 +1,21 @@
2010-06-21 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+ Work on Millet saturation descriptor.
+
+ * green/exp/annotating/saturation: New directory.
+ * green/exp/annotating/saturation/Makefile.am: New Makefile.
+ * green/exp/annotating/saturation/saturation.cc: New source file.
+ * green/exp/annotating/saturation/text-color.txt: New image class.
+ * green/exp/annotating/saturation/text-img.txt: New image class.
+ * green/exp/annotating/saturation/text-only.txt: New image class.
+
+
+2010-06-21 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
+
Work on Millet hsv descriptors.
* green/exp/annotating/hsv: New directory.
- * green/Exp/annotating/hsv/hsv.cc: New source file.
+ * green/exp/annotating/hsv/hsv.cc: New source file.
2010-06-21 Yann Jacquelet <jacquelet(a)lrde.epita.fr>
diff --git a/milena/sandbox/green/exp/annotating/achromastism/Makefile.am
b/milena/sandbox/green/exp/annotating/saturation/Makefile.am
similarity index 100%
copy from milena/sandbox/green/exp/annotating/achromastism/Makefile.am
copy to milena/sandbox/green/exp/annotating/saturation/Makefile.am
diff --git a/milena/sandbox/green/exp/annotating/achromastism/achromastism.cc
b/milena/sandbox/green/exp/annotating/saturation/saturation.cc
similarity index 75%
copy from milena/sandbox/green/exp/annotating/achromastism/achromastism.cc
copy to milena/sandbox/green/exp/annotating/saturation/saturation.cc
index fdb8e6d..3eb27a4 100644
--- a/milena/sandbox/green/exp/annotating/achromastism/achromastism.cc
+++ b/milena/sandbox/green/exp/annotating/saturation/saturation.cc
@@ -1,4 +1,4 @@
-// ACHROMATISM TEST CF MILLET 2008
+// SATURATION TEST CF MILLET 2008
#include <iostream>
#include <sstream>
@@ -21,9 +21,10 @@
#include <mln/geom/nsites.hh>
-#include <mln/fun/v2v/rgb_to_achromatism_map.hh>
+#include <mln/fun/v2v/rgb_to_saturation_map.hh>
#include <mln/io/ppm/load.hh>
+//#include <mln/io/pgm/save.hh>
#include <mln/io/plot/save_image_sh.hh>
#include <mln/value/rgb8.hh>
@@ -45,12 +46,14 @@ unsigned count_histo(const mln::Image<I>& img_)
return result;
}
-float achromatism_test(const std::string input,
- const std::string output,
- const unsigned threshold)
+
+float saturation_test(const std::string input,
+ const std::string output,
+// const std::string tmp,
+ const unsigned threshold)
{
- typedef mln::fun::v2v::rgb_to_achromatism_map<8> t_rgb_to_achromatism_map;
+ typedef mln::fun::v2v::rgb_to_saturation_map<8> t_rgb_to_saturation_map;
mln::image2d<mln::value::rgb8> input_rgb8;
mln::image2d<mln::value::int_u8> map;
@@ -61,7 +64,7 @@ float achromatism_test(const std::string input,
mln::io::ppm::load(input_rgb8, input.c_str());
- map = mln::data::transform(input_rgb8, t_rgb_to_achromatism_map());
+ map = mln::data::transform(input_rgb8, t_rgb_to_saturation_map());
histo = mln::data::compute(mln::accu::meta::stat::histo1d(), map);
cnt1 = count_histo(histo | mln::box1d(mln::point1d(0),
mln::point1d(threshold)));
@@ -69,6 +72,7 @@ float achromatism_test(const std::string input,
prop = ((100.0 * cnt1) / cnt2);
mln::io::plot::save_image_sh(histo, output.c_str());
+// mln::io::pgm::save(map, tmp.c_str());
return prop;
}
@@ -95,13 +99,15 @@ int main()
for (t_iter_path dir_iter(full_path[i]); end_iter != dir_iter; ++dir_iter)
{
// concatenation de chaine
- t_path directory(ANNOTATING_ACHROMATISM_RET_PATH);
- t_path leaf = dir_iter->path().leaf();
+ t_path directory(ANNOTATING_SATURATION_RET_PATH);
+ t_path leaf = dir_iter->path().leaf();
t_path output = change_extension(directory / leaf, ".sh");
+ t_path tmp = change_extension(directory / leaf, ".pgm");
- prop = achromatism_test(dir_iter->path().string(),
- output.string(),
- 11);
+ prop = saturation_test(dir_iter->path().string(),
+ output.string(),
+// tmp.string(),
+ 25);
std::cout << output << " : " << prop << std::endl;
std::cerr << output << " : " << prop << std::endl;
diff --git a/milena/sandbox/green/exp/annotating/achromastism/text-color.txt
b/milena/sandbox/green/exp/annotating/saturation/text-color.txt
similarity index 100%
copy from milena/sandbox/green/exp/annotating/achromastism/text-color.txt
copy to milena/sandbox/green/exp/annotating/saturation/text-color.txt
diff --git a/milena/sandbox/green/exp/annotating/achromastism/text-img.txt
b/milena/sandbox/green/exp/annotating/saturation/text-img.txt
similarity index 100%
copy from milena/sandbox/green/exp/annotating/achromastism/text-img.txt
copy to milena/sandbox/green/exp/annotating/saturation/text-img.txt
diff --git a/milena/sandbox/green/exp/annotating/achromastism/text-only.txt
b/milena/sandbox/green/exp/annotating/saturation/text-only.txt
similarity index 100%
copy from milena/sandbox/green/exp/annotating/achromastism/text-only.txt
copy to milena/sandbox/green/exp/annotating/saturation/text-only.txt
--
1.5.6.5
Show replies by date