A simple and inexpensive way to image and analyze subtle surface details on objects.
Hackaday Prize Entries using Atmel parts
Starts May 30th – Ends July 11th This challenge is about expanding the frontiers of knowledge.
Arduino is an open source hardware platform for making interactive objects that can sense and control the physical world.
Starts July 11th – Ends August 22nd / Automate your life. Program a robot to obey your every command.
Top Finishers Throughout the History of the Hackaday Prize
This project was created on 05/29/2016 and last updated a year ago.
Reflectance Transformation Imaging (RTI) creates a computerized virtual lighting model of an objects surface using multiple photos taken at different lighting angles. It reveals subtle surface details difficult or impossible to see without complicated & expensive techniques. Its used in archaeology, paleontology, forensics, numismatics, and any other field where youre interested in seeing enhanced surface details. Custom-made automated systems are available, but cost tens of thousands of dollars. The technique can be done manually, but its tedious and time-consuming. My system is fully automated, and can be put together for less than about $600 (plus camera), making it affordable for schools, museums and individuals.
All plans for building this system will be released under the Open Hardware standard, and these build instructions are licensed under Creative Commons. All software needed to run the system will be released as Open Source, GPL version 2.0.Details
Ever hold an object at an angle to the light, to see subtle details in the surface? Now imagine that technique on steroids, and you have Reflectance Transformation Imaging, RTI for short. Photographs are taken of an object at multiple lighting angles with the camera position fixed. These images are then analyzed and combined in a computer to create a virtual lighting model, where you can arbitrarily set the lighting direction to maximize the visible surface details. Whats more, because the lighting model is in computerized format, it can be mathematically manipulated and changed to further enhance surface details.
The technique wasinvented in 2000 by Tom Malzbender of HP Labs, and originally intended for use in more realistic lighting of 3D graphics; its still used for that purpose under its original name of Polynomial Texture Mapping (PTM). Malzbender quickly realized RTIs applications in imaging subtle variations in surface details, particularly for archaeological artifacts. Since its development, RTIs most famous use has been in helping todecode the Antikythera mechanism, the oldest known computing device. But its also been used for imaging ancient Middle Eastern writing tablets (e.g.Proto-ElamiteCuneiforminscription squeezes, andAramaic);ancient coins; ancient manuscripts (linksonetwothreefour); and many more. There are also other non-archaeological applications, such asforensicsandpaleontology. For more information on the technique and its applications, visit the website of the non-profitCultural Heritage Imaging, where youll also find links to free information and software to aid in the creation of processed RTI data files. A search forRTI on YouTubewill bring up many videos on the technique and its applications.
My original interest in RTI was for use in imaging and analyzing prehistoric lithic artifacts, stone tools like arrowheads and dart points. It is often very difficult to photograph these in a way that shows the obvious details of their manufacture. So difficult, in fact, that its standard practice to use line drawings instead of photographs. I presented a talk on using RTI for imaging lithic artifacts at the 2015 Society For American Archaeology, and Ive put up an extended version of that talk along with associated data filesat this website. Just to quickly show what the technique can do, the images below are of a Clovis spearpoint found in Arizona, dating back about 13,500 years. The first image is a regular photograph, and little to no detail of the spearpoints surface features can be seen. The second image was generated using RTI (plus some extra Photoshop processing), and the surface details are now dramatically clearer.
There are two common techniques for generating sets of photos for use in RTI. The manual technique is called Highlight-RTI, and requires manually moving a light source to different angles relative to an object (at a constant distance), and using a shiny reflective ball to determine the lighting angle (see theCultural Heritage Imaging websitefor more info on this technique). While this non-automated technique doesnt require much in the way of special equipment, its slow and cumbersome, and often requires two people to perform. The other technique, Dome-RTI, involves putting your object under a dome with multiple light sources on the inside, and a camera looking down through a hole at the object. An electronic controller turns lights on and off in sequence, and fires the camera shutter in sync with the lights. Because this technique is commonly fully automated, and because the lighting angles are always the same, obtaining the required photoset is much faster and easier with the Dome-RTI technique.
When I first started working with RTI in late 2012, there were no plans available to build such a dome system, only rough descriptions. There were several institutions (Cultural…
Helper program to speed up processing of RTI photo datasets generated by the RTI-Mage system. This is the new .Net version, replacing the older VB6 version. 32-bit, so should run on all versions of Windows from XP through 10.
x-zip-compressed – 1.92 MB – 03/11/2017 at 21:53
x-zip-compressed – 4.30 MB – 03/01/2017 at 19:09
Build/assembly flow chart for the RTI-Mage system, breaking down the build into modules that can be built concurrently by multiple participants.
svg+xml – 15.74 kB – 12/26/2016 at 05:22
application/x-zip-compressed – 36.72 MB – 12/26/2016 at 05:22
application/x-zip-compressed – 46.58 MB – 12/26/2016 at 05:22
Check the project logs first for info about parts and tools
equivalent. Older non-R3 acceptable.
9-12V DC Power Supply (9V recommended)
equivalent; 2A minimum current capability, Arduino-compatible jack (center-positive, 5.5mm x 2.1mm)
Battery power supply (6 AA alkaline) (optional)
Battery power supply (8 AA NiMH) (optional)
In order to minimize scattered light from the inside of the dome, it needs to be painted a flat/matte black. In the instructions, a flat black spray paint or chalkboard paint is specified, but you will still get some scattered light from both of those. It hasnt been a problem until now, but Ive been doing some RTI on shiny metal surfaces that are doing a great job of picking up scattered light from the dome surface, resulting in odd artifacts. So Ive been poking around for a solution.
Vantablackwould be an ideal solution, as it absorbs up to 99.965% of visible light. However, its not really available in commercial form, and the only paint version of it is dedicated to exclusive use by one artist. That has pissed off a number of other artists, one of whom has created a quasi-clone of it called Black 2.0 that he is offering for sale. Not cheap (150 ml for about $30 including shipping from the UK). Ive just ordered a bottle, and will check out whether its worth the price..
1. Just got back from the Illumination Of Material Culture symposium on RTI at the Metropolitan Museum of Art in NYC. Full house of 115 attendees, lots of great presentations and conversations. Videos of some of the presentations are online at theMets Facebook page.
2. Just posted a slightly-revised version of the RTI Processor software. Discovered that problems might occur if you try to process two sets of data simultaneously with the RTI fitters. Now theres a popup that cautions you against running two sets of data at one. You can always run in batch processing mode to get around this limitation. Source code isnt up for this yet, and I am working on a bigger update that will vastly speed up processing of groups of data, so Ill hold off on updating the source code until then.
3. Jean Roc Morreale, in the IT department for archaeology, Dpartement du Pas-de-Calais, has transferred the build documentation over to aread the docs web page. Looks really nice, and I will probably keep the build instructions as current as possible on both that site and the PDFs on this site, and bail on updating the instructions on the Hackaday website. Hes also translating the instruction to French prefatory to having a system built.
4. The University Of Minnesota has built two domes based on my design, one small and one big. Reports are that it works exactly as intended. Here are a few photos they sent me:
Been very busy recently, but still planning further additions/enhancements to this project. Thats why its not marked as completed. I have just uploaded the source code for the RTI Processor utility that simplifies the job of processing the data (but there will be additional enhancements to that as well shortly).
Since its Christmas today, a small present. Ive broken down the logs section of the PDF build instructions into categorical sections, cleaned them up, and put the new versions up in the Files section. One of the new sections deals with Assembly Logistics, where I break down the assembly into modules that can be done concurrently by multiple people; using this approach, a small group of people should be able to build a system in a weekend of work. Ive also created a flowchart that shows this breakdown; you can see it in the PDF file, Ive uploaded an SVG version of it to the File section, and you can see it below:
Got an email telling me that the RTI Processor program was throwing up an error at startup concerning a bad conversion from string to double. Threw me for a minute, until I realized that the emailer was from France (thanks, Jean-Roc!). The .lps file loaded by the program when it starts has light positions in string decimal format, where the decimal point character is the standard US .. In France, that character is a ,, so the program was labeling that string as unconvertible since it had a non-standard decimal point character. This was easy to fix since the subroutine where that problem arises is no longer needed – deleted that, and the problem went away. Also added a check for the ptmfitter.exe program required to generate PTM-format datafiles; if it doesnt find it, it disables the PTM fitting options, and sends you to the website where you can download the needed files. The new RTI Processor executable program is now up in the Files section; the source code will be up shortly.
Now that Ive completed the basic build documentation for the Hackaday Prize project (with refinement and minor additions to come), I am now the proud owner of one 18 RTI dome with controller, and two 12 RTI domes with advanced stands. This is more than I need, so Im looking to sell the older of my 12 domes. It is identical to the newer dome except for two features:
1. It doesnt have an OLED display on the front.
2. It isnt wired for the servo shutter control I hope to develop. It should be easy to add that capability to it once I have the design down; youd just need to use different output pins and wire it manually.
Neither of these affect the quality of the data you get, so functionally the older dome will give the same results as the newer one.
If youre interested, or have questions, drop me a line at leszekmp at gmail dot com.
Ive polished up and tested the version of the RTI Processor software, and it seems to work fine. So Ive pulled the older version (written in VB6) from the Files section, and replaced it with the newer version. Ive also modified the instructions for calibration and sample runs, but the differences between old and new versions are trivial. Source code isnt up yet – have to clean it up, comment it properly, and may also add some additional features.
Ive also updated some of the PDF files in the Manual zip files, located in the Files section, a process that will continue slowly but continuously. From now on, these will be the primary instructions for building and using the dome, rather than the instructions on the Hackaday project page. I will try to keep the Hackaday instructions updated, but its really cumbersome and difficult to edit those pages, so I cant promise that they will be updated in a timely fashion. Not only will the PDFs always be kept up to date, its far easier to use them as a guide to construction than the online pages.
Took a lot longer than I thought, but the advanced stand instructions are done. Sorry it took so long, but there are a crazy number of pictures (around 60). Youll find it at the bottom of the instructions, but I should have a PDF in the files section shortly.
This design is really only for smaller domes ( 15 in diameter), but allows a number of unique configurations that you cant do with the simple stand. Simple stand is still the only inexpensive and practical option for larger domes, though if you have access to a machine/woodworking shop you could probably come up with some more interesting designs than mine.
Heres a video showing what the advanced stand can do:
Of the short-term plans I wrote up in anearlier log, Ive done two: the Bluetooth HID shutter control, and this stand. Im actively working on a third, cleaning up the instructions, but that will take a while to complete. The servo shutter should be next on the list, but I forgot to list the .Net version of the processing software I wrote, and that will likely be next on the list. Then the servo shutter, then writing up a more detailed description of how to process and analyze RTI imagery. Even though the Hackaday prize contest is over, I will keep updating this project until Ive got everything done that should be here. Stay tuned.
PS Almost forgot – hope to get all the software and documentation up on GitHub in the near future.
Logged about a possible alternate approachto the low-side LED matrix driver, where I use n-channel MOSFETs to switch on the LED, and a single CAT4101 to gate/control the current running through all the n-channel MOSFETs. Seemed to work fine at low to moderate currents, so I thought Id prototype the low-side driver board using this design (cheaper than my original, and easier to work with). Before I did, I thought I should probably check it on a breadboard at the maximum current of 1A. Well, it doesnt get to 1 A; the best I could do was 0.8A, which is probably OK for most applications, but I still want full power. I suspect that theres some issue with the I-V characteristic of the MOSFET thats causing the current to saturate prematurely at a lower level. I may revisit this at some point in the future, but for now, the low-side driver board design will stay fixed with 8 CAT4101s both switching the LEDs in the matrix rows and controlling the current.
Back from the Superconference. Im a reasonably smart guy, but being in the company of those attendees made me feel totally inadequate – a massive amount of brainpower and expertise on display, but in the friendliest and most self-effacing of ways. Glad I went.
Given the competition, I was blown away by winning second place. My thanks to the judges for evaluating my project so highly, and to the entire Hackaday staff for running the competition and Superconference.
My second-place award was announced by Dr. Christal Gordon, who made a useful suggestion to me. The target audience for my gizmo includes museums and schools that may not have the making expertise required to build one of these, even with my OCDishly-comprehensive instructions. She suggested that a local group of makers could help these institutions out by getting together over a weekend, and cooperatively building such a system. One of my project logs discusses this very briefly, but Ill be adding a more comprehensive breakdown/flowchart of how a system could be assembled quickly by a group of makers by parallelizing the build.
Even though Ive won a prize, this project isnt done yet. I still have some loose odds and ends to complete, and the documentation needs to be assembled into a coherent manual for assembly. I have some longer-term plans as well, but still have to figure out how to do them. Stay tuned for more. And if youre building a system, please let me know, and dont hesitate to contact me if you need help or advice.
Note: Ive started converting these instructions into PDF format, and uploading them to my project Files section. These will ultimately be combined into a single large PDF file that will serve as a full manual for building and operating the system. The manual will be kept fully up to date; I will try to propagate updates to these instructions, but cant guarantee how frequently this will happen. And, these instructions are huge, and take a long time to appear in your browser. So, I strongly urge you to use the PDF files as your guide for building a system.
Addendum: Jean Roc Morreale has created aRead the Docs pagethat incorporates these instructions. Looks really nice, and I expect Ill try to keep both that site and the PDFs up to date at the expense of these instructions at Hackaday. Youve been warned.
These instructions are going to be excessively, even painfully detailed, especially if youre an experienced maker. Apologies for that upfront. A lot of the people who would benefit from using this system arent necessarily makers (archaeologists, paleontologists, numismatists, museums), and Im hoping that by making the assembly process as clear as possible, theyll be more likely to make one of these gizmos.
Quick note: Clicking on any picture will open it full-screen in browser; if theres a magnifying glass for a cursor, clicking will zoom to full resolution.
This first section will deal with prepping the dome for installing the LED lights on the inside. This boils down to two operations:
1. Marking the positions where the LEDs will be mounted on the inside, so that theyll still be visible after you paint the inside of the dome.
2. Painting the inside of the dome matte/flat black, to minimize scattered light.
By now, youve hopefully read the two project logs (onetwo) on how to select a dome, have ordered it, and now have it sitting before you, like this one:
(Note: not exactly like this one – Ive already marked the LED positions and painted the inside. But Ill use it as a model for this section.)
When construction is completed, and all the LEDs installed, the inside of the dome will look something like one of these:
The LEDs are mounted in rows with shifted columns, with even/odd rows lining up; this is to maximize the variation in angular position. The 12 dome has 48 LEDs in 6 rows/8 columns, while the 18 dome has the maximum of 64 LEDs, 8 rows and 8 columns. 8 rows and 8 columns are the maximum, but you can have fewer than those. Its even OK to have rows with varying numbers of columns, but I dont recommend it – it makes wiring the system and managing the software a real pain. Plus, you want to have the LEDs spaced uniformly in angle for best results, and that can be tricky with varying column counts. So the first thing to do is figure out where the LEDs will need to be mounted inside the dome, and mark those positions. Its best to do this before you paint the inside of the dome black.
Before proceeding, a quick comment about accuracy. While getting the rows and columns laid out evenly will make assembly easier, you shouldnt get too obsessive about accuracy, as small errors wont make that big a difference in the results you get from the system. While the software needs to know the positions of the lights in order to do its calculations, it gets those positions from a calibration file thats generated from the actual light positions. So even if one or more lights are a bit out of line with others in their row or column, it wont make a significant difference in the results, since the calibration file will take that into account.
Part A. Determine and mark the angular positions of the columns.
1. To find the angular spacing, just divide the number of columns into 360 degrees. So for 8 columns, the spacing would be 45 degrees; 60 degrees for 6. I wouldnt use fewer than 6 columns, and 8 is preferable to 6.
2. Place the dome on a sheet of paper large enough to allow you to trace a circle around the edge of the dome flange, then trace the circle.
3. Find the center of the circle youve just drawn. There are several methods you can use (ask Google), butthis oneis probably the simplest and cleverest.
4. Erase all the lines youve drawn except one, which youll use as a reference. Using a protractor, and the reference line, mark the angles at the spacings you determined in A.1, i.e. 45 degrees or 60 degrees; 45 degrees for the picture below.
5. Draw lines through these marks extending out to the edges of the circle; make an accentuating mark (x, dot, whatever) where the line and circle intersect.
6. Draw one additional mark halfway between two of the accentuating marks. You can determine the position by eyeball, or more accurately with a protractor used to bisect one of the angles (e.g. 22.5 degrees for a 45 degree spacing as it is in this example, 30 degrees for a 60 degree spacing). Differentiate it clearly from the other marks. The reason for this mark will become clear shortly.
7. Place the dome back on the paper so that it is centered inside the traced circle. Mark the flange clearly at every position where the angle lines intersected the circle. You may find it tough to find something that can temporarily mark acrylic plastic. Sharpies work, and the mark can be removed by rubbing with a paper towel soaked in WD-40; other solvents may work, but test them first to make sure they dont dissolve the plastic.
8. Now take the dome and rotate it in the traced circle until one of the initial marks lines up with the mark created in step A.6. Repeat the process of marking the dome flange at all the positions where the angle lines intersected the circle; try and differentiate this mark somehow from the first set (different color, put a slash through it, etc.). You have now marked the angular positions for all the columns. Half the rows will have their LED columns lined up with the first set of marks, the other half will be lined up with the second set of marks.
Step B. Determine the heights of the rows, and mark the LED positions on the dome.
1. Using standard RTI guidelines, the lowest angle the LEDs should be mounted is at 15 degrees above the plane of the ground; below this lighting angle, the object youre photographing may be too dim. The highest angle should be somewhere around 65-75 degrees; above this, the object may be too bright. With your desired top and bottom angles, the number of LED rows youll be installing, and the size of the dome, you can figure out the proper spacing on the rows.
Example 1: My big dome (18 dome diameter, 8 rows of 8 LEDs, 16 through 72 degrees). With 8 rows, there will be 7 angular gaps between the rows (8-1). The total angular distance between the low and high rows will be 72-16=56 degrees. The angular distance between individual rows will be 56/7=8 degrees. So there will be rows at the following angular positions (where bottom = 0 degrees):
To figure out the true arc distance up the side of the dome these angles correspond to, divide the angle by 90, then multiply by 1/4 the circumference of the dome. For an 18 diameter, the circumference is 18 x pi, or about 56.4; 1/4 of that is 14.1. Divide the table above by 90 and multiply by 14.1, and you get (after rounding):
So these are the row distances above the base of the dome/flange junction. But the columns in adjacent rows will be shifted by half the angular spacing, so you should group the heights into two staggered sets of rows (each set has LED columns aligned with each other):
Example 2: The small dome (12 dome diameter (the size of the dome Im building here), 6 rows of 8 LEDs, 15 through 65 degrees).
Angular distance between high&low = 65 – 15 = 50.
Angular distance between individual rows = High&Low / ( rows -1) = 50 / (6-1) = 10 degrees between rows.
Row angles = 15, 25, 35, 45, 55, 65.
1/4 circumference = 12 x pi/4 = 9.4
Row distances (from bottom) = 1.6, 2.6, 3.7, 4.7, 5.7, 6.8
Row distances paired by column alignment = 1.6, 3.7, 5.7 and 2.6, 4.7, 6.8
If this isnt 100% clear, just keep reading – hopefully after you see the actual marking operation, youll understand.
2. Now you need some way to mark these distances on the dome. Take a piece of string, make one mark on it to indicate the zero reference point, and then measure and mark positions for the first set of row distances on that piece of string (1.6, 3.7, 5.7 in this case). Create a similar second string for the other set of row distances (2.6, 4.7, 6.8). Taping the ends of the strings down while marking them helps keep them straight.
Marking sets of distances on two string segments. The long marks at left mark the zero point on the right edge of the mark. These are distances for the 12 dome, Example 2.
3. Tape the first string to the dome at the base with the flange at one of the marked angles, so that the zero distance mark is at that base. Tape or hold the other end of the string on the top edge of the hole, making the string as perpendicular to the base as you can. Make marks on the dome next to the marks on the string. Repeat this for all matching marks with the same angular spacing as in A.1.
4. Repeat step B.3 with the second piece of string, on the other set of marked angles (the ones offset by half the spacing of the first set; these should lie exactly halfway between the first set of marks you made).
And this is how the dome should look when youre done when viewed from above:
Step C. Transfer the marked positions to the interior of the dome.
The marks on the outside of the dome correspond to the positions of the LEDs on the inside of the dome. Thing is, youre about to paint the inside of the dome black, which will make it difficult to figure out what the corresponding position is. So, before you paint the dome, youll need to put some kind of mark on the inside that will remain visible even after you paint it. There are several options:
a. Put a blob of paint or nail polish on the inside of the dome at the same position as the mark on the other side.
b. Drill or scratch a small dimple at the same position as the mark on the other side. Be careful with this approach – I used an electric drill with the dome picture above, and came close to punching through the dome in several spots. Do it by hand and you should be OK.
c. Put a tiny piece of masking tape in the matching position, and peel it off after youve painted the inside.
By the way, this is why I recommend either a clear or white dome; both of those make it easy to see where the marks are on the outside of the dome when youre looking at the inside. A dark-colored dome makes this a lot tougher.
Once youve marked the interior positions, you can remove all the marks from the outside, including the flange marks. If you use WD-40, take care not to get any on the inside of the dome.
Step D. Paint the inside of the dome.
To minimize scattered light, the inside of the dome should be painted flat/matte black. Simplest (and probably best) way to do this is with spray paint. Use a brand specifically labeled as being appropriate for plastic, with the color marked as flat black or matte black to minimize reflections. Avoid satin or glossy finishes. My preferred brand isRustoleum Flat Black Ultra Cover Paint + Primer; Krylon will work, but seems to require more coats.
1. Make sure interior of dome is clean and dust-free; use soap and water if necessary, then dry completely. Instructions suggest lightly sanding the inside, but thats not really necessary for this application, as long as the surface is clean.
2. Cover the outside of dome with masking tape to protect it from stray spray paint. Pay special attention to the hole at the top, as thats the most likely place for paint to leak through.
3. Follow instructions on paint can. Apply paint to inside of dome in stea