Skip to content
Jeffrey Deng

Projects

Sample project two

2024 · CV · Web

Sample project two, image 1 of 2
Sample project two, image 2 of 2

Overview#

Placeholder body for a browser-side project. The gallery above shows the two sample images this entry references.

Interface#

  • Camera frames are processed on the device.
  • Results render into a canvas overlay.
export function toGrayscale(pixels: Uint8ClampedArray): Uint8ClampedArray {
  for (let i = 0; i < pixels.length; i += 4) {
    const value =
      0.299 * pixels[i] + 0.587 * pixels[i + 1] + 0.114 * pixels[i + 2];
    pixels[i] = pixels[i + 1] = pixels[i + 2] = value;
  }
  return pixels;
}

Warning

The demo link points at a placeholder address. Replace it with a real one.

Back to projects