Commit 3ad6a4d6 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Merge branch 'exp/green' into next-build-test

parents aae4f34a 6ada0c4e
2010-06-21 Yann Jacquelet <>
Fix the way to convert unsigned to float.
* mln/convert/from_to.hxx: New conversion utilities.
* mln/convert/impl/from_unsigned_to_value.hh: New conversion utilities.
2009-12-02 Yann Jacquelet <>
Fix the outside template use case for the convolve macros.
* mln/linear/ch_convolve.hh (mln_ch_convolve_, mln_ch_convolve_grad_):
Define new macros to work outside templates.
2010-11-15 Guillaume Lazzara <>
Add conversions from int_u to float and double.
2010-06-21 Yann Jacquelet <>
Add milena library components.
* green/mln/accu/stat/histo1d.hh: New header component.
* green/mln/fun/p2b/achromatic.hh: New header component.
* green/mln/fun/p2b/component_equals.hh: New header component.
* green/mln/fun/v2v/achromatism.hh: New header component.
* green/mln/fun/v2v/hue_concentration.hh: New header component.
* green/mln/fun/v2v/rgb_to_achromatism_map.hh: New header component.
* green/mln/fun/v2v/rgb_to_hsv.hh: New header component.
* green/mln/fun/v2v/rgb_to_hue_map.hh: New header component.
* green/mln/fun/v2v/rgb_to_saturation_map.hh: New header component.
* green/mln/fun/v2v/rgb_to_value_map.hh: New header component.
* green/mln/img_path.hh: New header component.
* green/mln/math/ceil.hh: New header component.
* green/mln/math/floor.hh: New header component.
* green/mln/math/hsv.hh: New header component.
2010-06-21 Yann Jacquelet <>
Work on Millet value descriptor.
* green/exp/annotating/value: New directory.
* green/exp/annotating/value/ New Makefile.
* green/exp/annotating/value/ New source file.
* green/exp/annotating/value/text-color.txt: New image class.
* green/exp/annotating/value/text-img.txt: New image class.
* green/exp/annotating/value/text-only.txt: New image class.
2010-06-21 Yann Jacquelet <>
Work on Millet hue descriptor.
* green/exp/annotating/hue: New directory.
* green/exp/annotating/hue/ New Makefile.
* green/exp/annotating/hue/ New source file.
* green/exp/annotating/hue/text-color.txt: New image class.
* green/exp/annotating/hue/text-img.txt: New image class.
* green/exp/annotating/hue/text-only.txt: New image class.
2010-06-21 Yann Jacquelet <>
Work on Millet saturation descriptor.
* green/exp/annotating/saturation: New directory.
* green/exp/annotating/saturation/ New Makefile.
* green/exp/annotating/saturation/ 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 <>
Work on Millet hsv descriptors.
* green/exp/annotating/hsv: New directory.
* green/exp/annotating/hsv/ New source file.
2010-06-21 Yann Jacquelet <>
Work on histograms view as density.
* green/exp/annotating/histo: New directory.
* green/exp/annotating/histo/ New
* green/exp/annotating/histo/ New source.
2010-06-21 Yann Jacquelet <>
Test error quantification as a color descriptor in our database.
* green/exp/annotating/error: New directory.
* green/exp/annotating/error/ New Makefile.
* green/exp/annotating/error/ New source.
2010-06-21 Yann Jacquelet <>
Benchmark few descriptors.
* green/exp/annotating/bench: New directory.
* green/exp/annotating/bench/ New Makefile.
* green/exp/annotating/bench/ New source.
2010-06-21 Yann Jacquelet <>
Test on image database the achromatism descriptor.
* green/exp/annotating/achromatism: New directory.
* green/exp/annotating/achromatism/ New Makefile.
* green/exp/annotating/achromatism/ New source.
* green/exp/annotating/achromatism/text-color.txt: New image class.
* green/exp/annotating/achromatism/text-img.txt: New image class.
* green/exp/annotating/achromatism/text-only.txt: New image class.
2010-06-21 Yann Jacquelet <>
Turn around Millet 2008 hsv descriptors.
* green/demo/annotating/hsv: New directory.
* green/demo/annotating/hsv/ New Makefile.
2010-02-10 Yann Jacquelet <>
Fix bugs in the histogram visualization tools.
* green/mln/display/ Add new vizualisations.
* green/mln/display/ Add new color projections.
2010-02-10 Yann Jacquelet <>
Fix last details in the image processing chain.
* green/tools/annotating/histo/ Manage new inputs/outputs.
* green/tools/annotating/opening/ Manage new inputs/outputs.
* green/tools/annotating/iz/ New Makefile.
* green/tools/annotating/iz/ New file.
* green/tools/annotating/regmax/ Manage new inputs/outputs.
2010-01-05 Yann Jacquelet <>
Extend the histogram visualization tools for new projection concept.
* green/mln/display/project_histo.hh (project2_histo): New functions
that keep the max of the histogram or the class associate to it while
projecting along a direction.
* green/mln/display/project_histo.hh (project3_histo): New functions
that keep the color of the class associate to the histogram maximum
while projecting along a direction.
* green/mln/display/display_histo.hh: New interface functions for
project2_histo and project3_histo.
2010-01-05 Yann Jacquelet <>
Build translation table between number of pixels and percentage of
pixels in image for the scribo database.
* green/demo/labeling/regional_maxima/threshold.txt: New translation
2010-01-05 Yann Jacquelet <>
Split the regional maxima binary in small atomic binaries.
* green/tools/annotating/histo: New directory.
* green/tools/annotating/histo/ New Makefile.
* green/tools/annotating/histo/ New source file.
* green/tools/annotating/opening: New directory.
* green/tools/annotating/opening/ New Makefile.
* green/tools/annotating/opening/ New source file.
* green/tools/annotating/regmax: New directory.
* green/tools/annotating/regmax/ New Makefile.
* green/tools/annotating/regmax/ New source file.
2009-12-23 Yann Jacquelet <>
Write the opening volume thresholds for the scribo image mp00082c.ppm.
* green/demo/labeling/regional_maxima/thresholds.txt: New documentation.
2009-12-23 Yann Jacquelet <>
Experiment variation on regional maxima labeling.
* green/demo/labeling/regional_maxima/
(demo_17_12_2009): New function that describes the experimentation.
2009-12-18 Yann Jacquelet<>
Fix the right behaviour of the regmax software.
* green/demo/labeling/regional_maxima/ Add
many modifications to reach the current software state. There is some
nomenclatura, some refactoring and debugging.
2009-12-17 Yann Jacquelet <>
Fix bug in the direction of projection.
* green/mln/display/display_histo.hh: Fix bug in the direction.
* green/mln/display/project_histo.hh: Add spaces to follow the LRDE
2009-12-16 Yann Jacquelet <>
Fix bugs in regional_maxima routine, work with rgb8 for stats.
* green/demo/labeling/regional_maxima/
(compute_stats): New function.
* green/demo/labeling/regional_maxima/
(demo,main): Update functions to map Theo's view.
2009-12-16 Yann Jacquelet <>
Test the local deviation operator (Millet2008) on the annotating base.
* green/exp/annotating/stddev_color_16: New directory.
* green/exp/annotating/stddev_color_16/ New Makefile.
* green/exp/annotating/stddev_color_16/ New demo.
2009-12-16 Yann Jacquelet <>
Introduce the local deviation operator (Millet2008) which
subdivise the image in 16 parts.
* green/demo/annotating/stddev_color_16: New directory.
* green/demo/annotating/stddev_color_16/ New Makefile.
* green/demo/annotating/stddev_color_16/ New demo.
2009-12-16 Yann Jacquelet <>
Group Millet2008 documentation files.
* green/doc/annotating: New directory.
* green/doc/annotating/class.txt: New hierarchy description.
* green/doc/annotating/testMillet2008.txt: New result interpretations.
* green/doc/annotating/syntheseMillet2008.txt: New feature extractions.
* green/demo/annotating/class.txt: Remove this obsolete file.
2009-12-16 Yann Jacquelet <>
Correct typo into directories.
* green/demo/annoting: Rename as ...
* green/demo/annotating: ... these.
* green/exp/annoting: Rename as ...
* green/exp/annotating: ... these.
* green/mln/img_path.hh: Propagate mistake corrections.
* green/exp/labeling/regional_maxima/ (main):
Rename ANNOTING macro references as ANNOTATING ones.
* green/exp/annotating/stddev_color/stddev_color (main):
Rename ANNOTING macro references as ANNOTATING ones.
* green/exp/annotating/nb_color/ (main):
Rename ANNOTING macro references as ANNOTATING ones.
2009-12-15 green <>
Introduce new image converter from color to greyscale.
* green/mln/fun/v2v/rgb8_to_int_u8.hh: New image converter.
2009-12-15 green <>
Add new image paths to use the annoting database.
* green/mln/img_path.hh: Update to LRDE norm and add annoting database.
2009-12-15 Yann Jacquelet <>
Work around the regional labeling chain and experiment it on the
annoting database.
* green/exp/labeling/regional_maxima/ Add boost library.
* green/exp/labeling/regional_maxima/ Count colors.
2009-12-15 Yann Jacquelet <>
Test clipart operators described by Millet on annoting database.
* green/exp/annoting/nb_color: New experimentation directory.
* green/exp/annoting/nb_color/ New Makefile.
* green/exp/annoting/nb_color/ New experementation.
* green/exp/annoting/stddev_color: New experimentation directory.
* green/exp/annoting/stddev_color/ New Makefile.
* green/exp/annoting/stddev_color/ New experimentation.
2009-12-15 Yann Jacquelet <>
Introduce clipart operators described by Millet.
* green/demo/annoting/nb_color: New demonstration directory.
* green/demo/annoting/nb_color/ New Makefile.
* green/demo/annoting/nb_color/ New source file.
* green/demo/annoting/stddev_color: New demonstration directory.
* green/demo/annoting/stddev_color/ New Makefile.
* green/demo/annoting/stddev_color/ New source file.
2009-12-02 Yann Jacquelet <>
Optimize regional maxima processing for statistical counts and outputs.
* green/demo/labeling/regional_maxima/ Add some compilation
* green/demo/labeling/regional_maxima/
(t_channel,t_labeling_rgbn,label_image,unquant,print_count2): New.
* green/demo/labeling/regional_maxima/
(print_count, merge, do_demo) : Update.
2009-12-02 Yann Jacquelet <>
Test experimentation with regmax code on annoting database.
* green/exp/labeling/regional_maxima/ New Makefile.
* green/exp/labeling/regional_maxima/ New directory
oriented demonstration code.
2009-12-02 Yann Jacquelet <>
Transform kmean object in a big function and then a canvas.
* green/mln/clustering/kmean_rgb.hh: New library source code.
* green/demo/clustering/kmean_rgb/ New Makefile.
* green/demo/clustering/kmean_rgb/ New demo. code.
2009-12-02 Yann Jacquelet <>
Benchmark on distance, preliminary work before optimizing kmean.
* green/bench/transform/distance/ New Makefile.
* green/bench/transform/distance/ New processing chain.
2009-12-02 Yann Jacquelet <>
Works on Millet2008 descriptors.
* green/mln/demo/annoting/bic/ New Makefile.
* green/mln/demo/annoting/bic/ New impl. of the bic descriptor.
* green/mln/demo/annoting/lep/ New Makefile.
* green/mln/demo/annoting/lep/ New impl. of the lep descriptor.
* green/mln/demo/annoting/project/ New Makefile.
* green/mln/demo/annoting/project/ New impl. of the project
* green/mln/demo/annoting/rgb_64/ New Makefile.
* green/mln/demo/annoting/rgb_64/ New impl. of the rgb_64
* green/mln/demo/annoting/rgb_64_9/ New Makefile.
* green/mln/demo/annoting/rgb_64_9/ New impl. of the
rgb_64_9 descriptor.
* green/mln/demo/annoting/class.txt: New notes on fax class.
2009-12-02 Yann Jacquelet <>
Extend the test image database.
* green/mln/img_path.hh: Add annoting directories to experiment
algorithms on fax, handwritten, typed, logo, bill, map, screenshot,
slide image.
2010-06-25 Guillaume Lazzara <>
* bench/ New. Add a bench for the best fastest
This diff is collapsed.
This diff is collapsed.
# Generic Makefile
#LOADLIBES= -lboost_filesystem
INCLUDES1= -I$(HOME)/git/olena/scribo/sandbox/green
INCLUDES2= -I$(HOME)/git/olena/milena
CXXFLAGS= -ggdb -O0 -Wall -W -pedantic -ansi -pipe $(INCLUDES)
#CXXFLAGS= -DNDEBUG -O1 -Wall -W -pedantic -ansi -pipe $(INCLUDES)
#CXXFLAGS= -DNDEBUG -O3 -Wall -W -pedantic -ansi -pipe $(INCLUDES)
ECHO= echo
RM= rm
MKDIR= mkdir -p
CP= cp
SOURCE_PATTERN= green/demo
BUILD__PATTERN= green/build/demo
ifeq ($(findstring $(BUILD__PATTERN),$(PWD)), $(BUILD__PATTERN))
# Case where make is done from build directory.
# Case where make is done from source directory.
SRC= $(notdir $(wildcard $(SOURCE_DIR)/*.cc))
OLD= $(notdir $(wildcard $(SOURCE_DIR)/*~))
OBJ= $(patsubst,%.o,$(SRC))
TARGET_FILE= $(notdir $(PWD))
SOURCE_FILES= $(notdir $(wildcard $(SOURCE_DIR)/*.*))
BUILD__F_PATH= $(addprefix $(BUILD__DIR)/,$(BUILD__FILES))
OBJ_F_PATH= $(addprefix $(BUILD__DIR)/,$(OBJ))
SRC_F_PATH= $(addprefix $(SOURCE_DIR)/,$(SRC))
OLD_F_PATH= $(addprefix $(SOURCE_DIR)/,$(OLD))
bootstrap: $(BUILD__DIR) $(BUILD__F_PATH) $(BUILD__M_PATH)
# Create, if nessary, the destination directory
# Copy, if nessary, all the files, except the
$(CP) $(addprefix $(SOURCE_DIR),$(@F)) $@
# Copy if nessary, the into Makefile
# ALL #
# We assume that the call is done from the build directory.
# With the directive vpath, hidden files are found in the source directory.
$( $< $(LOADLIBES) $(LDLIBS) -o $@
# Force every time the deletion
clean: clean_target clean_obj clean_dst clean_old #clean_make
-@$(RM) $(TARGET_F_PATH) &> /dev/null
-@$(RM) $(OBJ_F_PATH) &> /dev/null
-@$(RM) $(BUILD_F_PATH) &> /dev/null
-@$(RM) $(BUILD_M_PATH) &> /dev/null
-@$(RM) $(OLD_F_PATH) &> /dev/null
print: print_tools print_bootstrap
@$(ECHO) "HOME = $(HOME)"
@$(ECHO) "ECHO = $(ECHO)"
@$(ECHO) "RM = $(RM)"
@$(ECHO) "CP = $(CP)"
@$(ECHO) "PWD = $(PWD)"
@$(ECHO) "SRC = $(SRC)"
@$(ECHO) "OBJ = $(OBJ)"
@$(ECHO) "OLD = $(OLD)"
// Copyright (C) 2007, 2008, 2009, 2010 EPITA LRDE
// This file is part of Olena.
// Olena is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, version 2 of the License.
// Olena is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Olena. If not, see <>.
// As a special exception, you may use this file as part of a free
// software project without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to produce
// an executable, this file does not by itself cause the resulting
// executable to be covered by the GNU General Public License. This
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
/// \file
/// \brief Implement the Millet BIC descriptor []
/// This is an image descriptor. It quantifies the three channels on 3
/// bits, then builds two histograms with the interior pixels and the
/// exterior ones. The interior pixels are those where color value is
/// the same as their 4 neighbouring pixels. The descriptor is the
/// fusion of the two histograms.
#include <iostream>
#include <mln/accu/stat/histo3d_rgb.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/core/routine/initialize.hh>
#include <mln/core/var.hh>
#include <mln/data/compute.hh>
#include <mln/data/convert.hh>
#include <mln/data/transform.hh>
#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/fun/v2v/rgb8_to_rgbn.hh>
#include <mln/img_path.hh>
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
#include <mln/io/plot/save_image_sh.hh>
#include <mln/literal/colors.hh>
#include <mln/value/rgb.hh>
#include <mln/value/rgb8.hh>
/// \brief Main entry.
/// Load the images, compute the interior and the exterior with the
/// predicate, then compute the two histograms separately.
int main()
typedef mln::value::rgb<3> t_rgb3;
typedef mln::value::rgb8 t_rgb8;
typedef mln::neighb2d t_neighb2d;
typedef mln::image2d<t_rgb3> t_image2d_rgb3;
typedef mln::image2d<t_rgb8> t_image2d_rgb8;
typedef mln::image3d<unsigned> t_histo3d;
typedef mln::fun::v2v::rgb8_to_rgbn<3> t_rgb8_to_rgb3;
typedef mln::accu::meta::stat::histo3d_rgb t_histo3d_fun;
t_image2d_rgb8 input_rgb8;
t_image2d_rgb3 input_rgb3;
t_image2d_rgb3 interior_rgb3;
t_image2d_rgb3 exterior_rgb3;
t_histo3d histo_exterior;
t_histo3d histo_interior;
std::cout << "Image loading phase ..." << std::endl;
mln::io::ppm::load(input_rgb8, ICDAR_50P_PPM_IMG_PATH"/mp00082c_50p.ppm");
input_rgb3 = mln::data::transform(input_rgb8, t_rgb8_to_rgb3());
mln::initialize(interior_rgb3, input_rgb3);
mln::initialize(exterior_rgb3, input_rgb3);
mln::data::fill(interior_rgb3, mln::literal::black);
mln::data::fill(exterior_rgb3, mln::literal::black);