本文整理汇总了C++中Image2D::GetMaximum方法的典型用法代码示例。如果您正苦于以下问题:C++ Image2D::GetMaximum方法的具体用法?C++ Image2D::GetMaximum怎么用?C++ Image2D::GetMaximum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image2D
的用法示例。
在下文中一共展示了Image2D::GetMaximum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
Image2D *AminB = Image2D::CreateFromDiff(*image, *imageB);
delete image;
image = AminB;
delete imageB;
}
if(window)
{
Image2D *empty = Image2D::CreateZeroImage(image->Width(), image->Height());
for(unsigned y=image->Height()-windowY-windowHeight;y<image->Height()-windowY;++y)
{
for(unsigned x=windowX;x<windowX+windowWidth;++x)
empty->SetValue(x, y, image->Value(x, y));
}
delete image;
image = empty;
}
if(cutWindow)
{
for(unsigned y=image->Height()-cutWindowY-cutWindowHeight;y<image->Height()-cutWindowY;++y)
{
for(unsigned x=cutWindowX;x<cutWindowX+cutWindowWidth;++x)
image->SetValue(x, y, 0.0);
}
}
if(fft) {
Image2D *fft = FFTTools::CreateFFTImage(*image, FFTTools::Absolute);
Image2D *fullfft = FFTTools::CreateFullImageFromFFT(*fft);
delete image;
delete fft;
image = fullfft;
}
long double max;
if(individualMaximization) {
max = image->GetMaximum();
if(max <= 0.0) max = 1.0;
} else {
max = 1.0;
}
if(displayMax)
cout << "max=" << image->GetMinimum() << ":" << image->GetMaximum() << endl;
if(rms)
ReportRMS(image);
long double r=0.0,g=0.0,b=0.0;
if(redblue) {
r = 1.0;
b = 1.0;
} else if(useSpectrum)
ScaledWLtoRGB(wavelengthRatio, r, g, b);
else
HLStoRGB(wavelengthRatio, 0.5, 1.0, r, g, b);
totalRed += r;
totalGreen += g;
totalBlue += b;
if(red == 0) {
red = Image2D::CreateUnsetImage(image->Width(), image->Height());
green = Image2D::CreateUnsetImage(image->Width(), image->Height());
blue = Image2D::CreateUnsetImage(image->Width(), image->Height());
mono = Image2D::CreateUnsetImage(image->Width(), image->Height());
}
size_t minY = image->Height(), minX = image->Width();
if(red->Height() < minY) minY = red->Height();
if(red->Width() < minX) minX = red->Width();
for(unsigned y=0;y<minY;++y)
{
for(unsigned x=0;x<minX;++x)
{