Incompatible browser

The Public Laboratory website will not render correctly in Internet Explorer 6 or earlier. To view it properly, please use an up-to-date browser, such as Firefox, Chrome, or another standards-compliant browser. It's a good idea to upgrade anyways -- olderversions of IE pose a security risk for your computer.

Coded ground control points

Ground control point targets are useful to stitch photos on uniform or repeatitive landscapes. They can be made from cardbord plates, cloth etc. See for example this note.

However, on very uniform areas, even ground control points may not help: photos of green patches of grass with identical control points are hard to tell apart. In such situations, a coded ground control point marker comes in handy.

A simple approach I thought up over coffee with Thomas Groen is to make a paper sheet with a 3x3 grid of black-or-white squares, forming a binary code of 9 positions. The codes in the photo above for example are numbers 000.000.001 and 000.000.101 (when white = 1, black = 0).

Paper sheets with codes can be generated easily with some easy code, such as this script for Processing:

// Coded ground control points //

import processing.pdf.*;

size (297, 420,PDF, "GCPs.pdf"); // setup for A3 standard sheets
// load font'
PFont font;
font = loadFont("Georgia-12.vlw");

int achtergrond = 200; // sets background

for (int teller = 0; teller <= 98; teller = teller +1) { 

  background(achtergrond);
  String str = binary(teller, 9);
  println(str);
  for (int i = 0; i < 3; i = i+1) {
    for (int j = 0; j < 3; j = j+1) {
      stroke(achtergrond);
      fill(achtergrond*(int(str.charAt(j+i*3))-48));
      rect(4+96*j, 4+96*i, 95, 95);
    }
  }
  // draw scalebar of 250 mm long
  fill(1, 1, 1);
  stroke(1);
  rect(23, 308, 250, 94);

  // draw cross for GPS capture"
  stroke (achtergrond);
  strokeWeight(2);
  line(149-20,354,149+20,354);
  line (149, 354-20,149, 354+20);

  // add text 
  fill(100);
  textFont(font, 6);
  text("jasjavliegt.nl ", 40,330);
  text("Nr. "+teller, 40,350);
PGraphicsPDF pdf = (PGraphicsPDF) g;  // Get the renderer
 pdf.nextPage();  // Tell it to go to the next page
}
exit();

AttachmentSize
GCPs_A4.pdf518.81 KB
GCPs_11x17.pdf772.45 KB

Comments

Juan's picture

Interesting. Is it possible to include a north arrow scale?North arrow scale

Jasja's picture

Thank you Juan,
yes, that would be possible, but it would be easiest to use the rectangle, the scale bar, as a north arrow. If you always point it north-south, with the code on the left (or right) consistently, it should work like that.
I could upload a pdf of say the first 30 codes in A3 format if anyone is interested.

Juan's picture

Yes, but for technical photography (archeology, for example) I think it's better explain the North.

And yes, I am interested.

mathew's picture

Great idea with the coded ground control points-- I attached the rendered PDFs for folks who aren't comfortable with code, and made a modified version for USAians in our standard 11"x17" paper size (279mmx432mm).

One note, in the code it said the scale blocks were 200mm, but they're actually 250.

11x17 processing code:

// Coded ground control points //

import processing.pdf.*;

size (279, 432,PDF, "GCPs.pdf"); // setup for 11x17 standard sheets
// load font'
PFont font;
font = loadFont("Georgia-12.vlw");

int achtergrond = 200; // sets background

for (int teller = 0; teller <= 98; teller = teller +1) { 

  background(achtergrond);
  String str = binary(teller, 9);
  println(str);
  for (int i = 0; i < 3; i = i+1) {
    for (int j = 0; j < 3; j = j+1) {
      stroke(achtergrond);
      fill(achtergrond*(int(str.charAt(j+i*3))-48));
      rect(6+89*j, 6+89*i, 88, 88);  //modified for 11x17
    }
  }
  // draw scalebar of 250 mm long
  fill(1, 1, 1);
  stroke(1);
  rect(14, 308, 250, 94);

  // draw cross for GPS capture"
  stroke (achtergrond);
  strokeWeight(2);
  line(139-20,354,139+20,354);//modified for 11x17
  line (139, 354-20,139, 354+20); //modified for 11x17

  // add text 
  fill(100);
  textFont(font, 6);
  text("jasjavliegt.nl ", 40,330);
  text("Nr. "+teller, 40,350);
PGraphicsPDF pdf = (PGraphicsPDF) g;  // Get the renderer
 pdf.nextPage();  // Tell it to go to the next page
}
exit();

Jasja's picture

Matthew, that is great, thanks. I did not know how to attach documents to the post yet.

I've changed the 200 mm error in the script comments.

Also note that you can replace my commercial message on the GCP's with anything you want by altering the line

text("jasjavliegt.nl ", 40,330);

The text between " " is the text that is printed.

Adam-Griffith's picture

I'm interested in printing some of these nice panels, but don't know how to use this code. Is the PDF posted somewhere?

mathew's picture

hmmm... the attachments are missing from this post. they are still on the old site. I'll file an issue. until then:
http://publiclaboratory.org/notes/jasja/6-13-2012/coded-ground-control-p...

Enviar nuevo comentario

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].

More information about formatting options

To prevent automated spam submissions leave this field empty.
CAPTCHA
Esta pregunta se hace para comprobar que es usted una persona real e impedir el envío automatizado de mensajes basura.