<div dir="ltr">Thanks very much.  This looks really helpful.  I'll give it a spin and let you know how it goes.<div><br></div><div>msr</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 2:01 PM, Matthew Leotta <span dir="ltr"><<a href="mailto:matt.leotta@kitware.com" target="_blank">matt.leotta@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Oct 6, 2015, at 3:38 PM, Michael Rosen <<a href="mailto:michael.rosen@gmail.com" target="_blank">michael.rosen@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Thanks for this.  It compiles and the assert is gone.  <div><br></div><div>To be clear, here's what I did:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>git clone <a href="https://github.com/Kitware/maptk.git" target="_blank">https://github.com/Kitware/maptk.git</a></div><div><div>cd .\maptk</div></div><div><div>git fetch origin pull/88/head:dev/camera-pass-by-reference</div></div><div><div>git checkout dev/camera-pass-by-reference</div></div><div><div>cmake -G "NMake Makefiles" -DBOOST_ROOT=C:\dev\fletch\install -DEIGEN3_INCLUDE_DIR="C:\Program Files (x86)\Eigen\include\eigen3"</div></div><div><div>nmake</div></div><div><div>nmake install</div></div></blockquote></div></div></blockquote><div><br></div><div><br></div></span><div>Interesting, so you didn’t need to do any of the defines to disable byte alignment for Eigen?  Were you building master or release before?</div><div><br></div><div>By the way, I have now merged that dev/camera-pass-by-reference branch into both the release and master branches of MAP-Tk, so you should be able to use one of the primary branches again.</div><span class=""><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><br></div></blockquote><div><div>Is there a simple workflow you can pass that will demonstrate use of some of the utilities.  For example, suppose I have a collection of overlapping images, what can I do with them?</div></div></div></div></blockquote><div><br></div></span><div>I’ve been meaning to write up a tutorial on this, but haven’t gotten to it yet.  Part of this is because there are big API changes coming soon as well as improvements in algorithms.  There is a bunch of stuff building up that I can’t release yet until I get approval from AFRL.  A preview of those changes is on the kwiver-integration branch.  We are pulling a lot of core guts of MAP-Tk out into a new repository named VITAL (<a href="https://github.com/kitware/vital" target="_blank">https://github.com/kitware/vital</a>) that is shared across KWIVER projects.  I don’t recommend building that on Windows just yet.  But Keith Fieldhouse is working on a KWIVER “super build” that will use CMake to make the various projects build together easily.</div><div><br></div><div>Anyway, the best I can do at this point is to point you to a tutorial I gave back in June at the CVPR conference:</div><div><br></div><div><a href="http://www.kitware.com/cvpr2015-tutorial.html" target="_blank">http://www.kitware.com/cvpr2015-tutorial.html</a></div><div><br></div><div>This used a version of MAP-Tk similar to the current release branch.  There are examples for applying MAP-Tk to a sample dataset.  A Linux VM image is provided with all the software and data pre-installed, but you can also get the config files here:</div><div><br></div><div><a href="https://github.com/mleotta/cvpr2015-opensfm/tree/master/Exercises/maptk" target="_blank">https://github.com/mleotta/cvpr2015-opensfm/tree/master/Exercises/maptk</a></div><div><br></div><div>and the sample data here:</div><div><br></div><div><a href="https://github.com/mleotta/cvpr2015-opensfm/tree/master/Data/CLIF_2007" target="_blank">https://github.com/mleotta/cvpr2015-opensfm/tree/master/Data/CLIF_2007</a></div><div><br></div><div>and slides explaining what to do here:</div><div><br></div><div><a href="http://midas3.kitware.com/midas/download/item/317119/Hands_on_with_MAP-Tk.pdf" target="_blank">http://midas3.kitware.com/midas/download/item/317119/Hands_on_with_MAP-Tk.pdf</a></div><div><br></div><div>FYI, MAP-Tk is (for the moment) a bit specialized to aerial imagery, so it might not work well out of the box on arbitrary images.</div><div><br></div><div>Good Luck,</div><div>Matt</div><div><div class="h5"><div><br></div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>msr</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 10:36 AM, Matthew Leotta <span dir="ltr"><<a href="mailto:matt.leotta@kitware.com" target="_blank">matt.leotta@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Michael,<div><br></div><div>Thank you for reporting this issue.  I’ll be upfront and warn you that I’m not a Windows developer and MAP-Tk is currently better tested on Linux and Mac.  That said, we are working toward getting things better running on Windows more reliably.</div><div><br></div><div>In this case, the issues are related to Eigen byte-alignment issues as explained on the Eigen website linked from your error message:</div><div><br></div><div><a href="http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" target="_blank">http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html</a></div><div><br></div><div>I have read this page before, and expected I would need to make changes at some point to work around these issues, but until now I had not come across a compiler that exhibited these symptoms.  We should probably try to get a VisualStudio 2012 build up on our dashboard so I can work through those issues properly.  I expect that will take some time.  A shorter term solution is to try to disable alignment in your build.  Can you try the solutions described at the bottom of the page at the above URL?  In the "I don't care about vectorization, how do I get rid of that stuff?” section it suggests defining some macros to disable alignment.  Let me know if that works.</div><div><br></div><div>In the meantime, I can at least work around that pass-by-value build issue.  That function is pass-by-value because we intentionally want to make a local copy of the camera object to modify.  However, I can explicitly make that copy inside the function instead.  I’ve done this on the release branch of MAP-Tk and made a pull request (<a href="https://github.com/Kitware/maptk/pull/88" target="_blank">https://github.com/Kitware/maptk/pull/88</a>).  Can you try to build this branch and verify that it at least builds for you?</div><div><br></div><div>git fetch origin pull/88/head:dev/camera-pass-by-reference</div><div>git checkout dev/camera-pass-by-reference</div><div><br></div><div>If that works, I’ll merge this change into the release and master branches.  Also let me know if the solution on the Eigen page helps.</div><div><br></div><div>—Matt</div><div><br></div><div><br><div><blockquote type="cite"><div><div><div>On Oct 5, 2015, at 1:24 PM, Michael Rosen <<a href="mailto:michael.rosen@gmail.com" target="_blank">michael.rosen@gmail.com</a>> wrote:</div><br></div></div><div><div><div><div dir="ltr"><div>Hello Kwiver-folk,</div><div><br></div>I'm building MapTK on Windows 7/64 using VStudio 12 and having two immediate difficulties:  a compilation problem and a runtime assert.<div><br></div><div>MapTK is version 0.6.0, Eigen is 3.2.6<br><div><br></div><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">I've worked through getting Boost and Eigen built.  When I compile maptk, the first problem is this:</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">   [ 98%] Building CXX object tools/CMakeFiles/maptk_pos2krtd.dir/pos2krtd.cxx.obj</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">  pos2krtd.cxx</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">  C:\dev\maptk\tools\pos2krtd.cxx(220) : error C2719: 'base_camera': formal parameter with __declspec(align('16')) won't</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">  be aligned</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">  C:\dev\maptk\tools\pos2krtd.cxx(238) : error C2719: 'base_camera': formal parameter with __declspec(align('16')) won't</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">  …</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">I fixed these compilation errors by changing the signature of the offending function from pass-by-value to pass-by-reference:</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">    /// Convert a POS file to a KRTD file</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">    bool convert_pos2krtd(const maptk::path_t& pos_filename,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">                      const maptk::path_t& krtd_filename,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">                      maptk::local_geo_cs& cs,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">                      maptk::camera_d& base_camera, // msr.  was pass-by-value</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">                      maptk::rotation_d const& ins_rot_offset = maptk::rotation_d())</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">That allows everything to compile and link.  The next problem was that I got an Eigen Assert when I run any of the executables:</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">C:\Program Files (x86)\MAPTK\bin>maptk_analyze_tracks.exe</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">...</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "<a href="http://eigen.tuxfamily.org/d" target="_blank"><span style="color:purple">http://eigen.tuxfamily.org/d</span></a></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">ox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****", file c:\program files (x86)\eigen\include\eigen</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">3\eigen\src/Core/DenseStorage.h, line 86</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">The web page says that classes which contain certain Eigen data structures as members need to use the</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">     EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro to override the "new" operator so that those members will be 16-byte aligned. I've done that but am still seeing the assert.</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"><br></span></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">Can anyone offer insight into any of this?</span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">msr</span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></p></div></div></div></div></div>
_______________________________________________<br>Kwiver-users mailing list<br><a href="mailto:Kwiver-users@public.kitware.com" target="_blank">Kwiver-users@public.kitware.com</a><br><a href="http://public.kitware.com/mailman/listinfo/kwiver-users" target="_blank">http://public.kitware.com/mailman/listinfo/kwiver-users</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>
</div></blockquote></div></div></div><br></div></blockquote></div><br></div>