void PixelDownSampleHigh(Int32 Width, TVec Y, Int32 Index, Int32 Len, TVec X, TVec NX)
Downsample the vectors Y and (optionaly) X starting at position Index and for Len samples.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Width | Int32 | |
| 2 | Y | TVec | source TVec |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
| 5 | X | TVec | source TVec |
| 6 | NX | TVec | source TVec |
Result: stored in self (calling object)
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
TVec a;
TVec b;
TVec c;
TVec d;
TVec High;
TVec Low;
MtxVec.CreateIt(out a, out b, out c, out d);
MtxVec.CreateIt(out High, out Low);
try
{
a.SetIt(false,new double[] {0,0,0,1,2,3,1,2,3});
b.PixelDownSample(4,a);
High.Demultiplex(b,2,0);
Low.Demultiplex(b,2,1);
c.PixelDownSampleHigh(2,High); //further downsample
d.PixelDownSampleLow(2,Low); //further downsample
b.Size(2*c.Length);
b.Multiplex(c,2,0);
b.Multiplex(d,2,1);
//b now contains the same result, as if we would have called
//on the start:
b.PixelDownSample(2,a);
}
finally
{
MtxVec.FreeIt(ref a, ref b, ref c, ref d);
MtxVec.FreeIt(ref High, ref Low);
}
See Also: TVec.DownSample