CARVIEW |
Select Language
HTTP/2 200
date: Mon, 21 Jul 2025 19:38:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/opencv/opencv.git
etag: W/"01b4e018787bda349ee299ef3b258dff"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Oer%2FHrJa7W23OZv0uj%2BKjVqPtoLcZlhZVacHMM5njT42ZHeDdL7WHMkZUIHTNB59QawDG12Ii4BHv9Z0eELGbWzZWUWNgzQkSD%2B1iFYq8KgKcfVQNXV0k6SazQ1Fqj4vwCUlPaZ7tjybrzvqWaWLLkWTiRpGaWEVWCQq%2FhQ39jAZrIJ1eQU%2FzkqzanPkAM0PVMRxdQXuALQZu7A%2F8zqEpmIYkwYyo2eZXchWhdgRhoFYoRDLu8LZcHTaINRO7HfEohrJaLUp65rxloRtdFi8dA%3D%3D--wPYAZldrzzNzLuu2--MKBHbIIbIYPZp0DACmVvZA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1563979192.1753126705; Path=/; Domain=github.com; Expires=Tue, 21 Jul 2026 19:38:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 21 Jul 2026 19:38:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9310:26F11:1D09EB:2363CC:687E9731
Merge pull request #24773 from tailsu:sd/pathlike · opencv/opencv@2791bb7 · GitHub
Copy file name to clipboardExpand all lines: modules/core/include/opencv2/core/cvdef.h
Copy file name to clipboardExpand all lines: modules/dnn/include/opencv2/dnn/dnn.hpp
Copy file name to clipboardExpand all lines: modules/objdetect/include/opencv2/objdetect/barcode.hpp
Copy file name to clipboardExpand all lines: modules/objdetect/include/opencv2/objdetect/face.hpp
Copy file name to clipboardExpand all lines: modules/python/src2/cv2.hpp
Copy file name to clipboardExpand all lines: modules/python/src2/cv2_convert.cpp
Copy file name to clipboardExpand all lines: modules/python/src2/gen2.py
Copy file name to clipboardExpand all lines: modules/python/src2/hdr_parser.py
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Commit 2791bb7
authored
Merge pull request #24773 from tailsu:sd/pathlike
python: accept path-like objects wherever file names are expected #24773
Merry Christmas, all 🎄
Implements #15731
Support is enabled for all arguments named `filename` or `filepath` (case-insensitive), or annotated with `CV_WRAP_FILE_PATH`.
Support is based on `PyOS_FSPath`, which is available in Python 3.6+. When running on older Python versions the arguments must have a `str` value as before.
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake1 parent a7fa1e6 commit 2791bb7Copy full SHA for 2791bb7
File tree
Expand file treeCollapse file tree
9 files changed
+92
-26
lines changedFilter options
- modules
- core/include/opencv2/core
- dnn/include/opencv2/dnn
- objdetect/include/opencv2/objdetect
- python
- src2
- test
Expand file treeCollapse file tree
9 files changed
+92
-26
lines changedmodules/core/include/opencv2/core/cvdef.h
Copy file name to clipboardExpand all lines: modules/core/include/opencv2/core/cvdef.h+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
| 478 | + | |
| 479 | + | |
478 | 480 |
| |
479 | 481 |
| |
480 | 482 |
| |
|
modules/dnn/include/opencv2/dnn/dnn.hpp
Copy file name to clipboardExpand all lines: modules/dnn/include/opencv2/dnn/dnn.hpp+21-21Lines changed: 21 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
487 |
| - | |
| 487 | + | |
488 | 488 |
| |
489 | 489 |
| |
490 | 490 |
| |
| |||
517 | 517 |
| |
518 | 518 |
| |
519 | 519 |
| |
520 |
| - | |
| 520 | + | |
521 | 521 |
| |
522 | 522 |
| |
523 | 523 |
| |
| |||
890 | 890 |
| |
891 | 891 |
| |
892 | 892 |
| |
893 |
| - | |
| 893 | + | |
894 | 894 |
| |
895 | 895 |
| |
896 | 896 |
| |
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
918 |
| - | |
| 918 | + | |
919 | 919 |
| |
920 | 920 |
| |
921 | 921 |
| |
| |||
944 | 944 |
| |
945 | 945 |
| |
946 | 946 |
| |
947 |
| - | |
| 947 | + | |
948 | 948 |
| |
949 | 949 |
| |
950 | 950 |
| |
| |||
969 | 969 |
| |
970 | 970 |
| |
971 | 971 |
| |
972 |
| - | |
| 972 | + | |
973 | 973 |
| |
974 | 974 |
| |
975 | 975 |
| |
| |||
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 |
| - | |
| 1014 | + | |
1015 | 1015 |
| |
1016 | 1016 |
| |
1017 | 1017 |
| |
| |||
1037 | 1037 |
| |
1038 | 1038 |
| |
1039 | 1039 |
| |
1040 |
| - | |
| 1040 | + | |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 | 1043 |
| |
| |||
1064 | 1064 |
| |
1065 | 1065 |
| |
1066 | 1066 |
| |
1067 |
| - | |
| 1067 | + | |
1068 | 1068 |
| |
1069 | 1069 |
| |
1070 | 1070 |
| |
| |||
1093 | 1093 |
| |
1094 | 1094 |
| |
1095 | 1095 |
| |
1096 |
| - | |
| 1096 | + | |
1097 | 1097 |
| |
1098 | 1098 |
| |
1099 | 1099 |
| |
| |||
1116 | 1116 |
| |
1117 | 1117 |
| |
1118 | 1118 |
| |
1119 |
| - | |
| 1119 | + | |
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | 1122 |
| |
| |||
1289 | 1289 |
| |
1290 | 1290 |
| |
1291 | 1291 |
| |
1292 |
| - | |
| 1292 | + | |
1293 | 1293 |
| |
1294 | 1294 |
| |
1295 | 1295 |
| |
| |||
1298 | 1298 |
| |
1299 | 1299 |
| |
1300 | 1300 |
| |
1301 |
| - | |
| 1301 | + | |
1302 | 1302 |
| |
1303 | 1303 |
| |
1304 | 1304 |
| |
| |||
1403 | 1403 |
| |
1404 | 1404 |
| |
1405 | 1405 |
| |
1406 |
| - | |
| 1406 | + | |
1407 | 1407 |
| |
1408 | 1408 |
| |
1409 | 1409 |
| |
| |||
1508 | 1508 |
| |
1509 | 1509 |
| |
1510 | 1510 |
| |
1511 |
| - | |
| 1511 | + | |
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 | 1514 |
| |
| |||
1558 | 1558 |
| |
1559 | 1559 |
| |
1560 | 1560 |
| |
1561 |
| - | |
| 1561 | + | |
1562 | 1562 |
| |
1563 | 1563 |
| |
1564 | 1564 |
| |
| |||
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 | 1592 |
| |
1593 |
| - | |
| 1593 | + | |
1594 | 1594 |
| |
1595 | 1595 |
| |
1596 | 1596 |
| |
| |||
1621 | 1621 |
| |
1622 | 1622 |
| |
1623 | 1623 |
| |
1624 |
| - | |
| 1624 | + | |
1625 | 1625 |
| |
1626 | 1626 |
| |
1627 | 1627 |
| |
| |||
1687 | 1687 |
| |
1688 | 1688 |
| |
1689 | 1689 |
| |
1690 |
| - | |
| 1690 | + | |
1691 | 1691 |
| |
1692 | 1692 |
| |
1693 | 1693 |
| |
| |||
1842 | 1842 |
| |
1843 | 1843 |
| |
1844 | 1844 |
| |
1845 |
| - | |
| 1845 | + | |
1846 | 1846 |
| |
1847 | 1847 |
| |
1848 | 1848 |
| |
| |||
1903 | 1903 |
| |
1904 | 1904 |
| |
1905 | 1905 |
| |
1906 |
| - | |
| 1906 | + | |
1907 | 1907 |
| |
1908 | 1908 |
| |
1909 | 1909 |
| |
|
modules/objdetect/include/opencv2/objdetect/barcode.hpp
Copy file name to clipboardExpand all lines: modules/objdetect/include/opencv2/objdetect/barcode.hpp+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
|
modules/objdetect/include/opencv2/objdetect/face.hpp
Copy file name to clipboardExpand all lines: modules/objdetect/include/opencv2/objdetect/face.hpp+3-3Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
86 |
| - | |
| 85 | + | |
| 86 | + | |
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
| 157 | + | |
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
|
modules/python/src2/cv2.hpp
Copy file name to clipboardExpand all lines: modules/python/src2/cv2.hpp+4-1Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
| |
| 54 | + | |
53 | 55 |
| |
54 | 56 |
| |
55 | 57 |
| |
56 | 58 |
| |
57 | 59 |
| |
58 |
| - | |
| 60 | + | |
| 61 | + | |
59 | 62 |
| |
60 | 63 |
| |
61 | 64 |
| |
|
modules/python/src2/cv2_convert.cpp
Copy file name to clipboardExpand all lines: modules/python/src2/cv2_convert.cpp+12Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
701 | 701 |
| |
702 | 702 |
| |
703 | 703 |
| |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
704 | 716 |
| |
705 | 717 |
| |
706 | 718 |
| |
|
modules/python/src2/gen2.py
Copy file name to clipboardExpand all lines: modules/python/src2/gen2.py+5Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
500 | 500 |
| |
501 | 501 |
| |
502 | 502 |
| |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
503 | 507 |
| |
504 | 508 |
| |
505 | 509 |
| |
| |||
523 | 527 |
| |
524 | 528 |
| |
525 | 529 |
| |
| 530 | + | |
526 | 531 |
| |
527 | 532 |
| |
528 | 533 |
| |
|
modules/python/src2/hdr_parser.py
Copy file name to clipboardExpand all lines: modules/python/src2/hdr_parser.py+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 |
| |
94 | 98 |
| |
95 | 99 |
| |
| |||
627 | 631 |
| |
628 | 632 |
| |
629 | 633 |
| |
| 634 | + | |
| 635 | + | |
630 | 636 |
| |
631 | 637 |
| |
632 | 638 |
| |
|
modules/python/test/test_pathlike.py
Copy file name to clipboard+38Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + |
You can’t perform that action at this time.
0 commit comments