Added dynamic best camera resolution calculation