<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Type-Safe Computer Vision</title>
  <subtitle>Computer vision bugs that are type bugs, and how a type system makes them unrepresentable.</subtitle>
  <id>https://karhunen-loeve.github.io/</id>
  <link rel="alternate" type="text/html" href="https://karhunen-loeve.github.io/"/>
  <link rel="self" type="application/atom+xml" href="https://karhunen-loeve.github.io/feed.xml"/>
  <updated>2026-09-21T12:00:00Z</updated>
  <author>
    <name>Thomas Stephan</name>
    <uri>https://github.com/karhunen-loeve</uri>
  </author>
  <rights>© 2026 Thomas Stephan</rights>

  <entry>
    <title>The Blue Face Bug</title>
    <id>https://karhunen-loeve.github.io/01-rgb-bgr-the-blue-face-bug.html</id>
    <link rel="alternate" type="text/html" href="https://karhunen-loeve.github.io/01-rgb-bgr-the-blue-face-bug.html"/>
    <published>2026-09-11T12:00:00Z</published>
    <updated>2026-09-11T12:00:00Z</updated>
    <category term="computer-vision"/>
    <category term="rust"/>
    <summary type="text">Three bytes in memory do not say which channel comes first. Read as RGB they are a warm skin tone; read as BGR they are ice-blue. A blue face on screen is a funny bug; a blue face inside a tensor is a silent one. Why RGB/BGR confusion is a type bug, and what it looks like when the compiler catches it.</summary>
  </entry>

  <entry>
    <title>128 Is Not the Middle</title>
    <id>https://karhunen-loeve.github.io/02-gamma-blind-interpolation.html</id>
    <link rel="alternate" type="text/html" href="https://karhunen-loeve.github.io/02-gamma-blind-interpolation.html"/>
    <published>2026-09-11T12:00:00Z</published>
    <updated>2026-09-11T12:00:00Z</updated>
    <category term="computer-vision"/>
    <category term="rust"/>
    <summary type="text">Average a black pixel and a white pixel. You wrote (0 + 255) / 2 and got 128, but 128 carries only about 22% of the light, so the answer is visibly wrong. The correct value is 188. Gamma-encoded pixels break every naive resize, blur, and blend, and the fix belongs in the type system.</summary>
  </entry>

  <entry>
    <title>Climbing the Pyramid</title>
    <id>https://karhunen-loeve.github.io/03-pyramids-and-scale-space.html</id>
    <link rel="alternate" type="text/html" href="https://karhunen-loeve.github.io/03-pyramids-and-scale-space.html"/>
    <published>2026-09-21T12:00:00Z</published>
    <updated>2026-09-21T12:00:00Z</updated>
    <category term="computer-vision"/>
    <category term="rust"/>
    <summary type="text">To find an object at any size you shrink the image until the object fits your detector. Beautiful theory, and in practice a staircase of traps: odd sizes that stop round-tripping, two different things both called "scale", and coordinates that drift half a pixel per level.</summary>
  </entry>

</feed>
