Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

fs["features"]>>data;

It should be fs["features"]>>data;

It should be fs["features"]>>data;. Have in mind than reading a matrix is not only reading the numbers inside, but also reading its dimensions (rows and cols), type, etc.

Refer to documentation for more details and examples:

http://docs.opencv.org/2.4/modules/core/doc/xml_yaml_persistence.html#reading-data-from-a-file-storage http://docs.opencv.org/master/tutorial_file_input_output_with_xml_yml.html#gsc.tab=0

It should be fs["features"]>>data;. Have in mind than reading a matrix is not only reading the numbers inside, but also reading its dimensions (rows and cols), type, etc.

Refer to documentation for more details and examples:

http://docs.opencv.org/2.4/modules/core/doc/xml_yaml_persistence.html#reading-data-from-a-file-storage http://docs.opencv.org/2.4/modules/core/doc/xml_yaml_persistence.html#reading-data-from-a-file-storage

http://docs.opencv.org/master/tutorial_file_input_output_with_xml_yml.html#gsc.tab=0