|
Base class for windows applied by WindowOp's. More...
#include <Window.h>
Public Types | |
typedef C | conf_t |
Public Member Functions | |
Window (size_t width=1, size_t height=0) | |
Constructor with geometry setting option. | |
Window (const C &conf) | |
Constructor adapting given configuration. | |
Window (const Window &window) | |
virtual | ~Window () |
Destructor. | |
virtual void | setSize (size_t width, size_t height) |
Sets the window size. | |
size_t | getArea () |
Returns the nominal area in pixels. | |
size_t | getSamplingArea () |
Returns the area which has eventually been scaled (in a non-linear coordinate system) | |
virtual void | run () |
Main loop: traverses the source image and writes result to dst image. More... | |
virtual void | toStream (std::ostream &ostr) const |
Public Member Functions inherited from WindowCore | |
virtual void | setSrcFrames (const ImageTray< const Channel > &srcTray) |
virtual void | setDstFrames (ImageTray< Channel > &dstTray) |
virtual void | setSrcFrameWeight (const ImageFrame &srcW) |
virtual void | setDstFrameWeight (ImageFrame &dstW) |
Public Member Functions inherited from WindowCoreBase | |
virtual void | setSrcFrame (const ImageFrame &src) |
virtual void | setDstFrame (ImageFrame &dst) |
Public Attributes | |
conf_t | conf |
UniCloner< UnaryFunctor > | unicloner |
drain::UnaryFunctor & | myFunctor |
Public Attributes inherited from WindowCore | |
ImageView | src |
ImageView | dst |
Protected Member Functions | |
virtual bool | isHorizontal () const |
Tells if the window should be moved (traversed of slided) row-by-row (horizontally) or column-by-column (vertically). More... | |
virtual void | initialize () |
virtual void | update () |
At each location, this is called to calculate and store something in members. | |
virtual void | write ()=0 |
At each location, the result of computation to dst image(s). More... | |
virtual bool | reset () |
Function determining whether array should be cleared at the edge(s). Needed for 1) cleaning numerical residues and 2) updating window parameters. More... | |
virtual void | setImageLimits () const =0 |
Sets internal limits corresponding to image geometries. Typically using coordHandler. More... | |
virtual void | setLoopLimits (int width, int height) |
Sets the actual traversal range inside the window. Sometimes applied dynamically by reset(). | |
void | setLoopLimits () |
Sets the actual traversal range inside the window. Sometimes applied dynamically by reset(). | |
bool | debugDiag (int bit=4) |
Protected Attributes | |
Point2D< int > | location |
Current location of this window. | |
int | samplingArea = 0 |
Number of pixels in the window (frame width*height?). | |
bool | resetAtEdges = false |
To avoid accumulated numerical errors esp. with floats, reset the statistics at row/cols ends. See reset() . | |
bool | SCALE = true |
If set, scaling is applied, potentially slowering the computation. | |
Range< int > | iRange |
Studies source and destination images and decides whether scaling (SCALE=true) should be set. | |
Range< int > | jRange |
CoordinateHandler2D | coordinateHandler |
Base class for windows applied by WindowOp's.
C | - configuration (width, height and str metadata) |
R | - source and target images, and their setters. |
|
inlineprotectedvirtual |
This function \i must
Reimplemented in SlidingWindow< C, R >, SlidingWindow< WindowConfig, MultiChannelWindowCore >, SlidingWindow< C, RadarWindowCore >, SlidingWindow< RadarWindowConfig, EtopWindowCore >, SlidingWindow< WindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore2 >, SlidingWindow< HistogramWindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore1 >, SlidingRadarWindowBase< C, R >, SlidingRadarWindowBase< C, RadarWindowCore >, Etop2Window, DopplerInversionWindow, DopplerWindow, SlidingWindowHistogram< R >, SlidingWindowHistogram< WeightedWindowCore >, SlidingWindowHistogram< WindowCore >, FlowAverageWindow, SlidingOpticalFlow2< R >, SlidingOpticalFlow2< OpticalFlowCore2 >, SlidingOpticalFlow< R >, SlidingOpticalFlow< OpticalFlowCore1 >, GaussianStripe< DIR, R >, and GaussianStripe< true, WeightedWindowCore >.
|
inlineprotectedvirtual |
Tells if the window should be moved (traversed of slided) row-by-row (horizontally) or column-by-column (vertically).
One may think of a boat. Boats typically move more easily forward or backward (ie. "horizontally") than sideways ("vertically").
|
inlineprotectedvirtual |
Function determining whether array should be cleared at the edge(s). Needed for 1) cleaning numerical residues and 2) updating window parameters.
Consider: rename to edgeCheck ?
Reimplemented in SlidingRadarWindowBase< C, R >, SlidingRadarWindowBase< C, RadarWindowCore >, SlidingWindow< C, R >, SlidingWindow< WindowConfig, MultiChannelWindowCore >, SlidingWindow< C, RadarWindowCore >, SlidingWindow< RadarWindowConfig, EtopWindowCore >, SlidingWindow< WindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore2 >, SlidingWindow< HistogramWindowConfig, WindowCore >, and SlidingWindow< OpticalFlowConfig, OpticalFlowCore1 >.
|
virtual |
Main loop: traverses the source image and writes result to dst image.
The basic implementation is a two-level loop (for j, for i ...).
Contract: any implementation should call initialize().
Reimplemented in SlidingWindow< C, R >, SlidingWindow< WindowConfig, MultiChannelWindowCore >, SlidingWindow< C, RadarWindowCore >, SlidingWindow< RadarWindowConfig, EtopWindowCore >, SlidingWindow< WindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore2 >, SlidingWindow< HistogramWindowConfig, WindowCore >, and SlidingWindow< OpticalFlowConfig, OpticalFlowCore1 >.
|
protectedpure virtual |
Sets internal limits corresponding to image geometries. Typically using coordHandler.
Studies source image(s) and sets srcWidth, srcHeight and coordHandler. Consider already implemented methods like WindowCore::adjustCoordHandler()
Implemented in Etop2Window, SlidingRadarWindowBase< C, R >, SlidingRadarWindowBase< C, RadarWindowCore >, SlidingWindowHistogram< R >, SlidingWindowHistogram< WeightedWindowCore >, SlidingWindowHistogram< WindowCore >, FlowAverageWindow, SlidingOpticalFlow2< R >, SlidingOpticalFlow2< OpticalFlowCore2 >, SlidingOpticalFlow< R >, SlidingOpticalFlow< OpticalFlowCore1 >, GaussianStripe< DIR, R >, and GaussianStripe< true, WeightedWindowCore >.
|
virtual |
Write debugging info to stream
|
protectedpure virtual |
At each location, the result of computation to dst image(s).
Contract: this function is called after update().
Implemented in SlidingWindow< C, R >, SlidingWindow< WindowConfig, MultiChannelWindowCore >, SlidingWindow< C, RadarWindowCore >, SlidingWindow< RadarWindowConfig, EtopWindowCore >, SlidingWindow< WindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore2 >, SlidingWindow< HistogramWindowConfig, WindowCore >, SlidingWindow< OpticalFlowConfig, OpticalFlowCore1 >, RadarWindowWeightedAvg< C >, Etop2Window, RadarWindowStdDev< F >, RadarWindowSoftMax< C >, RadarWindowAvg< C >, DopplerInversionWindow, DopplerEccentricityWindow, DopplerDevWindow, DopplerAverageWindow2, DopplerAverageWindow, SlidingWindowMedianWeighted, SlidingWindowMedian, SlidingWindowHistogramWeighted, SlidingWindowHistogram< R >, SlidingWindowHistogram< WeightedWindowCore >, SlidingWindowHistogram< WindowCore >, FlowAverageWindowWeighted, FlowAverageWindow, SlidingOpticalFlow2< R >, SlidingOpticalFlow2< OpticalFlowCore2 >, SlidingOpticalFlow< R >, SlidingOpticalFlow< OpticalFlowCore1 >, GaussianStripeWeighted< DIR >, GaussianStripeWeighted< false >, GaussianStripe< DIR, R >, and GaussianStripe< true, WeightedWindowCore >.