* tests/detection/corner/Makefile.am (check_PROGRAMS): Add achard.
(achard_SOURCES): add achard.
(MOSTLYCLEANFILES): add achard-result
* tests/detection/corner/achard.cc: New.
---
milena/ChangeLog | 9 +++++++++
milena/tests/detection/corner/Makefile.am | 7 +++++--
.../detection/corner/{moravec.cc => achard.cc} | 13 ++++++++-----
3 files changed, 22 insertions(+), 7 deletions(-)
copy milena/tests/detection/corner/{moravec.cc => achard.cc} (88%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 22afbd2..3944be1 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2012-10-05 Jonathan Fabrizio <jonathan(a)lrde.epita.fr>
+ Add test for Achard corner detection.
+
+ * tests/detection/corner/Makefile.am (check_PROGRAMS): Add achard.
+ (achard_SOURCES): add achard.
+ (MOSTLYCLEANFILES): add achard-result
+ * tests/detection/corner/achard.cc: New.
+
+2012-10-05 Jonathan Fabrizio <jonathan(a)lrde.epita.fr>
+
Add Achard corner detection.
* mln/detection/corner/achard.hh: New.
diff --git a/milena/tests/detection/corner/Makefile.am
b/milena/tests/detection/corner/Makefile.am
index eb70108..3e4561e 100644
--- a/milena/tests/detection/corner/Makefile.am
+++ b/milena/tests/detection/corner/Makefile.am
@@ -18,13 +18,16 @@ include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
moravec \
-harris
+harris \
+achard
moravec_SOURCES = moravec.cc
harris_SOURCES = harris.cc
+achard_SOURCES = achard.cc
TESTS = $(check_PROGRAMS)
MOSTLYCLEANFILES = \
moravec-result.ppm \
-harris-result.ppm
+harris-result.ppm \
+achard-result.ppm
diff --git a/milena/tests/detection/corner/moravec.cc
b/milena/tests/detection/corner/achard.cc
similarity index 88%
copy from milena/tests/detection/corner/moravec.cc
copy to milena/tests/detection/corner/achard.cc
index 850d2a0..5c2af68 100644
--- a/milena/tests/detection/corner/moravec.cc
+++ b/milena/tests/detection/corner/achard.cc
@@ -23,7 +23,7 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#include <mln/detection/corner/moravec.hh>
+#include <mln/detection/corner/achard.hh>
#include <mln/value/rgb8.hh>
#include <mln/value/int_u8.hh>
#include <mln/io/essential.hh>
@@ -44,12 +44,15 @@ int main()
p_array<point2d> corners;
io::pgm::load(input, MLN_TESTS_IMG_DIR "/test_corner_detection.pgm");
- corners = mln::detection::corner::moravec(input);
+ corners = mln::detection::corner::achard(input);
output = mln::data::convert(value::rgb8(), input);
- mln_assertion(corners.nsites() == 1);
- mln_assertion(corners[0] == point2d(39,64));
data::fill( (output | corners).rw(), literal::red);
- io::ppm::save(output, "moravec-result.ppm");
+ io::ppm::save(output, "achard-result.ppm");
+
+ {
+ mln_assertion(corners.nsites() == 1);
+ mln_assertion(corners[0] == point2d(40,65));
+ }
}
--
1.7.2.5