Moved main image processing to a new function (test_connected_regions) which can take an image as a parameter.  Changed values to search for oranges, but left apple values in there as well.