detect image and save to type object