working on implementing opencv's findcontours.