Giter Club home page Giter Club logo

huihut / opencv-mingw-build Goto Github PK

View Code? Open in Web Editor NEW
926.0 30.0 215.0 303.18 MB

👀 MinGW 32bit and 64bit version of OpenCV compiled on Windows. Including OpenCV 3.3.1, 3.4.1, 3.4.1-x64, 3.4.5, 3.4.6, 3.4.7, 3.4.8-x64, 3.4.9, 4.0.0-alpha-x64, 4.0.0-rc-x64, 4.0.1-x64, 4.1.0, 4.1.0-x64, 4.1.1-x64, 4.5.0-with-contrib, 4.5.2-x64

Home Page: https://opencv.org/

opencv mingw mingw32 windows opencv-library build cmake qt codeblocks opencv-mingw dll opencv-contrib

opencv-mingw-build's People

Contributors

huihut avatar tccoin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencv-mingw-build's Issues

OpenCv 4 for x32 build

hi can you please share OpenCv v4 build for x32 for QT mingw730_32 as i noticed all opencv 4 builds are for x64

thanks

Error: undefined reference to `cv::VideoCapture::VideoCapture(std::string const&, int)'

Hi,

I'm trying to compile my simple program to capture video frame, using msys mingw64. Currently I get this error:

# make
x86_64-pc-msys-g++ -I../opencv4.5.5/include -Iinclude -L../opencv4.5.5/x64/mingw/bin -lopencv_videoio_ffmpeg455_64 -lopencv_video455 -lopencv_videoio455 -lopencv_imgproc455 -lopencv_highgui455 -lopencv_imgcodecs455 -lopencv_core455 -g -O0 -o sample  main.cpp
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: /tmp/ccfOqfBU.o:/e/dense_flow/structure_from_video/main.cpp:138: undefined reference to `cv::VideoCapture::VideoCapture(std::string const&, int)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: sample] Error 1

Tried with OpenCV 4.5.5, 4.1.0, 3.8.4. Nothing worked.

Opencv nonfree build

Hi hope you doing well

i wonder can you please build opencv 4 x86 with flag = OPENCV_ENABLE_NONFREE

also can you upload your app : https://github.com/avamoe/Avalive to gog.com i tried to buy it on steam but steam have strange country lock issue will not let me buy because of different steam account country and paypal . so will be thankful if u can upload to gog.com i would love to buy it

thanks

OpenCV4.4

Hi, huihut.
Can you provide the compilation of OpenCV4.4?
If you can add the opencv_contrib4.4 extension library module to compile, it would be even better.
Looking forward to OpenCV4.4!

undefined reference to `cv::imread(std::string const&, int)'

CMakeFiles\cv.dir/objects.a(main.cpp.obj): In function main': C:/Users/Administrator/Desktop/cv/main.cpp:8: undefined reference to cv::imread(std::string const&, int)'
C:/Users/Administrator/Desktop/cv/main.cpp:13: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[3]: *** [CMakeFiles\cv.dir\build.make:111: cv.exe] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:95: CMakeFiles/cv.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:102: CMakeFiles/cv.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:137: cv] Error 2

No x86 version ?

Hi,
Thanks for the job!
I downloaded the zip files for multiple non-x64 versions of openCV on your release age.

Unfortunately, in the build dir, there are only "x64/" subdir version?

Do you compile any x86 version for mingW? (I'm using mingw included in Code::Blocks and it's the 32bits version)

作者你好,我在使用你编译出来的库的时候出现了无法定位程序输入点的错误

编译环境:
作者提供的编译工具包

这是我的makefile:

INCLUDES = -I. -ID:\OpenCV-4.1.1\include
# opencv 主要模块 core,imgproc,highgui,imgcodecs,videoio(注意和video的区别),calib3d,feature2d,video,objdetect,dnn,ml,gapi,cuda
# LIBS = -lopencv_core420 -lopencv_imgcodecs420
LIBDIRS = -L. -LD:\OpenCV-4.1.1\x64\mingw\bin 
LIBS = -lopencv_core411 -lopencv_imgcodecs411
# OPT = -O3 -Wno-deprecated
 
CC=g++

# % 表示匹配当前目录下的所有文件,$@ 代表规则中的目标,$< 指代第一个依赖条件,$^ 指代所有的依赖条件,$+ 与 $^ 相似,只是其不会去除重复的部分。
 
a:*.cpp
	$(CC) $+ $(INCLUDES) $(LIBDIRS) $(LIBS) -o $@ $(OPT)

.PHONY: all clean
clean:
	rm -f *.o 
all:
	echo make complete

这是我的main.cpp:

#include<opencv2/core.hpp>
#include<opencv2/imgcodecs.hpp>
#include<iostream>

using namespace std;
using namespace cv;

int main()
{
    cv::Mat a;
    a = cv::imread("1.png");
    cout<<a<<endl;
}

这是执行输出的a.exe得到的结果:

无法定位程序输入点
_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt1
4default_deleteIS1_EEPFvvE 于动态链接库
D:\OpenCV-4.1.1\x64\mingw\bin\libopencv_imgcodecs411.dll
上。

error on vs code

I am completely noob on c++

I have cloned your repo x64 version

And when I run this command I get the error.

Command

g++ ./src/main.cpp -I C:/OpenCV-MinGW-Build-OpenCV-3.4.1-x64/include -L C:/OpenCV-MinGW-Build-OpenCV-3.4.1-x64/x64/mingw/lib -llibopencv_core341 -llibopencv_highgui341 -o app

Error

> Executing task:  g++ ./src/main.cpp -I C:/OpenCV-MinGW-Build-OpenCV-3.4.1-x64/include -L C:/OpenCV-MinGW-Build-OpenCV-3.4.1-x64/x64/mingw/lib -llibopencv_core341 -llibopencv_highgui341 -o app <

C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text+0x51): undefined reference to `cv::imread(cv::String const&, int)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text+0xa2): undefined reference to `cv::namedWindow(cv::String const&, int)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text+0x119): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text+0x139): undefined reference to `cv::waitKey(int)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text$_ZN2cv6StringC1EPKc[__ZN2cv6StringC1EPKc]+0x42): undefined reference to `cv::String::allocate(unsigned int)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text$_ZN2cv6StringD1Ev[__ZN2cv6StringD1Ev]+0xf): undefined reference to `cv::String::deallocate()'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text$_ZN2cv3MatD1Ev[__ZN2cv3MatD1Ev]+0x2d): undefined reference to `cv::fastFree(void*)'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text$_ZN2cv3Mat7releaseEv[__ZN2cv3Mat7releaseEv]+0x40): undefined reference to `cv::Mat::deallocate()'
C:\Users\giorg\AppData\Local\Temp\ccVLePpF.o:main.cpp:(.text$_ZN2cv3MataSEOS0_[__ZN2cv3MataSEOS0_]+0xb4): undefined reference to `cv::fastFree(void*)'
collect2.exe: error: ld returned 1 exit status
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

64bit version?

I'm mainly targeting x86_64-pc-windows-gnu these days. And I get linking errors from rust with the 32bit due to the eh vs sjlj difference.

error : no such file or directory

test.cpp:1:9: fatal error: opencv2/core/core.hpp: No such file or directory
#include<opencv2/core/core.hpp>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

how to compile the opencv with mingw64 build using gcc/g++ compiler?

opencv4 alpha

Hi,

Is is possible to have a 64bits version of opencv4?

Thanks

thank you

thank you my brother.
hope you can support mingw530_32 mingw810_32, and 64bit for QT dev enviroment.

Adding Open 3.4.7 version

The latest 3.4 release has some bug fixes in the dnn library that are very useful, would really appreciate if you could build it :)

Missing Library MinGW build x64

Hello, It's nice to see you created build result of opencv 4.0.1 for MinGW, however i got error lib not exist like picture shown below, but it solved so i just put this issue here and close it (in case someone got same error like mine)
image

D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_face401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_xfeatures2d401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_plot401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_tracking401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_img_hash401
collect2.exe: error: ld returned 1 exit status

so i tried to build them from source, then i found some libs is not exist in your build
i hope you update the build result, thank you

wenrjianr diusir

m:/work/tool/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_face410
m:/work/tool/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_xfeatures2d410
m:/work/tool/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_plot410
m:/work/tool/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_tracking410
m:/work/tool/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_img_hash410

Unable to import cv2 using `OpenCV-MinGW-Build-OpenCV-4.0.1-x64`

Using: msys2

$ uname -a
MINGW64_NT-10.0 gion-pc 2.11.2(0.329/5/3) 2018-11-26 09:22 x86_64 Msys

$ python3 --version
Python 3.7.0

I have installed it using:

istoica@gion-pc MINGW64 /W/Workspace/OpenCV-MinGW-Build-OpenCV-4.0.1-x64/python
$ python3 setup.py install
running install
running bdist_egg
running egg_info
writing opencv.egg-info/PKG-INFO
writing dependency_links to opencv.egg-info/dependency_links.txt
writing requirements to opencv.egg-info/requires.txt
writing top-level names to opencv.egg-info/top_level.txt
reading manifest file 'opencv.egg-info/SOURCES.txt'
writing manifest file 'opencv.egg-info/SOURCES.txt'
installing library code to build/bdist.mingw/egg
running install_lib
running build_py
creating build/bdist.mingw/egg
creating build/bdist.mingw/egg/cv2
copying build/lib/cv2/config.py -> build/bdist.mingw/egg/cv2
copying build/lib/cv2/load_config_py2.py -> build/bdist.mingw/egg/cv2
copying build/lib/cv2/load_config_py3.py -> build/bdist.mingw/egg/cv2
copying build/lib/cv2/__init__.py -> build/bdist.mingw/egg/cv2
byte-compiling build/bdist.mingw/egg/cv2/config.py to config.cpython-37.pyc
byte-compiling build/bdist.mingw/egg/cv2/load_config_py2.py to load_config_py2.cpython-37.pyc
byte-compiling build/bdist.mingw/egg/cv2/load_config_py3.py to load_config_py3.cpython-37.pyc
byte-compiling build/bdist.mingw/egg/cv2/__init__.py to __init__.cpython-37.pyc
creating build/bdist.mingw/egg/EGG-INFO
copying opencv.egg-info/PKG-INFO -> build/bdist.mingw/egg/EGG-INFO
copying opencv.egg-info/SOURCES.txt -> build/bdist.mingw/egg/EGG-INFO
copying opencv.egg-info/dependency_links.txt -> build/bdist.mingw/egg/EGG-INFO
copying opencv.egg-info/requires.txt -> build/bdist.mingw/egg/EGG-INFO
copying opencv.egg-info/top_level.txt -> build/bdist.mingw/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
cv2.__pycache__.__init__.cpython-37: module references __file__
creating 'dist/opencv-4.0.0-py3.7.egg' and adding 'build/bdist.mingw/egg' to it
removing 'build/bdist.mingw/egg' (and everything under it)
Processing opencv-4.0.0-py3.7.egg
removing 'W:/sdks/msys2/mingw64/lib/python3.7/site-packages/opencv-4.0.0-py3.7.egg' (and everything under it)
creating W:/sdks/msys2/mingw64/lib/python3.7/site-packages/opencv-4.0.0-py3.7.egg
Extracting opencv-4.0.0-py3.7.egg to W:/sdks/msys2/mingw64/lib/python3.7/site-packages
opencv 4.0.0 is already the active version in easy-install.pth

Installed w:/sdks/msys2/mingw64/lib/python3.7/site-packages/opencv-4.0.0-py3.7.egg
Processing dependencies for opencv==4.0.0
Searching for numpy==1.15.0
Best match: numpy 1.15.0
Adding numpy 1.15.0 to easy-install.pth file
Installing conv-template-script.py script to W:/SDKs/msys2/mingw64/bin
Installing conv-template.exe script to W:/SDKs/msys2/mingw64/bin
Installing f2py-script.py script to W:/SDKs/msys2/mingw64/bin
Installing f2py.exe script to W:/SDKs/msys2/mingw64/bin
Installing from-template-script.py script to W:/SDKs/msys2/mingw64/bin
Installing from-template.exe script to W:/SDKs/msys2/mingw64/bin

Using w:/sdks/msys2/mingw64/lib/python3.7/site-packages
Finished processing dependencies for opencv==4.0.0

But I get this output, unable to import cv2:

$ python3
Python 3.7.0 (default, Aug  3 2018, 11:56:18)  [GCC 8.2.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "W:/Workspace/OpenCV-MinGW-Build-OpenCV-4.0.1-x64/python\cv2\__init__.py", line 89, in <module>
    bootstrap()
  File "W:/Workspace/OpenCV-MinGW-Build-OpenCV-4.0.1-x64/python\cv2\__init__.py", line 62, in bootstrap
    ], True)
  File "W:/Workspace/OpenCV-MinGW-Build-OpenCV-4.0.1-x64/python\cv2\__init__.py", line 56, in load_first_config
    raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config-3.7.py', 'config-3.py']. Check OpenCV installation.

What must I do to get it working ?

Linking failure with Qt 5.12

Getting undefined references since Qt now uses MinGW 7.3.0

undefined reference to `cv::CascadeClassifier::load(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'

Hello,my friend

I'm a new learner to OpenCV in Mingw. Could you please tell me how to install the complied opencv ? My g++ tell me it couldn't find opencv.hpp

crash when calling in program

I have tried some versions like 3.4.9 and 4.1.1. Things work well with opencv objects like:

// cv_test.cpp main()
Point3d all_points[][2] = {
		Point3d( 0.0, 0.0, 0.0 ),
		Point3d( 1.0, 0.0, 0.0 ),

		Point3d( 0.0, 2.0, 0.0 ),
		Point3d( 1.0, 1.0, 0.0 ),
				 
		Point3d( 0.0, -2.0, 0.0 ),
		Point3d( 1.0, -1.0, 0.0 ),
	};

cv::Mat tmp = cv::Mat::zeros(512, 512, CV_8UC1);

However, when it comes to imread() and imshow(), I can still compile my program successfully, but running the exe, it crashes immediately. I guess it is about the dynamic link library...

// cv_test.cpp main()
    cv::Mat my_pic = cv::imread("./my_pic.png", cv::IMREAD_GRAYSCALE);
    cv::imshow("my_pic", my_pic);

// gdb output
(gdb) start
During startup program exited with code 0xc0000135

The library is compiled without QT support

I Tried Using addText() Function With A QtFont Parameter But It Resulted In This Error!
So I Think We Need The OpenCV With Qt Support.

Error

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.5.5-dev) Error: The function/feature is not implemented (The library is compiled without QT support) in fontQt, file C:\Users\m8317\Downloads\opencv_mingw\opencv\modules\highgui\src\window.cpp, line 1175

pull request for OpenCV 3.4.8x64?

我按你的教程自己编译了 OpenCV 3.4.8x64,fork地址在这里。不知道是否可以把我编译的pull request提交进来,兴许可以节约一些时间hhh?但我没权限开新分支,可能需要你开个分支我才能提交。

教程写得非常详尽!感谢XD!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.