trying to use the opencv doc tutorial's way now that some of this makes more sense