You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class CalibrationInfo { public Matrix<double> intrinsicMatrix; public Matrix<double> _istortionCoeffs; }
When I tried to serialize the class using XmlSerializer no problems but when I deserialized the object, the data in the matrices after the first property were all zeros It seems that when you implement ReadXml() you have to move pass the current node/element.
I added code like the following to fix the issue: do { reader.Read(); } while (reader.NodeType != XmlNodeType.Element && reader.NodeType != XmlNodeType.None);
I did not try other scenarios so not sure if this handles all cases.
The text was updated successfully, but these errors were encountered:
I have a class similar to the following:
public class CalibrationInfo { public Matrix<double> intrinsicMatrix; public Matrix<double> _istortionCoeffs; }
When I tried to serialize the class using XmlSerializer no problems but when I deserialized the object, the data in the matrices after the first property were all zeros It seems that when you implement ReadXml() you have to move pass the current node/element.
I added code like the following to fix the issue:
do { reader.Read(); } while (reader.NodeType != XmlNodeType.Element && reader.NodeType != XmlNodeType.None);
I did not try other scenarios so not sure if this handles all cases.
The text was updated successfully, but these errors were encountered: