Processing a Text File in Perl

Loading a text, processing the contents, and outputting a processed verssion of the file is a common task in Perl.

Sometimes it's light processing: rearrange the order of parts of each line. Sometime's it's heavier processing: collect a bunch of statistical data from the file and output a summary of the data with averages, mins, maxes, etc. In either case the following template is a handy starting point that shows the loading, some light processing, and writing the results to the output file. 

Creating aliases in the Cygwin Bash terminal

If you work in a Cygwin Bash or other Linux terminal regularly, it's handy to have short hand for certain commands you execute a lot. E.g. you can navigate to the path "C:/cygwin64/lib/perl5/vendor_perl/5.26/x86_64-cygwin-threads/Text"  by typing cd followed by that entire path. But what if you need to do that 100 times a day, or just keep forgetting the full path? Wouldn't a shorthand for that be great? 

Fast High Dynamic Range Image Deghosting for Arbitrary Scene Motion

High Dynamic Range (HDR) images of real world scenes often suffer from ghosting artifacts caused by motion in the scene. We address ghosting by performing change detection on exposure-normalized images, then reducing the contribution of moving objects to the final composite on a frame-by-frame basis. Change detection is computationally advantagous and it can be applied to images exhibiting varied ghosting artifacts. We increase the stability of our approach by using recent superpixel segmentation techniques to enhance the change detection. Our solution includes a novel approach for areas that see motion throughout the capture, e.g., foliage blowing in the wind.

LaTeX: List of Notations (Nomenclature)

Update for MikTeX 2.9 below.

 

I've been working on my thesis for a couple of months now, and frequently I have to look up ways to tweak certain Latex components, so I'm going to start posting about these tweaks, even if it's just to link to another page about how to do something. If I end up having a good collection at the end of my thesis, then I can write a final post aggregating them in a logical order so they can serve as a guide to formatting a thesis in Latex.

 

I'm using TeXnic Center (TXC) 2 Alpha 3 to edit and MikTeX to build. I originally installed both using ProTeXt which packages TXC1, MikTeX, Ghostscript, and Ghostgum. I later installed TXC2 which provides a much-needed overhaul to the interface so that toolbars don't shift all over the place whenever you resize the window.

Pixel Format Conversions

I recently found myself having to do a few interesting conversions in C++ to pass images between different formats and/ or libraries, including OpenCV, MATLAB, and some unusual custom formats. I'm going to post some code snippets here that do some of these conversions as I suspect they may be useful for others.

 

Keep in mind that, generally, image data is always stored in one long array, and you have a pointer to the beginning of that array. So, the question is, as you increment your way through the array contents, in what order are you traversing the image's data? E.g. are the first three elements the RGB values of the first pixel in the top left corner of the image? Or are they the R components of the first three pixels moving right along the top row of the image? Or something else entirely?

 

Debugging Blue Screen of Death (BSOD) problems

The dreaded Blue Screen of Death (BSOD) has existed at least as long as Windows, and baffles even fairly advanced computer users. It is usually triggered by low-level errors in the CPU, which in turn are usually caused by driver problems (e.g. illegal pointer references and such) or hardware problems (e.g. deffective RAM or CPU overheating). Usually the errors listed are not very descriptive, just one of the problems in actually making use of them. Whenever I've begun experience frequent BSODs, I've always just formatted my computer and reinstalled Windows, thinking that whatever is happening is probably a software or driver issue so obscure I'd never track it down. However, during the most recent outburst of BSODs on my new laptop (a 10 month old Dell), I decided to take a serious crack at analyzing the BSOD details.

 

Blue Screen of Death

 

Media Attention for University of Ottawa Image-Based Rendering Project

For my Master's research, I'm part of a research team of about 12 students and post-docs, as well as three professors at the University of Ottawa who are working on an NSERC Strategic Project entitled "High-quality acquisition and rendering of image-based models for tele-presence in remote environments." This project received some media attention over the past year, long before I got my site online, so I'm sharing it just a little late.

 

CBC Spark Interview

The project was featured in CBC Radio's program Spark. Meg Wilcox interviewed myself and several other members of the team about our work on the project. You can listen to the full interview (about 10 minutes) here. My portion is towards the end, and I talk about High Dynamic Range Imaging and the "So What?" of my work, i.e. what does it do for the end user.

 

Ottawa professors look to take Google's Street View to the next level

Back in June, the project was featured in the Ottawa Citizen, and several professors and a post-doc student from the project were interviewed. This was story also ran in the National Post and on Canada.com.

 

Floating Point Images in OpenCV

Working with Floating Point images in OpenCV can be tricky, especially if you've so far only worked with 8-bit (uchar) images. In this tutorial, I'll describe how to create a floating point image, how to access and modify it, and how to save it to or load it from disk.

 

There are many scenarios where we might wish to work with floating point pixel values. In my case, I'm working on High Dynamic Range Imaging which inherently deals with floats rather than integer values. A more common scenario is that you want to apply a series of operations to an image in a processing pipeline, and you'd like to maintain high precision throughout, then clamp the values at the end and round to integers. In that case you could take an 8-bit image at the beginning, convert it to 32-bit floats, perform all your operations on it, then convert back to 8-bit at the end so you only have one instance of integer rounding error.