Create detect_rect.cpp