patrikhuber / 4dface

Real-time 3D face tracking and reconstruction from 2D video

Home Page:https://www.4dface.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Texture.cpp: use COLOR_BGR2BGRA instead of CV_BGR2BGRA

waqarsqureshi opened this issue · comments

I was compiling 4dface and figured out that while compiling if you change to COLOR_BGR2BGRA, we can compile using latest version of opencv.

best

Thank you for the report!
Indeed I think you're right - I will include this the next time I'm going to push changes.

Thanks again :)

Lets close the issue then?

Let's leave this open to track it, since there is no PR at the moment.

commented

Hello,
My opencv version is the 4.0.0 and I had the same issue when I run "make" after cmake of source.
So I replaced CV_BGR2BGRA by 0 but I've got 3 others errors :

CMakeFiles/4dface.dir/apps/4dface.cpp.o  : In function « cv::Mat::Mat(int, int, int, void*, unsigned long) [clone .constprop.5619] » : 4dface.cpp:(.text+0x6318) : undefined reference to « cv::Mat::updateContinuityFlag() »
CMakeFiles/4dface.dir/apps/4dface.cpp.o : In function « rcr::HogTransform::operator()(cv::Mat, unsigned long, int) » : 4dface.cpp (.text._ZN3rcr12HogTransformclEN2cv3MatEmi[ZN3rcr12HogTransformclEN2cv3MatEmi]+0xf9e) : undefined reference to « cv::Mat::updateContinuityFlag() »
CMakeFiles/4dface.dir/apps/4dface.cpp.o : Dans la fonction « main » :
4dface.cpp:(.text.startup+0x14bb) : undefined reference to « cv::rectangle(cv::InputOutputArray const&, cv::Rect, cv::Scalar
const&, int, int, int) »

However, cv::Mat::updateContinuityFlag() is still in the current version of opencv https://docs.opencv.org/master/d3/d63/classcv_1_1Mat.html and idem for rectangle https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gac865734d137287c0afb7682ff7b3db23

Perhaps you need to compile opencv again! This only means that the function is not found in the library you compiled. Do you have two version of opencv installed?

@valbi Hi,
I don't think this source code is using cv::Mat::updateContinuityFlag() anywhere, I haven't seen that function before. I think you're just not linking OpenCV correctly or have some problem locally. Shouldn't have anything to do with the 4dface code.

commented

Ok, 4dface works.
After re-compile opencv4, i've got the error about OpenCV_haarcascades_DIR, like in the Build & run readme of 4dface. I never have this error at the first cmake, so opencv was not well compiled
I think when i follow build directions, i execute sudo apt-get install gcc-7 g++-7 libboost-all-dev libeigen3-dev libopencv-dev opencv-data with opencv already build and install from git source code. I should have removed libopencv-dev and opencv-data.
Thank you @waqarsqureshi and @patrikhuber.