<< return to Pixycam.com

Building PixyMon

I’ve been trying to build PixyMon from source but it seems like some source files are missing. I was able to find a version of libusb that seemed to make it happy but more troubling is the missing ui_configdialog.h and ui_about.h header files (and I’m assuming corresponding cpp files). Would it be possible to upload these to the git repo?

Also, since there is no real windows API it would be really handy to have a Visual Studio project for PixyMon so that it is possible to try to reverse engineer the protocol to talk with Pixy over USB. Unfortunately as it currently stands Pixy is not particularly useful over USB with the complete lack of software support.

Thanks,
joel

Hi Joel Pryde,
The ui_ files are generated by Qt.

I’m guessing you’re trying to compile in Visual Studio? So, Qt is pretty cool because it’s mult-platform — that means that all gui and OS objects are abstracted across all platforms (Windows, WinCE, Linux, MacOs, others). It’s also free. I’d download it! (http://qt-project.org/downloads)

Converting PixyMon over to Visual Studio wouldn’t make much sense… and it wouldn’t make figuring out the USB protocol any easier. PixyMon uses USB built ontop of libusb, so it’s a little fuzzy where a protocol starts/ends and libusb picks up. But the info you need is in the source, so there’s no need to reverse engineer!

Can you describe to me what you want to do? Do you want to use Pixy as a sensor for your Windows computer?

I have it linking with Qt installed on my computer. Not sure how to generate those files, are there some sort of intermediate files that Qt uses to generate these?

Converting PixyMon to a Visual Studio project would help a ton (I’m not the first to request this). The code for PixyMon is pretty much entirely uncommented and there is no documented API so looking through the source code isn’t particularly useful on its own. How I usually figure things out in these situations is to run a sample app and step through the code to see how it is communicating but since PixyMon was used with a fairly unusual build environment this isn’t very easy for new users such as myself.

I am trying to get Pixy to communicate with a windows c++ program over USB. Any help would be appreciated!

Qt has a meta build system. You need to run the project file through Qmake and it will create a makefile. Linking to Qt libs is sort of a difficult path. I’d download Qt Creator and bring up the project and build it. It’s much easier that way.

But you’re right-- you’re not the first person to ask about Visual Studio. Visual Studio +1. (We’re keeping track.)

Hello!
I have a similiar problem:
I use Qt 5.3.2 for Windows 32 bit MinGW (Download with 737 MB) on a PC Windows7.
MinGw is the recommended compiler.
I can start examples without errors.
But when I try to build Pixymon from Github sources (zip file downloaded, extract and stored) I got the following error:
libusb-1.0.dll.a: No such file or directory

Windows driver is installed, pixy is recognized with pixymon 0.1.49 and runs.

But I want to program my own image recognition and therefore need the sources of pixymon.

Thanks in advance

Ingeborg

(pixy is wonderful!)

…src\host\windows\README:

"
To build PixyMon for Windows, you need to first install the Qt development environment. Probably
the easiest way to get there is to install the Qt Open Source distribution with the mingw compiler.
(We use the mingw compiler to create the Windows binaries.) Go here:

and download and run the installer, and go with the defaults during the install, unless you know what
you’re doing.

Once Qt is installed, run Qt Creator. Click on File->Open File or Project and browse to
src/host/pixymon/pixymon.pro and then build by clicking on Build->Build Project “pixymon”. Run by
clicking on the run icon or debug icon. You’re done!
"

That’s not true for Windows 7: ERROR missing libusb-1.0.dll.a

Who can help?

Thanks in advance!

Ingeborg

Hi Ingeborg,
I just re-checked this file into git. I think it got purged when we did some restructuring and was in the gitignore file.

Check it out in /src/host/windows/

thanks! and sorry…

Thank you for your answer,
but now (with the new downloaded zip file) I got the following error:

Starte D:\EigeneBeispiele\pixy-master\src\host\build-pixymon-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\PixyMon.exe…
Das Programm ist abgestürzt.
D:\EigeneBeispiele\pixy-master\src\host\build-pixymon-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\PixyMon.exe ist abgestürzt

Sorry, it is in german and means “crashed”.

What is the reason?

Thanks in advance!

Ingeborg

You might try copying the dll (~/src/host/windows/libusb-1.0.dll) into your executable directory (D:\EigeneBeispiele\pixy-master\src\host\build-pixymon-Desktop_Qt_5_3_MinGW_32bit-Debug\debug)

Hi Rich,
I tried it and…
it works!
Thanks a lot!
Ingeborg

Unzipping pixy-master.zip to C:\Pixy and opening the .pro file with Qt 5.3.1 (MSVC 2010 32bit), I get lots of warnings (unknownn option -O0, -mno-ms-bitfields), but I also many errors:

Cant open PixyMon.h referenced in the files in the matlab folder. I fixed this by adding to the includepath (in the .pro file), the folder containing the bulk of the pixymon source

Invalid numeric argument: QMAKE_CXXFLAGS += -Wno-unused-parameter. I fixed this by removing this line in the .pro file

Can’t open include files debug.h, inttypes.h, etc

va_copy identifier not found

Are all these issues due to using MSVC instead of MingW, and/or an running an older version of Qt Creator? I couldn’t find anything in the wiki about which Qt version was used. Is there a specific platform that will work out of the box (Operating System, Qt version, Compiler version, unzip folder, etc)?

Thanks!

Hello Ben,
We don’t support MSVC (sorry). Please follow the directions here:

http://cmucam.org/projects/cmucam5/wiki/Building_PixyMon

Edward

Hi, maybe you guys are a little bit tired of answering these questions but I also tried to run PixyMon on my QtCreator. I am using the version 3.3.2 (see image 1) but it shows that it is based on MSVC 2010 (even I selected manually mingw in the installation process). I think I have the mingw compiler (see image 2) but when I try to run the project via src/host/pixymon/pixymon.pro I have various warnings and I cannot build it properly (see, once again, the photo). Is there any issue with the file extracted from GitHub? Am I configuring wrong Qt?

Saying that I do not find the folder pixy-master\src\host\build-pixymon-Desktop_Qt_5_3_MinGW_32bit-Debug (as it was said in a previous comment), I just have \pixy-master\src\host\build-pixymon-Desktop_Qt_5_4_1_MSVC2010_OpenGL_32bit-Debug.

Thanks in advance!

Robert

EDIT: I did not attach the files (hurra for me!)

Hello Robert,
There are no known issues with the pixymon build. Maybe if we saw the specific error we could help.

Edward

Hi Edward,

I reinstalled the Qt library and now I have the MinGW 4.9.1 that it seems that it compiles good. There is no warnings and I can run the program, but in the Application Output window I got this message: QFSFileEngine::open: No file name specified, and even the PixyMon window pops up and can detect Pixy, it does not react to any button I pressed and when the program eventually crashes and I have to restart Qt.

Thanks in advance!

Roberto

Hello Robert,
Make sure you copy the libusb dll (libusb-1.0.dll) into the same directory as the executable.

Edward

Hi Edward,

yes I copied that into the directory. It builds the project with no errors but when it comes to run the project, the PixyMon window pops up and it says: ‘Pixy detected. > runprogArg 8 1’, but I am not able to see anything and when I press a button in PixyMon (default program, configuration or whatever), it just crashes. In the Qt Application Output appears always ‘QFSFileEngine::open: No file name specified’ and ‘Format not recognized.’, so I tried it with all the camera firwares, but it keeps crashing.

I also tried to run the program from the debug folder (and I had to copy from the C:\Qt\5.4\mingw491_32\bin folder dll files as well for getting it started), but it makes no difference: PixyMon pops up, it seems that it recognizes my camera (but I cannot see anything) and it crashes when I try to do something.

Any help? Is anyone having the same issue?

Thanks!

Robert

Hi Robert,
I have had exactly the same problem. After I have copied all files and folders except the pixyMon.exe itself from the regular PixyMon Installation dir (C:\Program Files (x86)\PixyMon\bin) to my …\src\host\build-pixymon-Desktop_Qt_5_4_1_MinGW_32bit-Release\release folder, my rebuilt PixMon runs like a charm.
Cheers,
Helmut

Hello guys,
We haven’t seen this issue. Are you running the release version from Windows Explorer (by double-clicking on pixymon.exe) instead of running from within the Qt IDE? If so, this makes sense. (Qt makes sure all the correct dll’s are loaded, etc)

Edward

Hi Edward,
No, first of course I have tried the green Play button of the QT IDE. Later, as an act of despair, I have just copied the PixyMon binary to the regular installation dir and there it runs without problems. So I have copied all libs form the regular installation to my build directory. Then PixyMon can be started from the IDE or the Explorer. … A rather dirty workaround … and one shouldn’t press the “Rebuild” button.
Looks like that there is something wrong with my installation. Before I have reinstalled the open_source-mingw_QT I have had deinstalled my existing QT and minGW installations. OK, strangely on the first start of the new installation already knew the project I wanted to work on: PixyMon. Maybe some remains in some app data folders or the registry.

If I remember correctly, during the QT installation, I have had the choice between minGW32somthing and mingw32somthing_openGL. I have installed the mingw32somthing_openGL default. Could this be root cause for our problems?
cheers,
Helmut