<< return to Pixycam.com

How do I print images on Linux?

I’ve done all the tests provided on the homepage.
In our project, we’re going to have to print out images of Pixie, and in the demo we’re going to print a complete file, but only the data values are printed in the shell.
The images are not output separately. How do I get them?

We have to transmit this video to Android phones. I will use the server.

Hi Jaeil,

there are two methods: one is grabbing frames using PixyMon: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#grab-and-save-a-frame-in-pixymon

Or, you can use libpixyusb and grab raw frames using the cam_getFrame function. There are a few people on the forum who have grabbed raw frames in this way. For example:

Hope this helps!
Jesse

Thanks, but I’m still a student and I’m not used to working with Pixy.

As with the above question, you can use Pixymon on Windows to view the video

But on Raspberry Python Linux, can not it get the image through .py of pix2 / build / python_demo? Is there any relevant example of this?

I bought Pixy but I can not use it because I can not get the video. sad…

Hello,
You can get video frames over USB through libpixyusb2. There is an example called “get_raw_frame”.

GitHub

charmedlabs/pixy2

Contribute to charmedlabs/pixy2 development by creating an account on GitHub.

To install libpixyusb2, check out this page:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux

Hope this helps!

Jesse

The “get_raw_frame” example in libpixyusb2 works very well.
I modified this code slightly so that the images are stored consecutively in one folder.
But since the image was in ppm format, I could only make a video after converting it to jpeg format.
When I used Linux’s ‘imagemagick’ to convert to jpeg, I had a cache problem. So only one or two ppm were converted normally.
Can I get some example code to convert the ppm format to jpeg format?