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

Linux Make Issue #43

Open
Caleb-J773 opened this issue Jun 13, 2018 · 6 comments
Open

Linux Make Issue #43

Caleb-J773 opened this issue Jun 13, 2018 · 6 comments

Comments

@Caleb-J773
Copy link

Caleb-J773 commented Jun 13, 2018

I am getting stumped by this error. Log provided below.
~/ChosunTruck/linux$ make mkdir -p build g++ -c src/main2.cc pkg-config opencv --cflags --libs -std=c++11 -lX11 -Wall -fopenmp -O3 -march=native -o build/main2.o src/main2.cc: In function ‘int main(int, char**)’: src/main2.cc:128:32: error: ‘CV_RGBA2RGB’ was not declared in this scope cv::cvtColor(image, sendImg, CV_RGBA2RGB); ^~~~~~~~~~~ src/main2.cc:128:32: note: suggested alternative: ‘CV_RGB’ cv::cvtColor(image, sendImg, CV_RGBA2RGB); ^~~~~~~~~~~ CV_RGB src/main2.cc:182:44: error: ‘CV_THRESH_BINARY’ was not declared in this scope cv::threshold(sobel, contours, 145, 255, CV_THRESH_BINARY); ^~~~~~~~~~~~~~~~ src/main2.cc:240:8: warning: unused variable ‘degree’ [-Wunused-variable] int degree = atan2 (last_centerline - first_centerline, count_centerline) * 180 / PI; ^~~~~~ src/main2.cc:42:7: warning: unused variable ‘python_on’ [-Wunused-variable] bool python_on = false; ^~~~~~~~~ src/main2.cc:76:10: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system("python tensorbox/Car_detection.py"); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Am I doing something wrong here? I followed the steps and correctly installed opencv and tensorflow.

If the log isn't readable, here's a ghostbin link: https://ghostbin.com/paste/9p8h4/raw

@zappybiby
Copy link
Contributor

zappybiby commented Jun 13, 2018

Disclaimer: I haven't built ChosunTruck on Linux in a while and I don't have a Linux machine to test this on.

I think the issue is that OpenCV 3.0+ might not have the "CV_" prefix for those functions. For example, change "CV_RGBA2RGB" to "RGBA2RGB"

@zappybiby
Copy link
Contributor

Actually it might be "COLOR_RGBA2RGB"

And replace "CV_THRESH_BINARY" to "THRESH_BINARY" as that is the correct function in opencv 3+

@Caleb-J773
Copy link
Author

Yea, this doesn't seem to fix it, same issue.

@zappybiby
Copy link
Contributor

zappybiby commented Jul 1, 2018

Can you run

 dpkg -l | grep libopencv

And tell me what that returns?

You can try to add

cv::

To the functions I named above.

@RustyRaptor
Copy link

Ok so I had this issue with a different project called mxnet. It's the same deal in OpenCV 4.0.0

Indeed the correct version is cv::COLOR_RGBA2RGB
And that applies to anything in the color conversion functions.

THRESH_BINARY is also the correct form.

Anyway should we close this issue 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

3 participants