Skip to content

Conversation

@polarfuchs99
Copy link
Contributor

modified:   modules/line_descriptor/perf/perf_matching.cpp
modified:   modules/line_descriptor/test/test_matcher_regression.cpp

If have observed two compiler errors when compiling with MS Visual Studio 2010. The
reason is the function pow( 2, i ) . The first argument should not be an integer but rather
a float or double number. For this reason, I have replaced this function by pow( 2.0, i ) ,
I have done this in two cases. The changes should not have any effect on the calculation.

	modified:   modules/line_descriptor/perf/perf_matching.cpp
	modified:   modules/line_descriptor/test/test_matcher_regression.cpp
@alalek
Copy link
Member

alalek commented Feb 20, 2016

Any ideas why "(2 << i)" can't be used here?

	modified:   modules/line_descriptor/perf/perf_matching.cpp
	modified:   modules/line_descriptor/test/test_matcher_regression.cpp
@polarfuchs99
Copy link
Contributor Author

@alalek
This is a good idea. However, it must be (1<<i). I have checked that pow(2,i) is
equivalent to (1<<i). Thus I have made one more change to replace pow( 2.0, i )
by ( 1 << i ). This has been done in the two cases as before.

@alalek
Copy link
Member

alalek commented Feb 20, 2016

👍

@opencv-pushbot opencv-pushbot merged commit c2b5589 into opencv:master Feb 20, 2016
allnes pushed a commit to allnes/opencv_contrib that referenced this pull request Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants