dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Photogrammetry?

Sun Jun 18, 2017 11:36 pm

Hi guys

I'm looking at building a 3d scanner rig with a pizeroW (or pi3), a camera module, and extra parts...
I'm considering a Photogrammetry approach, whereby I rotate the object on the turntable (probably via a stepper motor) and take pictures at preset angles. This bit is relatively easy, what I'm struggling with is getting any Photogrammetry software running on the pi. the only open source one I could find was VisualSFM, which I couldnt persuade to compile, with the instructionshere (although, that may be me doing it wrong, I hate compiling stuff)
Anyone with any experience who can point me in the right direction?

Thanks
Dan
dan3008 wrote:Pays your money, takes your choice

IanS
Posts: 232
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Photogrammetry?

Tue Jun 20, 2017 2:54 pm

I remember seeing a project along these lines a few years ago, although I cannot remember which of the several that a quick Google search turns up it was. A number have open-source software behind them.
https://www.open-electronics.org/an-ope ... pberry-pi/
https://www.raspberrypi.org/magpi/fabsc ... g-for-all/
http://www.freelss.org/

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Tue Jun 20, 2017 4:40 pm

that's a structured light scanning, or laser light\line scanning

Similar, but not quite what I was looking for (hence I hadn't seen that)

freelss looks promising. So I'll have to take a look at that. Wasnt planning on going down the laser rout, but if its my only option...
dan3008 wrote:Pays your money, takes your choice

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Sun Jul 09, 2017 5:35 pm

Any Update/Further along on this?

Been thinking of setting up something like this myself.
Been googling photogrammetry software for a few days.
Technically it should be possible, but the time to render the 3d image from the pictures on a pi3 might be very slow.

Just need to find a rasprry pi friendly program or compile some of them linux based ones from source.
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

User avatar
bensimmo
Posts: 4157
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Photogrammetry?

Sun Jul 09, 2017 6:39 pm

Or off load that part onto something else on a network?

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Sun Jul 09, 2017 7:51 pm

S0litaire wrote:Any Update/Further along on this?

Been thinking of setting up something like this myself.
Been googling photogrammetry software for a few days.
Technically it should be possible, but the time to render the 3d image from the pictures on a pi3 might be very slow.

Just need to find a rasprry pi friendly program or compile some of them linux based ones from source.
Nothing :( I've tried compiling loads of stuff, and nothing seems to work :(
That said, I am considering a different approach, where I just use the pi to take pictures, and a different computer to do the photogamitary
bensimmo wrote:Or off load that part onto something else on a network?
That ^_^ or maybe put the images onto a usb pen, and then use a separate linux box (I have a couple around) with said usb
I'm also looking at a way of autouploading to something like 123d catch

Although, while writing this post, I stumbled accross Python Photogamitary Toolkit which I am going to look at next
dan3008 wrote:Pays your money, takes your choice

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Mon Jul 10, 2017 3:39 pm

take a look at micmac
http://micmac.ensg.eu/index.php/Accueil

It's got instructions for compiling in the Raspberry Pi
http://micmac.ensg.eu/index.php/Compila ... spBerryPi)
*note*
The site is in French but the commands are self explanatory.

Just started compiling it and will give it a go with some test snaps later today.
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Mon Jul 10, 2017 3:52 pm

S0litaire wrote:take a look at micmac
http://micmac.ensg.eu/index.php/Accueil

It's got instructions for compiling in the Raspberry Pi
http://micmac.ensg.eu/index.php/Compila ... spBerryPi)
*note*
The site is in French but the commands are self explanatory.

Just started compiling it and will give it a go with some test snaps later today.
good job I can read a bit of french then ;) lol

mmm, looks intresting, I'll have to compile it and see how it goes. I recon the pi3 should handle it ok
dan3008 wrote:Pays your money, takes your choice

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Tue Jul 11, 2017 12:42 pm

Well it took nearly leaving my Pi3 on overnight, but I finally got MicMac to compile 100% running just using a single thread (did accidentally turned off QT5 components in the cmake file, so I'm re-compiling again using 2 threads with QT5 enabled today)

But I had a quick try but can't get a completed 3D mesh/pointframe/image just yet, from my images (not sure if I've got the commands messed up or the disabled QT5 is causing an issue!)

After the re-compile I'll test with a couple of the provided test image packs (Boudha statue + Gravillions model).

**Note**
The rpi3 WILL need heatsinks when running this! Temps jumped as the cpu sat at 100% for a good 10 mins while running (got the thermal warning icon)
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Tue Jul 11, 2017 12:54 pm

Wow, S0litaire, you've got a load further than me...

Python photogammitary toobox wont work on the pi :( It uses some x86/64 only libaries, So I guess time to start working on MicMac :)

Actually, Maybe its time to work on my turntable setup to take the photos, THEN I can worry about the software...
dan3008 wrote:Pays your money, takes your choice

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Tue Jul 11, 2017 1:05 pm

Hardware is the easy bit... Lol ;)

Note you'll need to install the desktop version of Raspbian for the compile to work. ( Took me hours to figure that out yesterday!!)
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Tue Jul 11, 2017 1:50 pm

S0litaire wrote:Note you'll need to install the desktop version of Raspbian for the compile to work.
That seems like an odd, ah well, obviously uses some of the X libaries or something

I've just installed minmac on my desktop, going to see if I can learn how to use it while I wait for my new pi3 to arrive (my current one is busy lol)

We'll see. If its going to be too hard, then something like fabscanpi might be easyer
dan3008 wrote:Pays your money, takes your choice

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Tue Jul 11, 2017 2:08 pm

Just need the focal length of the r-pi camera now.

And to write a simple scratch program to take a sequence of tiff images and write out the exit info for the images...
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Tue Jul 11, 2017 2:38 pm

OK Ignore mt post about needing desktop version... just tried to compile it with QT5 enabled. Compile failed with the same error i was getting all last night....

So looks like their is an issue with rpi's QT5 version.

Currently trying a compile with QT4 instead see if that works.

didn't grab the whole error message but the QT5 error kicks in when it gets to "cMasq3D" ;

Code: Select all

     
src/CMakeFiles/elise.dir/build.make:3175: recipe for target 'src/CMakeFiles/elise.dir/geom3d/cMasq3D.cpp.o' failed
make[2]: *** [src/CMakeFiles/elise.dir/geom3d/cMasq3D.cpp.o] Error 1
CMakeFiles/Makefile2:311: recipe for target 'src/CMakeFiles/elise.dir/all' failed
make[1]: *** [src/CMakeFiles/elise.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

i73
Posts: 5
Joined: Fri Feb 19, 2016 6:00 am

Re: Photogrammetry?

Sun Jul 30, 2017 5:36 pm

S0litaire wrote:
Tue Jul 11, 2017 12:42 pm
Well it took nearly leaving my Pi3 on overnight, but I finally got MicMac to compile 100% running just using a single thread (did accidentally turned off QT5 components in the cmake file, so I'm re-compiling again using 2 threads with QT5 enabled today)

But I had a quick try but can't get a completed 3D mesh/pointframe/image just yet, from my images (not sure if I've got the commands messed up or the disabled QT5 is causing an issue!)

After the re-compile I'll test with a couple of the provided test image packs (Boudha statue + Gravillions model).

**Note**
The rpi3 WILL need heatsinks when running this! Temps jumped as the cpu sat at 100% for a good 10 mins while running (got the thermal warning icon)
Great job man! Before I jump into this do you have the specs on how long it took with X images? Just want to have an idea if I should just use my PC for this.

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Photogrammetry?

Tue Aug 01, 2017 1:54 pm

Actually I've not touched it since my last post. (If i kept going my R-Pi would be in a thousand bits after I dropped kicked it into a wall!!)

Main issue was that the program will not compile with QT4/5. It hits the same error each time I try to compile with QT enabled.

When i did get it compiled, I could not get it to produce a working file from the test images or the ones i took to test.

I know next to nothing about programming so don't know where to start in the QT source files to see what the actual issue is.

Looks like i'll just have to use the r-pi to capture the images and send them to my desktop for processing.. :(
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Photogrammetry?

Tue Aug 01, 2017 5:17 pm

S0litaire - I've been having the same issues :/ and I do know a LOT about programming :/ I think its destined not to work...

so yes, for now, it looks like get the pi to take pictures and send them to another computer. Wondering if it would be possible to put some software on a linux computer that can recive and handle the images automatically
dan3008 wrote:Pays your money, takes your choice

i73
Posts: 5
Joined: Fri Feb 19, 2016 6:00 am

Re: Photogrammetry?

Thu Aug 03, 2017 2:11 am

S0litaire wrote:
Tue Aug 01, 2017 1:54 pm
Actually I've not touched it since my last post. (If i kept going my R-Pi would be in a thousand bits after I dropped kicked it into a wall!!)

Main issue was that the program will not compile with QT4/5. It hits the same error each time I try to compile with QT enabled.

When i did get it compiled, I could not get it to produce a working file from the test images or the ones i took to test.

I know next to nothing about programming so don't know where to start in the QT source files to see what the actual issue is.

Looks like i'll just have to use the r-pi to capture the images and send them to my desktop for processing.. :(
Lol, yeah I hear you. Were you editing the source files? I could take a look at that the QT error.

bp100a
Posts: 1
Joined: Thu Jan 10, 2019 8:59 pm

Re: Photogrammetry?

Thu Jan 10, 2019 9:06 pm

There is an existing solution based on the Arduino called Ciclop that used opensource software called Horus. You can find information on it BQ Ciclop. Of course this isn't a Raspberry Pi solution but since all the code is opensource you could reverse-engineer it and create a Raspberry Pi solution.


I have created a project for Raspberry Pi Photogrammetry that uses a rig I found on Thingiverse. You can find the sources at RpiPG. It's a Python implementation and utilizes the gphoto library to control a consumer digital camera.

Good luck!

Return to “Other projects”