Closed thierrymalon closed 9 years ago
In fact, the BinaryFile was written but never closed. Just after being written, it was read to load the descriptors, but as it seems to be saved only after receiving a certain amount of data of after being closed, the read descriptors were not full.
In addition, the descriptors are composed of float, but are saved in the Binary File as char. As the descriptors are composed of values between 0 and 255, they were loaded negative as char when a value exceeds 128.
Several solutions could have been adopted, like overloading the >>
operator with unsigned char, or adding 256 to negative loaded descriptor values. We simply chose to write and read float values in the descriptors files.
When launching demoSift with default parameters twice, the scores are not the same: