Skip to content

Commit 1c20afe

Browse files
author
Julien Ugon
committed
Divide the depth of view by 2 to get the right number...
1 parent e0ec55d commit 1c20afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

slBenchmark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ double slImplementation::getDisplacement(double x_pattern, double x_image) {
7878
double xp = x_pattern/getPatternWidth();
7979
double gammac,gammap;// depths of view in radians.
8080
gammac = gammap = 49.134 * M_PI/180; // TODO: build into the parameters of the class.
81-
double tgc = tan(gammac), tgp = tan(gammap);
81+
double tgc = tan(gammac/2), tgp = tan(gammap/2);
8282
double Delta = 1; // Distance between camera and projector
8383

8484
return Delta / 2 / (tgc*xc - tgp*xp);

0 commit comments

Comments
 (0)