Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reading of specific images from multipage tiff #19780

Merged
merged 8 commits into from
Apr 23, 2021

Conversation

HarryDC
Copy link
Contributor

@HarryDC HarryDC commented Mar 25, 2021

The current implementation of imreadmulti reads all images from the multipage file, sometimes this is not the required functionality, for example due to memory contraints, or really just wanting to target a specific subrange of the multipage file. This PR allows any subsequence to be read .

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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

@sturkmen72
Copy link
Contributor

there is my previous work related

@asenyaev
Copy link
Contributor

asenyaev commented Apr 5, 2021

jenkins cn please retry a build

@HarryDC
Copy link
Contributor Author

HarryDC commented Apr 5, 2021

@sturkmen72 yes i saw that, i am trying a bit smaller approach that stays within the current interfaces.

@HarryDC
Copy link
Contributor Author

HarryDC commented Apr 6, 2021

@asenyaev it looks like the windows10 build is sufferring from some other issues

[ RUN      ] videoio/videoio_bunny.frame_timestamp/11, where GetParam() = ("mp4", CV_MJPEG)
[     SKIP ] Backend CV_MJPEG can't open the video: c:/Slave/workspace/precommit/windows10\opencv_extra\testdata/highgui/video/big_buck_bunny.mp4
[       OK ] videoio/videoio_bunny.frame_timestamp/11 (0 ms)
[ RUN      ] videoio/videoio_bunny.frame_timestamp/12, where GetParam() = ("mpg", MSMF)
Cancelling nested steps due to timeout
Sending interrupt signal to process
script returned exit code -1
[Pipeline] echo
Aggregating results
[Pipeline] junit
Recording test results
No test report files were found. Configuration error?
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Setting status of c5834abaf578a1f82e0dd0fa5cde08e434797e4f to FAILURE with url https://build.opencv.org.cn/job/precommit/job/windows10/1450/ and message: 'Build finished. '
Using context: OpenCV CN Windows 10 x64
ERROR: No test report files were found. Configuration error?
Finished: FAILURE

@asenyaev
Copy link
Contributor

asenyaev commented Apr 6, 2021

@HarryDC yes, you are right, it stuck on the videoio testing stage. The CI server for OpenCV CN Ubuntu 18.04 x86-64 build is down at this moment. I will restart builds for this PR as soon as it is online.

@asenyaev
Copy link
Contributor

asenyaev commented Apr 8, 2021

jenkins cn please retry a build

@HarryDC
Copy link
Contributor Author

HarryDC commented Apr 13, 2021

@asenyaev what are next steps ? Who could provide feedback for this ?

Thanks

modules/imgcodecs/src/loadsave.cpp Show resolved Hide resolved
modules/imgcodecs/src/loadsave.cpp Outdated Show resolved Hide resolved
modules/imgcodecs/src/loadsave.cpp Outdated Show resolved Hide resolved
modules/imgcodecs/src/loadsave.cpp Outdated Show resolved Hide resolved
Fix error messages
@HarryDC
Copy link
Contributor Author

HarryDC commented Apr 20, 2021

jenkins cn please retry a build

@alalek alalek merged commit fcaeeac into opencv:master Apr 23, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…-tiff

Add reading of specific images from multipage tiff

* Add reading of specific images from multipage tiff

* Fix build issues

* Add missing flag for gdal

* Fix unused param warning

* Remove duplicated code

* change public parameter type to int

* Fix warnings

* Fix parameter check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants