strtod loses all precision after using cv::imshow with OpenCV + QT (Bug #1999)
Description
Steps to reproduce:
1. create a string representing a double precision value: "1.0165"
2. apply strtod
to the string, gives the expected value of 1.0165
3. display any matrix/image using cv::namedWindow
, cv::imshow
, cv::waitKey
4. After cv::waitKey
apply strtod
again to the string, now it gives value 1.0000
OpenCV 2.4 with QT support compiled on Linux/AMD64. Disabling QT actually fixes the problem, so this might be something specific to QT instead of OpenCV, but I have no further experience with QT to investigate this.
History
Updated by Andrey Kamaev almost 13 years ago
- Category set to highgui-images
Updated by Vadim Pisarevsky almost 13 years ago
the issue is weird, but unfortunately we now do not have any experienced in Qt engineer to look at it.
- Priority changed from Normal to Low
- Target version set to 3.0
- Assignee set to Vadim Pisarevsky
Updated by Andrey Kamaev over 12 years ago
- Category changed from highgui-images to highgui-gui
Updated by Pavel Rojtberg about 10 years ago
the problem is probably that Qt changes locale. a setlocale(LC_NUMERIC, "C") at the correct place should fix this.
Updated by Steven Puttemans about 10 years ago
Hmm I thought I fixed this in 2.4 and 3.0 : https://github.com/Itseez/opencv/pull/3046/files
Will create a PR for this for 3.0 tomorrow!
- HW Platform set to Any
- Operating System set to Any
- Affected version set to branch 'master' (3.0-dev)
Updated by Steven Puttemans about 10 years ago
Fix submitted: https://github.com/Itseez/opencv/pull/3780
- Assignee changed from Vadim Pisarevsky to Steven Puttemans
- Pull request set to https://github.com/Itseez/opencv/pull/3780
Updated by Steven Puttemans almost 10 years ago
Fix merged! Latest 3.0 branch will not have this problem anymore!
- Status changed from Open to Done
- % Done changed from 0 to 100