OCCRA
Go to Post 610 is an all boys school, and we were surprised to see our pit and robot neatly decorated with hot pink boas and flowers upon arrival this morning. - Mr. Lim [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-30-2018, 04:17 PM
gcperk20's Avatar
gcperk20 gcperk20 is offline
Registered User
AKA: Grant Perkins
FRC #1100
Team Role: Programmer
 
Join Date: Mar 2018
Rookie Year: 2016
Location: Southborough MA
Posts: 24
gcperk20 is on a distinguished road
Install OpenCV for RobotPY-CScore

Hi all. I am trying to use RobotPY-CScore, and I am getting stuck at the error bellow while running: pip3 install robotpy-cscore

src/_cscore.cpp(11): fatal error C1083: Cannot open include file: 'opencv2/opencv.hpp': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.13.2 6128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

I have been following this tutorial. I have installed pybind11 already. I also installed opencv at C:\opencv\

Thank you!
Reply With Quote
  #2   Spotlight this post!  
Unread 03-30-2018, 11:27 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,396
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
Re: Install OpenCV for RobotPY-CScore

You will of course note the following:

Quote:
robotpy-cscore has not been tested on Windows
First, you need to compile/install opencv on Windows (which you did). Second, you need to convince robotpy-cscore to find them. It's a bit challenging, and I'm not 100% sure of the steps you'll need to do for the second piece.

You may have better luck trying to install robotpy-cscore on msys2.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 03-30-2018, 11:29 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,396
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
Re: Install OpenCV for RobotPY-CScore

Thinking about it, if you downloaded the source code for robotpy-cscore, you could modify setup.py's include paths part, and add a pointer to the correct C:\OpenCV\include\path...

Also, note that cscore isn't able to use USB cameras on Windows, it can only read from remote HTTP camera streams.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #4   Spotlight this post!  
Unread 03-31-2018, 10:42 PM
auscompgeek's Avatar
auscompgeek auscompgeek is offline
Registered User
AKA: David Vo
FRC #4774 (The Drop Bears)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2016
Location: Sydney, Australia
Posts: 26
auscompgeek is an unknown quantity at this point
Re: Install OpenCV for RobotPY-CScore

You might also be able to use the CL environment variable to add
Code:
/I C:\OpenCV\include
or similar to convince CL to find OpenCV's headers.

Good luck!
Reply With Quote
  #5   Spotlight this post!  
Unread 03-31-2018, 10:43 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,396
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
Re: Install OpenCV for RobotPY-CScore

Also, if you do get it working, please post how you did it so we can update the instructions for Windows users! I just don't really use Windows these days...
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2018, 04:20 PM
gcperk20's Avatar
gcperk20 gcperk20 is offline
Registered User
AKA: Grant Perkins
FRC #1100
Team Role: Programmer
 
Join Date: Mar 2018
Rookie Year: 2016
Location: Southborough MA
Posts: 24
gcperk20 is on a distinguished road
Re: Install OpenCV for RobotPY-CScore

Hi all. I was not able to get RobotPy-CSCore to work on Windows, although I only invested about another ~1 1/2 after the writing of this post. I was doing this to test code I was writing for my team's Raspberry Pi 3, which I did not have at my home at the time.

I spent A TON of time working on installing RobotPy-CScore onto the Pi3. Building OpenCV for the Pi was a huge hassle. I wrote some instructions on how to get a RobotPy Python file running here. Please check it out, and let me know if there's something better that I could've done.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-02-2018, 04:21 PM
gcperk20's Avatar
gcperk20 gcperk20 is offline
Registered User
AKA: Grant Perkins
FRC #1100
Team Role: Programmer
 
Join Date: Mar 2018
Rookie Year: 2016
Location: Southborough MA
Posts: 24
gcperk20 is on a distinguished road
Re: Install OpenCV for RobotPY-CScore

Now I just need to finish implementing PyNetworkTables into the code found on the above repository, and write a script to init.d to run the Python files on start-up.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:06 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi