From: Skullheadx Date: Mon, 12 May 2025 23:48:10 +0000 (-0400) Subject: Update camera.cpp X-Git-Url: http://git.skullheadx.com/nixos/NN_Heuristic%20OneTree.png?a=commitdiff_plain;h=refs%2Fheads%2FCamera-Decode-Testing;p=qrcodescanner.git Update camera.cpp --- diff --git a/camera.cpp b/camera.cpp index 8c0633c..879cad6 100644 --- a/camera.cpp +++ b/camera.cpp @@ -26,7 +26,7 @@ int main(){ for (auto test : test_cases){ std::vector> symbol(21, std::vector(21,0)); read_from_file(test + ".pbm", symbol); - //print(symbol); + print(symbol); std::cout << "Test: " << test_counter << std::endl; std::string result = decode_symbol(symbol); std::cout << "Test Passed: " << (result == test) << std::endl; @@ -316,8 +316,7 @@ std::vector get_codewords_from_symbol(std::vector> &symb return codewords; } -std::string get_input_data(std::vector &input_data, unsigned int character_count_indicator){ - std::string data = ""; +std::string get_input_data(std::vector &input_data, unsigned int character_count_indicator){ std::string data = ""; unsigned int data_length = character_count_indicator / 3 * 10; for (std::size_t i{0}; i < data_length; i += 10){ std::vector subvec(input_data.begin() + i, input_data.begin() + i + 10);