teaching machines

CS 491 Lecture 21 – Bluecheckers

Agenda explore GLSurfaceView hook GLSurfaceView.Renderer callbacks up to our C++ renderer incorporate UI events 3-D on Android Android offers a special GLSurfaceView for fast rendering. It also provides Java bindings for the OpenGL library. This added layer can reduce performance, so ultimately we’re going to want to use our low-level C++ code to do all […]

Timing Android voice recognition

I was curious whether the EXTRA_MAX_RESULTS value affected the time it takes to get voice recognition results back to an Android device, so I ran a couple of quick tests. In the first, I spoke the phrase “Binky the ball bounced away” a few times each for different EXTRA_MAX_RESULTS settings. I tried 1, 5, 20, […]

CS 491 Lecture 20 – OpenGL ES

Agenda discuss the OpenGL framework develop 3-D on the desktop in C++ migrate C++ to our Android device using JNI get a lit sphere running on a mobile device OpenGL ES It comes time in everyone’s life for a little 3-D. The process of taking 3-D objects and showing them on a 2-D screen is […]

CS 145 Homework 3 – due before 12/7

See the PDF. When you download speccheck_hw3.jar, make sure the filename ends in “.jar”. Here are some example image sequences: mog.zip hand.zip Feel free to contribute your own and share your resulting images on Piazza.

CS 145 Exam 2

This exam was either: far too easy, taken by very capable students, or poorly graded. I lean toward a combination of the first two. Exam

CS 145 Lecture 21 – Our own objects

Agenda command-line arguments writing an NDeckerBurger class writing a class: Figure out what it needs to do. (Methods.) Figure out what its persistent state is. (Instance variables.) Figure out how to initialize the state. (Constructor.) midterm 2 Code CommandLineArguments.java package lecture; public class CommandLineArguments { public static void main(String[] args) { // for (int i […]

CS 145 Lab 10

Reminder Show your TA or instructor your completed checkpoints from the last lab in the first 20 minutes of this lab. Object-orientation As we’ve seen in lecture, objects are the marriage of data (instance variables, declared at the class level) and methods. Up until now, our programming has been action- or procedure-oriented. We wrote methods […]

CS 145 Lecture 20 – Midterm 2 Review

Things to know The test is hand-written. You may write SOP instead of System.out.println. You need not import any classes. One page of handwritten notes is allowed. The front page of the exam will contain compact documentation for the Scanner, Random, and String classes. A strategy: on questions where you are asked to write a […]

CS 145 Lab 9

Reminder Show your completed lab 8 checkpoints to your TA or instructor in the first 20 minutes of this lab. Checkpoint 1 One of the steps to mastery of a subject is to formulate your own questions. So, for your first checkpoint, please write three questions, one on each of the following topics: logical operators […]

CS 145 Lecture 19 – 2-D arrays

Agenda What does this do? Code Imager.java package lecture; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Random; import javax.imageio.ImageIO; public class Imager { public static void main(String[] args) throws IOException { int width = 512; int height = 256; int[][] pixels = new int[height][width]; // noisify(pixels); stripes(pixels); writeToFile(pixels); } private static void noisify(int[][] […]