本文整理汇总了C++中Image2D::get_numberofpixels方法的典型用法代码示例。如果您正苦于以下问题:C++ Image2D::get_numberofpixels方法的具体用法?C++ Image2D::get_numberofpixels怎么用?C++ Image2D::get_numberofpixels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image2D
的用法示例。
在下文中一共展示了Image2D::get_numberofpixels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BandPass_2D
IppStatus BandPass_2D(Image2D &image_in, Image2D &image_bandpassed, const int feature_radius, const int hwhm_length)
{
//set status variable
IppStatus status;
Gaussian_Kernel GaussKernel(feature_radius, hwhm_length, image_in.get_width(), image_in.get_length());
Convolution_Kernel ConvolutionKernels(feature_radius, image_in.get_width(), image_in.get_length());
Tophat_Kernel TopHatKernel(feature_radius, image_in.get_width(), image_in.get_length());
int number_of_pixels = image_in.get_numberofpixels();
int step_size = image_in.get_stepsize();
//Create and initialize intermediate images
Image2D image_gauss_col(image_in.get_length(), image_in.get_width());
Image2D image_gauss_rowcol(image_in.get_length(), image_in.get_width());
Image2D image_tophat(image_in.get_length(), image_in.get_width());
//Gaussian kernel convolution
status = ippiFilterColumn_32f_C1R(image_in.get_image2D() + GaussKernel.get_offset(), step_size,
image_gauss_col.get_image2D() + GaussKernel.get_offset(), step_size,
GaussKernel.get_ROI_size(), GaussKernel.get_gaussian_kernel(),
GaussKernel.get_kernel_length(), GaussKernel.get_anchor_point());
status = ippiFilterRow_32f_C1R(image_gauss_col.get_image2D() + GaussKernel.get_offset(), step_size,
image_gauss_rowcol.get_image2D() + GaussKernel.get_offset(), step_size,
GaussKernel.get_ROI_size(), GaussKernel.get_gaussian_kernel(),
GaussKernel.get_kernel_length(), GaussKernel.get_anchor_point());
/*
//tophat kernel convolution/filterbox operation
status = ippiFilterBox_32f_C1R(image_in.get_image2D() + TopHatKernel.get_offset(), step_size,
image_tophat.get_image2D() + TopHatKernel.get_offset(), step_size,
TopHatKernel.get_ROI_size(), TopHatKernel.get_mask_size(),
TopHatKernel.get_anchor_point());
*/
//change by Eli Sloutskin: take away bias of square filtering kernel
status = ippiConvValid_32f_C1R(image_in.get_image2D(), step_size, image_in.get_ROIfull(),
ConvolutionKernels.get_circle_kernel(), ConvolutionKernels.get_kernel_step(), ConvolutionKernels.get_kernel_size(),
image_tophat.get_image2D() + ConvolutionKernels.get_offset(), step_size);
ippiDivC_32f_C1IR(3*feature_radius*feature_radius, image_tophat.get_image2D(),image_tophat.get_stepsize(),image_tophat.get_ROIfull());
//subtract the two images
status = ippiSub_32f_C1R(image_tophat.get_image2D() + TopHatKernel.get_offset(), step_size,
image_gauss_rowcol.get_image2D()+TopHatKernel.get_offset(), step_size,
image_bandpassed.get_image2D() + TopHatKernel.get_offset(), step_size,
TopHatKernel.get_ROI_size());
//cutoff values below zero
status = ippiThreshold_LTVal_32f_C1IR(image_bandpassed.get_image2D() + TopHatKernel.get_offset(), step_size,
TopHatKernel.get_ROI_size(),0,0);
return status;
}