Saturday, 8 December 2012

That's enough! We want drivers!

Hi all,
as you know, normally ATOR's main topic is related with archeology and open source ("open archeology"), reporting news, data, test and researches with free/libre and open source software and hardware. 
This time I write about something more general, but in a way connected with these arguments: the lack of a good support for GNU/Linux drivers from some hardware manufactures. 
This problem is not new and, through the years, we had to face with it during the development of ArcheOS, but it has never been as hard as this time, when, working on the next release (ArcheOS v. 5 - codename Theodoric), we found on our way the NVIDIA Optimus graphic card (the video below explain this concept from the "Linux gamers" point of view).




That's why today I decided to repost the call of the Istituto di Istruzione Secondaria Statale Ettore Majorana
Here I simply translate their post in English:

We ask Linux drivers!

This is the struggle we will fight together with other sites, blogs, forums and with the help of you all. We will just ask to the hardware manufacturers, with a simple email, the Linux driver (that are often not supported). Maybe many of you will not believe it, but in this way we already won some battles. Anyway it cost nothing...
We must make our voice heard. We are tired to buy PC with just Windows driver. If they will not listen to us, in the future we will buy only from the hardware manufacturer more susceptible to this problem. 

Battles already won 

Surely this time is different, but this method can work. Here are two examples of struggles already won, thanks to your help:

1) Free Software, finally also Italy has decided

2) Hands off Majorana

... So let's go everybody. Send e-mail and spread the initiative (Facebook, Twitter, blogs, websites, e-mails, friends, acquaintances, etc...)! Maybe this time, if we are many, things will adjust.

This initiative comes from our site and ItaliaUnix (managed by Gianmaria Generoso). With the hope that many other will join us...
To all of you who will participate, thanks in advance!

E-mail

Here is a suggestion to copy and paste for the object and the text of the e-mail (of course you can also write one that suites you best and send it to companies that you want). We start with the well-known Asus.

To:
info@asus.it

Object:
Serious problems to use your hardware

Text:
I'm using one of your devices but it can't support Linux as well as Microsoft Windows because I haven't the necessary drivers. Please give me the right drivers for Linux, otherwise I will not  buy nothing from you anymore. I also will invite  friends and other people not to buy anything signed by Asus because of its incompatibility with Linux or other Open Source Operative Systems. Regards.

The initiative's logo
Do you also support, like I do, the Majorana Institute initiative? In this case you can send an email to hardware companies that do not provide GNU/Linux drivers or help in spreading the struggle.
Thank you!


Wednesday, 5 December 2012

Georeferncing 3D pointclouds with open source tools


Hi all,
since every pointcloud created with Structure-from-Motion comes in its own, relative coordinate system, you often need to georeference the pointclouds in order to use it for archaeological purposes.

I would like to post some notes about a pretty easy way to georeference 3D pointclouds.
In GRASS GIS 7  there are now the modules v.in.ply, v.rectify and v.ply.out available (thanks to Markus Metz of the GRASS Team and TOPOI Berlin) that allow to georeference pointclouds. There will be soon a module that does all – import, transformation and export for the use of the pointcloud in other applications as Meshlab or CAD systems in one step (v.ply.rectify).  These modules can be easily installed under Install extensions from addons.

To accomplish the transformation of the coordinates you need to create a simple .txt file containing the coordinates from the pointcloud, and the real coordinates.
For this it is useful, beforehand in the field, to put at least four (more is better) markers into or near the object you want to model with SfM. The control points need to be visible in the point cloud, so it can help to use a distinctive color for the targets. After taking the photos, don´t forget to take the measurements of the control points!
If you have your pointclouds and the measured coordinates, open the point cloud with Cloud Compare, click on it and open “point list picking”.
Pick the control points one after the other and save the list (xyz) as .txt with the same name as the .ply file in the same folder. Remember the right order (or put numbers on it)!

Picking control points in Cloud Compare 
Then open the .txt and add the coordinates taken in the field to the picked coordinates in the following order:
xyz (from the pointcloud) – xyz (real coordinates) – 0 or 1
The coordinates have to be separated by a space. Use a decimal for the 1000 separator.
For example:
0.215062 -0.873330 -5.366510 323249.970 5907123.953 91.777 1
0.118612 -0.559895 -5.421750 323249.566 5907123.228 92.772 0
0.174586 -0.641221 -5.727870 323248.603 5907123.008 91.996 1

The 0 or 1 at the end of each line indicates whether the coordinates in this line are used for transformation (1) or not (0). At least four lines have to be active!
Save the .txt-file with the same name as your point cloud.
After importing the pointcloud with v.in.ply into GRASS, open v.rectify and add the point cloud in the required field. You have to check Perform 3D transformation and load the .txt-file in the appropriate filed under the optional flag. By checking the Print RMS errors Box you can see the errors of the single control points and choose the best ones (by changing 0 and 1 in the .txt-file) before the actual computation (you have to uncheck the RMS-Box then).

GRASS GIS
When the transformation is done, you can export the georeferenced 3D pointcloud again with v.out.ply. Here you should enter red,green,blue,alpha (without space) in the Name of attribute columns to be exported - field to conserve the color of the pointcloud.
In some cases you want to edit the coordinates so you can use the pointcloud in a graphic software like Mehslab, or in an CAD environment. For using the real coordinates in Meshlab, you have to cut the first couple of digits, which can easily be done in GRASS GIS with v.transform.

All in all, using some SfM-Kit, Meshlab, Cloud Compare and GRASS GIS offers the possibility to create nice, georeferenced 3D models that can be used for archaeological purposes.
Maybe this is useful for anyone, some more information is provided in the GRASS Manuals or here.

Three archaeological layers as original SfM output (left) and georeferenced (right, moved only in height)




Monday, 26 November 2012

ArcheOS 4 software list

Hi all,
to answer Salvatore Schimenti's question on ArcheOS FaceBook page, I report here the complete software list of version 4.0 (codename Caesar). Soon, with a series of short post, I will also try to describe the main archaeological applications of each software. The list is also available on github ArcheOS wiki.

ArcheOS v.4 (Caesar) software list


CAD QCAD Professional 2D CAD system
CAD FreeCAD Extensible Open Source 3D CAx program
DB pgadmin3 Database design and management application (for PostgreSQL)
DB phpPgAdmin Web-based administration tool (for PostgreSQL)
DB pgDesigner Datamodel designer (for PostgreSQL)
DB PostgreSQL Object-relational SQL database
DB PostGIS Geographic objects support for PostgreSQL
DB sqlite3 Embeddable SQL Database
DB SQLite Data Browser Visual tool used to create, design and edit database files (for SQLite)
DB spatialite Extension to support spatial data (for SQLite)
DB spatialite-gui User friendly GUI (for SQLite)
DB spatialite-gis minimalistic GIS tool built on the top of SpatiaLite
DB Tellico Collection manager for books, videos, music
Dendrochronology Corina Dendrochronology program
GIS GRASS Geographic Resources Analysis Support System
GIS OpenJump GIS written in the Java
GIS SAGA System for Automated Geoscientific Analyses
GIS QGIS Powerful and user friendly GIS
GIS uDig user-friendly Desktop Internet GIS
GIS gvSIG Tool to manage geographic informations
GPS GpsDrive Car navigation system
GPS GPSBabel Software for GPS data conversion and transfer
Graphics (3D) Blender Fast and versatile 3D modeller/renderer
Graphics (3D) MakeHuman Software to model 3-D humanoid characters
Graphics (3D) Virtual Terrain Project Software to develop 3D digital form. CAD, GIS, visual simulation, surveying and remote sensing, etc...
Graphics (3D) WhiteDune Graphical VRML97 viewer, editor, 3D modeler and animation tool
Graphics (raster) GIMP GNU Image Manipulation Program
Graphics (raster) GwenView Image viewer for KDE 4
Graphics (vector) Alchemy Drawing program for hand-made sketch
Graphics (vector) Inkscape Vector-based drawing program
Graphics (vector) Stippler Stippling software for non-photorealistic shading
Graphics (voxel) ParaView Multi-platform data analysis and visualization application
Internet Icedove Unbranded Thunderbird mail client
Internet Kompozer WYSIWYG web page editing
Laserscan MeshLab System for processing and editing triangular meshes
Office Scribus Professional layout and publishing software
Office OpenOffice Office software suite
Office Texmaker Cross-platform LaTeX editor
Office texlive-fonts-extra Tex package for extra fonts
Office JabRef Bibliography reference manager for BibTex
Photogrammetry stereo Software to extract 3D objects or surfaces within stereo photographs or images
Photogrammetry e-foto Digital photogrammetric workstation
Single View Reconstruction jSVR Single view reconstruction software in Java
Statistics R Statistical computation and graphics system
SfM-IBM Bundler Structure from Motion software for Unordered Image Collections
SfM-IBM CMVS Software to speed up SfM-IBM procedures (with clustering)
SfM-IBM PMVS2 Multi-view stereo software to reconstruct 3D scenes
SfM-IBM PPT Python Photogrammetry Toolbox: a tool to chain i a single sequence Bundler, CMVS and PMVS2
Total Station Total Open Station Software for downloading and processing data from total station devices
Virtual globe Marble Virtual Globe and World Atlas
WebGIS GeoServer Software to share and edit geospatial data
WebGIS JOSM Editor for OpenStreetMap (OSM) written in Java
WebGIS MapServer Software platform for publishing spatial data and interactive mapping applications to the web
WebGIS pmapper Framework to setup a MapServer application based on PHP/MapScript


ArcheOS logo

Saturday, 24 November 2012

Blender camera tracking + Python Photogrammetry Toolbox



Year by year the growing of Blender come increasing and surprising us. The short movie Tears of Steel proves this, mainly with the new feature of Blender, the camera tracking.




This article will show some tests with this technology in conjunction with Pyhton Photogrammetry Toolbox. Firstly we did an attempt to reconstruct a scene partially with PPT and match it with the footage.


Second, we use the camera tracked and we imported other scene (sphynx) to use the real movement of the camera.

Why use PPT instead a modeling over a picture? 1) Because the reconstruction over a picture is subjective and have the distortion of the perspective. 2) Because scanning complex objects can be easer than modeling it (thing in a statue broken, or an assimetric vase). 3) Because make the texture will be easier when we use the reference pictures. 4) Because you can use the frames of the footage to reconstruct the scene. 4) Because the work of ilumination can be easier cause the texture already be illuminated and the scene (background) be ready.

How can I use the camera tracking in Blender? Make the process can be more easier than you think. A good videotutorial can be found here. Once you have the scene tracked, you can do the reconstruction using PPT.

The image above is a frame of the original footage. How we said, you can use the video to make the reconstruction with PPT. You will have to convert the video in a imagem sequence using FFMPEG, for example (see the previous articles).

The great news, is that we discover (thanks to rgaidao!) an addon that imports Bundler files (bundler.out) inside Blender.


With this, you can receive the cameras with the pictures to project the texture on model.

And produce a model with a great quality of resemblance with the original.

Obs.: Unfortunately this reconstruction wasn't made by Luca Bezzi, the master of PPT reconstruction. So, we did all possible cover using Meshlab and Ball Pivoting reconstruction. This was sufficient to make a model that matched with the original in the important areas.

With the model tracked, reconstructed and matched, you can increase the possibilities of animation to make the impossible... like the picture above, and the videos in the top.

In archaeology, the Blender traking can be used, for example, to reconstruct ancient builds over current ruins.

The uses can be many, your creativity is the limitation.

A big hug!



Saturday, 17 November 2012

Taung Project: 3D with SfM & IBM

This post is published very late, but, due to technical problem, I could not write it before. Among the different articles regarding the Taung Project, this one should be read at the beginning, as it regards the 3D acquisition of the cast we used for the facial reconstruction.
As usual, we tried to choose the best technique to record a 3D digital copy of our subject and, as often happened, the best strategy was to use SfM/MVSR software. Thanks to the versatility of this methodology, all I had to do was set up a makeshift photo laboratory in a free space at the Anthropological Museum of Padua University. The image below shows my temporary workspace.

The makeshift photo lab
Then I took four different series of pictures: two for the cast of the original fossil (with and without flash) and two for a reconstructed cast of the same find (always with and without flash). I used an higher and a lower angle of shooting for each series. The animation below shows the pictures taken from the lower angle (while the two photos on the corner come from the higher corner).



As you can see, to take the pictures I used the same technique of this post. All in all, data acquiring operation did not require very much time (more or less a couple of hours) and the same day I was able to give all the photos to Alessandro Bezzi, who could elaborate them with Pierre Moulon's PPT (in ArcheOS) with his laptop (which is more fast and powerful than mine). Despite what I wrote in the post I mentioned before, this time the post-processing worked perfectly with PPT and Bundler 4, so that just some hours later a raw 3D model was ready to be sent in Brazil, where Cicero Moraes started the facial reconstruction work he described in his three posts (1, 2, 3).

Raw data

In case you want to replicate the experiment, I add some useful link to share the data. As usual in ATOR, they are licensed with Creative Commons.
Here you can download a zipped file with the original pictures. To get the 3D model you can use your favorite SfM - IBM combination of software. If everything work good, you should have a model similar to this pointcloud (you can also see in in the clip below).



If you want to give your model the real metric values, please use the A4 sheet as reference (21 x 29,7 cm), like I did for the find of this post.

Have fun!

Wednesday, 14 November 2012

Geoarchaeology with "terrazzo" tiles.

In this post I would like to describe a geoarchaeological analysis based on tiles built with the “terrazzo” technique. These tiles are made of sedimentary material, coming from the different layers of an archaeological excavation, poured with a cementitious binder (normal Portland cement) and then polished with a lapping machine.
This methodology has many advantages:
  1. It is relatively simple and inexpensive
  2. It allows a sistematic storage of the samples
  3. It allows analysis difficoult to achive (or not feasible) in other ways
Sample preparation

It is better to start with a copious sedimentary sample (at least 1 Kg) and sieve it to define a series of size ranges (16-8 mm, 8-4 mm, 4-2 mm, 2-0,06 mm), that will be used to build the tiles. Then we have to prepare some wooden molds with the preferred size (e.g. 30 x 20 x 5 cm) and to mix the sedimentary material with Portland cemenet, water and 1 dl of Vinavil glue. When the mixture is ready, we can put it in the wooden box and let it dry for a couple of days. After this time, if the cement is hard enough, we have to polish one of the larger faces of the tile with a lapping machine (for this operation we asked the help of a marble cutter). Now the sample preparation is complete (see the image below for an example).

An example of "geoarchaeological terrazzo tile"


Geoarchaeological analysis

The procedure described above allows to build a geoarchaeological archive, storing the sedimentary material of different excavations for future comparison.
The tiles built with the “terrazzo” technique expose a section of the components of the sedimentary material, in which it is possible to observe their genetic colour, their framework (internal structure) and their edge (on a random axis). The same parameters could not be visible on intact samples, due to the small size of the components and to their external surface, which is often dirty and altered.
On one hand, observing the colour and the framework of the sediment, it is possible to do some petrological analysis to determinate the rocks and minerals tipology, which could help in understanding their origin and the spatial distance they covered. On the other hand, the edge of the sediment gives morphologic and morphometric informations, which can explain the kind of transport (and the agent) the material was subject.
In the next days we will try to perform some of these analysis in a GIS to evaluate the potentialities of this kind of software also fo such a specific need.

Sunday, 4 November 2012

Taung Project: 3D Forensic Facial Reconstruction


This article will show the overall process with a timelapse and we'll offer you the file from Blender at the end.

The whole process of 3D modeling took 332 minutes, totaling 5 and a half hour of work and more than 12GB of captured video!

We plan to share the raw video in the future.

Step 1: Muscle Modeling


In this step, the skull structure receives the muscles, we use a new way to make this work, with the automatic fill feature of Blender; this after converting the complex mesh in a 4-sided polygon object.


See the timelapse video above.


Step 2: Skin Modeling



In this step we use the same technique of the Alberto's reconstruction. Since the object of reconstruction is an extinct a animal, it is impossible to use tissue depth marks, therefore the reconstruction was based only on the muscles only.


See the timelapse video above.


Step 3: Material & Rendering


This is the last step, when we finished the modeling and did the texturing and we rendering process.




You  can download the Blender file here. (Fixed!)

Screenshot source .blend file

Different of the last articles about facial forensic reconstruction, this article have all the timelapse videos of the modeling phases.

The videos may be fast, but certainly they should prove useful for the comprehension of the process of modeling and rendering, for those that already have some knowledge and want to study further - or event for those that never seen these techniques before.


We hope this post has been useful to you.

A big hug, and see you in the next!

BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.