Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 ) HW _ resize 1 D ( float * IN , float * OUT , int INlen, int OUTlen, int kernel _ type, double
HWresizeD float IN float OUTint INlen, int OUTlen, int kerneltype, double param Function HWresizeD scales the list of numbers stored in IN into a newlist OUT. IN has INlen elements of datatype float. OUT has OUTlen elements. If OUTLEN INLEN, then magnification must be performed. Else, minification takes place. In either case, the user specifies the filter through argument kerneltype,which can be set to to refer to nearest neighbor, linear interpolation, and cubic convolution, respectively. Incubic convolution, the free variable a is passed through param. V alues and for kerneltype are reserved for windowed sinc functions. The corresponding windowfunctions that should be used are: Hann, Hamming, and Lanczos windows. Note that parameter N for the Hann and Hamming windows as used in the equations in the book are passed through param.That is param will store the width of the window. Inthe case of the Lanczos window, param is used to store the number of sinc lobes allowed to pass. For instance, the Lanczosx windowwill be specified with param the Lanczosx windowwith param etc. Test HWresizeD for magnification for a D impulse function. Initialize an array of numbers with everywhere, and at the center location Then magnify this list by a scale factor of using all the above kernels. The output list of elements should match with the samples of the respective reconstruction kernels. Submit aplot of the output for each kernel. Remember to pad the input to avoid problems at the borders where the convolution kernel falls off the edge of the image. Use pixel replication for padding. Test HWresizeD for minification for a D sine wav e function having values lying between and Initialize an array of numbers with a sine wav e having cycles per scanline or cycles per pixel Then minify this list by a scale factor of using all the above kernels. The output list will have elements. Submit aplot of the output for each kernel. Remember to pad the input to avoid problems at the borders where the convolution kernel falls off the edge of the image. Use pixel replication for padding. Also, note that unlikethe magnification case, minification will cause the kernel to be stretched wider and reduced in amplitude in proportion to the scale factor.
in c using visual studio and qt
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started