Commit 43a7295d authored by Roland Levillain's avatar Roland Levillain
Browse files

Make src/primitive/group/group_from_rag.cc compile again.

	* src/primitive/group/group_from_rag.cc: Here.
	* src/primitive/group/Makefile.am (noinst_PROGRAMS):
	Add group_from_rag.
parent d7ef07c6
2014-06-18 Roland Levillain <roland@lrde.epita.fr>
Make src/primitive/group/group_from_rag.cc compile again.
* src/primitive/group/group_from_rag.cc: Here.
* src/primitive/group/Makefile.am (noinst_PROGRAMS):
Add group_from_rag.
2014-06-17 Roland Levillain <roland@lrde.epita.fr>
Update the list of Scribo-related publications.
......
# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
# Copyright (C) 2009, 2010, 2014 EPITA Research and Development Laboratory
# (LRDE).
#
# This file is part of Olena.
......@@ -23,8 +23,9 @@ noinst_PROGRAMS = \
group_from_several_left_links \
group_from_single_link
noinst_PROGRAMS += group_from_rag
## FIXME: Does not compile.
## bin_PROGRAMS += group_from_rag \
## group_from_graph \
## group_from_several_graph
## noinst_PROGRAMS += \
## group_from_graph \
## group_from_several_graph
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
......@@ -44,7 +44,7 @@
#include <mln/util/graph.hh>
#include <mln/accu/center.hh>
#include <scribo/primitive/extract/objects.hh>
#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/link/with_rag.hh>
//#include <scribo/primitive/group/from_rag.hh>
......@@ -54,8 +54,8 @@
#include <scribo/fun/v2b/objects_small_filter.hh>
#include <scribo/debug/save_bboxes_image.hh>
#include <scribo/debug/save_linked_bboxes_image.hh>
#include <scribo/debug/bboxes_image.hh>
#include <scribo/debug/linked_bboxes_image.hh>
#include <scribo/make/debug_filename.hh>
int usage(const char *name)
......@@ -172,40 +172,45 @@ int main(int argc, char* argv[])
typedef image2d<value::label_16> L;
value::label_16 nbboxes;
typedef object_image(L) objects_t;
objects_t objects = primitive::extract::objects(input, c8(), nbboxes);
typedef component_set<L> components_t;
components_t components = primitive::extract::components(input, c8(), nbboxes);
/// First filtering.
objects_t filtered_objects
= scribo::filter::objects_small(objects, 6);
components_t filtered_components
= scribo::filter::components_small(components, 6);
filtered_objects
= scribo::filter::objects_thin(filtered_objects, 3);
filtered_components
= scribo::filter::components_thin(filtered_components, 3);
filtered_objects
= scribo::filter::objects_thick(filtered_objects,
filtered_components
= scribo::filter::objects_thick(filtered_components,
math::min(input.ncols(), input.nrows()) / 6);
/// Getting objects links from a Region Adjacency graph.
mln_VAR(rag_data, primitive::link::with_rag(filtered_objects, c8()));
/// Getting components links from a Region Adjacency graph.
mln_VAR(rag_data, primitive::link::with_rag(filtered_components, c8()));
mln_VAR(v_ima, scribo::graph::compute_vertex(accu::center<point2d>(),
rag_data.first(),
filtered_objects,
filtered_objects.nlabels()));
filtered_components.labeled_image(),
filtered_components.nelements()));
//FOR DEBUGGING PURPOSE
{
image2d<value::rgb8>
before_grouping = data::convert(value::rgb8(), input);
// FIXME: Disabled, no longer compiles.
#if 0
scribo::draw::bounding_boxes(before_grouping,
filtered_objects.bboxes(),
filtered_components.bboxes(),
literal::blue);
#endif
mln_VAR(pv, mln::make::p_vertices_with_mass_centers(filtered_objects, rag_data.first()));
mln_VAR(pv,
mln::make::p_vertices_with_mass_centers(filtered_components.labeled_image(),
rag_data.first()));
mln::debug::draw_graph(before_grouping, pv, literal::green, literal::green);
io::ppm::save(before_grouping,
......@@ -227,7 +232,7 @@ int main(int argc, char* argv[])
// scribo::draw::bounding_boxes(after_grouping,
// filtered_objects.bboxes(),
// filtered_components.bboxes(),
// literal::blue);
// mln::debug::draw_graph(after_grouping, v_ima.domain(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment