Go to Post I respect what you have to say and I ask that you do the same for me. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 02-12-2013, 20:59
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

Darn it...the edit button is broken

I have gotten OpenCV installed. I just used "apt-get install libopencv-dev". Hopefully that works.

I have one problem now:
I do not trust the Windows version of OpenCV. I had a working install, which got corrupted when I ran sample code! My team wants to stick with Windows, because that is the OS that everyone is familiar with and the Driver Station resides on. How should I use OpenCV? We are using Java, though I am sure that the language shouldn't make any difference. Should I run VIrtualBox on the DS, or should I get another DS laptop (We have a couple) to boot Ubuntu (Or maybe Debian, to make the install lighter), to run OpenCV? That laptop can also become the network robot coprocessor!
  #17   Spotlight this post!  
Unread 02-12-2013, 23:09
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,102
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Installing OpenCV

Building OpenCV on Windows is pretty straightforward if you have Visual Studio installed. Just run cmake and then compile the sln files.

We had delay issues connecting FFMPEG to the camera, and had to compile a custom version of it to make it work. I was able to use the FFMPEG build instructions found in the OpenCV source code to build the DLL successfully using MinGW.

Check out the following links for the bug report:
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
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
  #18   Spotlight this post!  
Unread 03-12-2013, 08:22
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

Installing in Windows is quite straightforward. However, I find it hard to trust the install. It works at first, but breaks when you are in the middle of something big! . At least, this is what happened to my installation! That's why I am interested in Linux!
  #19   Spotlight this post!  
Unread 03-12-2013, 09:08
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Installing OpenCV

The full installation crashes on you? I've never had problems with that... maybe try a reinstallation? Your download could've been interrupted at the very end and some file could be corrupt or something, as the repository is "quite a heavy download."

Also, make sure you're running a legal copy of Windows; I've found trouble installing many things if not with a legal copy because of some missing components.
__________________
Per Audacia Ad Astra
  #20   Spotlight this post!  
Unread 03-12-2013, 12:15
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

Quote:
Originally Posted by Invictus3593 View Post
The full installation crashes on you? I've never had problems with that... maybe try a reinstallation? Your download could've been interrupted at the very end and some file could be corrupt or something, as the repository is "quite a heavy download."

Also, make sure you're running a legal copy of Windows; I've found trouble installing many things if not with a legal copy because of some missing components.
My copy of Windows is genuine. It is OEM! I doubt it was the download because it worked before. However, when I ran some code, it crashed and OpenCV got corrupt. I was running OpenCV 2.4.3, because that was the version where I could find max info about! BTW, I am using 7, and VS C++ Express 2010. However, I can use VS pro if you guys suggest it!
  #21   Spotlight this post!  
Unread 03-12-2013, 12:48
brennonbrimhall brennonbrimhall is offline
Free Agent
AKA: Brennon Brimhall
no team
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Clifton Park, NY
Posts: 222
brennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to all
Re: Installing OpenCV

Quote:
Originally Posted by yash101 View Post
Installing in Windows is quite straightforward. However, I find it hard to trust the install. It works at first, but breaks when you are in the middle of something big! . At least, this is what happened to my installation! That's why I am interested in Linux!
Unless you're running a "bleeding edge" version of OpenCV (e.g., you cloned the git repository and compiled straight from source), there shouldn't be a reason why the OpenCV library crashed on you.

I would suspect instead that you had a misconfigured development environment (not having all the compiled binaries in your PATH, for example), a bad build, a corrupted source tree, etc., assuming you used a stable version of OpenCV.

You concern me when your solution to your problem is to install OpenCV on Linux and run that on the Driver Station. Virtualization is very resource-intensive, and I would recommend not doing that on the master controller for the robot, especially with something running on VirtualBox as computationally intensive as computer vision. Instead, I would go back a few steps and look for the root cause of failure, and look at the documentation that OpenCV has on their website and fix your original Windows build. Just my $0.02.

And one more suggestion: I would consider using OpenCV's Q&A site, where OpenCV experts are able to give you far better advice than me (and probably the rest of the CD community).
__________________
Team 20, 2012-2014: 4 blue banners, 5 medals, and 9 team awards.
Church of Jesus Christ of Latter-day Saints, 2014-2016: Missionary, Colorado Denver South Mission.
  #22   Spotlight this post!  
Unread 03-12-2013, 22:08
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

No. I used an OpenCV build that I found online, 2.4.3! I am pretty sure that isn't the problem. Also, I did mess around with the configuration a lot, to make it work. It worked until the binaries got corrupted!
  #23   Spotlight this post!  
Unread 04-12-2013, 08:23
brennonbrimhall brennonbrimhall is offline
Free Agent
AKA: Brennon Brimhall
no team
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Clifton Park, NY
Posts: 222
brennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to all
Re: Installing OpenCV

Quote:
Originally Posted by yash101 View Post
No. I used an OpenCV build that I found online, 2.4.3! I am pretty sure that isn't the problem. Also, I did mess around with the configuration a lot, to make it work. It worked until the binaries got corrupted!
If the binaries are corrupted, that would most likely be due to a faulty download or physical hardware failure.

Just last night, I installed the OpenCV 2.4.7 Java binaries on my machine and was doing some facial recognition stuff from Eclipse. While I wasn't using the C++ interface, it seemed that the binaries were right there with the self-extracting archive.

I'm still confused as to how the binaries were corrupted, or why you were led to believe that the corruption of your binaries was related to Windows. There should be a reliability decrease if you use OpenCV on virtualized Linux on the same machine, not a reliability gain.
__________________
Team 20, 2012-2014: 4 blue banners, 5 medals, and 9 team awards.
Church of Jesus Christ of Latter-day Saints, 2014-2016: Missionary, Colorado Denver South Mission.
  #24   Spotlight this post!  
Unread 04-12-2013, 19:04
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

Anyways, I am now interested in using Apt for the installation. It seems a lot easier to do. After installing the Apt version, I was unable to compile anything. What did I do wrong? If anyone would like to help me, I might set up a skype or RDP connection!
  #25   Spotlight this post!  
Unread 06-12-2013, 10:30
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Installing OpenCV

Quote:
Originally Posted by yash101 View Post
Anyways, I am now interested in using Apt for the installation. It seems a lot easier to do. After installing the Apt version, I was unable to compile anything. What did I do wrong? If anyone would like to help me, I might set up a skype or RDP connection!
I posted the apt-gets in an earlier comment. I have personally used this list to install opencv 5 times, and other students and mentors on the team have used it over ten times as a collection without any problems.

It is also explained on our team's website:

http://ratchetrockers1706.org/vision-setup/

We are working on a script that will install it all, and compile some of our vision code. Hopefully it will be up on our website before build season starts, so all you'll have to do is click run, wait a couple minutes, then opencv will be installed!

If you have any questions, don't be afraid to ask.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #26   Spotlight this post!  
Unread 06-12-2013, 19:42
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Smile Re: Installing OpenCV

I am actually interested in creating a bash script that will download most of the things using git, and compiles it by itself. That would be nice. However, that will only be possible after I get OpenCV running myself!

That tutorial that you forwarded to me seems legit.

I think I will reinstall Ubuntu (or try in virtulbox) and then try this to make sure there is maximum consistency! I wish I had more Raspberry Pis!
  #27   Spotlight this post!  
Unread 07-12-2013, 07:10
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Installing OpenCV

How do you know the binaries were corrupt? Also, are you sure that the crash was due to the library and not something else, like the test program?

Greg McKaskle
  #28   Spotlight this post!  
Unread 07-12-2013, 14:56
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

Visual Studio told me that they were corrupt and unreadable, and if I continued, my computer crashed!
  #29   Spotlight this post!  
Unread 07-12-2013, 19:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Installing OpenCV

Do you have more specifics on the message? For instance, if Visual Studio told you that memory was corrupted at a stack crawl including OpenCV, and then you continued, you would indeed crash, but that has nothing to do with the library or DLL on disk. If you think the library is corrupt, something like nm or ld with some options would probably be the right tool to determine if it is corrupt and what is wrong.

I've rarely seen a corrupted library. The instances I saw it were in the Win31 and Win95 days and the disk sector information was already bad when the library was installed. My guess is that you do not need to reinstall SW, but instead need to correct the usage of the library functions.

Greg McKaskle
  #30   Spotlight this post!  
Unread 07-12-2013, 19:48
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Installing OpenCV

I know it was corrupt because it started working as soon as I copied new binaries into the installation folder!
Closed Thread


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 03:27.

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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi