<< return to Pixycam.com

MATLAB interface with Pixy

Hello there people,

I’m currently implementing IBVS control law using Pixy as the image sensor on a robot for my final year undergraduate project.
I need to use the data from Pixy in SIMULINK but I can’t figure out how to communicate the two.

Question regarding SIMULINK interface:

  1. What are the necessary files I need to download for the interface?
  2. How do I create MATLAB wrapper for Pixy?

I have tried to built the wrapper but errors kept showing up!

I would appreciate any help.


Hi Faruque,

I also want to interface both platforms for real time image processing, but as far as I konw, Matlab just supports some cameras for the Image Acquisition Toolbox and Pixy is not among them. I dont know if what you want is the real video coming from the camera or just the data (in this case I dont know if it would be possible for IBVS).


Were either of you successful? I’ve been trying to do the same thing. To answer Faruque’s question, the way you would do this is to write a MATLAB Mex wrapper. This allows you to run C++ code in MATLAB as if you were calling a normal function. I’ve been working on this, but I’m having issues linking the libusb-1.0.dll.a into my program. I’m getting unresolved external errors which I believe are being generated because my MATLAB is 64bit and the library was built 32bit. I don’t know how to build libusb for 64bit windows.

Hello Austin,
Which compiler are you using? libusb-1.0.dll.a is for GCC. There are other binary versions of the library for different compilers available here: http://libusb.info/

Here’s a thread that talks about grabbing frames from Pixy:

I don’t know of anyone who’s used a Microsoft compiler with Pixy (yet), but it should be possible using libpixyusb and boost.


I’m building in Visual Studio. Thanks for the link. I was able to successfully build the hello_pixy.cpp in VS 64bit as well as in MATLAB (mex). I don’t have my pixy with me right now, but it’s looking good. Thanks!

Hello Austin,
I was also looking to read pixy data in Matlab. Did it work for you? Would you mind sharing what you’ve got or working on it together if more work is needed? Any input is appreciated.

Thanks, Jonas.

Why does pixy not have a interface with MATLAB and python directly? If there is Please can anyone tell me?