jhdewitt / sltk

An OpenCV-based structured light processing toolkit.
MIT License
251 stars 63 forks source link

update 4.5.18 #12

Open prahjister opened 6 years ago

prahjister commented 6 years ago

FYI i re imaged my box and started over sltk compiles perfectly.

I tried both mjpg streamers and doesnt compile

Yours has this error....Getting closer

In file included from /home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c:44:0:
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_uvc/input_uvc.c: In function ‘input_init’:
/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
prahjister@amlogic:~/mjpg-streamer/mjpg-streamer-experimental$
jhdewitt commented 6 years ago

Found a c270 and will take a shot at getting it working with uvc mjpg-streamer module on an rpi this weekend. 720p images should process significantly faster on arm box than 5-8mp ones!

prahjister commented 6 years ago

Awesome. I ended up getting a c920 off Amazon. I have been using brown University structured light with some success.

jhdewitt commented 6 years ago

Ah, yay the c920 is the other usb cam on hand! Pretty sharp imo. Want reproducible results. Glad to hear of success :)

prahjister commented 6 years ago

I didn't want to pressure you. But I am still standing by.

I wish this one took your approach to calibration. Seems better

jhdewitt commented 6 years ago

Ok it seems like it's working now, was a simple mistake. This update works on my end to make -timestamp option function with input_uvc.so: https://github.com/jhdewitt/mjpg-streamer/commit/de757cefe7921660ca8714198ae3561d97c45142

mjpg_streamer -i "input_uvc.so -f 30 -r HD -timestamp" -o "output_http.so"

with c920 I get: 1523665657.559277 : frame# 1730 (0.205 late) (0.204 dt = 4fps) ( 47587 B)

also tried with ps3 eye and it had very low frame delay 1523665143.702563 : frame# 0736 (0.034 late) (0.030 dt = 33fps) ( 18912 B)

jhdewitt commented 6 years ago

now back to fixing all the other broken things ;)

prahjister commented 6 years ago

Fantastic news. I will get to testing here.

What all is broken?

prahjister commented 6 years ago

I know this is off topic but after messing with alignment in mesh lab. Your ply tools look very interesting. But how do you set the noise threshold and does it ignore the surface the object is on?

jhdewitt commented 6 years ago

The current public repo should function fine, but I have been working on refactoring stuff to get the code into a more sane and less rat nest like state. This will allow me to add features and stay sane while doing so.

Re: ply tools, the current idea is that the scanner would be moved infrequently in relation to the static background. My current way of cleaning up scans is as follows:

or

this is the general procedure i followed for the shell example in the readme.

jhdewitt commented 6 years ago

sorry for long winded explanation

noise is determined by a manually created "background reference". basically run once with no object then save until hardware is moved.

jhdewitt commented 6 years ago

ps the autofocus on the c920 is on by default and interferes with the image capture process. trying to figure out how to disable it.

This thread was the closest I could find on short notice. https://sourceforge.net/p/mjpg-streamer/discussion/739917/thread/5f8681a5/

This function is probably accessed through dyncontrol but how is totally unclear to me https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_uvc/dynctrl.h