Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an initial version of a texton module that represents the appea… (
#1692) * Added an initial version of a texton module that represents the appearance of an image with a texton distribution In past work, we have used texton distributions for instance for obstacle detection. If the entropy of the texton distribution becomes low, this is typically an indication of a close obstacle. This "appearance variation cue" can be a good complement to using optical flow measurements for obstacle avoidance. There are may other uses for texton distributions though, while they are computationally quite cheap. * Fixed code style, and added nicer settings and documentation in xml
- Loading branch information
Showing
3 changed files
with
646 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE module SYSTEM "module.dtd"> | ||
|
||
<module name="cv_textons" dir="computer_vision"> | ||
<doc> | ||
<description>Represent the appearance (texture, color) of an image by means of a texton histogram.</description> | ||
|
||
<section name="TEXTONS" prefix="TEXTONS_"> | ||
<define name="LOAD_DICTIONARY" value="YES" description="Whether a dictionary is loaded (YES) or learned (NO)."/> | ||
<define name="N_TEXTONS" value="20" description="The number of textons (words) in the dictionary."/> | ||
<define name="PATCH_SIZE" value="6" description="Size of the image patches extracted from the image - even numbers."/> | ||
<define name="FULL_SAMPLING" value="NO" description="If YES, the entire image is covered with samples, if NO sub-sampling is used (faster)."/> | ||
<define name="DICTIONARY_NUMBER" value="0" description="Number of the dictionary (so that different environments can each have their specific dictionary)."/> | ||
<define name="ALPHA" value="10" description="Learning rate when creating the dictionary: 0 = no learning, 255 = the texton becomes equal to the new patch."/> | ||
<define name="N_SAMPLES_IMAGE" value="50" description="Number of samples extracted form the image when not doing full sampling."/> | ||
<define name="N_LEARNING_SAMPLES" value="10000" description="Number of samples used for learning the dictionary."/> | ||
<define name="BORDER_WIDTH" value="0" description="Width of the image border from which no samples are taken."/> | ||
<define name="BORDER_HEIGHT" value="0" description="Height of the border from which no samples are taken."/> | ||
</section> | ||
|
||
</doc> | ||
|
||
<settings> | ||
<dl_settings> | ||
<dl_settings NAME="Textons"> | ||
<dl_setting var="load_dictionary" min="0" step="1" max="1" module="computer_vision/textons" shortname="load dict." values="NO|YES" param="TEXTONS_LOAD_DICTIONARY"/> | ||
<dl_setting var="n_textons" min="1" step="1" max="255" shortname="n_textons" param="TEXTONS_N_TEXTONS"/> | ||
<dl_setting var="patch_size" min="2" step="2" max="40" shortname="p_size" param="TEXTONS_PATCH_SIZE" /> | ||
<dl_setting var="FULL_SAMPLING" min="0" step="1" max="1" shortname="full_sam" values="NO|YES" param="TEXTONS_FULL_SAMPLING" /> | ||
<dl_setting var="dictionary_number" min="0" step="1" max="20" shortname="dict_num" param="TEXTONS_DICTIONARY_NUMBER" /> | ||
<dl_setting var="n_samples_image" min="0" step="10" max="1000" shortname="n_samples" param="TEXTONS_ALPHA" /> | ||
<dl_setting var="n_learning_samples" min="1" step="100" max="250000" shortname="n_l_samples" param="TEXTONS_N_LEARNING_SAMPLES" /> | ||
<dl_setting var="alpha" min="0" step="1" max="255" shortname="alpha" param="TEXTONS_ALPHA"/> | ||
<dl_setting var="border_width" min="0" step="1" max="200" shortname="b_w" param="TEXTONS_BORDER_WIDTH"/> | ||
<dl_setting var="border_height" min="0" step="1" max="200" shortname="b_h" param="TEXTONS_BORDER_HEIGHT"/> | ||
</dl_settings> | ||
</dl_settings> | ||
</settings> | ||
|
||
<header> | ||
<file name="textons.h"/> | ||
</header> | ||
<init fun="textons_init()"/> | ||
|
||
<makefile> | ||
<file name="textons.c"/> | ||
<file name="image.c" dir="modules/computer_vision/lib/vision"/> | ||
</makefile> | ||
</module> | ||
|
Oops, something went wrong.