Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
CDTGenerator Class Reference#include <CDTGenerator.h>
Inheritance diagram for CDTGenerator:
![]() Detailed DescriptionGenerates SegmentedColorFilterBankEvents with images provided from the system.The Aibo has hardware-level color segmentation based on rectangular regions of UV color space. This less flexible than the CMVision segmentation routines, which allow arbitrary shapes in color space, but the CDT (Color Detection Table) implementation has the major advantage of being done in hardware. This class doesn't do any processing of its own, it simply provides access to the CDT segmented images generated by the system. To use this, you will first have to send the system the color regions that define the CDT. You'll need to look in the OPEN-R documentation regarding the OCdtVectorData data structure and the New/Set/DeleteCdtVectorData() functions. For now, the color information in the Segmented Color Events will be NULL, so you won't be able to connect it to the rest of the CMVision stages unless you fill it in. Filling in the color information will require modifications of this source - I'm consciously cutting some corners to get this out the door sooner. Hopefully someone who needs this capability can pick up where I left off. It would be nice if someone made a version of CMVision's .col file format which also held the CDT information so the whole thing could be set up with one file load. Only the actual layers sent by the system will be referenced - no double resolution layer. Much like RawCameraGenerator, the extra subsampled images are simply using a larger interleave value. If you want the images in continuous memory, you'll need to pass this through a de-interleaver stage. Only one channel is available. Definition at line 43 of file CDTGenerator.h.
Member Enumeration Documentationholds id values for specifying image channel/bands
Definition at line 57 of file CDTGenerator.h.
Constructor & Destructor Documentation
don't call
Member Function Documentation
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 54 of file CDTGenerator.h.
need to override EventGeneratorBase's lazy listening -- as a root stage, need to remember each frame, just in case it might be used
Reimplemented from EventGeneratorBase. Definition at line 63 of file CDTGenerator.h.
called with system's image info The const casts in this function are regretable but necessary since the OPEN-R OFbkImage constructor requires mutable arguments, even though it shouldn't be modifying the data Reimplemented from FilterBankGenerator. Definition at line 33 of file CDTGenerator.cc.
the memory for all layers was allocated by system, so we just set them to NULL before calling FilterBankGenerator::freeCaches() so it won't try to delete them
Reimplemented from FilterBankGenerator. Definition at line 169 of file CDTGenerator.cc. Referenced by setDimensions(), and ~CDTGenerator().
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 89 of file CDTGenerator.cc.
The loadBuffer() functions of the included subclasses aren't tested, so don't assume they'll work without a little debugging... Reimplemented from FilterBankGenerator. Definition at line 99 of file CDTGenerator.cc.
Save to a given buffer in memory.
Reimplemented from FilterBankGenerator. Definition at line 106 of file CDTGenerator.cc.
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 180 of file CDTGenerator.cc. Referenced by CDTGenerator().
resets the current width, height, stride, and skip for all of the layers
Reimplemented from FilterBankGenerator. Definition at line 154 of file CDTGenerator.cc. Referenced by processEvent().
create new image data storage area for the cache - this called by getImage() only when the corresponding entry in images is NULL You should return the pointer you want stored in images to be returned by any calls to getFirstRow. Interpretation of the data it points to is dependant on the the generator which creates it Implements FilterBankGenerator. Definition at line 196 of file CDTGenerator.cc.
should calculate new image data, called by getImage() only when imageValids indicates the image being requested is dirty (and only after getImage() has already called createImageCache()) This is where you'll want to put your user-specific code for calculating the image data Implements FilterBankGenerator. Definition at line 201 of file CDTGenerator.cc.
deletes the arrays
Reimplemented from FilterBankGenerator. Definition at line 253 of file CDTGenerator.cc. Referenced by ~CDTGenerator().
don't call
Member Data Documentation
the number of actual layers to expect from the system
Definition at line 87 of file CDTGenerator.h. Referenced by calcImage(), processEvent(), setDimensions(), and setNumImages().
an array of pointers to actual system memory for each layer
Definition at line 89 of file CDTGenerator.h. Referenced by calcImage(), destruct(), processEvent(), and setNumImages().
information about image properties
Definition at line 90 of file CDTGenerator.h. Referenced by calcImage(), destruct(), processEvent(), setDimensions(), and setNumImages().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:12 2007 by Doxygen 1.5.4 |