Working per frame vision code with 640x480 image