Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b36fe569ca
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (18 sloc) 0.528 kB
#! /usr/bin/env racket
#lang racket/base
(require rackunit "16-computer-vision-1.rkt")
(define image-0
'((255 7 3 5)
(212 240 4 5)
(218 216 230 5)))
(define vertical-edge-kernel '((-1 1)))
(check-equal? (image-width image-0)
4)
(check-equal? (image-height image-0)
3)
(check-equal? (image-pixel-value image-0 0 1)
212)
(check-equal? (convolve image-0 vertical-edge-kernel)
'((-248 -4 2)
( 28 -236 1)
(-2 14 -225)))
Jump to Line
Something went wrong with that request. Please try again.