Commit 9f4def73 authored by Guillaume Pasero's avatar Guillaume Pasero

Remove Edison module

parent a376e3ff
project(OTBEdison)
set(OTBEdison_THIRD_PARTY 1)
set(OTBEdison_INCLUDE_DIRS ${OTBEdison_SOURCE_DIR}/src/otbedison)
set(OTBEdison_LIBRARIES otbedison)
otb_module_impl()
set(DOCUMENTATION "This module imports Edison to the build system")
otb_module(OTBEdison
DEPENDS
TEST_DEPENDS
DESCRIPTION
"${DOCUMENTATION}"
)
otb_module_activation_option("Enable Edison segmentation dependent modules" ON)
set(OTB3P_INSTALL_EXPORT_NAME "${OTBEdison-targets}")
set(OTB3P_INSTALL_INCLUDE_DIR "${OTBEdison_INSTALL_INCLUDE_DIR}")
set(OTB3P_INSTALL_RUNTIME_DIR "${OTBEdison_INSTALL_RUNTIME_DIR}")
set(OTB3P_INSTALL_LIBRARY_DIR "${OTBEdison_INSTALL_LIBRARY_DIR}")
set(OTB3P_INSTALL_ARCHIVE_DIR "${OTBEdison_INSTALL_ARCHIVE_DIR}")
set(EDISON_SOURCES
# prompt/parser.cpp
# prompt/globalFnc.cpp
# prompt/edison.cpp
# prompt/libppm.cpp
otbedison/msSysPrompt.cpp
otbedison/ms.cpp
otbedison/msImageProcessor.cpp
otbedison/RAList.cpp
otbedison/rlist.cpp
# edge/BgEdge.cpp
# edge/BgEdgeDetect.cpp
# edge/BgEdgeList.cpp
# edge/BgGlobalFc.cpp
# edge/BgImage.cpp
)
set(EDISON_HEADERS
# prompt/parser.h
# prompt/defs.h
# prompt/error.h
# prompt/flags.h
# prompt/edison.h
# prompt/imfilt.h
# prompt/libppm.h
otbedison/tdef.h
otbedison/RAList.h
otbedison/ms.h
otbedison/msImageProcessor.h
otbedison/msSys.h
otbedison/rlist.h
# edge/BgDefaults.h
# edge/BgEdge.h
# edge/BgEdgeDetect.h
# edge/BgImage.h
)
add_library(otbedison ${EDISON_SOURCES})
# Apply user-defined properties to the library target.
if(OTB_LIBRARY_PROPERTIES)
set_target_properties(otbedison PROPERTIES ${OTB_LIBRARY_PROPERTIES})
endif(OTB_LIBRARY_PROPERTIES)
install(TARGETS otbedison
EXPORT ${OTB3P_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${OTB3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB3P_INSTALL_ARCHIVE_DIR} COMPONENT Development
)
# Forced to install edison headers into the main include dir
# unless we patch the includes to add a "otbedison" root dir
# in all #include directives
install(FILES
${EDISON_HEADERS}
DESTINATION ${OTB3P_INSTALL_INCLUDE_DIR}
COMPONENT Development
)
otb_module_target( otbedison NO_INSTALL )
\ No newline at end of file
Mean Shift Image Processor Class ver1.0 README
----------------------------------------------
Class Overview:
===============
The mean shift image processor class is designed to offer the following functionality:
(1) Perform image segmentation and edge-preserving filtering using the mean shift algorithm.
(2) Perform (1) using a general kernel and/or an arbitrary input data space.
Table of Contents:
-------------------
(A) Image Segmentation and Filtering
(B) Synergistic Image Segmentation
(C) Using a General Kernel
(D) Using an Arbitrary Input Data Space
(E) The Class Error Handler
(F) Current Version Information
(G) References
(H) Contact Information
================================================================================================
(A) Image Segmentation and Filtering
-------------------------------------------------------------------------------------------------
Mean shift based image segmentation and filtering is performed using use the following methods:
msImageProcess::Filter - filters the image
msImageProcessor::Segment - segments the image
The input image processed by these methods is defined via the method,
msImageProcessor::DefineImage - this uploads the RGB data into the msImageProcessor class for processing
To obtain the output call:
msImageProcessor::GetResults - returns filtered or segmented image in RGB space
msImageProcessor::GetBoundaries - returns the boundaries of regions resulting from filtering
or segmentation
msImageProcessor::GetRegions - returns the classification structure that maps each
data point in the image to a given mode, and also
the number of points in the image correlating to each mode.
NOTE:
-----
The modes returned by GetRegions are not in the RGB space. If DefineImage was used, they are in the LUV space. The modes may be converted from LUV to RGB (and visa versa) using the space conversion methods of the msImageProcessor class:
msImageProcessor::RGBtoLUV - converts data points from the RGB data space to LUV
msImageProcessor::LUVtoRGB - converts data points from the LUV data space to RGB
Alternatively, mean shift may be applyed to data that lies in a space other than LUV. This may be accomplished through the use of the method MeanShift::DefineLInput (see section D).
================================================================================================
(B) Synergistic Image Segmentation
-------------------------------------------------------------------------------------------------
A weight map may be provided to the mean shift image processor class, used to perform synergistic image segmentation as described in the paper [3]. One may specify a weight map by calling either of the following methods:
MeanShift::SetWeightMap - defines the weight map used to specify a weighted kernel during
mean shift; the weight map may only be used for data that lies
on a lattice (e.g. an image)
msImageProcessor::SetWeightMap - specifies a weight map to be used for performing synergistic image
segmentation
Each of the above methods accept a floating point array of size L elements containing the weight map. When using the mean shift base class L is the number of data points in the specified data set; when using the image processor class L = height x width, where height and width are the dimensions of the image. The method msImageProcessor::SetWeightMap accepts an additional parameter, namely t_e, a threshold value used during the transitive closure step of the image segmentation algorithm. See the paper [3] for details.
================================================================================================
(C) Using a General Kernel
-------------------------------------------------------------------------------------------------
A general kernel can be used to perform mean shift filtering and segmentation by calling the inherited method:
MeanShift::DefineKernel - defines an N-dimensional kernel having kp subspaces, in which each subspace
can be of one of three types: Uniform, Gaussian, or UserDefined.
DefineImage, used to define the input image when performing image segmentation or filtering, defines a Uniform kernel having two subspaces (one spatial (x,y) and one range (L,U,V)) each subspace having bandwidths sigmaS and sigmaR respectively. By skimming the method definition one may get an idea of how to define a general kernel.
NOTE:
----
For data that is defined on a lattice, it is always assumed that the spatial domain is treated as a single subspace. Also, DefineKernel() must be called *after* DefineImage() when these methods are used together.
================================================================================================
(D) Using an Arbitrary Input Data Space
-------------------------------------------------------------------------------------------------
Mean shift filtering and segmentation may be performed on an arbitary image data space. Such data is defined through calling the inherited method:
MeanShift::DefineLInput - specifies input defined on a lattice
DefineImage() calls this method using the LUV data it generates. Through the use of the above methods, mean shift may be applied to an arbitrary input data space using a general kernel. In doing so, one must ensure that the dimension of the input data space and kernel are the same (N). If their dimensions do not agree an error will be flagged.
================================================================================================
(F) The Class Error Handler
-------------------------------------------------------------------------------------------------
The mean shift image processor class uses an error message string and error-level flag to perform error handling. These two variables, MeanShift::ErrorMessage and MeanShift::ErrorLevel, are public data members of the class.
Upon the occurance of an error,
* An error message is copied into the error message string.
* The error level of the class is set to EL_ERROR.
The following example demonstrates the use of the error handling mechanism described above.
msImageProcessor iProc;
...
iProc.Segment(sigmaS, sigmaR, minRegion, SPEEDUP);
if(iProc.ErrorLevel == EL_ERROR)
{
fprintf(stderr, iProc.ErrorMessage);
exit(1);
}
...
================================================================================================
(G) Current Version Information
-------------------------------------------------------------------------------------------------
The current version of the code was tested under both UNIX and Windows environments.
================================================================================================
(H) References
-------------------------------------------------------------------------------------------------
[1] D. Comanicu, P. Meer: "Mean shift: A robust approach toward feature space analysis".
IEEE Trans. Pattern Anal. Machine Intell., May 2002.
[2] P. Meer, B. Georgescu: "Edge detection with embedded confidence". IEEE Trans. Pattern Anal.
Machine Intell., 28, 2001.
[3] C. Christoudias, B. Georgescu, P. Meer: "Synergism in low level vision". 16th International
Conference of Pattern Recognition, Track 1 - Computer Vision and Robotics, Quebec City,
Canada, August 2001.
================================================================================================
(I) Contact Information
-------------------------------------------------------------------------------------------------
Personal Contact Information
----------------------------
Email:
cmch@caip.rutgers.edu (Chris Christoudias)
georgesc@caip.rutgers.edu (Bogdan Georgescu)
Laboratory Contact Information
------------------------------
Laboratory Website:
www.caip.rutgers.edu/riul/
================================================================================================
\ No newline at end of file
/*******************************************************
Mean Shift Analysis Library
=============================================
The mean shift library is a collection of routines
that use the mean shift algorithm. Using this algorithm,
the necessary output will be generated needed
to analyze a given input set of data.
Region Adjacency List:
=====================
The Region Adjacency List class is used by the Image
Processor class in the construction of a Region Adjacency
Matrix, used by this class to applying transitive closure
and to prune spurious regions during image segmentation.
The definition of the RAList class is provided below. Its
prototype is provided in "RAList.h".
The theory is described in the papers:
D. Comaniciu, P. Meer: Mean Shift: A robust approach toward feature
space analysis.
C. Christoudias, B. Georgescu, P. Meer: Synergism in low level vision.
and they are is available at:
http://www.caip.rutgers.edu/riul/research/papers/
Implemented by Chris M. Christoudias, Bogdan Georgescu
********************************************************/
//include Region Adjacency List class prototype
#include "RAList.h"
//include needed libraries
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ PUBLIC METHODS @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/
/* Class Constructor and Destructor */
/*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/
/*******************************************************/
/*Class Constructor */
/*******************************************************/
/*Constructs a RAList object. */
/*******************************************************/
/*Post: */
/* - a RAlist object has been properly constru- */
/* cted. */
/*******************************************************/
RAList::RAList( void )
{
//initialize label and link
label = -1;
next = NULL;
//initialize edge strenght weight and count
edgeStrength = 0;
edgePixelCount = 0;
}
/*******************************************************/
/*Class Destructor */
/*******************************************************/
/*Destructrs a RAList object. */
/*******************************************************/
/*Post: */
/* - the RAList object has been properly dest- */
/* ructed. */
/*******************************************************/
RAList::~RAList( void )
{
//do nothing
}
/*******************************************************/
/*Insert */
/*******************************************************/
/*Insert a region node into the region adjacency list. */
/*******************************************************/
/*Pre: */
/* - entry is a node representing a connected re- */
/* gion */
/*Post: */
/* - entry has been inserted into the region adj- */
/* acency list if it does not already exist */
/* there. */
/* - if the entry already exists in the region */
/* adjacency list 1 is returned otherwise 0 is */
/* returned. */
/*******************************************************/
int RAList::Insert(RAList *entry)
{
//if the list contains only one element
//then insert this element into next
if(!next)
{
//insert entry
next = entry;
entry->next = NULL;
//done
return 0;
}
//traverse the list until either:
//(a) entry's label already exists - do nothing
//(b) the list ends or the current label is
// greater than entry's label, thus insert the entry
// at this location
//check first entry
if(next->label > entry->label)
{
//insert entry into the list at this location
entry->next = next;
next = entry;
//done
return 0;
}
//check the rest of the list...
exists = 0;
cur = next;
while(cur)
{
if(entry->label == cur->label)
{
//node already exists
exists = 1;
break;
}
else if((!(cur->next))||(cur->next->label > entry->label))
{
//insert entry into the list at this location
entry->next = cur->next;
cur->next = entry;
break;
}
//traverse the region adjacency list
cur = cur->next;
}
//done. Return exists indicating whether or not a new node was
// actually inserted into the region adjacency list.
return (int)(exists);
}
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ END OF CLASS DEFINITION @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*******************************************************
Mean Shift Analysis Library
=============================================
The mean shift library is a collection of routines
that use the mean shift algorithm. Using this algorithm,
the necessary output will be generated needed
to analyze a given input set of data.
Region Adjacency List:
=====================
The Region Adjacency List class is used by the Image
Processor class in the construction of a Region Adjacency
Matrix, used by this class to applying transitive closure
and to prune spurious regions during image segmentation.
The prototype for the RAList class is provided below. Its
defition is provided in "RAList.cc".
The theory is described in the papers:
D. Comaniciu, P. Meer: Mean Shift: A robust approach toward feature
space analysis.
C. Christoudias, B. Georgescu, P. Meer: Synergism in low level vision.
and they are is available at:
http://www.caip.rutgers.edu/riul/research/papers/
Implemented by Chris M. Christoudias, Bogdan Georgescu
********************************************************/
#ifndef RALIST_H
#define RALIST_H
//define Region Adjacency List class prototype
class RAList {
public:
//============================
// *** Public Data Members ***
//============================
////////////RAM Label//////////
int label;
////////////RAM Weight/////////
float edgeStrength;
int edgePixelCount;
////////////RAM Link///////////
RAList *next;
//=======================
// *** Public Methods ***
//=======================
/*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/
/* Class Constructor and Destructor */
/*\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*/
//***Class Constrcutor***
RAList( void );
//***Class Destructor***
~RAList( void );
/*/\/\/\/\/\/\/\/\/\/\/\/\*/
/* RAM List Manipulation */
/*\/\/\/\/\/\/\/\/\/\/\/\/*/
//Usage: Insert(entry)
int Insert(RAList*); //Insert a region node into the region adjecency list
private:
//=============================
// *** Private Data Members ***
//=============================
///////current and previous pointer/////
RAList *cur, *prev;
////////flag///////////
unsigned char exists;
};
#endif
Edge Detection and Image SegmentatiON (EDISON) System ver1.0 README
-------------------------------------------------------------------
System Overview:
===============
The EDISON system is a low-level vision tool that performs confidence based edge detection and synergistic image segmentation. It is packaged under a platform independent graphical user interface. A command prompt version is also provided.
Table of Contents:
-------------------
(A) System Overview
(B) Help Files
(C) Current Version Information
(D) Using wxWindows
(E) References
(F) Contact Information
================================================================================================
(A) System Overview
-------------------------------------------------------------------------------------------------
The low-level image processor system is comprised of four components:
(1) An image segmentation module consisting of a collection of classes that are designed to
perform mean shift based and synergistic segmentation.
(2) An edge detection module consisting of a collection of classes that are designed to perform
confidence based edge detection.
(3) A platform independent graphical user interface programmed using wxWindows.
(4) A command prompt version.
The code for each module is available in its own directory. The directory structure is outlined below:
- segm : code for image segmentation
- edge : code for edge detection
- GUI : code for graphical user interface
- prompt: code for system command prompt
================================================================================================
(B) Help Files
-------------------------------------------------------------------------------------------------
The system help files are located in the 'help' directory. This directory contains the help files needed for both the graphical user interface and command prompt versions of the system. The 'doc' directory contains the help files needed for the graphical user interface. This directory must be placed in the same directory as the program executable to be used with the system. The file 'specification.html' contains the command prompt version specification.
================================================================================================
(C) Current Version Info
-------------------------------------------------------------------------------------------------
Both versions of the system were tested under a Windows environment. The command prompt version was also tested under UNIX. The graphical user interface was compiled using Microsoft Visual C++. The project files used to package the system code are located in the 'project' directory under the project name 'EDISON'. The makefile needed to compile the command prompt is also located in this directory. For any further questions on the compilation of this code, please contact us using the provided contact information below.
Although our system is thoroughly tested bugs may still exist. We would greatly appreciate any bug reports you may provide to assist us in building a more stable system.
================================================================================================
(D) Using wxWindows
-------------------------------------------------------------------------------------------------
In order to compile the graphical user interface version of EDISON wxWindows must be download and installed. It may be obtained from the wxWindows web site at http://www.wxWindows.org.
================================================================================================
(E) References
-------------------------------------------------------------------------------------------------
[1] D. Comanicu, P. Meer: "Mean shift: A robust approach toward feature space analysis".
IEEE Trans. Pattern Anal. Machine Intell., May 2002.
[2] P. Meer, B. Georgescu: "Edge detection with embedded confidence". IEEE Trans. Pattern Anal.
Machine Intell., 28, 2001.
[3] C. Christoudias, B. Georgescu, P. Meer: "Synergism in low level vision". 16th International
Conference of Pattern Recognition, Track 1 - Computer Vision and Robotics, Quebec City,
Canada, August 2001.
================================================================================================
(F) Contact Information
-------------------------------------------------------------------------------------------------
Personal Contact Information
----------------------------
Email:
cmch@caip.rutgers.edu (Chris M. Christoudias)
georgesc@caip.rutgers.edu (Bogdan Georgescu)
Laboratory Contact Information
------------------------------
Laboratory Website:
www.caip.rutgers.edu/riul/
================================================================================================
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*******************************************************
Mean Shift Analysis Library
=============================================
The mean shift library is a collection of routines
that use the mean shift algorithm. Using this algorithm,
the necessary output will be generated needed
to analyze a given input set of data.
Type Defintions:
===============
This header file contains the type defintions and
enumerations shared among the various classes of the mean
shift library.
The theory is described in the papers:
D. Comaniciu, P. Meer: Mean Shift: A robust approach toward feature
space analysis.
C. Christoudias, B. Georgescu, P. Meer: Synergism in low level vision.
and they are is available at:
http://www.caip.rutgers.edu/riul/research/papers/
Implemented by Chris M. Christoudias, Bogdan Georgescu
********************************************************/
#ifndef TDEF_H
#define TDEF_H
/*/\/\/\/\/\/\/\/\/\/\/\*/
/* Define Enumerations */