Skip to content

[pix_n_flix] Developer Documentation

Bryan Loh edited this page Apr 12, 2021 · 6 revisions

Source PixNFlix Module

API documentation for pix_n_flix can be found here.

Introduction

The pix_n_flix module allows Source programmers to process still images and video from a connected camera. A central element of pix_n_flix is the notion of a Filter, a function that is applied to two images: the source Image and the destination Image. We can install a given Filter to be used to transform the Images that the camera captures into images displayed on the output screen by using the function install_filter. The output screen is shown in Source Academy in the tab labeled "Video Display" with a camera tab icon.

Definitions

Object Description
Pixel Uint8Array
A array of length 4 that contains rgba values from 0 to 255.
Image Uint8Array[][]
Two-dimensional array of Pixel.
Filter (source: Uint8Array[][], destination: Uint8Array[][]) => void
A function that takes in the source Image and destination Image and returns nothing.

Implementation

Clone this wiki locally