Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hey #10

Open
prahjister opened this issue Apr 3, 2018 · 9 comments
Open

Hey #10

prahjister opened this issue Apr 3, 2018 · 9 comments
Labels

Comments

@prahjister
Copy link

I know this is a lot of work. Do you think that I should ask for some help? I feel like we are so close.

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

Hey,

Weekend dragged out a bit. With most recent commit, I have slcapture and sldisp working on my raspberry pi from fresh clone and make. I've changed the config to default to assuming these programs are all on same computer: slcapture.py, sldisp, mjpg-streamer (all on rpi!)

slcontrol still needs to be IP configured because I haven't braved setting up Processing on rpi yet.

Updated Networking Notes with some more details.

Regarding the opencv 2/3 thing, the only really breaking thing was a single stereoCalibrate function argument order; I wrapped this in an ifdef to use the right argument order for opencv2 vs opencv3. This should relax the dependency requirement to be satisfied by either version. slcalibrate compiles fine on my mac with opencv3 installed and also raspi with opencv2.4 installed.

Hope these changes work!

On your setup, I believe you will need to change:
in slcontrol.pde: remoteControl and remoteDisplay to point to your ARM box.
in slcapture.py: GUI_server_addr to point to your windows box running slcontrol Processing sketch

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

slcapture output should now look something like this:

1522857336.805041 : SEQUENCE START
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Sequence "" #0 -> [~/completed_scans/sequence_0000/scan_0000]
+    [ 1 ] scans of [ 49 ] patterns per, with [ 1412 ] steps rotation between
+    consisting of:
[ gcb_seq with 40 gcb patterns ]
[ rgb_seq with 9 rgb patterns ]

1522857336.886989 : frame# 15831 (0.113 late) (0.097 dt = 10fps) ( 1111433 B) ( 1111969 B avg) ( -536 B diff) show_dt = 0.000; show_dtavg = 0.000
1522857336.889510 : PATTERN REQUEST [0 0 0  9 0.40 0.40 0.40]
1522857337.083946 : frame# 15833 (0.109 late) (0.098 dt = 10fps) ( 1110802 B) ( 1111777 B avg) ( -975 B diff) show_dt = 0.000; show_dtavg = 0.000
1522857337.108962 : MATCH  gcb pattern  [0, 0, 9, 0.4, 0.4, 0.4] delay = 0.219481
1522857337.374083 : frame# 15837 saved [IDX 0] 0.265121 secconds after display @[~/completed_scans/sequence_0000/scan_0000/1522857337.374083_gcb_00_09_0-00_img.jpg]
                         1 / 40 patterns : 0 / 2 sequences written
*******************************************************************************************

1522857337.806277 : frame# 15838 (0.337 late) (0.096 dt = 10fps) (  788577 B) (  791021 B avg) (-2444 B diff) show_dt = 0.219; show_dtavg = 0.219
1522857337.808230 : PATTERN REQUEST [0 1 0  9 0.40 0.40 0.40]
1522857337.862198 : frame# 15839 (0.292 late) (0.100 dt =  9fps) (  788797 B) (  790687 B avg) (-1890 B diff) show_dt = 0.219; show_dtavg = 0.219
1522857337.869483 : MATCH  gcb pattern  [1, 0, 9, 0.4, 0.4, 0.4] delay = 0.061275
1522857338.170608 : frame# 15845 saved [IDX 1] 0.301125 secconds after display @[~/completed_scans/sequence_0000/scan_0000/1522857338.170608_gcb_00_09_1-01_img.jpg]
                         2 / 40 patterns : 0 / 2 sequences written
*******************************************************************************************

@prahjister
Copy link
Author

prahjister commented Apr 4, 2018

Great...i was thinking the worst. I am a pessimist at heart.. I will start ingesting the info.

Could you reply to that other github project...on this issue. Without the timestamps it limits it to raspicam

#9

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

checking it out

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

Ok so it seems that uvc.so indeed doesn't have timestamp support yet. I responded to the thread; pretty sure it is coming from the http "X-Timestamp" header which precedes the jpg bytes. Other thread has more details. Hopefully mjpg-streamer will support this feature soon...!!

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

Linking this here for now since timestamp is a hangup with uvc image source

PR for timestamp feature on mjpg-streamer:

jacksonliam/mjpg-streamer#127

@prahjister
Copy link
Author

fantastic....how do i pull this to test

@jhdewitt
Copy link
Owner

jhdewitt commented Apr 4, 2018

git clone https://github.com/jhdewitt/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental/
make
sudo make install

This should build mjpg-streamer from the prototype commit and install if no error.

@prahjister
Copy link
Author

I get this with https://github.com/jhdewitt/mjpg-streamer.git

/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/../../utils.h:74:17: error: ‘context_settings {aka struct <anonymous>}’ has no member named ‘timestamp_auto’
         settings->v##_auto = 1; \
                 ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c:367:9: note: in expansion of macro ‘OPTION_INT_AUTO’
         OPTION_INT_AUTO(39, timestamp)
         ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/../../utils.h:75:46: error: ‘context_settings {aka struct <anonymous>}’ has no member named ‘timestamp’
     } else if (sscanf(optarg, "%d", &settings->v) != 1) { \
                                              ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c:367:9: note: in expansion of macro ‘OPTION_INT_AUTO’
         OPTION_INT_AUTO(39, timestamp)
         ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/../../utils.h:79:13: error: ‘context_settings {aka struct <anonymous>}’ has no member named ‘timestamp_set’
     settings->v##_set = 1;
             ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c:367:9: note: in expansion of macro ‘OPTION_INT_AUTO’
         OPTION_INT_AUTO(39, timestamp)
         ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c: In function ‘help’:
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c:540:66: warning: backslash and newline separated by space
     " [-timestamp ]..........: Set timestamp value to populate\n"\
                                                                  ^
plugins/input_uvc/CMakeFiles/input_uvc.dir/build.make:86: recipe for target 'plugins/input_uvc/CMakeFiles/input_uvc.dir/input_uvc.c.o' failed
make[3]: *** [plugins/input_uvc/CMakeFiles/input_uvc.dir/input_uvc.c.o] Error 1
make[3]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
CMakeFiles/Makefile2:286: recipe for target 'plugins/input_uvc/CMakeFiles/input_uvc.dir/all' failed
make[2]: *** [plugins/input_uvc/CMakeFiles/input_uvc.dir/all] Error 2
make[2]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
Makefile:17: recipe for target 'all' failed
make: *** [all] Error 2

And i dont get a timestamp with this https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c#L710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants