Go to Post Are yellow cards still being given out like AOL demo CDs in the late 90s? - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
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 20-01-2015, 19:42
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Accessing .mjpg stream from camera to process

Our team is attempting to use a dlink camera (don't know the exact model at the moment) and it has support in the form of 10.16.84.20/camera.mjpg. I've looked at the axis camera code and switching that to a standard mjpeg stream would require a bit of deconstruction, which is doable but is a waste of my time if there is another alternative.

Is there a built in way to retrieve images from any given mjpg stream?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2015, 18:23
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Accessing .mjpg stream from camera to process

bump. Haven't had time to write a mjpeg adapter
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2015, 21:51
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Accessing .mjpg stream from camera to process

I do not think you can do what your looking for. I think first really shafted the java programmers this season! I digress, I think you might have to use a usb webcam for that. In the beginning i was playing around with the vision and stuff, but it seems like you will need a co-processor anyways. I did a solid week of research on this topic before I got a semi workable vision prototype. I only use OpenCV(for image processing) and the network tables to communicate to the robot. You can find the github link here!
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2015, 10:37
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Quote:
Originally Posted by Fauge7 View Post
I think first really shafted the java programmers this season!

What do you think is worse this year compared to last year?
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2015, 12:24
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Joe Ross View Post
What do you think is worse this year compared to last year?
Vision programming. The entire thing is really buggy with next to no documentation whatsoever and the only sample code doesn't even process an image.

Thanks for your JavaCV link but the only thing I'm looking for is to display the image on the driver station. I ended up following this code to get some byte arrays out of a mjpeg.
Reply With Quote
  #6   Spotlight this post!  
Unread 24-01-2015, 12:26
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Arhowk View Post
Vision programming. The entire thing is really buggy with next to no documentation whatsoever and the only sample code doesn't even process an image.
yeah, exactly that! Also I do not think there is a support for the axis camera series, just Usb webcams
Reply With Quote
  #7   Spotlight this post!  
Unread 24-01-2015, 12:59
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Fauge7 View Post
yeah, exactly that! Also I do not think there is a support for the axis camera series, just Usb webcams
AxisCamera.java?
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2015, 13:30
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Arhowk View Post
AxisCamera.java?
Have you had any success with actually connecting to the camera from the robot?
Reply With Quote
  #9   Spotlight this post!  
Unread 24-01-2015, 13:48
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by notmattlythgoe View Post
Have you had any success with actually connecting to the camera from the robot?
That class was made for last year's vision system. Also I have tested it this year and does not work.
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2015, 21:10
orangelight's Avatar
orangelight orangelight is offline
Registered User
AKA: Alex
FRC #0548 (Robostangs)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Northville
Posts: 168
orangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to behold
Re: Accessing .mjpg stream from camera to process

You can use OpenCV VideoCapture object. You could also edit the smart dashboard camera view.
__________________


Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2015, 21:23
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Quote:
Originally Posted by Fauge7 View Post
That class was made for last year's vision system. Also I have tested it this year and does not work.

It works for me. There's even a built in example for it.
Reply With Quote
  #12   Spotlight this post!  
Unread 25-01-2015, 12:44
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Fauge7 View Post
That class was made for last year's vision system. Also I have tested it this year and does not work.
I also confirm that it works, though CameraServer has a 2-3sec lag compared to SmartDashboard's direct connection which gets a ~100ms lag
Reply With Quote
  #13   Spotlight this post!  
Unread 25-01-2015, 19:04
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Accessing .mjpg stream from camera to process

Quote:
Originally Posted by Arhowk View Post
I also confirm that it works, though CameraServer has a 2-3sec lag compared to SmartDashboard's direct connection which gets a ~100ms lag
what Axis camera? I used an axis m1013 and it did not, maybe I will revisit it.
Reply With Quote
  #14   Spotlight this post!  
Unread 26-01-2015, 08:55
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Accessing .mjpg stream from camera to process

We were finally able to get it running, but not with the AxisCamera. The robotRio sees the IP camera as cam0, so I was able to use it just like the USB cameras. Thank for the help.
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 12:59.

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