duplication of functionality http://docs.opencv.org/modules/core/doc/utility_and_system_functions_and_macros.html?highlight=nan#cv.IsNaN