trailing whitespace and some bracket

This commit is contained in:
laurentBerger 2015-05-16 19:29:12 +02:00
parent 68e9d19743
commit 7cf5de0ed0

View File

@ -34,7 +34,7 @@ static void help()
" ./detect_mser <image1(without parameter a syntehtic image is used as default)>\n"
"Press esc key when image window is active to change descriptor parameter\n";
"Press 2, 8, 4, 6, +,- or 5 keys in openGL windows to change view or use mouse\n";
}
}
struct MSERParams
{
@ -179,23 +179,33 @@ static void onMouse(int event, int x, int y, int flags, void*)
prevPhi = y;
}
if (event==EVENT_MOUSEWHEEL)
{
if (getMouseWheelDelta(flags)>0)
rObs += (float)0.1;
else
rObs -= (float)0.1;
float pi = (float)acos(-1.0);
}
float pi = (float)acos(-1.0);
if (thetaObs>pi)
{
{
thetaObs = -2 * pi + thetaObs;
}
}
if (thetaObs<-pi)
{
thetaObs = 2 * pi + thetaObs;
}
if (phiObs>pi / 2)
{
phiObs = pi / 2 - (float)0.0001;
}
if (phiObs<-pi / 2)
{
phiObs = -pi / 2 + (float)0.00001;
}
if (rObs<0)
{
rObs = 0;
}
}
@ -360,17 +370,15 @@ Mat MakeSyntheticImage()
p0 = Point(600, 600);
for (int i = 0; i<13; i++)
{
{
circle(img, p0, width[i] / 2, Scalar(color[i]), 1);
floodFill(img, p0, Scalar(color[i]));
}
}
int histSize = 256;
float range[] = { 0, 256 };
const float* histRange[] = { range };
Mat hist;
// we compute the histogram
calcHist(&img, 1, 0, Mat(), hist, 1, &histSize, histRange, true, false);
cout << "****************Maximal region************************\n";
for (int i = 0; i < hist.rows ; i++)
@ -518,7 +526,3 @@ int main(int argc, char *argv[])
}
return 0;
}