Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Accessing .mjpg stream from camera to process (http://www.chiefdelphi.com/forums/showthread.php?t=133245)

Arhowk 20-01-2015 19:42

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?

Arhowk 23-01-2015 18:23

Re: Accessing .mjpg stream from camera to process
 
bump. Haven't had time to write a mjpeg adapter

Fauge7 23-01-2015 21:51

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!

Joe Ross 24-01-2015 10:37

Quote:

Originally Posted by Fauge7 (Post 1433062)
I think first really shafted the java programmers this season!


What do you think is worse this year compared to last year?

Arhowk 24-01-2015 12:24

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Joe Ross (Post 1433188)
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.

Fauge7 24-01-2015 12:26

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Arhowk (Post 1433232)
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

Arhowk 24-01-2015 12:59

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Fauge7 (Post 1433235)
yeah, exactly that! Also I do not think there is a support for the axis camera series, just Usb webcams

AxisCamera.java?

notmattlythgoe 24-01-2015 13:30

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Arhowk (Post 1433247)
AxisCamera.java?

Have you had any success with actually connecting to the camera from the robot?

Fauge7 24-01-2015 13:48

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by notmattlythgoe (Post 1433272)
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.

orangelight 24-01-2015 21:10

Re: Accessing .mjpg stream from camera to process
 
You can use OpenCV VideoCapture object. You could also edit the smart dashboard camera view.

Joe Ross 24-01-2015 21:23

Quote:

Originally Posted by Fauge7 (Post 1433280)
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.

Arhowk 25-01-2015 12:44

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Fauge7 (Post 1433280)
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

Fauge7 25-01-2015 19:04

Re: Accessing .mjpg stream from camera to process
 
Quote:

Originally Posted by Arhowk (Post 1433665)
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.

notmattlythgoe 26-01-2015 08:55

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.


All times are GMT -5. The time now is 11:12.

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