open image from terminal in ubuntu 18

C++
prashad@ubuntu:~/test$ xdg-open output_image.jpg 

Source

Also in C++: