2

My pi camera is attached to a pi zero w running buster. The pi zero normally runs headless. But while I'm developing my code, I've got a keyboard and monitor attached.

Is there a way to preview jpg files that the camera has captured and written (kind of like the camera preview window)? Once the app is finished, I'll access the jpgs remotely, but that's a pain right now.

6
  • Have you looked at the feh program? feh.finalrewind.org This assumes you have a file and GUI...
    – user115418
    Sep 6, 2020 at 3:54
  • @Andyroo That link is a 404.
    – goldilocks
    Sep 6, 2020 at 13:19
  • As @goldilocks points out, the link is bogus, but the url is obvious enough. I took a look. It appears to only way to get it is to compile it -- which I'm not set up to do and can't take the time to setup right now. But, thank you for your contribution.
    – MACE
    Sep 6, 2020 at 15:23
  • Link fixed ;) FEH is X11 based and so does require the full GUI stack.
    – goldilocks
    Sep 6, 2020 at 16:09
  • FEH is available;lable from the repository (unless Buster pulled it for some reason) - no idea about the link - was on my iPad so who knows what you got (blush)... Runs fine over VNC.
    – user115418
    Sep 6, 2020 at 17:07

3 Answers 3

2

You can either install the GUI desktop stack and use whatever you like there, or else you need something that runs on the kernel's software framebuffer. I'm not sure if this is what the camera preview window does, since it was written for the Pi it probably uses custom GPU code.

The only framebuffer image viewer I'm aware of is fbi: https://linux.die.net/man/1/fbi, which is in the Raspbian/RPiOS repo (apt install fbi). When looking for a link I noticed this: FIM (Fbi IMproved) image viewer, which is also in the repo (apt install fim).

I'm sure both of these can do what you want;fbi is probably simpler.

1
  • Thank you, @goldilocks. fbi fits my needs perfectly and appears to be quite feature-rich.
    – MACE
    Sep 6, 2020 at 15:19
1

I like qiv as image viewer myself. It requires an X server but you can run it using ssh -X and view the images on your desktop too.

There is also fuse-sshfs. With that you can simply mount the directory the images are in on the Pi on your desktop and then browse them locally.

1

there is a program called tiv i use for viewing images on the cli. It outputs the picture in ascii/ansi - so image quality may be low. main advantage is that it doesn't need any xserver running.

You can find it at https://github.com/radare/tiv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.