Raspberry Pi Camera Comparison

I use a number of Raspberry Pi 3 Model B ARM-based Linux computers to help simplify my day-to-day life. Because I live in an urban area, I have been interested in setting up a security camera that could alert me to any issues that might arise when I’m not in the house. Most recent Raspberry Pis also include a CSI connector, meaning that it is easy to connect a high-resolution camera that can be easily accessed via python or via bash. This would also be helpful for any other computer vision setup, including OctoPrint. Since the Raspberry Pi runs OpenCV, I can use open source computer vision source code to quick and easily setup a security system. The first step is selecting a camera.

I plan on using a Raspberry Pi 3 or Raspberry Pi Zero v1.3 (with camera connector) as the base machine. However, there are a number of 3rd party cameras available. As is often the case, I was not able to find a comparison of the options available online, so today I am going to do a quick and dirty look at the following cameras:

Model Chipset Megapixels Advertised FOV
Raspberry Pi Camera OV5647 5MP 54° (h) x 41° (v)
Raspberry Pi v2 Camera IMX219 8MP 62.2° (h) x 48.8° (v)
Arducam 5MP RPi Camera OV5647 5MP 54° (h) x 41° (v)
Waveshare RPi Camera (I) OV5647 5MP 170°
Waveshare RPi Camera (J) OV5647 5MP 222°
Waveshare RPi Camera IR-CUT OV5647 5MP 75.7°

In this post, I provide some demonstration photos for outdoor, indoor, and low-light scenarios for the modules.

Read More

Replacing Battery in Apple MacBook Pro Retina (Late 2012)

The battery on my Late 2012 Apple MacBook Pro Retina is garbage. It holds a charge for no more than 20 minutes, completely dies at approximately 50% reported battery charge remaining, and the menu has an exclamation point noting that I need to service my battery. Admittedly, this is after over four years of continuous usage for my research and studies and I’ve downplayed the warnings for almost a year now. I have avoided replacing the battery because I was nowhere near the maximum number of cycles that Apple claims I should be able to reach before the battery is considered “consumed” (~600 charge cycles vs. Apple’s stated max. of 1000). But I could not stand the fact that I can’t use my laptop without a power cable and none of the fixes suggested online were working (e.g., resetting the SMC). So, it was time to replace the battery.

Read More

Upgrading SSD in Apple MacBook Pro Retina (Late 2012)

For some time now, I have hit the storage limit on the 256GB SSD in my Late 2012 Apple MacBook Pro Retina. I’ve needed to move a significant chunk of data to external drives, which impedes access and frankly is a pain in the butt. I’ve considered a number of methods to upgrade the SSD, but Apple decided to use a proprietary connector for the SSD (rather than using the mSATA or, more recently, the M.2 standards), which has made upgrading more difficult/expensive than it should be. However, even though there were a few minor roadblocks, I ended up successfully upgrading the SSD using a combination of 3rd party modules. Since I could not find anecdotal reports of similar upgrades, I wanted to throw mine out into the ether.
Read More

Backpack and Canon T3i lost/stolen in Frankfurt (Main) Hauptbahnhof

I had a red and black The North Face backpack/Rucksack taken from a train in Frankfurt, Germany this past Monday, so I’m posting this online with the hope, however remote, to contact the individual(s) who removed the bag from the train and to see if they can contact me to return it. It contained my DSLR camera, lenses, and a number of personal keepsakes that have really hurt to lose.

Lost/Stolen The North Face Hot Shot Backpack

Here is a short run-down of what happened: On Monday, December 29th, 2014, I went down to the Frankfurt central train station (Hauptbahnhof) with my wife and friends to go ice skating at the Eissporthalle Frankfurt. We took a Deutsche Bahn (DB) train from Giessen, Germany to Frankfurt, Germany, departing at 3:22 PM and
 arriving at 4:02 PM. At the beginning of the trip, I placed my backpack on the 
luggage rack above the seat. About 10 minutes after exiting the train, after having taken an S-Bahn train to Hauptwache, I realized I did not have my bag. I immediately took another S-Bahn back to Frankfurt Hbf, ran up to the train platform, and found my train still waiting at the track (total time from departing the train to returning was approximately 20 minutes). I quickly searched the train because it was about to leave to head northward, but the backpack was gone.

I immediately notified the DB lost property office (Fundbüro) and made a 
claim. I also notified the police but will need to wait 1 week before I can officially file a police report (which I plan on doing on Monday if the bag has not been found).

Unfortunately, I don’t know how much identifying information was in the backpack (it did not contain any IDs), but in the future, I will make sure to include contact information on the camera to help the person who finds my things to reach out to me, if this were to ever happen again.

Read More

HTML to Markdown Converter

I am moving my blog post formatting code over to Markdown and found an incredibly useful HTML to Markdown converter by Dom Christie. It allows me to take HTML, for example:

<h2>;A great list of websites:</h2>
<ul>
<li><a href = "https://www.semifluid.com">Semifluid.com</a></li>
<li><a href = "https://uni-giessen.academia.edu/StevenACholewiak">Steven Cholewiak's Academia.edu profile</a></li>
<li><a href = "https://www.researchgate.net/profile/Steven_Cholewiak">Steven Cholewiak's ResearchGate.com profile</a></li>
</ul>

And easily convert it to markdown:

## A great list of websites:

*   [Semifluid.com](https://www.semifluid.com)
*   [Steven Cholewiak's Academia.edu profile](https://uni-giessen.academia.edu/StevenACholewiak)
*   [Steven Cholewiak's ResearchGate.com profile](https://www.researchgate.net/profile/Steven_Cholewiak)

The code can be found on GitHub at to-markdown and Dom has a live demo available too.

Magic Lantern HDR video to tonemapped video with MATLAB scripts

I have a Canon T3i with a Canon EF 50mm f1.4 lens that I use for the gross majority of my day-to-day photography these days. I’ve been using a custom firmware for the Canon called Magic Lantern that provides a some interesting (and useful!) functions. One of them is HDR video. Here’s a beautiful example of what can be done:

I tried my hand at processing the HDR video output and was able to get a reasonably nice tone-mapped video:

After the break, you’ll find how I processed the initial Magic Lantern video using MATLAB and exiftool and tone-mapped the output using Luminance HDR.

Read More