From: Skullheadx Date: Wed, 27 Nov 2024 04:55:19 +0000 (-0500) Subject: Find Distance between centers of finder patterns X-Git-Url: http://git.skullheadx.com/nixos/static/gitweb.js?a=commitdiff_plain;h=ea15b415a88a76b71e223367831901d8a8463500;p=qrcodescanner.git Find Distance between centers of finder patterns --- diff --git a/camera.cpp b/camera.cpp index 986bd0a..826e625 100644 --- a/camera.cpp +++ b/camera.cpp @@ -82,9 +82,11 @@ int main(){ print(symbol_noisy); std::vector> coords = get_finder_coords(symbol_noisy); - std::cout << std::endl << "coords:" << std::endl; + std::cout << "coords:" << std::endl; for (auto &i : coords){for (auto j:i){std::cout << j << " ";} std::cout << std::endl;} std::cout << std::endl; + float D = coords[1][1] - coords[0][1]; + std::cout << "D: " << D << std::endl; std::vector> symbol(21, std::vector(21,0)); return 0;