Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

OpenDroneMap — Now with animated GIFs

Posted by smathermather on February 20, 2015

Ok. I confess, clickbait. OpenDroneMap won’t make the animated gifs for you. But come on! it can make the 3D models which you can view in Meshlab or where ever, and then create animated gifs. Ok ok. I promised animated gifs. These are from data contributed to our test dataset repo by  Aaron Racicot and Tomasz Nycz respectively.

View of 3D textured surface model of Langley, BC

View of 3D textured surface model of Langley, BC

3D of kite aerial photography dataset

3D view of farm from Kite Aerial Photography (revised description)

 

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | 7 Comments »

Korean Phonetics and Hangul

Posted by smathermather on February 16, 2015

Introduction:

I learn topics better if I talk and write about them. If you have been following this blog for long, you’ll know that I am always willing to post half-learned knowledge here. Today, it will be the Korean alphabet, Hangul.

What I like about learning Korean (people, food, culture, letters, language) is that, like culture in general, it is a complicated, many faceted and subtle thing. It is a real challenge to get good at, and as I get better at it, I slowly get to know fellow thinkers in a FOSS, half a world away. It satisfies my love of people (in general and in particular) and my love of learning.

In addition, the better I learn Hangul and the Korean language, the easier it will be to navigate Seoul this September when I return for Free and Open Source for GeoSpatial.

Hangul:

In a previous post, I mentioned the value of learning a little bit of Hangeul (or Hangul) the Korean alphabet in advance of going to FOSS4G in Seoul this year. I will confess that, as much as there is English text on most signs in Seoul, flying into a nation that uses a completely different system of writing is an exercise in immediate illiteracy. At one point I spent 30 minutes comparing signs in the well labeled and signed Seoul Metropolitan Subway in order to get on the train going the right direction. I got it all figured out, looking carefully at the Hangul (which I couldn’t read), and after all my effort, still got on the train going the opposite direction of my intent. Fortunately, that particular line is a loop… .

But, you don’t have to be as ignorant on arrival as I was. A small amount of study will make you a pro. I’m currently working through Living Language: Korean Essentials, which does a fine job. Wikipedia is also not a bad place to start, and where I got all of my history which follows.

A little History:

Hangul is the official and native alphabet of the two Koreas. It’s called Hangul in South Korea meaning either “great script” or “Korean script”, and called Chosŏn’gŭl in North Korea, which (if my understanding is correct) means “Korean script” but also could be interpreted as “North Korean script”, as Choson is North Korea, but also a historical name for Korea.

Hangul was created during the Joseon Dynasty in the 15th century. It has mostly replaced the use of Chinese characters to write Korean, a borrowed writing system called Hanja.

Why Hangul:

The cool thing about Hangul, coming from a Roman alphabet, is that it is not much different. Unlike a Roman alphabet, syllables are blocks, much like Chinese and other writing systems, but the blocks are phonetic, so themselves can be decomposed into their requisite sounds.

There are a few rules for syllables.

  1. must always start with a consonant
  2. must always contain a vowel
  3. must be either consonant then vowel, or consonant then vowel then consonant (diphthongs and iotized vowels included here as vowels)

Let’s take my name, for example. My full first name is “Stephen” which is pronounced like “Steven”, or more specifically “Steevun” or “Steevin”. In Hangul, that converts approximately to:

스티브는

Let’s break it down into it’s parts:

ㅅ is the character “siot”, which is the equivalent of the letter “s”. (So far so good). Note our third rule: we can’t have two consonants in a row in Hangul. The way around this is to use the character “eu” which is a simple line ㅡ (pronounced like i is in “bid” but further back in the mouth). In this case, the “eu” is unpronounced, it is just playing its role as the required vowel.

ㅌ is our next character. This is “tieut” and is pronounced like the “t” in “tip”. It is followed by ㅣwhich is pronounced like “ee” in “beep”. Putting these two character blocks together, we have “Stee”.

So far so good. Like with all languages, there is no one-to-one correspondence for all sounds. Korean doesn’t have a “v” sound, so the closest letter is used: ㅂ, which is called “bieup”, and sounds like the “b” in “boy”. What follows is another ㅡ or “eu”. In this case, I think it’s not acting in a silent capacity but as that short “i” like sound. Now we have “Steebi” with a short “i” sound.

Finally our “N” sound is fulfilled by “nieun” or ㄴ. On this syllable, I need to phone a friend — I’m not sure if the pronunciation of this get’s it’s own separate audible syllable or not. So, I’m not sure of the final sound is “Steebinin” or “Steebin”. For our sticklers for proper translation the proper way to Romanize this would be more like Stibeuneun (I think), or just translate it back to what it was in the first place “Stephen”.

Whew! Try this with your own name. Try going to https://translate.bing.com or https://translate.google.com and see if you can get a Korean version of your own name translated. Common English names (anyway) do have common translations, and you can double check by translating it back, though I don’t know about other languages. Or better yet, contact a friend, if you have one that speaks Korean. If not, make sure to come to FOSS4G in Korea this year. You’ll find many.

 

Postscript:

I was informed by Sanghee Shin that the final 는 is the suffix that flags a word as the subject in the sentence.

Posted in FOSS4G, FOSS4G2015 | Tagged: , , | Leave a Comment »

Normalizing tables in PostgreSQL: experiments with Fulcrum

Posted by smathermather on February 12, 2015

Fulcrum by Spatial Networks is an interesting and very useful hosted service for collecting geo data in the field with whatever smartphone or tablet you already own.  It works well, so long as you just want to collect points, and the field building capabilities are quite extraordinary. Also, for many applications, it’s cheaper than custom solutions, so it hits that sweet spot well. If you’ve been paying attention, I prefer my hosted solutions to be (nearly) purely open source, so as to avoid vendor lock-in. Fulcrum is sufficiently compelling, we are using it carefully and with a bit of joy, in spite of not meeting my normal preferences.

Screen shot of Fulcrum's form builder

So, I thought I’d share some table normalization we are doing on our wetland inventory data that we’ll be collecting with Fulcrum. The State of Ohio specifies a rapid assessment method for classifying wetlands called Ohio Rapid Assessment Method for Wetlands (ORAM) (warning– pdf). This assessment method has force of law, and on paper is a one-page, two-sided form with a range of physical, water regime, land cover and other characterizations, and to date we’ve always filled it out on paper, transcribed that at the office, and then populated spreadsheets, or more recently a PostGIS/PostgreSQL database.

Where we run into some difficulty is that some of our form values can be multiple values. Fulcrum returns a single field for these, with comma delimited contents:

comma_delimited

Since we need to do lookups and calculations on these fields, we really need some normalization. Enter regexp_split_to_table.

CREATE TABLE nr.oram_metrics AS
  SELECT oram_id, 'm1_wetland_area'::text AS metric, regexp_split_to_table(m1_wetland_area, ',')::text AS selection
    FROM nr.cm_oram_data;

Now in our case, we have one lookup table for ORAM. Perhaps it should be multiple tables, but it’s just one discrete (ht. Brian Timoney for grammar fix) thing, this ORAM form, so we keep it simple. This means for each of our columns that should be normalized, we can throw them all in one table. We use UNION ALL to accomplish this:

CREATE TABLE nr.oram_metrics AS
  SELECT oram_id, 'm1_wetland_area'::text AS metric, regexp_split_to_table(m1_wetland_area, ',')::text AS selection
    FROM nr.cm_oram_data

UNION ALL

  SELECT oram_id, 'm2a_upland_buffer_width'::text AS metric, regexp_split_to_table(m2a_upland_buffer_width, ',')::text AS selection
    FROM nr.cm_oram_data;

Finally, we can use a FOREIGN KEY constraint with a table that has all our metrics and selections plus our lookup value to complete the exercise:

CREATE TABLE nr.oram_metrics AS
  SELECT oram_id, 'm1_wetland_area'::text AS metric, regexp_split_to_table(m1_wetland_area, ',')::text AS selection
    FROM nr.cm_oram_data

UNION ALL

  SELECT oram_id, 'm2a_upland_buffer_width'::text AS metric, regexp_split_to_table(m2a_upland_buffer_width, ',')::text AS selection
    FROM nr.cm_oram_data;

ALTER TABLE nr.oram_metrics ADD CONSTRAINT "metric_constraint"
  FOREIGN KEY (metric, selection) REFERENCES nr.oram_score_lookup_all (metric, selection);​ 

Posted in Database, Database Optimization, Fulcrum, PostGIS, PostgreSQL, SQL | Tagged: , , , | Leave a Comment »

Take that, hipsters. Compositing in GeoServer

Posted by smathermather on February 12, 2015

Let’s be honest. There’s some un-coolness to GeoServer. It’s built on Java. It’s old(er) and multi-purpose. It has none of the cache of server side javascript or GoLang goodness. But bless me, it is a workhorse. And sometimes having a tool that can do anything is a blessing. If multi-purpose toolbelts and pocket protectors are uncool, then declare me uncool. You won’t be the first.

Anyway, this a long way of saying that GeoServer now has something that the Mapnik ecosystem has — it has compositing! Which means any cartographic effect you want is well within reach with GeoServer.

Examples of compositing in GeoServer

So, now you can do “Enterprise” geo stuff _with_compositing. Cheers.

http://docs.geoserver.org/latest/en/user/styling/sld-extensions/composite-blend.html

http://blog.geoserver.org/2015/01/22/geoserver-2-7-beta-released/

Posted in GeoServer | Tagged: , | 2 Comments »

OpenDroneMap — Orthophotos, textured mesh, ground control points, oh my!

Posted by smathermather on February 7, 2015

Spotscale’s texturing, orthophotos, and ground control have landed on the main branch for OpenDroneMap. No docs written yet, but an orthophoto and properly oriented textured mesh will be autogenerated just by running it on data with GPS ephemeris. Documentation yet to come on using ground control points for balloons, kites, and lower end drones, but expect that early next week.

Snapshot of untextured mesh, Seneca test dataset

 

Snapshot of textured mesh of Seneca test dataset

(edit: for the record, this is my pi post — my 314th post on my blog)

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | Leave a Comment »

OpenDroneMap — Orthophotos and GCPs

Posted by smathermather on February 4, 2015

No docs yet for orthophoto generation and the use of GCPs in OpenDroneMap, but for the early adopters, check out this branch of OpenDroneMap:

https://github.com/OpenDroneMap/OpenDroneMap/tree/ortho-gcp

The format of the GCP file is simple. The header line is a description of the coordinate system (nothing formal here). Subsequent lines are the X, Y & Z coordinate in your coordinate system, your associated pixel and line number in the image, and the image name itself:

WGS84 UTM 17N
306285.997948 4545379.373772 218.375076 755 1159 IMG_0541.jpg
306086.87645 4545305.068275 220.971863 1874 1508 IMG_0548.jpg
306286.079002 4545211.102966 222.374451 1650 2381 IMG_0605.jpg
306258.256744 4545357.435387 218.836639 1763 2603 IMG_0513.jpg
306323.770813 4545246.277000 222.837692 543 2326 IMG_0521.jpg

 
For your edification, the schematic of ground control for Michele M. Tobias & Alex Mandel’s Cole Oil Point Reserve dataset.

Image of ground control over Coal Oil Point Reserve dataset

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | Leave a Comment »

OpenDroneMap — Orthophotos and Textured Mesh (Habitats)

Posted by smathermather on February 4, 2015

ODM shows some promise in mapping out microhabitats as on display with Michele Tobias & Alex Mandel’s dataset of hot air balloon derived images of Coal Oil Point Reserve, Goleta, CA.

Here is one of the raw images:

Raw aerial image of beach from hot air balloon

And here’s a visualization of the small topographic and surface model variation derived from using ODM from the dataset.

Mesh of small scale beach structure

 

edit: I’m really looking forward to trying this out in sedge habitats… .

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | Leave a Comment »

OpenDroneMap — Orthophotos and Textured Mesh (testing…)

Posted by smathermather on February 4, 2015

A few new features are about to land on OpenDroneMap. Among those features, we have great work led and implemented by Spotscale for orienting our textured meshes so that Z is up:

Screenshot of georeferenced textured mesh

and auto-exporting an orthophoto when GPS ephemeris is available in our input images:

Screen capture of orthophoto from Seneca test dataset

——-

Next step — testing the input of ground control points in order to output fully referenced and orthorectified imagery. Stay tuned.

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | Leave a Comment »

OpenDroneMap — Orthophotos and Textured Mesh (cont.)

Posted by smathermather on January 21, 2015

Schematic showing ODM processing chain

(Credit goes to Brandon Garman for the graphic above. It’s part of a very nice sUAS graphic he’s putting together at the moment.)

Following up on the earlier post on the addition of orthophotos and textured mesh to OpenDroneMap (FYI, one word, and not OpenDroneMaps) https://smathermather.wordpress.com/2014/12/22/opendronemap-orthophotos-and-textured-mesh/ we have some more features in the pipeline. This is a deeper dive into architecture and future enhancements.

In the previous post, I talked about the addition of orthophotos and textured surface models as outputs. Those are currently being refined by the folks at Spotscale. In addition to that work, Spotscale is also adding the ability to include ground control points in the processing chain.

This will allow for the following:

  • imagery that doesn’t have onboard GPS to be used
  • refinement for datasets that do have onboard GPS, but have more accurate ground control points
  • use of ODM with balloons
  • kite aerial photography and other applications.

I am really excited by these enhancements. They lower the barrier to entry for a range of users, widen the use cases, and allow for fine refinements of the geometry / geography of ODM outputs.


 

The other thing in progress is the integration of Mapillary’s OpenSfM into the toolchain. This gets us a few things:

  • A modern SfM solution as an option at the front of the toolchain. The hope is this will improve the performance and quality of image matching. It will also allow us to take advantage of the solutions that Mapillary has developed and is developing for dealing with photo matching at scale and with a range of camera qualities, types, etc.
  • The ability to more easily use ground level imagery in the toolchain
  • Auto-correction of GPS ephemeris in the imagery using best available GPS ephemeris and structure from motion positioning (ala http://blog.mapillary.com/update/2014/11/14/opensfm.html)

This is huge. I expect between the work of Spotscale and Mapillary that, image smoothing / vignetting fixes aside, ODM will be on-par with any sUAS image processing software. Delivery and testing will tell, but stay tuned.

An initial schematic for how the OpenSfM and ODM can integrate now is below. In short order, OpenSfM will run as a submodule within OpenDroneMap, and we likely keep Bundler / vlsift for legacy sake.  When this happens, the schematic will simplify somewhat.

Schematic of workflow/interaction between ODM and OpenSfM

 

Posted in 3D, Bundler, Camera Calibration, FOSS4G, Image Processing, OpenDroneMap, Optics, Photogrammetry, PMVS | Tagged: , , , , , , , | Leave a Comment »

(Further) Refinements on the Tenor Guitar

Posted by smathermather on January 18, 2015

A couple more tenor guitar pictures.

2015/01/img_0103.jpg

2015/01/img_0105.jpg

Posted in Other | Tagged: , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,230 other followers