-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Description
System Information
OpenCV version: 4.3.0
Operating system / platform: Windows 10
Compiler & compiler version: Visual Studio 2019 16.11.3
Detailed description
A json file was created with multple data types. Items that are clearly a long integer (int64) do not get parsed properly by the FileNode class. The FileNode will return a zero value for this parameter and mark its type as an INT (32-bit).
In the file persistence.hpp, there is no support for long integers. Trying to read in this data when using readRaw results in an exception.
Steps to reproduce
Code:
auto fs = cv::FileStorage("Test.json", cv::FileStorage::READ);
const auto read_metadata_init = fs["MetadataInit"];
const auto beginTS = metadata_chunk["BeginTS"];
int t_size = beginTS .size(); // = 1 (correct)
int t_rsize = beginTS .rawSize(); // = 9 bytes (not correct)
int t_type = beginTS .type(); // = 1 (not correct)
// Json file below, remember to remove txt extension)
Test.json.txt
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status