Computer vision for real-time crop inventories and optimal harvests