Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to Qt5 #163

Open
Nu2This opened this issue Apr 9, 2020 · 15 comments
Open

Updating to Qt5 #163

Nu2This opened this issue Apr 9, 2020 · 15 comments

Comments

@Nu2This
Copy link

Nu2This commented Apr 9, 2020

Any chance you are planning on upgrading to a newer version of Qt? I cant seem to get the correct libraries installed on Debian sid.

@zumbrunnen
Copy link

Ubuntu 20.04 has removed support for Qt4, too. So, the GUI no longer works. An upgrade to Qt5 would be highly appreciated!

@rfvizarra
Copy link

Hi, I've done a quick migration to Qt5. Would you mind testing it?
https://github.com/rfvizarra/linuxtrack
If it works fine for you I would consider creating a pull request.

@zumbrunnen
Copy link

Hi @rfvizarra
Thank you for your changes. I tried to build it on Ubuntu 20.04. Unfortunately, I cannot build the project. I get OpenCV errors for facetrack.cpp:

facetrack.cpp:138:35: error: ‘last_fcvGetTickCountace_h’ was not declared in this scope
  138 |       face_h = ltr_int_expfilt(h, last_fcvGetTickCountace_h, expFiltFactor);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
facetrack.cpp: In function ‘void* ltr_int_detector_thread(void*)’:
facetrack.cpp:168:24: error: ‘cvGetTickCount’ was not declared in this scope
  168 |     double t = (double)cvGetTickCount();
      |                        ^~~~~~~~~~~~~~

Maybe linuxtrack needs other changes in order to work with newer OpenCV libraries.

If you manage to make a build of the GUI, could you provide it?

@rfvizarra
Copy link

Hi @zumbrunnen

linuxtrack uses opencv version 2... If that package is not available in Ubuntu 20.20 (I use Archlinux) try the following commands

sed -i 's/opencv >= 2.0/opencv4/g' configure
sed -i 's/opencv2/core/core.hpp/opencv2/core/core_c.h/g' src/facetrack.cpp
sed -i 's/#include <opencv2/#include <opencv4/opencv2/g' src/facetrack.cpp

and run configure and make again

It that doesn't work we can talk about providing binaries (contact me by email rfvizarra (at) gmail.com)

@zumbrunnen
Copy link

Hello @rfvizarra

I've sent you an e-mail on May, 18th but unfortunately I haven't got an answer yet.

@rfvizarra
Copy link

Hello @zumbrunnen

thanks for testing the changes I made. Given that they work fine for you I have created a pull request with them.
I'll create a separate pull request to submit the changes required to make it compile with opencv4

@Richard-Payne
Copy link

Manjaro has the opencv4 package. The headers are In /usr/include/opencv4/opencv2. I just moved the opencv2 folder down to /usr/include and the errors disappeared.

Thanks for this patch @rfvizarra.

@rfvizarra
Copy link

Manjaro has the opencv4 package. The headers are In /usr/include/opencv4/opencv2. I just moved the opencv2 folder down to /usr/include and the errors disappeared.

Thanks for this patch @rfvizarra.

Glad it is useful for someone :)

@Richard-Payne
Copy link

Glad it is useful for someone :)

Has anyone heard from uglyDwarf, or is the repo basically unmaintained now?

@nobilisgkill4
Copy link

@rfvizarra: Any chance that you create install instructions for your fork? Seems like your currently maintaining the fork more than the original project is maintained.

It would be great to have an updated AUR package as well ;-)

@rfvizarra
Copy link

@rfvizarra: Any chance that you create install instructions for your fork? Seems like your currently maintaining the fork more than the original project is maintained.

It would be great to have an updated AUR package as well ;-)

Hi, I´ll what I can do, I can´t promise anything as my free time is very limited. In summary the instructions are the same, except that you need to have installed the required QT5 and opencv2 packages.

I'm an Archlinux user myself, and I would benefit from that package as well, but I've never built an aur package and It would require time to learn.

@nobilisgkill4
Copy link

opencv2 from AUR failed to build. Is it also possible to use the latest (4.5) version?

@rfvizarra
Copy link

rfvizarra commented Oct 23, 2022 via email

@CyberGuerro
Copy link

that is correct, I've just created a patch in my distribution package (on my local repository)
replacing
AC_PATH_PROGS(QMAKE_PATH, [qmake qmake-qt5])
with
AC_PATH_PROGS(QMAKE_PATH, [qmake5])

and it works perfectly :-) so if you want to make your change I'll remove my patch from my package :-)
question:
it could be possible replace "5" with a variable? This would be more useful for the next qt6 release :-)

@rfvizarra
Copy link

I have updated the pull request including qmake5. I haven't the change
Unfortunately a change to qt6 will take more than replacing a 5 with a 6 so I don't think it's worth the effort now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants