Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void PixelDownSampleHigh(int Width, TVec *Y, int Index, int Len, TVec *X = null, TVec *NX = null); | Downsample the vectors Y and (optionaly) X starting at position Index and for Len samples. |
| 2 | void PixelDownSampleHigh(int Width, TVec *Y, TVec *X = null, TVec *NX = null); |
Overload 1: void PixelDownSampleHigh(int Width, TVec *Y, int Index, int Len, TVec *X = null, TVec *NX = null);
Downsample the vectors Y and (optionaly) X starting at position Index and for Len samples.
Remarks:
The method downsamples only the maximum values. This can be usefull, if the input is already a downsampled signal which has to be further downsampled.
Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;
void Example()
{
TVec *a, *b, *c, *d, *High, *Low;
CreateIt(a, b, c, d);
CreateIt(High, Low);
a->SetIt(false, DewArray<double>{0,0,0,1,2,3,1,2,3,4,5,6,7,8,9,5,5,5,2,3,4,1,1,1});
b->PixelDownSample(8, a);
High->GatherByIncr(b, 2, 0);
Low->GatherByIncr(b, 2, 1);
c->PixelDownSampleHigh(2, High); //further downsample
d->PixelDownSampleLow(2, Low); //further downsample
b->Size(2*c->Length);
b->ScatterByIncr(c, 2, 0);
b->ScatterByIncr(d, 2, 1);
//b now contains the same result, as if we would have called
//on the start:
b->PixelDownSample(2, a);
FreeIt(a, b, c, d);
FreeIt(High, Low);
}
See Also: TVec::DownSample
Declared in Dew::Math::TVec · Dew.Math/MtxVec.h · Cross-compiler