Segmentation fault on a laptop, but not desktop

So, the code crashes at the end of main() when your objects try to destruct themselves.

I suspect this: As you are not using waitKey, there is no message loop for that imshow might need, leaving it in a randow state, where it might in, some enviroments and situations, segfault.