thoughts, ponderings, experiments & recent things
Recently have taken to using custom scalebars with coded targets when photogrammetric modelling with Agisoft Photoscan.
Detecting targets is automatic, importing coordinates is automatic. Currently, importing scalebars is not.
Here’s a very basic Python script from importing scalebars and setting their value.
# script for automatically creating and importing scalebars from a csv file. # format must be # modified from script for making scale bars from the camera # pair with the following naming convention: "NM_links..." + "NM_rechts..." by Alexey #compatibility PhotoScan Pro 1.3.2 import PhotoScan from PySide2 import QtCore, QtGui doc = PhotoScan.app.document chunk = doc.chunk print("Create and import scalebars") msg = "Choose a scalebar csv file" path = PhotoScan.app.getOpenFileName("Select input text file:") file = open(path, "rt") eof = False line = file.readline() while not eof: #split the line and load into variables point1, point2, dist, acc = line.split(",") #iterate through chunk markers and see if there is a match for point 1 if (len(chunk.markers) > 0): for marker in chunk.markers: if (marker.label == point1): scale1 = marker #iterate through chunk markers and see if there is a match for point 2 for marker in chunk.markers: if (marker.label == point2): scale2 = marker #create a new scale bar between points if they exist and set distance scalebar = chunk.addScalebar(scale1,scale2) scalebar.reference.distance = float(dist) nopair = 0 else: nopair = 1 else: nopair = 0 if nopair: print("Missing one or other end of point") else: print("no markers") #reading the next line in input file line = file.readline() if not len(line): eof = True break file.close() PhotoScan.app.update() print("Script finished")
Ever had to typset some Farsi from a word document only to find that the non-joiners and other characters get stripped?
This might help if you, like me are trying to get a Farsi document written in microsoft word on the PC into Indesign on the mac and don’t have Microsoft office.
Firstly, the .docx will open in TextEdit, Pages, Libre Office, Google docs and can be ‘placed’ in Indesign directly.
Of these Libre Office is the only one where the non-joiner appears to be preserved. Copying and pasting from Libre Office into Indesign however has the same effect of using one of the other options – the non-joiner is lost. But… through the magic of search and replace you can swap the non-joiner used in the word document with one that Indesign (and all the other programs) like and save it in the docx format to boot. Doing this is a little fiddly – you need to copy and paste the offending and working characters into the search and replace box, which spend most of their lives being entirely invisible.
Why and what is causing this incompatibility I don’t know nor have time to find out. But as a note-to-self-for-others, this is a solution.
The past year has been spent at the School of SimVis at the GSA, learning new things, and improving on old things.
For information about the final project on collaborative 3D environments for reconstruction of past landscapes see here:
More to come
A simple and obvious trick for catching those fiddly fine details as part of your photogrammetric modelling.
3D models, photogrammetry. All the rage these days. Sometimes though it’s just not possible to model those very fine details you want to record.
There is always the time & data volume tradeoff – it’s not practical to model everything at the microscopic level, or the material is ill suited for photogrammetry, or maybe the available equipment isn’t quite up to standard, or perhaps you just stuff up a shoot.
Whatever the cause some details that are easier (and better) recorded with techniques raking light, hand illustration or RTI.
So why not do both?
You could of course try and model an object entirely in raking light, and again in diffuse light, but that wouldn’t work very well as you loose information in the shadows and highlights that you want from raking light. But it’s quite simple to take a few extra shots during your modelling that you can use as textures later on.
A tripod (or sturdy setup of chairs and bags of lentils) to hold the camera is essential, but the principal is the same regardless of whether you are using a turntable setup or not.
Every so often in your imaging sequence, take a shot in your main modelling diffuse light, then stop, making sure the camera and object do not move. Then turn off your lamps (or change camera settings) and use a 3rd light (or better external flash) and take your raking light photographs. You could even do a full RTI shoot if your setup leaves you enough space to work with.
Then carry on as you were.
When modelling, exclude these images from the process until you get to the texturing stage. Rename these files to the name of the diffuse images and turn off all other images then build the texture. With care you can texture the whole object in this way, and even trace off fine details and save new images to map onto the model. You may find UV unwrapping the model and compositing textures externally helpful to get best results.
You can even trace features and save new textures that can be included in the same way. What’s nice is it creates a very simple record you can revisit that sits well as part of your raw photogrammetry photo archive. And of course you can export each UV mapped texture for your final model for archiving and sharing too.
More ZooMS coming when I’m back with the main hard disk and requisite graphics. For now. Note to the wise.
If you’re planning some Near Infra-Red Reflectance Transformation Imaging (NIR RTI), check your balls before you start, not all shiny black spheres are alike. It’s also worth to prepare some background material – the image above/below is actually black velvet.
When preparing for field work, I can whole heartedly recommend not doing this to your macro lens…
some time, quite some time later…
cleaned, re-greased and reassembled.
Nikon 105mm macros lens from ~ 1983.
cleaned with 50:50 ethanol water
greased with TF2 lithium bike grease
take notes and photos
don’t loose screws
More detailed. Sketches to come later.
remove back plate (note spring when replacing)
remove rubber grip
note position of the 3 little screws that are in narrow slots. remove
set f-stop to 2.8 and un-hook/tilt f-stop ring (lift one side – only one will lift)
twist lens round and round and round till it unscrews – try and note the relative positions off all segments at this point.
twist the nose part till this comes out of the big spirally by that was under the grip.
clean lens elements and blower liberrally.
clean spirally bit (helicoid) with different cloth.
paint on grease with artists paint brush
screw the nose back in (starting from the same position as it was just before it came apart)
screw nose into spiral till thread is invisible but before the square bump goes out of view
pier through the back lens to align the metal guide rails (you’ll see them in the back section) line up with hold areas in front.
make sure f-ring is tilted again
twist central spiral section so that it screws into the back, and the nose moves without turning.
slot f-stop ring down and check it moves the aperture
screw it all down to most compact state
put the 3 small screws back where they were and double check your focus
replaces all other bits.
to clean between other lens elements, such as front you need 2 flat head precision screwdrivers and a cross handle (or vice). Well worth it if they are looking foggy.
a project to be de-mothballed
One of the greatest delights of an english summer are the rich and varied plants and blossoms that spring forth from every nook and cranny. Cheif among them are those that can be worked in to some form of culinary delight, be it the humble nettle or the fragrant rose.
Today’s concoction is Honeysuckle Delight – using a honeysuckle infusion as the base for some home made turkish delight.
An early draft of collage combining interesting elements of York running in a section through the whole city and out the other end. Begun in 2012, but on ice ever since.
Of cuts from a picture recently made as a gift – it is the view over one of Copenhagen’s lakes in winter, a layer of ice sits across it, pierced by the feet of geese.
Home made frames for home made photographs.
I have had the good fortune to receive 2 very fine, uk made knives from the skilled and friendly Will Ferraby.
Check him out at http://www.ferrabyknives.co.uk but be ready for a long wait, he’s quite popular!