Skip to content

Commit ff66a31

Browse files
fix(opencv backend): Removing open cv default backend on Windows and defaulting to cv2.CAP_ANY for all operating systems
1 parent 6007a22 commit ff66a31

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lerobot/common/cameras/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import platform
1817
from pathlib import Path
1918
from typing import TypeAlias
2019

@@ -59,7 +58,4 @@ def get_cv2_rotation(rotation: Cv2Rotation) -> int | None:
5958
def get_cv2_backend() -> int:
6059
import cv2
6160

62-
if platform.system() == "Windows":
63-
return cv2.CAP_AVFOUNDATION
64-
else:
65-
return cv2.CAP_ANY
61+
return cv2.CAP_ANY

0 commit comments

Comments
 (0)