Friday 30 August 2013

gdal_edit.py: if you can think it, you can do it

Hi all,
today I'll write a post about a python script I used to edit the projection of an old geotiff, to import it in the GIS I am managing for Aramus archaeological mission 2013. To understand why I needed to use such a script, I have to explain briefly the problem occurred this year.
Since eight years (2006), Arc-Team is supporting the excavation in Aramus (AR), currently leaded by Dott. Walter Kuntner of Insbruck University (Institut für Alte Geschichte und Altorientalistik), in colaboration with Prof. Hayk Avetissian (Yerevan State University). In 2006 Ing. Klaus Kerkow and Christine Hanisch produced an high resolution aerial map of Aramus hill, using S-42 geodetic datum (with the Krassowsky ellipsoid). Unfortunatley, since 2004, Aramus project has been set up on a modified version of S-42, to avoid bureaucratic problems. This is the reason why I had to convert the aerial map geotif from the Krassowsky-Pulkovo to the local Aramus system. If I could work with a georeferenced raster and a plain world file, it would have been simple to solve the problem, just modifying the coordinates directly in the code... but working with a geotiff, things became more complicated. I could georeference again the aerial map, but I wanted to spare time and keep the same quality of the original raster. Luckily Walter Kuntner found the right solution in internet: gdal_edit.py, a simple scrit able to "edit in place various information of an existing GDAL dataset (projection, geotransform, nodata, metadata)". I checked quickly If I had this script in my GDAL files, but I did not find it, so I simply copied the source code from the OSGeo SVN repository, at (this link) and I saved it in a .py file. Than I get the coordinates of the upper left and lower right corner of my geotiff in OpenJUMP ...


Copying the upper left coordinates of the geotif

... and finally I modified the GDAL dataset with this command:

python gdal_edit -a_ullr ulx uly lrx lry

where ulx and uly stand for the new x and y coordinates of the upper left corner of the geotif, while lrx and lry are the new x and y coordinates for the lower right corner.
I know that this problem is not very common, but I hope that this post will be anyway somehow useful to ATOR readers.
Have a nice day!

Thursday 15 August 2013

OpenJUMP: query to extract single points from a general vector layer

Hi all,
today I am working on data elaboration of an archaeological excavation. I decided to record a short videotutorial to show how to perform a very simple query in OpenJUMP (which is a topic I am often asked to explain during lessons about archeology and open source). Before to start, I'll write a short introduction regarding the processing of this data, just to understand why I need to perform this kind of query. 
I worked on this excavations collecting all the data in a local system (with simple 3D Cartesian coordinates), because the job was an emergency archeology project and I did not have the time to set up a geographic coordinate system on the field, before the construction site began. Just at the and of the excavation, I could come with a RTK GPS, to collect some Ground Control Points (GCP) in UTM WGS84. This is the reason why in this time, when I am processing the data, I had to put together all the daily total station downloads in a single cvs file, which I georeferenced in OpenJUMP, using the GCP I collected with the GPS. The problem is that now I will have to separate again the single points, grouping them according to their function (e.g. points for photomapping of area 1, height points of the same area, points for SfM georeferencing, find-points and so on...). To do this operation, I will simply use OpenJUMp (where I loaded and georeferenced the csv file), performing a query on the attribute (the name) of cumulative vector layer , which will tell me where are the the points I need. In this way I can select in the GIS the features I am looking for and put them in a new vector level, copying the db schema of the cumulative layer (name, y, x, z, code). At the end of the process, I will have single separated vector files which I will use in the next steps of data processing (photomapping, 3D, ecc...).

Here is the videotutorial I uploaded in the ArcheOS tutorila wiki (rom Insbruck University):



I hope it was useful, have a nice day!

Wednesday 14 August 2013

Course Introduction to Forensic Facial Reconstruction with Free Software



Since I started my research in the field of forensic facial reconstruction and published the first results, some people asked me to come up with a course.

Initially, cases lacked know-how to securely develop a methodology of my own, but that was taken care of naturally with the dozens of reconstructions performed within almost two years of study.

Later another problem showed up, the lack of a partnership with institutional affiliation and technical background. Fortunately this was also solved with numerous collaborators and partnerships with some institutions. Specifically for this course I started a teamwork with Dr. Paulo Miamoto, PhD student in Forensic Dentistry in one of Brazil's most famous university, the Faculty of Dentistry of the University of Sao Paulo (FO-USP).

The initial project is to offer students a course of 32 hours, divided into two modules of 16 hours, distributed in two classes of 8 hours each. This is an adequate structure for the syllabus to be covered in two weekends.


Course Introduction to Forensic Facial Reconstruction with free software

Please, activate subtitle in English

Faculty:

- Prof. Cícero Moraes (3D designer, specialized in Forensic Facial Reconstruction)

- Prof. Paulo Eduardo Miamoto Dias (Dentist, MDS, Specialist in Forensic Dentistry, and PhD student at USP - São Paulo)


Course Objective:

Provide aspirants introductory training in facial reconstruction routines. Target students: dental students and professionals interested in Forensic Sciences, Forensic Dentistry, Forensic Anthropology, professionals such as forensic experts, researchers, specialists in Forensic Dentistry, Archaeologists and other professionals in related fields.

Methodology: Lectures, demonstrative and practical classes.

Syllabus:

- History of Forensic Facial Reconstruction

- Forensic Dentistry and Forensic Facial Reconstruction

- Ethical and legal aspects in Forensic Facial Reconstruction

- Research in Forensic Facial Reconstruction

- Photographic Technique for photogrammetry

- Converting a cloud of points in a 3D mesh with texture

- Rebuilding CT scans into 3D objects

- Editing and cleaning large 3D files

- Introduction to Blender and 3D computer graphics

- Manipulating objects in 3D space

- Adding color to objects

- How to light a scene and generate files

- Modifiers in Blender, what are they and how they work

- Inserting, combing and cutting hair virtually

- Rudiments of digital painting and texturing

- Introduction to the methodology of rapid forensic facial reconstruction

- Working with templates for rapid facial reconstruction

- Comparison between 3D meshes

- Studying a case of reconstruction in practice


Information on locations and dates coming soon.

More information by e-mail: contato@ciceromoraes.com.br

Translation: Dr. Paulo Miamoto

Monday 5 August 2013

3D scanning by photos taken with a simple smartphone

Example of composed scene (scaned objects + modeled objects)

3D scanning with photos by Structure-from-Motion (SfM) and Image Based Modeling (IBM) has provoked the admiration and has pointed the curiosity of the people.

Some of these people want only to test randomly the technology, but other have objective ambitions, like to reconstruct the architectural heritage, art for advertising and even forensic research that already has been shown here, in other post.

The objective of this blog is share the knowledge of all people that want to learn about free software technology. Thinking about a great number of individuals, today will be shown the result of scanning with the camera of a simple smartphone, the Galaxy Y Duos, from Samsung.

The next phase of the researches will be the collect of photos of other cell phones and smartphones more and less sofisticated than this presented here.

Configuration


Before anything else, is necessary know that the scanning is not made inside the smartphone, but in a personal computer with PPT-GUI installed. A few months ago a post was published here with a tutorial of 3D scanning by photos, that you can follow to make your own test.

The objective of this post is prove that the result is literally at your fingertips. Even the hardware you have not be the most sophisticated (sorry, the version of screenshots are only in Portuguese).


In this case, the model used is a GT-S6102B, with Android 2.3.6. It is a quite simple smartphone sold in Brazil.

All the photos was taken with default configuration of illumination.

Evidently, anyone scanning was made with photos taken during the night.

Some of the scenes was in sunny environment. Some of them in environment with shade of sun, and other in internal of houses.

The only change in the default configuration was use the 3.2 megapixels the total power of the camera, with 2048x1536 pixels.

The result was shown in the video on top of this post.

I hope you enjoyed.

See you in the next!






Saturday 3 August 2013

jsc3D: javascript for 3D models and scenes in the web

Hi all,
as I promised in this post today I write a short text about a very interesting software named jsc3D. 
This tool provides a 3D viewer to embed objects and scenes on a webpage. The code is Javascript and it is released with the MIT License (more info here). One of the best feature of this software is its intuitiveness, which makes it easy to use also for newbies. Moreover it works with obj file format, a very common and  open "standard" (de facto) for 3D models.
The versatility of the code is another very important peculiarity of this application.
As you see, I can import a simple scene here in blogger (e.g. layer 162 of the excavation of S. Andrea's church, Storo - TN - Italy)...



... while Giuseppe Naponiello (our webgis expert), used jsc3D to integrate a simple 3D viewer in Raptor (the open source webgis Arc-Team is developing for the Ministero per i Beni e le Attività Culturali)...


Raptor's 3D extension

... and, again, I integrated this tool also in some presentation I did using the software impress.js, which will be the topic of one of the next post.

Presentation of the Taung Project during the ArcheoFOSS 2013

I hope this short informations about jsc3d will be useful for your projects. Have a nice day!
BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.