Finished "Histogram Match" porting