Added biggest rect recognition + motion detection