diff options
Diffstat (limited to 'libraries/frei0r')
-rw-r--r-- | libraries/frei0r/README | 6 | ||||
-rw-r--r-- | libraries/frei0r/frei0r.SlackBuild | 120 | ||||
-rw-r--r-- | libraries/frei0r/frei0r.info | 10 | ||||
-rw-r--r-- | libraries/frei0r/patches/01.b27f03c.patch | 27 | ||||
-rw-r--r-- | libraries/frei0r/patches/02.35ed870.patch | 167 | ||||
-rw-r--r-- | libraries/frei0r/slack-desc | 19 |
6 files changed, 0 insertions, 349 deletions
diff --git a/libraries/frei0r/README b/libraries/frei0r/README deleted file mode 100644 index 903e6aad22..0000000000 --- a/libraries/frei0r/README +++ /dev/null @@ -1,6 +0,0 @@ -Frei0r is a minimalistic plugin API for video sources and filters. The -behaviour of the effects can be controlled from the host by simple parameters. -The intent is to solve the recurring reimplementation or adaptation issue of -standard effects. - -Optional dependencies are opencv and gavl. diff --git a/libraries/frei0r/frei0r.SlackBuild b/libraries/frei0r/frei0r.SlackBuild deleted file mode 100644 index ce64a47e50..0000000000 --- a/libraries/frei0r/frei0r.SlackBuild +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh - -# Slackware build script for frei0r - -# Copyright 2009, Jonathan Larsen (agentc0re), SLC, UT -# Contact Info: agentc0re 'AT' learnix 'DOT' net -# Copyright 2012-2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Change Log -# -# Mar 3rd, 2010 -# *Revised to build "2" - fixed the "strip" for bash 4 -# *compatibility and removed the man page section -# Mar 12th, 2013 -# *Updated for 1.4 -# Sep 7th, 2015 -# *Patch for opencv-3.0 -# Dec 29th, 2016 -# *Updated for 1.5.0 -# May 25th, 2017 -# *Updated for 1.6.0 -# Mar 14th, 2018 -# *Updated for 1.6.1 -# Jan 1st, 2020 -# *Updated for 1.7.0 - -PRGNAM=frei0r -VERSION=${VERSION:-1.7.0} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-plugins-$VERSION -tar xvf $CWD/$PRGNAM-plugins-$VERSION.tar.gz -cd $PRGNAM-plugins-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# Apply upstream patches -for i in $CWD/patches/* ; do patch -p1 < $i ; done - -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++11" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=/usr/lib$LIBDIRSUFFIX \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd .. - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS.txt COPYING* ChangeLog.txt README.txt TODO.txt \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/frei0r/frei0r.info b/libraries/frei0r/frei0r.info deleted file mode 100644 index f50f66034b..0000000000 --- a/libraries/frei0r/frei0r.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="frei0r" -VERSION="1.7.0" -HOMEPAGE="https://frei0r.dyne.org" -DOWNLOAD="https://files.dyne.org/frei0r/releases/frei0r-plugins-1.7.0.tar.gz" -MD5SUM="78a7c7511cbda93013147563dc7a3618" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Matteo Bernardini" -EMAIL="ponce@slackbuilds.org" diff --git a/libraries/frei0r/patches/01.b27f03c.patch b/libraries/frei0r/patches/01.b27f03c.patch deleted file mode 100644 index 49b8e017b6..0000000000 --- a/libraries/frei0r/patches/01.b27f03c.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b27f03c8d51c34cd5f79e0399bb0024ca94ea813 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= <zmoelnig@iem.at> -Date: Tue, 10 Dec 2019 15:01:52 +0100 -Subject: [PATCH] facedetect: include imgproc/imgproc_c.h when using OpenCV-4+ - -imgproc_c.h defines the constants CV_BGR2GRAY, CV_FILLED & CV_AA. - -it also includes "core/core_c.h", which then provides - `cvGetTickCount()` and `cvGetTickFrequency()` ---- - src/filter/facedetect/facedetect.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/filter/facedetect/facedetect.cpp b/src/filter/facedetect/facedetect.cpp -index 1906962..4e7d476 100644 ---- a/src/filter/facedetect/facedetect.cpp -+++ b/src/filter/facedetect/facedetect.cpp -@@ -21,6 +21,9 @@ - #include <stdio.h> - #include <string.h> - #include <opencv2/opencv.hpp> -+#if CV_MAJOR_VERSION >= 4 -+# include <opencv2/imgproc/imgproc_c.h> -+#endif - #include "frei0r.hpp" - #include "frei0r_math.h" - diff --git a/libraries/frei0r/patches/02.35ed870.patch b/libraries/frei0r/patches/02.35ed870.patch deleted file mode 100644 index d2f9c629bb..0000000000 --- a/libraries/frei0r/patches/02.35ed870.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 35ed870a3b4e7977119272d3232aaa947bea22ac Mon Sep 17 00:00:00 2001 -From: kwizart <kwizart@gmail.com> -Date: Mon, 30 Dec 2019 14:44:51 +0100 -Subject: [PATCH] Update facebl0r to c++ api - -Signed-off-by: kwizart <kwizart@gmail.com> ---- - src/filter/facebl0r/facebl0r.cpp | 56 ++++++++++++++++++-------------- - 1 file changed, 32 insertions(+), 24 deletions(-) - -diff --git a/src/filter/facebl0r/facebl0r.cpp b/src/filter/facebl0r/facebl0r.cpp -index 17446cc..ba146d0 100644 ---- a/src/filter/facebl0r/facebl0r.cpp -+++ b/src/filter/facebl0r/facebl0r.cpp -@@ -18,7 +18,11 @@ - #include <stdlib.h> - #include <stdio.h> - #include <string.h> --#include <opencv2/opencv.hpp> -+#include <opencv2/core.hpp> -+#include <opencv2/imgproc/imgproc_c.h> -+#include <opencv2/imgproc.hpp> -+#include <opencv2/objdetect.hpp> -+#include <opencv2/video/tracking.hpp> - #include "frei0r.hpp" - #include "frei0r_math.h" - -@@ -30,7 +34,7 @@ typedef struct { - - CvHistogram* hist; //histogram of hue in original face image - -- CvRect prev_rect; //location of face in previous frame -+ cv::Rect prev_rect; //location of face in previous frame - CvBox2D curr_box; //current face location estimate - } TrackedObj; - -@@ -53,7 +57,7 @@ class FaceBl0r: public frei0r::filter { - void update_hue_image (const IplImage* image, TrackedObj* imgs); - - //trackface -- CvRect* detect_face (IplImage*, CvHaarClassifierCascade*, CvMemStorage*); -+ CvRect* detect_face (IplImage*, cv::CascadeClassifier&, CvMemStorage*); - - - TrackedObj* tracked_obj; -@@ -63,7 +67,7 @@ class FaceBl0r: public frei0r::filter { - //used by capture_video_frame, so we don't have to keep creating. - IplImage* image; - -- CvHaarClassifierCascade* cascade; -+ cv::CascadeClassifier cascade; - CvMemStorage* storage; - - // plugin parameters -@@ -96,7 +100,7 @@ FaceBl0r::FaceBl0r(int wdt, int hgt) { - tracked_obj = 0; - face_found = 0; - -- cascade = 0; -+ //cascade = 0; - storage = 0; - - classifier = "/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"; -@@ -124,7 +128,7 @@ FaceBl0r::~FaceBl0r() { - if(tracked_obj) - destroy_tracked_object(tracked_obj); - -- if(cascade) cvReleaseHaarClassifierCascade(&cascade); -+ //if(cascade) cvReleaseHaarClassifierCascade(&cascade); - if(storage) cvReleaseMemStorage(&storage); - - } -@@ -133,7 +137,7 @@ void FaceBl0r::update(double time, - uint32_t* out, - const uint32_t* in) { - -- if (!cascade) { -+ if (cascade.empty()) { - cvSetNumThreads(cvRound(threads * 100)); - if (classifier.length() > 0) { - if (classifier == old_classifier) { -@@ -142,8 +146,7 @@ void FaceBl0r::update(double time, - return; - } else old_classifier = classifier; - -- cascade = (CvHaarClassifierCascade*) cvLoad(classifier.c_str(), 0, 0, 0 ); -- if (!cascade) { -+ if (!cascade.load(classifier.c_str())) { - fprintf(stderr, "ERROR in filter facebl0r, classifier cascade not found:\n"); - fprintf(stderr, " %s\n", classifier.c_str()); - memcpy(out, in, size * 4); -@@ -234,30 +237,33 @@ void FaceBl0r::update(double time, - - /* Given an image and a classider, detect and return region. */ - CvRect* FaceBl0r::detect_face (IplImage* image, -- CvHaarClassifierCascade* cascade, -+ cv::CascadeClassifier &cascade, - CvMemStorage* storage) { - - CvRect* rect = 0; -+ std::vector<cv::Rect> faces; -+ cv::Mat gray_mat; - -- if (cascade && storage) { -+ if (!cascade.empty() && storage) { - //use an equalized gray image for better recognition - IplImage* gray = cvCreateImage(cvSize(image->width, image->height), 8, 1); - cvCvtColor(image, gray, CV_BGR2GRAY); - cvEqualizeHist(gray, gray); - cvClearMemStorage(storage); -+ gray_mat = cv::cvarrToMat(&gray); - - //get a sequence of faces in image - int min = cvRound(smallest * 1000); -- CvSeq *faces = cvHaarDetectObjects(gray, cascade, storage, -+ cascade.detectMultiScale(gray_mat, faces, - search_scale * 10.0, - cvRound(neighbors * 100), -- CV_HAAR_FIND_BIGGEST_OBJECT|//since we track only the first, get the biggest -- CV_HAAR_DO_CANNY_PRUNING, //skip regions unlikely to contain a face -- cvSize(min, min)); -+ cv::CASCADE_FIND_BIGGEST_OBJECT|//since we track only the first, get the biggest -+ cv::CASCADE_DO_CANNY_PRUNING, //skip regions unlikely to contain a face -+ cvSize(min,min)); - - //if one or more faces are detected, return the first one -- if(faces && faces->total) -- rect = (CvRect*) cvGetSeqElem(faces, 0); -+ if(faces.size() > 0) -+ rect = (CvRect*) &faces.front(); - - cvReleaseImage(&gray); - } -@@ -321,7 +327,7 @@ void FaceBl0r::destroy_tracked_object (TrackedObj* obj) { - - /* Given an image and tracked object, return box position. */ - CvBox2D FaceBl0r::camshift_track_face (IplImage* image, TrackedObj* obj) { -- CvConnectedComp components; -+ //CvConnectedComp components; - - //create a new hue image - update_hue_image(image, obj); -@@ -330,16 +336,18 @@ CvBox2D FaceBl0r::camshift_track_face (IplImage* image, TrackedObj* obj) { - cvCalcBackProject(&obj->hue, obj->prob, obj->hist); - cvAnd(obj->prob, obj->mask, obj->prob, 0); - -+ cv::Mat obj_prob_mat = cv::cvarrToMat(&obj->prob); -+ - //use CamShift to find the center of the new face probability -- cvCamShift(obj->prob, obj->prev_rect, -- cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1), -- &components, &obj->curr_box); -+ cv::RotatedRect rot_rect = cv::CamShift(obj_prob_mat, obj->prev_rect, -+ cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1)); -+ // &components, &obj->curr_box); - - //update face location and angle -- obj->prev_rect = components.rect; -- obj->curr_box.angle = -obj->curr_box.angle; -+ //obj->prev_rect = components.rect; -+ //obj->curr_box.angle = -obj->curr_box.angle; - -- return obj->curr_box; -+ return rot_rect; - } - - void FaceBl0r::update_hue_image (const IplImage* image, TrackedObj* obj) { diff --git a/libraries/frei0r/slack-desc b/libraries/frei0r/slack-desc deleted file mode 100644 index c1c1dc1dd6..0000000000 --- a/libraries/frei0r/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -frei0r: frei0r (a minimalistic plugin API for video sources and filters) -frei0r: -frei0r: Frei0r is a minimalistic plugin API for video sources and filters. -frei0r: The behaviour of the effects can be controlled from the host by -frei0r: simple parameters. The intent is to solve the recurring -frei0r: reimplementation or adaptation issue of standard effects. -frei0r: -frei0r: homepage: https://frei0r.dyne.org -frei0r: -frei0r: -frei0r: |