Tuesday 22 October 2013

Image Processing: Why You Should Normalize Your Images


1. Normalizing Homographies
A homography represents a transformation between coordinates. But the actual values that go into this homography can be arbitrarily large and small. The reason to normalize here is to more accurately represent large numbers or numbers close to 0, due to computer system limitations on floats and propagation of precision errors.


2. Normalize Images
Normalizing images from their byte representations to a value between 0 and 1 is for convenience, in order to get a better estimate of the pixel intensity. We have better intuition towards a value that can be represented as a percentage (0 to 1) vs. a pixel value (0 to 255).


Source: Karanhaar

Monday 21 October 2013

Writing: Understanding the Importance of Thesis Statements

The thesis statement is important - when readers don't have much time, they'll only read the first line of a paragraph, or even the paper, before deciding whether the rest of it is worth their time (harsh but true reality, you probably do it too). So lead with something strong. At the same time, the second most important location is the end of the paragraph. So end strong as well.

During my fellowship essay review, I kept getting asked "what is the most important part of this paragraph?" and laughed to myself as each time it was embedded somewhere within the paragraph. Julia would tell me to listen as she read the paragraph and tell me to stop her when I got to my main point. Embarassingly enough, it was never at the beginning. If teachers back in middle/high school revised my essay like this, I think it would have been better ingrained in my head how to structure my essays. Although maybe embarrassment isn't the best strategy.

Depends on the audience of course, for something like this, an anecdote, I don't need to pay attention to such rules.


Source: Dr. Julia Deems

Sunday 20 October 2013

Programming: Debugging Tips


  • Visualize concepts when possible. 
    • Helps to understand where the information is going and what is happening
  • Modular code to easily understand the separate parts. 
    • Break things into smaller functions, assign a single task to each function.
  • Clear variable names, especially loop variables. 
    • Example: Instead of i,j for a matrix, use iRow, jCol
    • Now you at least have some sort of idea what each loop variable is.
  • Unit Testing
    • Modular code allows you to test each code component separately in order to ensure that the behavior of each function is what you expect.

For more tips like these, see 'Clean Code'. 
http://it-ebooks.info/book/1441/

Book recommendation and discussion via Karanhaar.