OpenCV: error C3861: 'finite':identifier not found

I am using opensource code prepared by Julien Pilet et al. under the title "Making Background Subtraction Robust to Sudden Illumination Changes". I didn't change anything, but just run it, then it gives me the following error:

error C3861: 'finite':identifier not found

I checked and this error occurred in the "imstat.h" file in the following lines:

if (!finite(det) || det<1e-5) {
        sigma_computed=false;
        n=0;
        one_over_sq_det= 1;
        memset(sigma,0,sizeof(sigma));
        sigma[0][0]=1;
        sigma[1][1]=1;
        sigma[2][2]=1;
        two_ln_sq_det = 2;
    } else {
        one_over_sq_det = 1/sqrtf(det);
        assert(finite(one_over_sq_det));
        two_ln_sq_det = 2*log(sqrtf(det));
        sigma_computed=true;
        n = new_n;
    }

The "imstat.h" file was included by the code in "emvisi2.h" file. Could someone help me understand this error? Seems like there is something wrong in some kind of class definition, but I couldn't find it. Thank you.

Answers


finite() is an obsolete BSD library function which you might find in some, but not all, versions of <cmath>.

If you have a C++11 version of <cmath> or a C99 version of <math.h>, then an equivalent isfinite() should be available. This might not be available in older versions of the standard library.

Microsoft also seem to declare an equivalent non-standard _finite() function in <float.h>.


Need Your Help

Fatal signal 11 in background thread only on 4.4.2

java android multithreading mapfragment background-thread

I have an activity that displays a screenshot of a map fragment, along with some other things. Everything shows up perfectly until a second or two later when the app crashes. This is only happening...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.