Set precision for double in FileStorage#25087
Conversation
|
Some tests had been failed, however I think they are false-positive. Window10-x86 BuidAndTesthttps://github.com/opencv/opencv/actions/runs/8034792429/job/21950114758#step:22:184
It means failed to remove temporary file. macOS-x64/BuildAndTesthttps://github.com/opencv/opencv/actions/runs/8034792429/job/21950115658#step:13:1699
This is timeout error. macOS-x64/BuildContribhttps://github.com/opencv/opencv/actions/runs/8034792429/job/21950115851#step:11:2415
This is timeout error. Android-Test/BuildAndTesthttps://github.com/opencv/opencv/actions/runs/8034792429/job/21950114939#step:15:4916
opencv/modules/core/misc/java/test/MatTest.java Lines 255 to 259 in ae347ab This test is to check element length, but It is not related with this patch. |
|
@Kumataro Thanks a lot for research and contribution! The PR was discussed on core team meeting and we propose to change approach. C++ standard proposes %g option to shortest representation of the value in printf-like functions. It'll be %e or %f depending on value. It covers the original issue without API changes and always produces efficient result. See https://cplusplus.com/reference/cstdio/printf/ |
|
I agree with the results of the above review. Currently, there is a conflict with this commit, and a new and different approach is required, so I would like to withdraw this pull request. Thank you very much for your consideration! |
|
I created new pull request using format %g at #25351 |
core: persistence: output reals as human-friendly expression. #25351 Close #25073 Related #25087 This patch is need to merge same time with opencv/opencv_contrib#3714 ### 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 - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
core: persistence: output reals as human-friendly expression. opencv#25351 Close opencv#25073 Related opencv#25087 This patch is need to merge same time with opencv/opencv_contrib#3714 ### 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 - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
core: persistence: output reals as human-friendly expression. opencv#25351 Close opencv#25073 Related opencv#25087 This patch is need to merge same time with opencv/opencv_contrib#3714 ### 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 - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
Close #25073
I feel the function/enum names may have to be improved.
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.