sltk icon indicating copy to clipboard operation
sltk copied to clipboard

Hey

Open prahjister opened this issue 6 years ago • 9 comments

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.

prahjister avatar Apr 03 '18 19:04 prahjister

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 avatar Apr 04 '18 15:04 jhdewitt

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
*******************************************************************************************

jhdewitt avatar Apr 04 '18 16:04 jhdewitt

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

https://github.com/jhdewitt/sltk/issues/9

prahjister avatar Apr 04 '18 16:04 prahjister

checking it out

jhdewitt avatar Apr 04 '18 16:04 jhdewitt

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 avatar Apr 04 '18 16:04 jhdewitt

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

PR for timestamp feature on mjpg-streamer:

https://github.com/jacksonliam/mjpg-streamer/pull/127

jhdewitt avatar Apr 04 '18 18:04 jhdewitt

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

prahjister avatar Apr 04 '18 18:04 prahjister

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.

jhdewitt avatar Apr 04 '18 18:04 jhdewitt

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

prahjister avatar Apr 05 '18 01:04 prahjister