Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Convolution Scaling

Ryan2
Beginner
613 Views
Hi,

Using ippiConvFull_32f_C3R yeilds very large luminance values. Using a softclip algorithm gives me aesthetic results, but I'd like to inquire about proper post scaling methods for ippiConvFull.

Any thoughts?

Best,

Ryan
0 Kudos
3 Replies
Ryan2
Beginner
613 Views
Divided the Kernel by sqrt(Kernel_Width*Kernel_Height)
0 Kudos
Chao_Y_Intel
Moderator
613 Views

Hi,

If you want to normalize the data, is it to divided the kernel by sum of the all kernel value?

Thanks,
Chao

0 Kudos
Ryan2
Beginner
613 Views
Hi,

I actually just worked that out. Thank you for replying.

Here's the code I used for anyone else who's wondering:

[cpp]	//Calculate Sum of Kernel
	ippiSum_32f_C3R(Ipp_Ker, Ker_StepBytes, Ker_Size, KerScaled, ippAlgHintFast);

	// Clamp KerScale to 1.
	for (i=0; i<3; i++)
	{
		if (KerScaled > 1)
			KerScalef = float(1) / KerScaled[0];
		else
			KerScalef = 1;
	}
	// Multipy Ker by Inverse of Sum
	ippiMulC_32f_C3IR(KerScalef, Ipp_Ker, Ker_StepBytes, Ker_Size);[/cpp]
0 Kudos
Reply