Matthew Petroff https://mpetroff.net mpetroff.net Sat, 30 Jun 2018 20:58:47 +0000 en-US hourly 1 Geysers del Tatio https://mpetroff.net/2018/06/geysers-del-tatio/ https://mpetroff.net/2018/06/geysers-del-tatio/#respond Sat, 30 Jun 2018 20:58:47 +0000 https://mpetroff.net/?p=2659 Continue reading ]]> I recently returned from a couple months working in Chile. While there, I finally made it out to see the El Tatio geyser field, which is the third largest geyser field in the world. The geysers are around an 80 km, hour and a quarter drive north of San Pedro de Atacama and are normally seen just before sunrise. Some photos I took are below.

Geyser Field

Geyser

Geyser Field

Geyser Field

Geyser Field

Geyser Field

]]>
https://mpetroff.net/2018/06/geysers-del-tatio/feed/ 0
Photogrammetry Targets https://mpetroff.net/2018/05/photogrammetry-targets/ https://mpetroff.net/2018/05/photogrammetry-targets/#respond Sat, 26 May 2018 21:53:08 +0000 https://mpetroff.net/?p=2638 Continue reading ]]> The Scanreference photogrammetry system includes 149 magnetic coded targets and PDFs for printing 192 more targets. However, while measuring something that isn’t ferromagnetic, the magnetic targets aren’t particularly helpful, and the 192 printable coded targets aren’t always enough. Unfortunately, AICON wouldn’t provide the full set of printable coded targets when I asked and instead tried to sell me a multi-thousand dollar software package for generating printable coded targets. Instead, I looked in the literature and found multiple references to a 1991 paper1 as the original publication about the ring code targets. Unfortunately, the paper is not available electronically, so I had to request a copy via interlibrary loan; I received a copy just to find out that it didn’t include any technical details on the targets.

Fortunately, further research turned up expired German patent DE19733466A1. The patent contains all of the details needed to generate the ring codes for the coded targets, except for the exact parameters and numbering scheme used for the Scanreference targets. This missing information was fairly straightforward to figure out—the targets are 14-bit with no restrictions on the number of transitions from black segments to white segments and are ordered by increasing binary value. With this information, I was then able to write a script to generate the ring codes and a script to generate a set of printable targets, resulting in a PDF with all 516 targets ready to print on stickers.


  1. Schneider, C. T. “3-D Vermessung von Oberflächen und Bauteilen durch Photogrammetrie und Bildverarbeitung.” Proc. IDENT/VISION 91 (1991): 14-17.  

]]>
https://mpetroff.net/2018/05/photogrammetry-targets/feed/ 0
Color Cycle Picker https://mpetroff.net/2018/03/color-cycle-picker/ https://mpetroff.net/2018/03/color-cycle-picker/#respond Sat, 31 Mar 2018 01:36:29 +0000 https://mpetroff.net/?p=2610 Continue reading ]]> The “category10” color palette, originally developed by Tableau, was adopted as the default color cycle for Matplotlib 2.0 and is also used by default by D3.js and Vega, along with other software packages. While more aesthetically pleasing than the old Matplotlib default, it is unfortunately not colorblind-friendly.1 In an effort to improve this and promote the development of colorblind-friendly color cycles for scientific visualization, I built a color cycle picker that incorporates color vision deficiency simulation and enforces a minimum perceptual distance between colors, for both normal and anomalous trichromats. This is accomplished by performing color vision deficiency simulations2 for various types of deficiencies and enforcing a minimum perceptual difference for the simulated colors using the CAM02-UCS3 perceptually uniform color space (each type of deficiency is treated separately). Additionally, a minimum lightness distance is enforced, for better grayscale printability. The tool allows colors to be picked from a visualization of the CAM02-UCS color gamut and assembled into a color cycle. This visualization is performed using hardware-accelerated WebGL to allow for real-time interactive adjustment of parameters; the resulting palette is also visualized. The minimum perceptual color distance, lightness distance, and color vision deficiency simulation parameters are all adjustable. A hosted copy is provided, and the code is available in a repository on GitHub.

Color Cycle Picker Screenshot


  1. Personally, I have difficulty telling the second and third colors apart.  

  2. G. M. Machado, M. M. Oliveira and L. A. F. Fernandes, “A Physiologically-based Model for Simulation of Color Vision Deficiency,” in IEEE Transactions on Visualization and Computer Graphics, vol. 15, no. 6, pp. 1291-1298, Nov.-Dec. 2009. doi:10.1109/TVCG.2009.113  

  3. Luo M.R., Li C. (2013) CIECAM02 and Its Recent Developments. In: Fernandez-Maloigne C. (eds) Advanced Color Image Processing and Analysis. Springer, New York, NY. doi:10.1007/978-1-4419-6190-7_2  

]]>
https://mpetroff.net/2018/03/color-cycle-picker/feed/ 0
Pannellum 2.4 https://mpetroff.net/2018/01/pannellum-2-4/ https://mpetroff.net/2018/01/pannellum-2-4/#comments Wed, 31 Jan 2018 21:14:03 +0000 https://mpetroff.net/?p=2597 Continue reading ]]> Yesterday, I released Pannellum 2.4.0. It doesn’t contain any major new features, although it does finally include translation support, which was an often requested feature. Also included are numerous minor improvements, a few new API functions, and quite a few bug fixes; see the changelog for full details. It had been more than a year since the last release—and I’ve been meaning to create a new release for a few months—so it was high time for a new release.

]]>
https://mpetroff.net/2018/01/pannellum-2-4/feed/ 10
Amazon Echo Button Teardown https://mpetroff.net/2017/12/amazon-echo-button-teardown/ https://mpetroff.net/2017/12/amazon-echo-button-teardown/#comments Sun, 31 Dec 2017 21:18:50 +0000 https://mpetroff.net/?p=2561 Continue reading ]]> Amazon recently released the Echo Button, a Bluetooth Low Energy device designed for use with Echo devices (which I don’t own). Although it uses Bluetooth instead of Wi-Fi, I thought it might be a better device to repurpose than the Dash Button, due to its larger size and easily replaceable battery. Thus, I bought one to take apart.

Echo Button outside

Amazon seemed really worried about the batteries falling out, since the battery door is held shut with both a plastic tab and one Phillips #1 screw. Underneath one of the two AAA batteries is a row of exposed test points. Four other Phillips #1 screws are hidden beneath the device’s rubber feet; removing these allows the device to be opened.1

With battery door open

Once opened, there are two parts—a top half with the large button, and a bottom half with the PCB and batteries.

Halves separated

The top half consists of three plastic parts, three button contacts, and four springs.

Top half parts

The bottom half consists of one plastic piece, with the battery compartment, and the PCB, secured with two more Phillips screws.

Bottom half parts

The device can be easily disassembled and reassembled with standard tools and without damaging it.

All parts

The PCB is fairly spartan, consisting of a combined microcontroller / Bluetooth Low Energy SoC, three RGB LEDs,2 a trace antenna, and supporting components. For easy hackability, there’s a Tag-Connect SWD footprint, as well as a U.FL antenna connector and numerous cuttable traces / solder jumpers. The SoC is a Cypress CYW20735 “single-chip Bluetooth transceiver for wireless input devices.” There appear to be freely available development tools for it.

PCB top

The bottom of the PCB includes a set of test points, some of which are accessible from within the battery compartment. In particular, the SWD header is accessible via these test points with the following mapping:

 TMF2: SWDIO
 TMF9: SWCLK
TMF10: GND
TMF11: RESET
TMF12: VCC
TMF22: SWO

PCB bottom

As far as software goes, the device broadcasts as a Bluetooth Low Energy gamepad with ID EchoBtn2V8.3 I was able to successfully pair it to a computer, but I have not yet tried to use it as an input device. I have also not yet tried to connect a debugger to the SoC.


  1. There’s no glue or ultrasonic welding. 

  2. There’s also a fourth, unpopulated footprint. 

  3. The last three characters might be specific to my device. 

]]>
https://mpetroff.net/2017/12/amazon-echo-button-teardown/feed/ 4