[GSOC] ImageCollection Class improvements#27496
[GSOC] ImageCollection Class improvements#27496sturkmen72 wants to merge 80 commits intoopencv:4.xfrom
Conversation
4c520ec to
807788b
Compare
807788b to
502e536
Compare
|
@asmorkalov could you take a look at this PR. it is not urgent but maybe merging it before 4.12 release will be useful |
|
@asmorkalov sorry to bother. there is a last minute fix for an issue. |
| CV_WRAP ImageCollection(); | ||
| CV_WRAP ImageCollection(const String& filename, int flags = IMREAD_UNCHANGED); | ||
| CV_WRAP void init(const String& img, int flags); | ||
| CV_WRAP size_t size() const; |
There was a problem hiding this comment.
size_t is not wrapped to Python and Java correctly. Java even does not support unsigned types. Please use int instead.
There was a problem hiding this comment.
size_t is not wrapped to Python and Java correctly. Java even does not support unsigned types. Please use int instead.
please check the last commit. i created size32() for wrapping
There was a problem hiding this comment.
i reverted size32()
CV_WRAP size_t size() const; seems working as python and java tests passed. also there is CV_EXPORTS_W size_t imcount(const String& filename, int flags = IMREAD_ANYCOLOR); what is your opinion.
There was a problem hiding this comment.
it is unlikely we ever get an animation with INT_MAX frames anyway. Using an int is enough.
|
@asmorkalov OK, i have more time to better improvements. |
|
✅ DECODER_OK = 0 In ImageCollection:
In ImageCollection: ❌ DECODER_SOURCE_NOT_OPENED = 2 In ImageCollection: The file doesn’t exist. It’s unreadable (permissions issue). It’s empty or corrupted. The image will likely be skipped or flagged as a loading error. ❓ DECODER_UNKNOWN_SOURCE_FORMAT = 3 In ImageCollection: A file with a .jpg extension that is actually a text file. A valid file of a format not supported by the decoder (e.g., .tiff in a system that only supports PNG and JPEG). 🧱 DECODER_READ_HEADER_FAILED = 4 In ImageCollection: Indicates the image file is partially damaged or incorrectly encoded. Common in corrupt downloads or truncated files. 💥 DECODER_READ_DATA_FAILED = 5 In ImageCollection: Could occur during multi-frame extraction (e.g., animated WebP, GIF). Or due to allocation issues (e.g., insufficient memory). The image might show up with correct metadata but no pixel content. |
|
another option is ( maybe simple is better ) ImageCollection::Status::OK |
Performance tests for writing and reading animations #27605 ### Pull Request Readiness Checklist related : #27496 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 - [ ] 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 CMake
Performance tests for writing and reading animations opencv#27605 ### Pull Request Readiness Checklist related : opencv#27496 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 - [ ] 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 CMake
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
TO DO: