From c50b977db20ff29e32edff2d724a003d3c769491 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 7 Nov 2026 16:24:09 +0100 Subject: [PATCH] Collection of minor fixes and adjustments --- config.yml | 2 +- proto | 2 +- src/Resources.cpp | 2 +- src/driver/spinnakerdriver.cpp | 2 +- src/opencl.cpp | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.yml b/config.yml index 4634111..da81faa 100644 --- a/config.yml +++ b/config.yml @@ -61,7 +61,7 @@ geometry: # Enable field line pixel refinement. # Disable in cluttered environments when the geometry calibration has failed multiple times in a row. - #refinement: true + #refinement: false # Minimum brightness difference to surrounding pixels for the classification as field line pixel (0 - 255) #field_line_threshold: 5 diff --git a/proto b/proto index 02cbc8e..fdd7988 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 02cbc8e6b6ec8e5057d5a2d49d05404efbd53c22 +Subproject commit fdd7988ac689d894479b4ec80ce054ba2e686836 diff --git a/src/Resources.cpp b/src/Resources.cpp index 17d43c2..0bd01d6 100644 --- a/src/Resources.cpp +++ b/src/Resources.cpp @@ -105,7 +105,7 @@ Resources::Resources(const std::string& configPath) : fieldReference(), configPa cameraAmount = geometry["camera_amount"].as(1); cameraHeight = geometry["camera_height"].as(0.0); lineCorners = geometry["line_corners"].as>(std::vector()); - geometryRefinement = geometry["refinement"].as(true); + geometryRefinement = geometry["refinement"].as(false); fieldLineThreshold = geometry["field_line_threshold"].as(5); minLineSegmentLength = geometry["min_line_segment_length"].as(10.0); maxLineSegmentOffset = geometry["max_line_segment_offset"].as(10.0); diff --git a/src/driver/spinnakerdriver.cpp b/src/driver/spinnakerdriver.cpp index bc84796..b5ce7b4 100644 --- a/src/driver/spinnakerdriver.cpp +++ b/src/driver/spinnakerdriver.cpp @@ -207,7 +207,7 @@ void SpinnakerDriver::selectPixelFormat() { try { pCam->PixelFormat.FromString(entry.c_str()); } catch (Spinnaker::Exception &e) { - FATAL("Could not select pixel format " << entry << ": " << e.GetErrorMessage()); + WARN("Could not select pixel format " << entry << ": " << e.GetErrorMessage()); } // "BayerRG8" style entries name the Bayer pattern, Raw8 cameras report it separately std::string pattern; diff --git a/src/opencl.cpp b/src/opencl.cpp index 4592bc7..286638a 100644 --- a/src/opencl.cpp +++ b/src/opencl.cpp @@ -158,6 +158,7 @@ static inline cl::Buffer clAlloc(cl_mem_flags type, cl::size_type size, void* da #define MINIMUM_ALIGNMENT 4096 static std::shared_ptr hostAlloc(int size) { + size = (size + MINIMUM_ALIGNMENT-1)/MINIMUM_ALIGNMENT * MINIMUM_ALIGNMENT; return {aligned_alloc(MINIMUM_ALIGNMENT, size), [size](void* ptr) { munlock(ptr, size); free(ptr);