| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
RLEGenerator Class Reference#include <RLEGenerator.h>
Inheritance diagram for RLEGenerator: ![]() Detailed DescriptionGenerates RLE compressed FilterBankEvents (generally from indexed color images from, say, SegmentedColorGenerator).Uses the CMVision library for main processing. getImage() will return the first run, from the upper left hand corner. The type is RLEGenerator::run. The RLE produced isn't quite optimal in terms of size. To make it easier to directly process the RLE for recognition tasks, each run will be broken at the end of the row. So a solid image will still contain height runs instead of just one. Also, the run structures contain extra fields to be used for region connecting. These fields aren't sent over wireless, and are filled in by the RegionGenerator. I don't necessarily like the tight coupling between the RLE and Region Generators that this requires, but it saves a copy of the data and allows us to use CMVision instead of rewriting. Note that since the amount of data for each row is variable (depends on the complexity of that row) the row stride and skip are useless. You'll have to process the RLE yourself to find a given index. If the incoming events is a SegmentedColorFilterBankEvents, then it will post a SegmentedColorFilterBank to retain additional color information. If the event is of a different format, it will post a regular FilterBankEvent. Note that although you could hook this class up to a raw intensity image, it is primarily of use with segmented color images because it doesn't handle gradients or noise well at all - this type of encoding/compression assumes cartoonish images of large blocks of flat color. However, if you have some kind of other preprocessing that also provides suitable data, this can encode it for you. The format used for serialization is: (code is in saveBuffer())
Note that the RLEGenerator doesn't save the color infomation regarding what each index value "means". This is just a compression stage, pure and simple. You'll need to look at the RLEGenerator's source (probably SegmentedColorGenerator, but doesn't have to be) to determine how to interpret the indicies.
Definition at line 64 of file RLEGenerator.h.
Constructor & Destructor Documentation
constructor TODO - after RLEGraphics is inplace, replace the 'tid' parameter in FBG's constructor call! Definition at line 10 of file RLEGenerator.cc.
Member Function Documentation
Calculates space needed to save - if you can't precisely add up the size, just make sure to overestimate and things will still work. getBinSize is used for reserving buffers during serialization, but does not necessarily determine the actual size of what is written -- the return value of saveBuffer() specifies that after the data actually has been written. If getBinSize overestimates, the extra memory allocation is only temporary, no extra filler bytes are actually stored.
Reimplemented from FilterBankGenerator. Definition at line 55 of file RLEGenerator.cc.
Gives a short description of what this class of behaviors does... you should override this (but don't have to). If you do override this, also consider overriding getDescription() to return it Reimplemented from BehaviorBase. Definition at line 78 of file RLEGenerator.h.
this isn't really tested, don't rely on it working without a little debugging... specifically, doesn't set parent or next fields Reimplemented from FilterBankGenerator. Definition at line 68 of file RLEGenerator.cc.
Save to a given buffer in memory.
Reimplemented from FilterBankGenerator. Definition at line 100 of file RLEGenerator.cc. Referenced by SegCamBehavior::writeRLE().
resizes the filter bank information storage area, you should override this to do your setup and call it from your constructor In general, it isn't expected that FilterBankGenerator's should necessarily be dynamically resizeable (although it would be nice), which is why this isn't public. If yours is, just add some pubic accessor functions which call this. In general, the included subclasses should be able to handle being resized, but there's no reason to do so since the system won't be changing its available resolutions at run time. The default implementation is a no-op if(numLayers==nLayers && numChannels==nChannels) Reimplemented from FilterBankGenerator. Definition at line 134 of file RLEGenerator.cc. Referenced by RLEGenerator().
The documentation for this class was generated from the following files: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Fri May 11 20:08:42 2007 by Doxygen 1.4.7 |