An accidental image processing collection.
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    3,183
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    An accidental image processing collection.

    I have a couple of projects in mind that require the ability to convert a set of photographs into a 3D model.
    As a result I have been searching around for a suitable program to do this process, since it involves maths that I have long ago forgotten (if I ever knew it).

    I eventually came across Regard3D which seems to get quite good reviews.
    Of course the Linux support comments were not encouraging:
    Linux
    Unfortunately, there are no binaries available for Linux, so you'll need to compile the program, and its executable and library dependencies, from source. The developer's build instructions leave most of the process as an exercise for the reader, so a degree of familiarity with C++ and Cmake will come in handy.
    To do Figure out complete build/install procedure
    The phrase "exercise for the reader" should have rung alarm bells, but, no, I dive into the process of building this program - I mean, how hard could it be ?

    On the Regard3D site the first thing you notice is that there is both the source zip file for Regard3D, and one for openMVG which has apparently been modified a bit for use with the program.

    Hence the first task was to build this library.
    It unpacks to 64MB of source, so it takes while to build.
    Its final step is to link 22MB of static libraries, where it announces there are undefined references
    So I wade through the unfamiliar cmake files to adjust them so that it finds the needed libraries.
    I notice that there are some warnings so I have a look at them. Mostly they were unimportant warnings, but a couple were real bugs, but easy enough to fix.
    At this point I finally read the build instructions through to the end and discovered that I was installing it incorrectly, so I adjusted the configure command to set the installation prefix.
    Item 1 done.

    Step two: Build the program.
    This starts with an iterative process of running the cmake program.
    Finding out what package it couldn't find and installing it.
    It is amazing that build instructions will tell you about libpng, and other minor packages, but overlook wxWidgets, Qt5, and Boost.
    I guess these have been installed in the developer's systems for so long they are just considered part of the system.
    Eventually it wrote out the make files and could have a go at actually compiling the program.
    A few compile errors needed fixing, some of which make me wonder if the source I am compiling is the same source as is being used to build the Windows and Mac binaries.
    [I will run a diff between the original source and its "fixed" form and report the actual changes in a later post.]
    Eventually the program is created.

    Step three: Run the program.
    The very first thing that comes up is a dialog box:
    Third party executables not found.
    Please put them where the executable is located.
    This is a bit concerning since I had not seen any reference to additional programs being needed, and what programs ??
    This was followed by other warning dialogs about the data files containing details of cameras which were easily resolved.
    The program then started with a work flow tree on the left, an OpenGL viewer in the middle with some controls for it on the right.
    The first step is to load in some pictures which it did, but failed to find the camera details and complained that it could not proceed.

    Step four: Debugging.
    The program comes with (as in its a separate download) a CSV file of camera details - the model that is saved with the jpg image and the width of the image sensor. After about a day of hand tracing through multi-threaded code that uses wxWidgets (new to me) I finally get down to the code that parses the CSV file and discover that it has been trying to use ';' as the separator - truly weird.
    It was then able to load the pictures and start searching for "matches" - bits of image that can be found on more than one photo.
    This crashed the program.
    So, I enabled core files, crashed it again, and fired up gdb.
    The program was crashing when adding what looked like a vector of floats to a storage vector.
    I have never seen this code fail, so I started to look for other problems, such as race conditions in the multi-threading.
    That came up empty, so the next candidate was memory corruption - a nasty type of bug to find.
    Valgrind is the answer to finding these memory issues. It found about 23000 problems, but none of them looked like the culprit.
    [Not sure why there is so much access of uninitialised data in wxWidgets.]
    So, time to dig a bit deeper and follow down the call sequence in the gdb back trace.
    Turns out, what I thought was std::vector<float, 144> was actually a single column matrix from the eigen3 library.
    Tracking down into that I find that it uses the new C++ move operator, but then tries to access the data that was just moved
    Once that was fixed it was all fairly straight forward to use up to the point where it produces a "point cloud".

    It displays the point cloud in its OpenGL view window - very small.
    Now, the left mouse button does rotations, but the other buttons for pan and zoom don't work.
    I then loaded the point cloud into Blender and zoomed in to see quite a nice 3D representation of the object in the photos.

    There are two more steps necessary to get the model in a usable form - made up of triangles rather than points.
    For these the program requires those missing third party programs

    Looking at the tutorial for Regard3D there are links to the home pages for these programs.
    So I now have 7 projects to build.
    Once done I will have a rather comprehensive graphics processing collection.

    User error. Please replace user and try again

  2. #2
    Join Date
    Jul 2004
    Location
    Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
    Age
    74
    Posts
    23,830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: An accidental image processing collection.

    So, no problems then?
    Linux & Beer - That TOTALLY Computes!
    Registered Linux User #362651


    Don't use any of my solutions on working computers or near small children.

  3. #3
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    3,183
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: An accidental image processing collection.

    Quote Originally Posted by bob
    So, no problems then?
    Nup.
    All going as expected.
    Mostly because my expectations of other people's code isn't very high.
    [At least with my own code I don't have any expectations.]

    User error. Please replace user and try again

  4. #4
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    6,230
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: An accidental image processing collection.

    Quote Originally Posted by ocratato
    Nup.
    All going as expected.
    Mostly because my expectations of other people's code isn't very high.
    [At least with my own code I don't have any expectations.]
    When you go fishing, and when you catch a fish, you can't stop fishing until you reel it in.
    Ditto for a project. Are you getting any sleep?
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  5. #5
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    3,183
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: An accidental image processing collection.

    Quote Originally Posted by lsatenstein
    When you go fishing, and when you catch a fish, you can't stop fishing until you reel it in.
    Ditto for a project. Are you getting any sleep?
    I have several projects which I am currently working on.
    I spend a week or so on each one, and then move on to the next one.
    I find a week is long enough to really get "into" the project and get something done.
    The week might drag out a bit if what I am doing is keeping my interest, but in this case discovering I had another 7 things to build was the trigger to put it aside for a while.

    User error. Please replace user and try again

Similar Threads

  1. Accidental format.
    By mohan.10 in forum Using Fedora
    Replies: 2
    Last Post: 12th October 2010, 07:22 AM
  2. how to install darktable raw image processing software
    By davidvandoren in forum Using Fedora
    Replies: 9
    Last Post: 31st July 2010, 10:42 AM
  3. [SOLVED]
    How to use processing.org's Processing-1.0.9 as an Application
    By rjames in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 3rd March 2010, 10:31 PM
  4. image processing software
    By eutu9 in forum Using Fedora
    Replies: 2
    Last Post: 7th October 2007, 09:20 PM
  5. Replies: 0
    Last Post: 18th January 2007, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •