Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Emmanuel_W_
New Contributor I
101 Views

DecimateFilterRow, DecimateFilterColumn filters

Jump to solution

The documentation is very vague in describing the polyphasefilter used: "The functions used the set of special internal polyphase filters". Is it possible to get the specification of the filters or at least there length.

Thanks,
Emmanuel

0 Kudos
1 Solution
Yuri_Tikhomirov__Int
New Contributor I
101 Views
Yes, but it is polyphase filter.
OK, I show a method.For 1/2 casethe IPP function is used10 src pixels with appropriate weights for computation 1 dst pixel:

1) int val = 2*s[-4]-6*s[-3]-15*s[-2]+33*s[-1]+114*s[0]+114*s[1]+33*s[2]-15*s[3]-6*s[4]+2*ps[5];
2) val rounding
3) val saturation
4) *d++ = val; s += 2;

Thanks,
Beg

View solution in original post

6 Replies
Yuri_Tikhomirov__Int
New Contributor I
101 Views
Hello Emmanuel,

The functions are used for vertical or horizontal downsampling of image (in one direction only).
The available values are 1/2, 3/5, 2/3, 7/10, 3/4.

From documentation:
These functions perform decimating of the source image by the rows or by the columns respectively. The functions used the set of special internal polyphase filters. The parameter fraction specifies how the decimating is performed, for example, if the parameter is set to ippPolyphase_3_5, then each 5 pixels in the row (or column) of the source image give 3 pixels in the destination image, if the parameter is set to ippPolyphase_1_2, then each two pixels in the row (or column) of the source image give 1 pixel in the destination image, an so on.

, where the parameter fraction specifies how the decimating is performed.

Thanks,
Beg
Emmanuel_W_
New Contributor I
101 Views
Hello Emmanuel,

The functions are used for vertical or horizontal downsampling of image (in one direction only).
The available values are 1/2, 3/5, 2/3, 7/10, 3/4.

From documentation:
These functions perform decimating of the source image by the rows or by the columns respectively. The functions used the set of special internal polyphase filters. The parameter fraction specifies how the decimating is performed, for example, if the parameter is set to ippPolyphase_3_5, then each 5 pixels in the row (or column) of the source image give 3 pixels in the destination image, if the parameter is set to ippPolyphase_1_2, then each two pixels in the row (or column) of the source image give 1 pixel in the destination image, an so on.

, where the parameter fraction specifies how the decimating is performed.

Thanks,
Beg

Hi,

I understand the decimation part, but I would like to know what filtering operation actually take place (or at least how many pixelin the source are contributing to what pixel in the destination).

If I take the 1/2 filter, fill an image with 00 except for 1 pixel set to mid value, in the destination image I end up with 3 pixels that are not 0. The reason I am asking is because the result do not seem to be symmetrical which seems unusual. For example with only one pixel change in the source I get the following sequence in the destination

00 00 .... 00 b a 00 c 00 00 00 00

where "b" is smaller than "a", "a" is close to the original value, "c" is close to 0.

I would have expected something more like

00 00 .... 00 a b a 00 00 ... 00 00 or 00 00 ... 00 c b a b c 00 ... 00 etc

Emmanuel


Yuri_Tikhomirov__Int
New Contributor I
101 Views
Hi Emmanuel,

Sourceimage should have borders before a filtration. Unfortunately in the documentation it is passed.
For example for horizontal 1/2 filter we shouldhave 4 pixels to the left and 4 pixels to the right in each line.

So these functions don't care of borders, the user should make it.
Try please again with borders...

Thanks for your valuable comments. The documentation will be expanded.
Beg
Emmanuel_W_
New Contributor I
101 Views
Hi Emmanuel,

Sourceimage should have borders before a filtration. Unfortunately in the documentation it is passed.
For example for horizontal 1/2 filter we shouldhave 4 pixels to the left and 4 pixels to the right in each line.

So these functions don't care of borders, the user should make it.
Try please again with borders...

Thanks for your valuable comments. The documentation will be expanded.
Beg

So in the 1/2 case if we need a border of 4 I assume the filter length is 5 correct?

Thanks,
Emmanuel
Yuri_Tikhomirov__Int
New Contributor I
102 Views
Yes, but it is polyphase filter.
OK, I show a method.For 1/2 casethe IPP function is used10 src pixels with appropriate weights for computation 1 dst pixel:

1) int val = 2*s[-4]-6*s[-3]-15*s[-2]+33*s[-1]+114*s[0]+114*s[1]+33*s[2]-15*s[3]-6*s[4]+2*ps[5];
2) val rounding
3) val saturation
4) *d++ = val; s += 2;

Thanks,
Beg

View solution in original post

Emmanuel_W_
New Contributor I
101 Views
Yes, but it is polyphase filter.
OK, I show a method.For 1/2 casethe IPP function is used10 src pixels with appropriate weights for computation 1 dst pixel:

1) int val = 2*s[-4]-6*s[-3]-15*s[-2]+33*s[-1]+114*s[0]+114*s[1]+33*s[2]-15*s[3]-6*s[4]+2*ps[5];
2) val rounding
3) val saturation
4) *d++ = val; s += 2;

Thanks,
Beg
Thanks, this is exactly what I wanted to confirm.

Emmanuel
Reply