Histogram-Based Template Matching Object Detection In Images With Varying Brightness And Contrast