opencv-安装注意点-The function is not implemented
- 格式:docx
- 大小:751.63 KB
- 文档页数:3
CVX使用说明范文CVX是一个用于求解凸优化问题的软件包。
它提供了一种简洁而直观的方式来描述和求解各种各样的凸优化问题,包括线性规划、二次规划、半正定规划、凸逼近、最小二乘、最小凸规划等。
CVX的设计目标是使用户专注于问题的描述和建模,而不用关心底层的求解算法和优化技术。
本文将详细介绍CVX的安装、使用和一些常见的技巧和注意事项。
一、CVX的安装CVX是基于MATLAB环境下的一个软件包,首先需要安装MATLAB。
CVX 支持MATLAB版本R2024a及以上,操作系统支持Windows、Mac OS X和Linux。
2.解压压缩包3.添加路径打开MATLAB,点击顶部菜单栏的"Set Path",然后点击"Add Folder",将解压后的文件夹路径添加到MATLAB的路径中。
4.检查安装在MATLAB的命令窗口中输入"cvx_setup",如果成功显示CVX的版本号,说明CVX已经成功安装。
二、CVX的基本使用CVX的使用与MATLAB的语法非常相似,在问题的建模阶段,CVX提供了一些简洁的语句来描述问题的约束条件和目标函数,然后通过调用cvx_begin和cvx_end之间的代码块来执行求解过程。
1.基本语法在MATLAB中,通过调用cvx_begin函数来声明一个新的优化问题,然后在cvx_end部分结束。
中间的代码块用来描述问题的目标函数和约束条件。
示例:cvx_beginvariable x(n)minimize (c' * x)subject toA*x<=bsum(x) == 1x>=0cvx_end其中,variable x(n)声明了一个n维的变量x,minimize (c' * x)表示要最小化目标函数c' * x,后面的subject to部分是约束条件,可以有多个约束条件。
2.变量和约束条件在CVX中,变量可以通过使用variable关键字来声明,并指定其维度。
win10+anaconda安装yolov5的⽅法及问题解决⽅案⽬录YOLOV5-3.0/3.1版本版本问题YOLOV5-4.0版本电脑配置过程中的⼀些报错报错1:打开摄像头报错报错2:摄像头报错报错3:在创建虚拟环境后,安装库的时候出现错误报错4:报错5:cv2版本报错4.5.1对于yolo系列,应⽤⼴泛,在win10端也有很⼤的应⽤需求,所以这篇⽂章给出win10环境下的安装教程。
先给出系列⽂章YOLOV5-3.0/3.1版本版本问题python 3.7 torch 1.6.0 torchvision 0.7.0 cuda 10.1注意:Yolov5-3.1只能使⽤torch 1.6.01.在⽹站下载对应版本的torch和torchvision的whl⽂件2.新建虚拟环境conda create -n YOLOV5-3.1 python=3.73.查看虚拟环境conda info -e4.激活虚拟环境activate YOLOV5-3.15.安装相关库pip3 install opencv-python==4.4.0.46 -i https:///simple/pip3 install numpy==1.19.2 -i https:///simple/pip3 install Cython==0.29.21 -i https:///simple/pip3 install pillow==8.0.1 -i https:///simple/pip3 install matplotlib==3.3.2 -i https:///simple/pip3 install pyyaml==5.3.1 -i https:///simple/pip3 install tensorboard==2.3.0 -i https:///simple/pip3 install scipy==1.5.2 -i https:///simple/pip3 install tqdm==4.54.0 -i https:///simple/pip3 install pandas==1.1.3 -i https:///simple/pip3 install seaborn==0.11.0 -i https:///simple/pip3 install pycocotools==2.0.2 -i https:///simple/6.安装torch将路径跳转到步骤1中下载的⽂件位置,使⽤pip install .....whl 格式来安装whl⽂件7.验证import torch#查看版本print(torch.__version__)#查看gpu是否可⽤.返回True则表⽰可以使⽤gputorch.cuda.is_available()#返回设备gpu个数torch.cuda.device_count()8.图像检测python detect.py9.调⽤摄像头python detect.py --source 0YOLOV5-4.0版本电脑配置CPU:i7-10750H内存:16G显卡:GTX1650 4GAnaconda:4.9.21.⼀开始就最好把源换⼀下查看当前下载源conda config --show-sources添加源:conda config --add channels https:///anaconda/cloud/pytorch/conda config --add channels https:///anaconda/cloud/menpo/conda config --add channels https:///anaconda/cloud/bioconda/conda config --add channels https:///anaconda/cloud/msys2/conda config --add channels https:///anaconda/cloud/conda-forge/conda config --add channels https:///anaconda/pkgs/main/conda config --add channels https:///anaconda/pkgs/free/conda config --set show_channel_urls yes查看当前下载源conda config --show-sources如果出现国内源挂掉的情况,就换回默认源conda config --remove-key channels2.新建虚拟环境conda create -n YOLOV5-4.0 python=3.73.查看虚拟环境conda info -e4.激活虚拟环境activate YOLOV5-4.05.安装相关库注意1:这⾥不能直接使⽤pip install -r requirements.txt 这样直接安装会默认安装cpu版本的torch,不知道为什么,可能是torch是其他库的依赖库,这⾥不懂,有会的⼩伙伴可以⼀起交流。
ubuntu18.04编译openpose时遇到的问题在编译最后的时候遇到⼀个问题,⼀直⽆法解决CMake Error: The following variables are used in this project, but they are set to NOTFOUND.Please set them or make sure they are set and tested correctly in the CMake files:CUDA_cublas_device_LIBRARY (ADVANCED)后来搜索这个问题看到⼀个答主说必须要⽤cmake-3.14版本源码编译才可以,但是我明明记得前阵⼦⽤cmake-3.13版本就可以的偏偏不信这个邪,最后决定把现在的cmake卸载按照openpose官⽹的安装前置条件严格执⾏。
Uninstall your current Cmake-gui version by running sudo apt purge cmake-qt-gui.Install OpenSSL for building CMake by running sudo apt install libssl-dev.Run sudo apt-get install qtbase5-dev.Download the Latest Release of CMake Unix/Linux Source from the , called cmake-X.X.X.tar.gz.Unzip it and go inside that folder from the terminal.Run ./configure --qt-gui. Make sure no error occurred.Run ./bootstrap && make -j`nproc` && sudo make install -j`nproc` . Make sure no error occurred.执⾏完了后再编译,发现就顺利解决这个问题了。
python环境下安装opencv库的⽅法⽬录⼀、安装⽅法⼆、测试安装版本三、备注注意:安装opencv之前需要先安装numpy,matplotlib等⼀、安装⽅法⽅法⼀、在线安装1.先安装opencv-pythonpip install opencv-python --user我的python版本是3.6.8,可以看到opencv安装的默认版本是 opencv_python-4.1.0.25-cp36-cp36m-win_amd64.whl2.再安装opencv-contrib-pythonpip install opencv-contrib-python --user备注1:此种⽅法安装后,import cv2 as cv后,代码可以正常运⾏,但是⽆法⾃动补全解决⽅案1:import cv2.cv2 as cv(此⽅法有时会时灵时不灵)若出现这样的情况:例如cv.imread()本来是个函数,但是只能补全到cv.imread,解决⽅案:修改 project interpreter为别的路径,然后再修改回来;原因分析:库⽂件在刚刚被加⼊项⽬中时,pycharm会针对这个库⽂件,构建索引,然后再pycharm底部会显⽰⼀个进度条:updating skeletons for ...,在进度条⾛完之前,代码⽆法⾃动补全解决⽅案2:(1)检查上图的project interpreter处,只保留python的⼀个路径,把其他⽆效或错误路径全部删除;(2)修改cv2/__init__.py⽂件的代码,如下:import sysimport osimport importlibos.environ["PATH"] += os.pathsep + os.path.dirname(os.path.realpath(__file__))from .cv2 import *globals().update(importlib.import_module('cv2.cv2').__dict__)(3)删除⽣成的pyc⽂件(4)重启pycharm; import cv2 as cv,完美解决⽅法⼆、离线安装pip installopencv_python-4.1.1+contrib-cp36-cp36m-win_amd64.whlpip installopencv_python-4.1.1+contrib-cp36-cp36m-win_amd64.whl⼆、测试安装版本三、备注python扩展包的⾮官⽅windows⼆进制⽂件参见以下⽹址:总结到此这篇关于python环境下安装opencv库的⽅法的⽂章就介绍到这了,更多相关python安装opencv库内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!。
Ubuntu18.04安装opencv3.2.0的解决⽅法下载opencv.zip要提前安装依赖项。
先更新⼀下下载源。
⽤17.04 的源可以解决在18.04中找不到libjasper.dev的问题。
refhttps:///questions/43484357/opencv-in-ubuntu-17-04libjasper-dev⽆法安装errorE: unable to locate libjasper-dev解决⽅法sudo add-apt-repository “deb /ubuntu xenial-security main”sudo apt updatesudo apt install libjasper1 libjasper-dev报错:-- Checking for module 'gstreamer-base-1.0'-- No package 'gstreamer-base-1.0' found-- Checking for module 'gstreamer-video-1.0'-- No package 'gstreamer-video-1.0' found-- Checking for module 'gstreamer-app-1.0'-- No package 'gstreamer-app-1.0' found-- Checking for module 'gstreamer-riff-1.0'-- No package 'gstreamer-riff-1.0' found-- Checking for module 'gstreamer-pbutils-1.0'-- No package 'gstreamer-pbutils-1.0' found-- Checking for module 'gstreamer-base-0.10'-- No package 'gstreamer-base-0.10' found-- Checking for module 'gstreamer-video-0.10'-- No package 'gstreamer-video-0.10' found-- Checking for module 'gstreamer-app-0.10'-- No package 'gstreamer-app-0.10' found-- Checking for module 'gstreamer-riff-0.10'-- No package 'gstreamer-riff-0.10' found-- Checking for module 'gstreamer-pbutils-0.10'-- No package 'gstreamer-pbutils-0.10' found解决⽅法refhttps:///questions/37678324/compiling-opencv-with-gstreamer-cmake-not-finding-gstreamer安装sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev报错-- CUDA detected: 9.0-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARYAtlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY)-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATHJAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory withVTKConfig.cmake file总结以上所述是⼩编给⼤家介绍的Ubuntu18.04安装opencv 3.2.0的解决⽅法,希望对⼤家有所帮助,如果⼤家有任何疑问请给我留⾔,⼩编会及时回复⼤家的。
安装MATLAB时,都或多或少的遇到一些问题。
但是,我发现很多问题都是大家遇到的,所以呢,为了帮助大家,我上网搜集,总结了一下十几种安装错误提示以及解决方案,供大家参考。
1,安装Matlab提示exception calling main解决方法在安装完windows sp3补丁后,很多人发现matlab2007b无法正常运行,总是启动画面闪一下,然后就没反应了,或者有时候弹出exception calling main的系统错误提示。
解决此问题的办法很简单,右键单击matlab程序图标,选择属性,在兼容性选项卡中勾选"用兼容性运行此程序",兼容模式为window NT 4.0(service pack 5),确定后即可恢复正常2,安装时出现红色叉杠并出现英文字母:The installer cannot read the mwinstall.dll file, This is probably due to a CD reader which can only read files with an eight.three naming convention. Please see the technical support page at 解决方法:请一定不要用WinRar之类的解压软件来再次解压matlab.iso文件,而是必须要用Daemon Tools一类的虚拟光驱软件来打开!3,输入注册码后出现红色叉杠并出现英文字母:There are no products to install, check that the product.zip f iles are in either the root folder or the …archives‟ folder.解决方法:在我的电脑-右键-属性,在系统属性对话框中选择高级-环境变量-TMP改为C:\Temp ,同时在C的根目录下建立Temp文件夹,问题可以解决。
安装python、setuptools、pip等(houwenbin1986)最近需要编译opencv-2.4.12,下载源码opencv-2.4.13.zip后:unzip opencv-2.4.13.zipcd opencv-2.4.12mkdir buildcd buildcmake ..//报错,找不到ccmake ..//GUI模式,进行相应的配置make在cmake配置时,Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES),找不到PythonLibs,好吧,修改/usr/share/cmake/Modules/FindPythonLibs.cmake:因为我想用anaconda2,加入#fixed by houwenbin#set(PYTHON_FOUND 1)#set(PYTHON_INCLUDE_DIRS "/root/anaconda2/include")#set(PYTHON_LIBRARIES "/root/anaconda2/lib")再次试,虽然找到了,仍然报:target opencv_python requests linking to directory......Targets may link only to libraries. CMake is dropping the item.表现为总是找到的是系统自带的Python2.6.6的so库。
不想捣鼓系统的Python,那就还是用系统的吧!!!补全安装系统的Python开发环境:yum install python-devel再次配置opencv,出现找不到numpy,安装,没有setuptools,安装:wget https://bootstrap.pypa.io/ez_setup.py --no-check-certificatepython ez_setup.pycd numpy-1.11.2rc1python setup.py install贴一下ez_setup.py#!/usr/bin/env python"""Setuptools bootstrapping installer.Maintained at https:///pypa/setuptools/tree/bootstrap.Run this script to install or upgrade setuptools."""import osimport shutilimport sysimport tempfileimport zipfileimport optparseimport subprocessimport platformimport textwrapimport contextlibimport jsonimport codecsfrom distutils import logtry: from urllib.request import urlopen from urllib.parse import urljoinexcept ImportError: from urllib2 import urlopen from urlparse import urljointry: from site import USER_SITEexcept ImportError: USER_SITE = NoneLATEST = object()DEFAULT_VERSION = LATESTDEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/"DEFAULT_SAVE_DIR = os.curdirdef _python_cmd(*args): """ Execute a command. Return True if the command succeeded. """ args = (sys.executable,) + args return subprocess.call(args) == 0def _install(archive_filename, install_args=()): """Install Setuptools.""" with archive_context(archive_filename): # installing log.warn('Installing Setuptools') if not _python_cmd('setup.py', 'install',*install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') # exitcode will be 2 return 2def _build_egg(egg, archive_filename, to_dir): """Build Setuptools egg.""" with archive_context(archive_filename): # building an egg log.warn('Building a Setuptools egg in %s', to_dir) _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result log.warn(egg) if not os.path.exists(egg): raise IOError('Could not build the egg.')class ContextualZipFile(zipfile.ZipFile): """Supplement ZipFile class to support context manager for Python 2.6.""" def __enter__(self): return self def __exit__(self, type, value, traceback): self.close() def __new__(cls, *args, **kwargs): """Construct a ZipFile or ContextualZipFile as appropriate.""" if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) return super(ContextualZipFile, cls).__new__(cls)@contextlib.contextmanagerdefarchive_context(filename): """ Unzip filename to a temporary directory, set to the cwd. The unzipped target is cleaned up after. """ tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) with ContextualZipFile(filename) as archive: archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) log.warn('Now working in %s', subdir) yield finally: os.chdir(old_wd) shutil.rmtree(tmpdir)def _do_download(version, download_base, to_dir, download_delay): """Download Setuptools.""" py_desig = 'py{sys.version_info[0]}.{sys.version_info[1]}'.format(sys=sys) tp = 'setuptools-{version}-{py_desig}.egg' egg = os.path.join(to_dir, tp.format(**locals())) if not os.path.exists(egg): archive = download_setuptools(version, download_base, to_dir, download_delay) _build_egg(egg, archive, to_dir) sys.path.insert(0, egg) # Remove previously-imported pkg_resources if present (see # https:///pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: _unload_pkg_resources() import setuptools setuptools.bootstrap_install_from = eggdef use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, download_delay=15): """ Ensure that a setuptools version is installed. Return None. Raise SystemExit if the requested version or later cannot be installed. """ version = _resolve_version(version) to_dir = os.path.abspath(to_dir) # prior to importing, capture the module state for # representative modules. rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) try: import pkg_resources pkg_resources.require("setuptools>=" + version) # a suitable version is already installed return except ImportError: # pkg_resources notavailable; setuptools is not installed; download pass except pkg_resources.DistributionNotFound: # no version of setuptools was found; allow download pass except pkg_resources.VersionConflict as VC_err: if imported: _conflict_bail(VC_err, version) # otherwise, unload pkg_resources to allow the downloaded version to # take precedence. del pkg_resources _unload_pkg_resources() return _do_download(version, download_base, to_dir, download_delay)def _conflict_bail(VC_err, version): """ Setuptools was imported prior to invocation, so it is unsafe to unload it. Bail out. """ conflict_tmpl = textwrap.dedent(""" The required version of setuptools (>={version}) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using {VC_err.args[0]!r}) """) msg = conflict_tmpl.format(**locals()) sys.stderr.write(msg) sys.exit(2)def _unload_pkg_resources(): sys.meta_path = [ importer for importer in sys.meta_path if importer.__class__.__module__ != 'pkg_resources.extern' ] del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') ] for mod_name in del_modules: del sys.modules[mod_name]def _clean_check(cmd, target): """ Run the command to download target. If the command fails, clean up before re-raising the error. """ try: subprocess.check_call(cmd) except subprocess.CalledProcessError: if os.access(target, os.F_OK): os.unlink(target) raisedef download_file_powershell(url, target): """ Download the file at url to target using Powershell. Powershell will validate trust. Raise an exception if the command cannot complete. """ target = os.path.abspath(target) ps_cmd = ( "[.WebRequest]::DefaultWebProxy.Credentials = " "[.CredentialCache]::DefaultCredentials; " '(new-object .WebClient).DownloadFile("%(url)s", "%(target)s")' % locals() ) cmd = [ 'powershell', '-Command', ps_cmd, ] _clean_check(cmd, target)def has_powershell(): """Determine if Powershell is available.""" if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return Truedownload_file_powershell.viable = has_powershelldef download_file_curl(url, target): cmd = ['curl', url, '--location', '--silent', '--output', target] _clean_check(cmd, target)def has_curl(): cmd = ['curl', '--version'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return Truedownload_file_curl.viable = has_curldef download_file_wget(url, target): cmd = ['wget', url, '--quiet', '--output-document', target] _clean_check(cmd, target)def has_wget(): cmd = ['wget', '--version'] with open(os.path.devnull, 'wb') asdevnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return Truedownload_file_wget.viable = has_wgetdef download_file_insecure(url, target): """Use Python to download the file, without connection authentication.""" src = urlopen(url) try: # Read all the data in one block. data = src.read() finally: src.close() # Write all the data in one block to avoid creating a partial file. with open(target, "wb") as dst: dst.write(data)download_file_insecure.viable = lambda: Truedef get_best_downloader(): downloaders = ( download_file_powershell, download_file_curl, download_file_wget, download_file_insecure, ) viable_downloaders = (dl for dl in downloaders if dl.viable()) return next(viable_downloaders, None)def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, delay=15, downloader_factory=get_best_downloader): """ Download setuptools from a specified location and return its filename. `version` should be a valid setuptools version number that is available as an sdist for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. ``downloader_factory`` should be a function taking no arguments and returning a function for downloading a URL to a target. """ version = _resolve_version(version) # making sure we use the absolute path to_dir = os.path.abspath(to_dir) zip_name = "setuptools-%s.zip" % version url = download_base + zip_name saveto = os.path.join(to_dir, zip_name) if not os.path.exists(saveto): # Avoid repeated downloads log.warn("Downloading %s", url) downloader = downloader_factory() downloader(url, saveto) return os.path.realpath(saveto)def _resolve_version(version): """ Resolve LATEST version """ if version is not LATEST: return version meta_url = urljoin(DEFAULT_URL, '/pypi/setuptools/json') resp = urlopen(meta_url) with contextlib.closing(resp): try: charset = ().get_content_charset() except Exception: # Python 2 compat; assume UTF-8 charset = 'UTF-8' reader = codecs.getreader(charset) doc = json.load(reader(resp)) return str(doc['info']['version'])def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package. Returns list of command line arguments. """ return ['--user'] if er_install else []def _parse_args(): """Parse the command line for options.""" parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, help='install in user site package') parser.add_option( '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, help='alternative URL from where to download the setuptools package') parser.add_option( '--insecure',dest='downloader_factory', action='store_const', const=lambda: download_file_insecure, default=get_best_downloader, help='Use internal, non-validating downloader' ) parser.add_option( '--version', help="Specify which version to download", default=DEFAULT_VERSION, ) parser.add_option( '--to-dir', help="Directory to save (and re-use) package", default=DEFAULT_SAVE_DIR, ) options, args = parser.parse_args() # positional arguments are ignored return optionsdef _download_args(options): """Return args for download_setuptools function from cmdline args.""" return dict( version=options.version, download_base=options.download_base,downloader_factory=options.downloader_factory, to_dir=options.to_dir, )def main(): """Install or upgrade setuptools and EasyInstall.""" options = _parse_args() archive = download_setuptools(**_download_args(options)) return _install(archive, _build_install_args(options))if __name__ == '__main__': sys.exit(main())配置opencv,编译OK!同理,安装pip-8.1.2:tar xzf pip-8.1.2.tar.gzcd pip-8.1.2python setup.py install。
opencv问题及解决办法1:编译通过,但是运行的时候会提示缺少一些dll 文件,如果是缺少opencv_core243d.dll 和opencv_highgui243d.dll,那么从E:\Program Files\OpenCV243\opencv\build\x86\vc10\bin中复制到C:\Windows\System32 中即可;如果是缺少msvcr100d.dll 和msvcp100d.dll,可以到HYPERLINK"/doc/c6561848.html,/dll/msvcr 100d_dll.html"/doc/c6561848.html,/dll/msvcr1 0 0d_dll.html上下载,然后同样放到C:\Windows\System32 中。
现在,再次运行你的程序,是不是成功了呢?2、如果需要在Release 模式下工作,只需要在4(1)中选择Release|Win32,打开/doc/c6561848.html,er 属性页,用相同的方式加入路径和依赖附加项,但是此时依赖附加项的名称中的243d 的d 要去掉,因为它代表debug。
至此,已经完全实现了最新版本的OpenCV 和VS 的配置,开始享受它的完美的性能吧!遇到的问题及解决办法:question1:fatal error C1083: 无法打开包括文件:“opencv.hpp”: No such file or directorySolution:步骤1:定位报“fatal error C1083:”错误的文件,找到它所在的目录。
步骤2:添加该项目的附加路径将opencV.hpp文件所在的文件夹加入到【工具】—【选项】—【项目和解决方案】—【VC++目录】的包含文件中就行了2:)刚开始测试的时候出现这样的问题:fatal error C1083: 无法打开包括文件:“opencv2/core/core_c.h”: No such file or directory 这个主要是包含目录下的include配置出错了,改成E:\Program Files\\opencv243\build\include\opencv2E:\Program Files\\opencv243\build\include\opencvE:\Program Files\\opencv243\build\include注:(上面只是参考,具体目录根据自己的情况定)3:error LNK2019: 无法解析的外部符号"void __cdecl cv::imshow(class std::basic_string<char,struct< p=""> std::char_traits,class std::allocator > const &,class cv::_InputArray const &)"(?imshow@cv@@YAXABV?$basic_string@DU?$char_traits@ D@std@@V?$allocator@D@2@@std@@ABV_InputArray@1@ @Z),该符号在函数 _main 中被引用1>main.obj : error LNK2019: 无法解析的外部符号"public: __thiscall cv::_InputArray::_InputArray(class cv::Mat const &)" (??0_InputArray@cv@@QAE@ABVMat@1@@Z),该符号在函数_main 中被引用1>main.obj : error LNK2019: 无法解析的外部符号"class cv::Mat __cdecl cv::imread(classstd::basic_string,class std::allocator > const &,int)"(?imread@cv@@YA?AVMat@1@ABV?$basic_string@DU?$c har_traits@D@std@@V?$allocator@D@2@@std@@H@Z),该符号在函数_main 中被引用1>main.obj : error LNK2019: 无法解析的外部符号"void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z),该符号在函数"public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) 中被引用1>main.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall cv::Mat::deallocate(void)"(?deallocate@Mat@cv@@QAEXXZ),该符号在函数"public: void __thiscall cv::Mat::release(void)"(?release@Mat@cv@@QAEXXZ) 中被引用1>C:\Users\abc\Desktop\OpenCV\Debug\test.exe : fatal error LNK1120: 5 个无法解析的外部命令可能的原因是什么?菜单Project -> Properties -> Configuration Properties -> Linker -> Input在additional dependencies中加入cxcore.lib cv.lib ml.lib cvaux.lib highgui.lib等需要的库。
OpenCV Error: Unspecified error (The function is not implemented...
分类:技术opencv ubuntu linux 2012-06-09 11:15 115人阅读评论(0) 收藏举报初始安装好opencv2.4.1后测试时出现以下问题:(下面第一行为测试语句,系统为Ubuntu12.04)
----想不通的是明明已经安装了GTK+2.x这些东东
~$./DisplayImage lena.jpg
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you
are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
re-run cmake or configure script) in cvNamedWindow, file
/home/aborn/software/OpenCV-2.4.1/modules/highgui/src/window.cpp, line 598
terminate called after throwing an instance of 'cv::Exception'
what(): /home/aborn/software/OpenCV-2.4.1/modules/highgui/src/win dow.cpp:598: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
上网一查,发现有人也遇到过这个问题,如这个csdn-topic还有yahoo 的gruop-topic
最后在这个地方找到了解释,点击此处。
简单的解释就是你的GTK+2.x要先于OpenCV安装,所以它给的解决方法是You should remove the current installation of opencv from your system; rebuild your opencv lib after installing gtk dev lib in the correct path; and reinstall the compiled opencv lib.
我按照这个方法,又重新用cmake-gui make sudo make install重新安装了一遍,最后成功,如下图:
分享到: 上一篇:Ubuntu linux下安装OpenCV2.4.1所需包。