[opencv] 01/02: Import Debian patch 2.4.9.1+dfsg-2.1
Mattia Rizzolo
mattia at debian.org
Tue Oct 4 17:50:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository opencv.
commit ba9738e0d67b25cbeb8e2148ea178937d34113e8
Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
Date: Tue Oct 4 17:07:49 2016 +0200
Import Debian patch 2.4.9.1+dfsg-2.1
---
debian/changelog | 8 +++++
debian/patches/fix_ftbfs_with_gcc6 | 71 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 80 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 53367bd..7a8f56c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+opencv (2.4.9.1+dfsg-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * debian/patches:
+ - Add fix_ftbfs_with_gcc6 to fix FTBFS with gcc-6. (Closes: #828928)
+
+ -- John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de> Tue, 04 Oct 2016 17:07:49 +0200
+
opencv (2.4.9.1+dfsg-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/fix_ftbfs_with_gcc6 b/debian/patches/fix_ftbfs_with_gcc6
new file mode 100644
index 0000000..0706faa
--- /dev/null
+++ b/debian/patches/fix_ftbfs_with_gcc6
@@ -0,0 +1,71 @@
+Description: gcc-6 build fixes, cherry-picked from Fedora
+From: https://pkgs.fedoraproject.org/cgit/rpms/opencv.git/commit/?id=ca7da00ea608b62859a640493a1cd6c0f5802550
+Author: Sérgio M. Basto <sergio at serjux.com>
+Last-Update: 2016-10-04
+
+--- opencv-2.4.9.1+dfsg.orig/modules/contrib/src/chamfermatching.cpp
++++ opencv-2.4.9.1+dfsg/modules/contrib/src/chamfermatching.cpp
+@@ -966,10 +966,8 @@ void ChamferMatcher::Matching::computeDi
+ for (int y=0;y<h;++y) {
+ for (int x=0;x<w;++x) {
+ // initialize
+- if (&annotate_img!=NULL) {
+- annotate_img.at<Vec2i>(y,x)[0]=x;
+- annotate_img.at<Vec2i>(y,x)[1]=y;
+- }
++ annotate_img.at<Vec2i>(y,x)[0]=x;
++ annotate_img.at<Vec2i>(y,x)[1]=y;
+
+ uchar edge_val = edges_img.at<uchar>(y,x);
+ if( (edge_val!=0) ) {
+@@ -1013,10 +1011,8 @@ void ChamferMatcher::Matching::computeDi
+ dist_img.at<float>(ny,nx) = dist;
+ q.push(std::make_pair(nx,ny));
+
+- if (&annotate_img!=NULL) {
+- annotate_img.at<Vec2i>(ny,nx)[0]=annotate_img.at<Vec2i>(y,x)[0];
+- annotate_img.at<Vec2i>(ny,nx)[1]=annotate_img.at<Vec2i>(y,x)[1];
+- }
++ annotate_img.at<Vec2i>(ny,nx)[0]=annotate_img.at<Vec2i>(y,x)[0];
++ annotate_img.at<Vec2i>(ny,nx)[1]=annotate_img.at<Vec2i>(y,x)[1];
+ }
+ }
+ }
+@@ -1107,26 +1103,22 @@ ChamferMatcher::Match* ChamferMatcher::M
+
+ float cost = (sum_distance/truncate_)/addr.size();
+
++ float* optr = orientation_img.ptr<float>(y)+x;
++ float sum_orientation = 0;
++ int cnt_orientation = 0;
+
+- if (&orientation_img!=NULL) {
+- float* optr = orientation_img.ptr<float>(y)+x;
+- float sum_orientation = 0;
+- int cnt_orientation = 0;
+-
+- for (size_t i=0;i<addr.size();++i) {
++ for (size_t i=0;i<addr.size();++i) {
+
+- if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
+- if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
+- sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
+- cnt_orientation++;
+- }
++ if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
++ if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
++ sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
++ cnt_orientation++;
+ }
+ }
++ }
+
+- if (cnt_orientation>0) {
+- cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
+- }
+-
++ if (cnt_orientation>0) {
++ cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
+ }
+
+ if(cost > 0){
diff --git a/debian/patches/series b/debian/patches/series
index 4010606..721d8bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ Don-t-check-sphinx-build-version.patch
change_type_from_int_to_Atomic_word
fix_without_sysctl.patch
ffmpeg_2.9.patch
+fix_ftbfs_with_gcc6
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list