good question. i don't know. ROS had problems with the installed opencv version (too old) so to use ROS you will need to build opencv. I didn't get segfault for waitKey but I didn't test extensively. What do you want to do?