Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
imquery() and overloaded imread() functions#17753
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vpisarev commentedJul 13, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@sturkmen72, thank you for the contribution! I think, we should discuss the API. Can you provide a little code snippet how people would use this new functionality? In C++ one of the best approaches would be to create an image iterator. For Python it could be possible to use a similar approach, even though it would not look as idiomatic. Something like that: of course, it would also be possible to create more Pythonic wrapper on top of it, like suggested here, for example: |
sturkmen72 commentedJul 14, 2020
@vpisarev thank you for your feedback. let me work on the PR a bit more |
asmorkalov commentedJul 29, 2020
@sturkmen72 Do you have a chance to finish the PR in meantime? |
sturkmen72 commentedJul 29, 2020
@asmorkalov ,@vpisarev i am still thinking of an effective usage way considering#8511 |
f993d08 to8613543Comparesturkmen72 commentedAug 6, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
A simple review is required before continuing. please forgive my sloppiness i did not look codes of#8511 before. now i am aware both PR has basely similar changes. @brian-armstrong-discord do you have time to look my changes |
0b598c7 tofd04510Compare618f9dd to0fa2201Comparesturkmen72 commentedOct 6, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@vpisarev,@alalek please take a look at this PR. I know it still need more work but i need to know if i am on the right path. sample usage C++ Python |
sturkmen72 commentedMay 27, 2021
vpisarev commentedMay 28, 2021
@sturkmen72, yes, let's discuss it. I sent you e-mail |
12a9896 to854c1c4Comparesamples/python/imquery.py Outdated
| row=int((page_info1.height-page_info3.height)/2) | ||
| roi=img1[row:row+page_info3.height,column:column+page_info3.width] | ||
| #ret,roi = cv.imread("images.tif", None, cv.IMREAD_REDUCED_COLOR_2, i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
you can try the following:
ret,roi = cv.imread("images.tif", None, cv.IMREAD_REDUCED_COLOR_2, i)img1[row:row+page_info3.height, column:column+page_info3.width] = roiUh oh!
There was an error while loading.Please reload this page.
modules/imgcodecs/src/loadsave.cpp Outdated
| mats.push_back(page); | ||
| } | ||
| } | ||
| return!mats.empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
mats shoud not be empty before calling this function
| } | ||
| } | ||
| return!mats.empty(); | ||
| returncounter == count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If we asked for more images than multipage page count and we successfully read existing images should this be false ?
modules/imgcodecs/src/grfmt_gdal.cpp Outdated
| /** | ||
| * try to go to next page | ||
| */ | ||
| boolGdalDecoder::nextPage(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
i think GDAL driver loads only first page of multipage images. i will try to implementGdalDecoder::nextPage() after actual changes seems good.
sturkmen72 commentedJun 2, 2021
@vpisarev I think I've made significant progress after our meeting. could you review the actual code. |
e3d2d0e to3e968afCompare7025ed2 to36a618eCompare1a020a1 toe9ed1e8Compare7e8ef09 toeb33df1Comparesturkmen72 commentedJul 3, 2025
What was expected from this PR was done in#27496 |
Uh oh!
There was an error while loading.Please reload this page.
proposed solution to#6574#17862
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.