public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pcl] f44: Add patch to fix line fitting in SAC segmentation
@ 2026-06-25  5:49 Till Hofmann
  0 siblings, 0 replies; only message in thread
From: Till Hofmann @ 2026-06-25  5:49 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/pcl
Branch : f44
Commit : 91893c0e41299842a946168136f0b8d7799d0d09
Author : Till Hofmann <thofmann@fedoraproject.org>
Date   : 2019-10-24T14:40:48+02:00
Stats  : +41/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/pcl/c/91893c0e41299842a946168136f0b8d7799d0d09?branch=f44

Log:
Add patch to fix line fitting in SAC segmentation

---
diff --git a/pcl-1.9.1-sacsegmentation.patch b/pcl-1.9.1-sacsegmentation.patch
new file mode 100644
index 0000000..9a225d4
--- /dev/null
+++ b/pcl-1.9.1-sacsegmentation.patch
@@ -0,0 +1,33 @@
+From 36c2bd6209f87dc7c6f56e2c0314e19f9cab95ec Mon Sep 17 00:00:00 2001
+From: Thorsten Harter <thorsten.harter@gmx.net>
+Date: Thu, 10 Jan 2019 15:54:52 +0100
+Subject: [PATCH] Fix regression in pcl::SACSegmentation line fitting
+
+pcl::SampleConsensusModelLine<PointT>::isSampleGood should check if the two sample points differ in one coordinate, not in all of them.
+---
+ .../include/pcl/sample_consensus/impl/sac_model_line.hpp   | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sample_consensus/include/pcl/sample_consensus/impl/sac_model_line.hpp b/sample_consensus/include/pcl/sample_consensus/impl/sac_model_line.hpp
+index 7c7fd7512a..9a8505d93c 100644
+--- a/sample_consensus/include/pcl/sample_consensus/impl/sac_model_line.hpp
++++ b/sample_consensus/include/pcl/sample_consensus/impl/sac_model_line.hpp
+@@ -49,13 +49,16 @@
+ template <typename PointT> bool
+ pcl::SampleConsensusModelLine<PointT>::isSampleGood (const std::vector<int> &samples) const
+ {
++  // Make sure that the two sample points are not identical
+   if (
+       (input_->points[samples[0]].x != input_->points[samples[1]].x)
+-    &&
++    ||
+       (input_->points[samples[0]].y != input_->points[samples[1]].y)
+-    &&
++    ||
+       (input_->points[samples[0]].z != input_->points[samples[1]].z))
++  {
+     return (true);
++  }
+ 
+   return (false);
+ }

diff --git a/pcl.spec b/pcl.spec
index 3f0e377..1415d51 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -2,7 +2,7 @@
 
 Name:           pcl
 Version:        1.9.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Library for point cloud processing
 License:        BSD
 URL:            http://pointclouds.org/
@@ -24,6 +24,9 @@ Patch3:         %{name}-1.7.2-doxyfix.patch
 Patch4:         %{name}-1.9.1-oom.patch
 # Upstream patch to disable boost endian warnings
 Patch5:         %{name}-1.9.1-boostendian.patch
+# Upstream patch to fix SACSegmentation line fitting
+# https://github.com/PointCloudLibrary/pcl/pull/2767
+Patch6:         %{name}-1.9.1-sacsegmentation.patch
 
 # For plain building
 BuildRequires:  cmake, gcc-c++, boost-devel
@@ -86,6 +89,7 @@ Library.
 %patch3 -p0 -b .doxyfix
 %patch4 -p1 -b .oom
 %patch5 -p1 -b .boostendian
+%patch6 -p1 -b .sacsegmentation
 
 # Just to make it obvious we're not using any of these
 rm -fr recognition/include/pcl/recognition/3rdparty/metslib
@@ -192,6 +196,9 @@ ARGS='-V' make -C build test || true
 %doc build/doc/advanced/advanced
 
 %changelog
+* Thu Oct 24 2019 Till Hofmann <thofmann@fedoraproject.org> - 1.9.1-5
+- Add patch to fix line fitting in SAC segmentation
+
 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25  5:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25  5:49 [rpms/pcl] f44: Add patch to fix line fitting in SAC segmentation Till Hofmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox