nerdsfornature / changebrackets

This is a public repo for our project that uses angle brackets to monitor environmental change
MIT License
5 stars 4 forks source link

TimeLapser has been deprecated #9

Open jasper2xF opened 8 years ago

jasper2xF commented 8 years ago

Timlapser github:

UPDATE: This repository is depricated. This functionality can be obtained by using sample example

Meaning the stitching_detailed.cpp OpenCV example.

Also, as @kueda noted in Issue #7 (I wanted to bring this up as a separate issue as it is unrelated):

Yeah, running into an issue with @pglotov's alignment script, which means it would need to be rebuilt >with a recent version of opencv... which might not work. I've since discovered >http://wiki.panotools.org/Align_image_stack, which might be a better solution to the alignment problem, >but it's a bit fussy and will need some tweaking before it will work (right now it just segfaults on me when >run with default settings).

I ran the stitching_detailed example today and liked the preliminary results. I'm a fan of the sophisticated functionality OpenCV offers.

I have yet to create the movie file from the timelapse images, but I think we should integrate stitching_detailed as a command line call.

kueda commented 8 years ago

Go for it if it works. I've never been able to get those OpenCV example programs to run.

jasper2xF commented 8 years ago

I'll work on this.

This will require setting the examples up to use the full pipeline though. ] leave helpful resources here for now:

This is a great description on how to setup opencv on Ubuntu that worked well for me.

However, the stitching_detailed example also requires the opencv_contibutions. So that needs to be cloned as well and the cmake of the above instructions changes to:

cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DOPENCV_EXTRA_MODULES_PATH=~/opencv-3.1.0/opencv_contrib/modules -DBUILD_opencv_nonfree=ON ..

Without opencv_contrib you will get an error along

...< OpenCV was built without SURF support>...

as discussed here.

danrademacher commented 8 years ago

@jasper2xF any luck on resolving this issue?

jasper2xF commented 8 years ago

@danrademacher yes, to some extent

The most difficult part of replacing the timelapse code is compiling the OpenCV examples. With the above instructions this is quite doable.

I the just run the moviemaker with

--timelapsing="./*PATH_TO_OPENCV_EXAMPLES*/cpp-example-stitching_detailed --timelapse as_is --rangwidth 6"

It seems to work, but I think there's still something wrong. My hunch is that the algorithm struggles with pictures that are too different. Note that I reduced the alignment window size down to 10, this seems to work better and is more convenient for debugging.

Maybe sorting the alignment batches by time-step helps grouping more familiar images together. This seems to make sense either way.

I will be traveling until the 19th and won't have a chance to look further into this until then.