fix core dump because of not properly initialize cv algorithm