Skip to content

summererror/imapla-udf-sample-phash-cv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

Impala UDF for pHash (C++ Edition)

License

  • "Anti 996" License

  • ["Anti 995" License]

  • ["Follow 955" License]

  • ["World Peace" License] Sri Lanka Bombing

  • So, I'm waiting for the three licenses above to republic.

Background

Use impala-udf-sample to Create an Impala UDF function for image's phash compute based on cv::img_hash::pHash. provided by opencv-> pHash .

Speed

0.5s/image, so, it's UNusable in produtive envirment abviously. Luck!

Install

1. Opencv

Refer to Installation in Linux .

1.1 ffmpge

# Maybe you need configure the "mirror" for yum install.
sudo yum -y install ffmpeg ffmpeg-devel

1.2 cmake (>3.x)

cd /tmp
wget https://github.com/Kitware/CMake/releases/download/v3.14.3/cmake-3.14.3-Linux-x86_64.tar.gz
tar xzf cmake-3.14.3-Linux-x86_64.tar.gz

1.3 opencv(BASE) opencv_contrib(EXTRA)

cd /tmp
# opencv 4.1.0 download
wget https://github.com/opencv/opencv/archive/4.1.0.zip
unzip 4.1.0.zip
# opencv_contrib download from https://github.com/opencv/opencv_contrib
git clone https://github.com/opencv/opencv_contrib.git
cd opencv-4.1.0
mkdir build; cd build
# cmake
../../cmake-3.*/bin/cmake  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/ ..
# make
make -j8
# install
make install

1.4 cloudera

About

Impala UDF for pHash use opencv2 img_hash::pHash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published