We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reading this yaml file in opencv 4.10 works while failing with opencv 4.11 (all int values like 0 get corrupted in 4.11 - while 0.0 is fine):
0
0.0
%YAML:1.0 matrix1: rows: 1 cols: 4 dt: d data: [ 0, 0.0, 1, 1.0 ]
Note that changing dt: d to dt: f works fine.
dt: d
dt: f
You can run the following code to repro (assert failing only with 4.11):
# Good: python -m pip install --upgrade opencv-python==4.10.0.84 # Bad: python -m pip install --upgrade opencv-python==4.11.0.86 import cv2, numpy as np mat_str = '[ 0, 0.0, 1, 1.0 ]' yaml_file =\ '%YAML:1.0\n'\ 'matrix1:\n'\ ' rows: 1\n'\ ' cols: 4\n'\ ' dt: d\n'\ f' data: {mat_str}\n' node_name = 'matrix1' fs = cv2.FileStorage(yaml_file, cv2.FILE_STORAGE_MEMORY) mat = fs.getNode(node_name).mat().flatten() expected = np.array(eval(mat_str)) print(f'mat from yaml: {mat}') print(f'mat expected: {expected}') assert np.allclose(mat, expected)
I see some changes related to FileStorage in 4.11 (like opencv/opencv#26434) that might have introduced this regression.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reading this yaml file in opencv 4.10 works while failing with opencv 4.11 (all int values like
0
get corrupted in 4.11 - while0.0
is fine):Note that changing
dt: d
todt: f
works fine.You can run the following code to repro (assert failing only with 4.11):
I see some changes related to FileStorage in 4.11 (like opencv/opencv#26434) that might have introduced this regression.
The text was updated successfully, but these errors were encountered: