用cmake编译opencv3.0 时候出现的问题

CMake Error at CMakeLists.txt:88 (project):
No CMAKE_C_COMPILER could be found.
这是什么问题啊!
求大神解决
我是win764位 刚下的opencv3.0 用cmake进行configure就出错
安装的是vs2010

1个回答

Configure中的VC++配置的版本不对,不是你机器上安装的那个版本。点击界面中的Configure 按钮进去修改一下,改为你安装的版本,没有安装就安一个。

如果不能进入Configure,在菜单中的File菜单中选择Delete Cache,就可以重新配置了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
vs2015 cmake编译opencv3.1+opencv_contrib报错
在OPENCV_EXTRA_MODULES_PATH,添加opencv_contrib目录后报错,求问是什么问题啊? CMake Error at /Users/Documents/opencv/source/opencv-3.2.0/cmake/OpenCVUtils.cmake:1045 (file): file DOWNLOAD cannot open file for write. Call Stack (most recent call first): /Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download) /Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/CMakeLists.txt:5 (include) CMake Error at /Users/Documents/opencv/source/opencv-3.2.0/cmake/OpenCVUtils.cmake:1049 (message): Failed to download . Status= Call Stack (most recent call first): /Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download) /Users/Documents/opencv/source/opencv_contrib-master/modules/dnn/CMakeLists.txt:5 (include)
cmake编译的opencv3.0.0生成的工程无法通过编译
我在windows下用cmake-gui编译opencv3.0(联合opencv contrib master), 生成的工程Opencv.sln在build的时候出现了许多下列类似的错误: ![图片说明](https://img-ask.csdn.net/upload/201602/17/1455675347_444915.png) 请问这是什么原因呢? 系统是windows10,vs2013
Cmake编译opencv3.0时报错
**CMake Error at D:/VTK7.0/vtk_src/VTK-7.0.0/CMake/vtkModuleAPI.cmake:120 (message): Requested modules not available: ** vtkRenderingOpenGL Call Stack (most recent call first): D:/VTK7.0/vtk_bin/VTKConfig.cmake:75 (vtk_module_config) cmake/OpenCVDetectVTK.cmake:6 (find_package) CMakeLists.txt:584 (include)** **
用cmake编译opencv3.4.0后无法找到opencv_world340.lib 的问题
按照网上给的操作做到了最后一部添加依赖项的时候要求添加”opencv_ts340.lib opencv_world340.lib “这些文件,然而惊讶的发现x86->vc11-lib里面没有这些文件,只有其它的lib。怎么办呢?编译都显示成功的呀。 以下是试运行的代码 #include<iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace cv; int main() { // 读入一张图片(游戏原画) Mat img = imread("pic.jpg"); // 创建一个名为 "游戏原画"窗口 namedWindow("游戏原画"); // 在窗口中显示游戏原画 imshow("游戏原画", img); // 等待6000 ms后窗口自动关闭 waitKey(6000); }
opencv3.2与opencv 2.8 切换的问题
我的ubuntu系统原来安装了opencv2.8,现在由于实际需要,安装了opencv3.2。但是,opencv2.8还得继续保留。利用pkg-config --modversion opencv 查看opencv的版本,显示是3.2.0。原来(opencv2.8下),CMakeList文件是这样写的。 project(test) find_package(OpenCV REQUIRED) add_executable(test src/test.cpp) target_link_libraries(test ${OpenCV_LIBS}) cmake_minimum_required(VERSION 2.8) 我使用opencv3.2编译的时候,按照要求,我把路径给加上了。 project(test) find_package(OpenCV REQUIRED) set(OpenCV_DIR "/usr/local/opencv320/share/OpenCV") INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) add_executable(test src/test.cpp) target_link_libraries(test ${OpenCV_LIBS}) cmake_minimum_required(VERSION 3.2) 但是显示错误:要求的opencv版本太高,当前运行版本为2.8。但是我用 pkg-config --modversion opencv 查看版本,显示的是3.2.0
windows环境下codeblocks17.12 用cmake配置opencv3.4.7出现如下错误
试了好多次了,参考了不少博主的文章编译,还是有错 ``` F:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `CMakeFiles\opencv_core.dir/objects.a(vs_version.rc.obj)' is incompatible with i386:x86-64 output collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_core.dir\build.make:1843: recipe for target 'bin/libopencv_core340.dll' failed mingw32-make[2]: *** [bin/libopencv_core340.dll] Error 1 CMakeFiles\Makefile2:1686: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:161: recipe for target 'all' failed mingw32-make: *** [all] Error 2 ```
cmake3.4.3重新编译opencv,vs2013,cuda-8.0
最近想使用opencv的GPU模块,就需要用cmake重新编译opencv, 尝试很多中方法,一直不成功,编译老是出错,环境变量也设置了, 真的不知道是什么问题,望大神解答~![图片说明](https://img-ask.csdn.net/upload/201612/28/1482931144_726131.png)
【已经解决】 Win10环境下采用CMake编译OpenCV项目,提示无法找到opencv
1. 安装过OpenCV 4.1 win pack版本,同时安装的Intel Sensor SDK第三方软件中有opencv 3.4版本。 都按照操作要求添加了环境变量路径。 2. 采用CMake编译一个文件出现一直提示错误,这个错误应该是很多人都遇到过的。 CMakeLists.txt文件内容如下: cmake_minimum_required(VERSION 3.10) project(CvTrack) set(CMAKE_BUILD_TYPE Debug) set(OpenCV_DIR "D:/opencv/build") find_package(OpenCV REQUIRED) add_executable(CvTracking "main.cpp") target_link_libraries(CvTrack ${OpenCV_LIBS}) ********************************************************************************************************************************************************** 产生的错误提示: Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362. OpenCV ARCH: x86 OpenCV RUNTIME: vc14 OpenCV STATIC: OFF CMake Warning at D:/opencv/build/OpenCVConfig.cmake:166 (message): Found OpenCV Windows Pack but it has no binaries compatible with your configuration. You should manually point CMake variable OpenCV_DIR to your build of OpenCV library. Call Stack (most recent call first): CMakeLists.txt:15 (find_package) CMake Error at CMakeLists.txt:15 (find_package): Found package configuration file: D:/opencv/build/OpenCVConfig.cmake but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND. ![图片说明](https://img-ask.csdn.net/upload/201912/09/1575860198_340992.png) 安装目录如下: ![图片说明](https://img-ask.csdn.net/upload/201912/09/1575860277_399662.png) ![图片说明](https://img-ask.csdn.net/upload/201912/09/1575860289_707476.png) 请问,这个问题如何解决呢?? /==/==/==/==/==/==/==/==/==/==/==/==/==/==/==/==/==/== 解决方法: 主要原因:根据提示,OpenCVConfig.cmake文件有问题;实际在OpenCV 4.1 wind pack安装版本中,OpenCVConfig.cmake在其它路径下也有一个文件,修改路径即。 其次原因:设定的工程名为CvTrack,在add\_excuatable中的TargetName不对应。所以:重新修正了一下CMakeLists.txt: cmake_minimum_required(VERSION 3.10) project(CvTrack) set(OpenCV_DIR "D:/opencv/build/x64/vc15/lib") # 错误修正 find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) add_executable(CvTrack "main.cpp") # 错误修正 target_link_libraries(CvTrack ${OpenCV_LIBS})
opencv3.1.0交叉编译出错
我在给mini2440移植opencv3.1.0的时候,make编译opencv过程中出错了。log如下: CMakeFiles/opencv_perf_core.dir/perf/perf_math.cpp.obj: In function `cv::Mat::~Mat()': perf_math.cpp.text._ZN2cv3MatD1Ev[cv::Mat::~Mat()]+0x1c): undefined reference to `__sync_fetch_and_add_4' CMakeFiles/opencv_perf_core.dir/perf/perf_compare.cpp.obj: In function `Size_MatType_CmpType_compare:erfTestBody()': perf_compare.cpp.text._ZN28Size_MatType_CmpType_compare12PerfTestBodyEv+0x30c): undefined reference to `__sync_fetch_and_add_4' perf_compare.cpp.text._ZN28Size_MatType_CmpType_compare12PerfTestBodyEv+0x378): undefined reference to `__sync_fetch_and_add_4' perf_compare.cpp.text._ZN28Size_MatType_CmpType_compare12PerfTestBodyEv+0x3ec): undefined reference to `__sync_fetch_and_add_4' CMakeFiles/opencv_perf_core.dir/perf/perf_compare.cpp.obj: In function `Size_MatType_CmpType_compareScalar:erfTestBody()': perf_compare.cpp.text._ZN34Size_MatType_CmpType_compareScalar12PerfTestBodyEv+0x32c): undefined reference to `__sync_fetch_and_add_4' CMakeFiles/opencv_perf_core.dir/perf/perf_compare.cpp.obj:perf_compare.cpp.text._ZN34Size_MatType_CmpType_compareScalar12PerfTestBodyEv+0x3a0): more undefined references to `__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status make[2]: *** [bin/opencv_perf_core] Error 1 make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 make: *** [all] Error 2 我用的是Ubuntu14.04,32位虚拟机。 查网上说是CMAKE_C_FLAGS要设为-march=armv4t 可是我安装提示设置了CMAKE_C_FLAGS 和 CMAKE_CXX_FLAGS的值,错误还是没有消失。 我试过了opencv3.1。0和opencv3.2.0了,都会出现这个问题。因为项目需求要用到opencv3 所以只能自己编译最新版,,泪奔 有大神遇到过这个问题吗?
为什么Opencv3.4.0使用make编译时出现错误?
环境:Debian(Raspiberry Pi Buster) cmake version: 3.0.2 gcc version: 8.2.0 python version: 3.7.2 make version: 4.2.1 本来计划用opencv基于python进行图像辨别 在使用cmake配置完成后使用make命令编译: ``` sudo make ``` 编译到大约90%时,出现如下错误: ``` #这是之前很多条控制台信息中的warning warning: cast between incompatible function types from ‘PyObject* (*)(PyObject*, PyObject*, PyObject*)’ {aka ‘_object* (*)(_object*, _object*, _object*)’} to ‘PyCFunction’ {aka ‘_object* (*)(_object*, _object*)’} [-Wcast-function-type] ``` ``` #make错误,退出 make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:56: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:21149: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2 make: *** [Makefile:138: all] Error 2 ``` 如图(图1中使用了make -i选项忽略错误,继续编译剩余部分,但open_cv python3没有成功编译): ![图片说明](https://img-ask.csdn.net/upload/201908/11/1565498546_278259.png) (图2显示了make的错误) ![图片说明](https://img-ask.csdn.net/upload/201908/11/1565499335_385379.png) ``` #忽略错误后出现的c++error c++: error: Cmakefiles/opencv_python3.dir/__/src2/cv2.cpp.o No such file or dictionary ``` 在网上看到的编译错误的例子都和这个有所区别,没有能够很好地解决问题。有的说这是gcc编译器的问题 希望各位大佬们能够帮忙分析一下错误的原因,因为我的项目急需配置好opencv,也没有其它更好的替代,谢谢~
cmake+vs2013编译opencv contrib
cmake编译opencv contrib生成OPENCV.sln后,在vs2013编译过程中出现以下错误 :![图片说明](https://img-ask.csdn.net/upload/201606/15/1465985118_50684.png) ![图片说明](https://img-ask.csdn.net/upload/201606/15/1465985138_303923.png) 已经试过[](http://blog.csdn.net/xizero00/article/details/50823020 "")的方法,试了cmake 3.5.0 3.5.1 3.5.2版本了,问题依旧在。希望有前辈能够提供帮助。 我是win7 64位系统
cmake opencv openCV_DIR路径设置问题
http://bbs.csdn.net/wap/topics/390607744# 跟这个问题一样 但还是不知道怎么操作解决 怎么能把openCV_DIR路径换到我编译到的opencv3.0.0/build中
编译opencv+contribute出现错误
CMake Error at E:/AutonomousNavigationRobot/Opencv3.0/opencv_contrib-master/opencv_contrib-master/modules/dnn/cmake/download_protobuf.cmake:23 (ocv_download): Unknown CMake command "ocv_download". Call Stack (most recent call first): E:/AutonomousNavigationRobot/Opencv3.0/opencv_contrib-master/opencv_contrib-master/modules/dnn/cmake/download_protobuf.cmake:51 (ocv_protobuf_download) E:/AutonomousNavigationRobot/Opencv3.0/opencv_contrib-master/opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:30 (include) E:/AutonomousNavigationRobot/Opencv3.0/opencv_contrib-master/opencv_contrib-master/modules/dnn/CMakeLists.txt:38 (include)
关于opencv3.1.0对于win10 vs2015
我用cmake编译x86的库产生如下错误 ![图片说明](https://img-ask.csdn.net/upload/201612/10/1481383476_746137.png) 而编译x64的库却 ![图片说明](https://img-ask.csdn.net/upload/201612/10/1481383564_445359.png) 使用的代码为opencv内的video_homography.cpp代码。 怎么办??? /* * video_homography.cpp * * Created on: Oct 18, 2010 * Author: erublee */ #include "opencv2/calib3d.hpp" #include "opencv2/videoio.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/features2d.hpp" #include "opencv2/xfeatures2d.hpp" #include <iostream> #include <list> #include <vector> using namespace std; using namespace cv; using namespace cv::xfeatures2d; static void help(char **av) { cout << "\nThis program demonstrated the use of features2d with the Fast corner detector and brief descriptors\n" << "to track planar objects by computing their homography from the key (training) image to the query (test) image\n\n" << endl; cout << "usage: " << av[0] << " <video device number>\n" << endl; cout << "The following keys do stuff:" << endl; cout << " t : grabs a reference frame to match against" << endl; cout << " l : makes the reference frame new every frame" << endl; cout << " q or escape: quit" << endl; } namespace { void drawMatchesRelative(const vector<KeyPoint>& train, const vector<KeyPoint>& query, std::vector<cv::DMatch>& matches, Mat& img, const vector<unsigned char>& mask = vector< unsigned char> ()) { for (int i = 0; i < (int)matches.size(); i++) { if (mask.empty() || mask[i]) { Point2f pt_new = query[matches[i].queryIdx].pt; Point2f pt_old = train[matches[i].trainIdx].pt; cv::line(img, pt_new, pt_old, Scalar(125, 255, 125), 1); cv::circle(img, pt_new, 2, Scalar(255, 0, 125), 1); } } } //Takes a descriptor and turns it into an xy point void keypoints2points(const vector<KeyPoint>& in, vector<Point2f>& out) { out.clear(); out.reserve(in.size()); for (size_t i = 0; i < in.size(); ++i) { out.push_back(in[i].pt); } } //Takes an xy point and appends that to a keypoint structure void points2keypoints(const vector<Point2f>& in, vector<KeyPoint>& out) { out.clear(); out.reserve(in.size()); for (size_t i = 0; i < in.size(); ++i) { out.push_back(KeyPoint(in[i], 1)); } } //Uses computed homography H to warp original input points to new planar position void warpKeypoints(const Mat& H, const vector<KeyPoint>& in, vector<KeyPoint>& out) { vector<Point2f> pts; keypoints2points(in, pts); vector<Point2f> pts_w(pts.size()); Mat m_pts_w(pts_w); perspectiveTransform(Mat(pts), m_pts_w, H); points2keypoints(pts_w, out); } //Converts matching indices to xy points void matches2points(const vector<KeyPoint>& train, const vector<KeyPoint>& query, const std::vector<cv::DMatch>& matches, std::vector<cv::Point2f>& pts_train, std::vector<Point2f>& pts_query) { pts_train.clear(); pts_query.clear(); pts_train.reserve(matches.size()); pts_query.reserve(matches.size()); size_t i = 0; for (; i < matches.size(); i++) { const DMatch & dmatch = matches[i]; pts_query.push_back(query[dmatch.queryIdx].pt); pts_train.push_back(train[dmatch.trainIdx].pt); } } void resetH(Mat&H) { H = Mat::eye(3, 3, CV_32FC1); } } int main(int ac, char ** av) { if (ac != 2) { help(av); return 1; } Ptr<BriefDescriptorExtractor> brief = BriefDescriptorExtractor::create(32); VideoCapture capture; capture.open(atoi(av[1])); if (!capture.isOpened()) { help(av); cout << "capture device " << atoi(av[1]) << " failed to open!" << endl; return 1; } cout << "following keys do stuff:" << endl; cout << "t : grabs a reference frame to match against" << endl; cout << "l : makes the reference frame new every frame" << endl; cout << "q or escape: quit" << endl; Mat frame; vector<DMatch> matches; BFMatcher desc_matcher(brief->defaultNorm()); vector<Point2f> train_pts, query_pts; vector<KeyPoint> train_kpts, query_kpts; vector<unsigned char> match_mask; Mat gray; bool ref_live = true; Mat train_desc, query_desc; Ptr<FastFeatureDetector> detector = FastFeatureDetector::create(10, true); Mat H_prev = Mat::eye(3, 3, CV_32FC1); for (;;) { capture >> frame; if (frame.empty()) break; cvtColor(frame, gray, COLOR_RGB2GRAY); detector->detect(gray, query_kpts); //Find interest points brief->compute(gray, query_kpts, query_desc); //Compute brief descriptors at each keypoint location if (!train_kpts.empty()) { vector<KeyPoint> test_kpts; warpKeypoints(H_prev.inv(), query_kpts, test_kpts); //Mat mask = windowedMatchingMask(test_kpts, train_kpts, 25, 25); desc_matcher.match(query_desc, train_desc, matches, Mat()); drawKeypoints(frame, test_kpts, frame, Scalar(255, 0, 0), DrawMatchesFlags::DRAW_OVER_OUTIMG); matches2points(train_kpts, query_kpts, matches, train_pts, query_pts); if (matches.size() > 5) { Mat H = findHomography(train_pts, query_pts, RANSAC, 4, match_mask); if (countNonZero(Mat(match_mask)) > 15) { H_prev = H; } else resetH(H_prev); drawMatchesRelative(train_kpts, query_kpts, matches, frame, match_mask); } else resetH(H_prev); } else { H_prev = Mat::eye(3, 3, CV_32FC1); Mat out; drawKeypoints(gray, query_kpts, out); frame = out; } imshow("frame", frame); if (ref_live) { train_kpts = query_kpts; query_desc.copyTo(train_desc); } char key = (char)waitKey(2); switch (key) { case 'l': ref_live = true; resetH(H_prev); break; case 't': ref_live = false; train_kpts = query_kpts; query_desc.copyTo(train_desc); resetH(H_prev); break; case 27: case 'q': return 0; break; } } return 0; } ``` ```
opencv3.0 error C2065: SurfFeatureDetector未定义标识符
编程环境:win7旗舰版+opencv3.0(含opencv_contrib-master)+vs2013 我在opencv3.0下使用SURF算法提取特征时出现了以下错误:error C2065: “SurfFeatureDetector”未定义标识符 我在nonfree.hpp文件下查看了SurfFeatureDetector的定义,在路径“opencv2/xfeatures2d/nonfree.hpp”下可以找到nonfree.hpp(这个路径是用CMAKE 编译 opencv_contrib-master下 源代码后下的相应路径)。 在nonfree.hpp中明明可以看到SURF类的定义和SurfFeatureDetector的类型定义,nonfree.hpp下的一段代码如下 class CV_EXPORTS_W SURF : public Feature2D { public: /** @param hessianThreshold Threshold for hessian keypoint detector used in SURF. @param nOctaves Number of pyramid octaves the keypoint detector will use. @param nOctaveLayers Number of octave layers within each octave. @param extended Extended descriptor flag (true - use extended 128-element descriptors; false - use 64-element descriptors). @param upright Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation). */ CV_WRAP static Ptr<SURF> create(double hessianThreshold=100, int nOctaves = 4, int nOctaveLayers = 3, bool extended = false, bool upright = false); CV_WRAP virtual void setHessianThreshold(double hessianThreshold) = 0; CV_WRAP virtual double getHessianThreshold() const = 0; CV_WRAP virtual void setNOctaves(int nOctaves) = 0; CV_WRAP virtual int getNOctaves() const = 0; CV_WRAP virtual void setNOctaveLayers(int nOctaveLayers) = 0; CV_WRAP virtual int getNOctaveLayers() const = 0; CV_WRAP virtual void setExtended(bool extended) = 0; CV_WRAP virtual bool getExtended() const = 0; CV_WRAP virtual void setUpright(bool upright) = 0; CV_WRAP virtual bool getUpright() const = 0; }; typedef SURF SurfFeatureDetector; typedef SURF SurfDescriptorExtractor; ``` 我已经在VC++包含目录中添加了include, opencv 和 opencv2三个文件夹下的路径。也在连接器中添加了相应的*.lib文件。#include "opencv2/xfeatures2d/nonfree.hpp"时也没有报错,为什么还是提示SurfFeatureDetector是未定义的标识符呢?
opencv3.1.0交叉编译 使用摄像头 编译出错
opencv3.1.0交叉编译: 宿主机:ubuntu 14.04 交叉编译工具:gcc-4.6.2-glibc-2.13-linaro 在使用Cmake-gui配置时,因为要使用摄像头(OV3640)取图像,进行图像处理,所以将Operating System填为Linux, 并将WITH_V4L勾选上,之后执行make命令,总是编译错误,提示许多的库找不到,如下图中所示; 如果将Operating System填为arm-linux,没有勾选WITH_V4L,则可以make编译通过,但在arm开发板上用OpenCV打不开摄像头,isOpened ()返回值是false。请帮忙分析问题原因,希望给提供些正确的解决办法,非常感激! ![勾选WITH_V4L 编译错误信息](https://img-ask.csdn.net/upload/201605/29/1464522128_617542.png)![勾选WITH_V4L 编译错误信息](https://img-ask.csdn.net/upload/201605/29/1464522146_811706.jpg) ![cmake-gui 配置为Linux](https://img-ask.csdn.net/upload/201605/30/1464565387_398821.png) ![cmake-gui 配置为arm-linux](https://img-ask.csdn.net/upload/201605/30/1464565406_575197.png)
谁能帮忙看一下OpenCV 3.4.1源码的类型转换编译错误?
环境: 1. Ubuntu 12.04 LTS 2. cmake 3.5.1 3. OpenCV 3.4.1源码 4. Arm Cortex-A7 NXP i.MX6Q 5. 已经sudo为root 执行过程 cd opencv-3.4.1 mkdir build cd build cmakd -D CMAKE_BUILD_TYPE=Relase -D CMAKE_INSTALL_PREFIX=/usr/local .. make make install 出错提示: [ 0%] Built target gen-pkgconfig [ 9%] Built target libwebp [ 14%] Built target IlmImf [ 20%] Built target libprotobuf [ 23%] Built target carotene_objs [ 24%] Built target tegra_hal [ 24%] Built target opencv_ts_pch_dephelp [ 24%] Built target pch_Generate_opencv_ts [ 25%] Built target opencv_core_pch_dephelp [ 25%] Built target pch_Generate_opencv_core [ 31%] Built target opencv_core [ 31%] Built target opencv_imgproc_pch_dephelp [ 31%] Built target pch_Generate_opencv_imgproc [ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smooth.cpp.o /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp: In function ‘void cv::vlineSmooth1N(const FT* const*, const FT*, int, ET*, int) [with ET = unsigned char, FT = {anonymous}::ufixedpoint16]’: /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2676:31: error: conversion from ‘{anonymous}::ufixedpoint32’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2676:31: note: candidates are: /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:223:22: note: {anonymous}::ufixedpoint32::operator float() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:222:22: note: {anonymous}::ufixedpoint32::operator double() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:221:22: note: {anonymous}::ufixedpoint32::operator ET() const [with ET = unsigned char] /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp: In function ‘void cv::vlineSmooth1N1(const FT* const*, const FT*, int, ET*, int) [with ET = unsigned char, FT = {anonymous}::ufixedpoint16]’: /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2693:24: error: conversion from ‘const {anonymous}::ufixedpoint16’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2693:24: note: candidates are: /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:289:22: note: {anonymous}::ufixedpoint16::operator float() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:288:22: note: {anonymous}::ufixedpoint16::operator double() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:287:22: note: {anonymous}::ufixedpoint16::operator ET() const [with ET = unsigned char] /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp: In function ‘void cv::vlineSmooth3N(const FT* const*, const FT*, int, ET*, int) [with ET = unsigned char, FT = {anonymous}::ufixedpoint16]’: /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2740:71: error: conversion from ‘{anonymous}::ufixedpoint32’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2740:71: note: candidates are: /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:223:22: note: {anonymous}::ufixedpoint32::operator float() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:222:22: note: {anonymous}::ufixedpoint32::operator double() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:221:22: note: {anonymous}::ufixedpoint32::operator ET() const [with ET = unsigned char] /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp: In function ‘void cv::vlineSmooth5N(const FT* const*, const FT*, int, ET*, int) [with ET = unsigned char, FT = {anonymous}::ufixedpoint16]’: /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2816:109: error: conversion from ‘{anonymous}::ufixedpoint32’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2816:109: note: candidates are: /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:223:22: note: {anonymous}::ufixedpoint32::operator float() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:222:22: note: {anonymous}::ufixedpoint32::operator double() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:221:22: note: {anonymous}::ufixedpoint32::operator ET() const [with ET = unsigned char] /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp: In function ‘void cv::vlineSmooth(const FT* const*, const FT*, int, ET*, int) [with ET = unsigned char, FT = {anonymous}::ufixedpoint16]’: /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2919:18: error: conversion from ‘{anonymous}::ufixedpoint32’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2914:23: note: candidates are: /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:223:22: note: {anonymous}::ufixedpoint32::operator float() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:222:22: note: {anonymous}::ufixedpoint32::operator double() const /home/linaro/opencv-3.4.1/modules/imgproc/src/fixedpoint.inl.hpp:221:22: note: {anonymous}::ufixedpoint32::operator ET() const [with ET = unsigned char] make[2]: *** [modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smooth.cpp.o] Error 1 make[1]: *** [modules/imgproc/CMakeFiles/opencv_imgproc.dir/all] Error 2 make: *** [all] Error 2 说明: 关键之处是 /home/linaro/opencv-3.4.1/modules/imgproc/src/smooth.cpp:2919:18: error: conversion from ‘{anonymous}::ufixedpoint32’ to ‘cv::uint8_t {aka unsigned char}’ is ambiguous 类型转换错误。 请教各位大侠,这个错误出在哪里,如何解决呢? 谢谢!
opencv3.2.0下pca.cpp编译后命令行该如何输入?
我用的环境是linux ubuntu+opencv3.2.0,其pca.cpp已经用cmake编译成功,但是执行总是报命令行错误,求解命令行应该如何输入,举例最好。pca.cpp源码如下:/* * pca.cpp * * Author: * Kevin Hughes <kevinhughes27[at]gmail[dot]com> * * Special Thanks to: * Philipp Wagner <bytefish[at]gmx[dot]de> * * This program demonstrates how to use OpenCV PCA with a * specified amount of variance to retain. The effect * is illustrated further by using a trackbar to * change the value for retained varaince. * * The program takes as input a text file with each line * begin the full path to an image. PCA will be performed * on this list of images. The author recommends using * the first 15 faces of the AT&T face data set: * http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html * * so for example your input text file would look like this: * * <path_to_at&t_faces>/orl_faces/s1/1.pgm * <path_to_at&t_faces>/orl_faces/s2/1.pgm * <path_to_at&t_faces>/orl_faces/s3/1.pgm * <path_to_at&t_faces>/orl_faces/s4/1.pgm * <path_to_at&t_faces>/orl_faces/s5/1.pgm * <path_to_at&t_faces>/orl_faces/s6/1.pgm * <path_to_at&t_faces>/orl_faces/s7/1.pgm * <path_to_at&t_faces>/orl_faces/s8/1.pgm * <path_to_at&t_faces>/orl_faces/s9/1.pgm * <path_to_at&t_faces>/orl_faces/s10/1.pgm * <path_to_at&t_faces>/orl_faces/s11/1.pgm * <path_to_at&t_faces>/orl_faces/s12/1.pgm * <path_to_at&t_faces>/orl_faces/s13/1.pgm * <path_to_at&t_faces>/orl_faces/s14/1.pgm * <path_to_at&t_faces>/orl_faces/s15/1.pgm * */ #include <iostream> #include <fstream> #include <sstream> #include <opencv2/core.hpp> #include "opencv2/imgcodecs.hpp" #include <opencv2/highgui.hpp> using namespace cv; using namespace std; /////////////////////// // Functions static void read_imgList(const string& filename, vector<Mat>& images) { std::ifstream file(filename.c_str(), ifstream::in); if (!file) { string error_message = "No valid input file was given, please check the given filename."; CV_Error(Error::StsBadArg, error_message); } string line; while (getline(file, line)) { images.push_back(imread(line, 0)); } } static Mat formatImagesForPCA(const vector<Mat> &data) { Mat dst(static_cast<int>(data.size()), data[0].rows*data[0].cols, CV_32F); for(unsigned int i = 0; i < data.size(); i++) { Mat image_row = data[i].clone().reshape(1,1); Mat row_i = dst.row(i); image_row.convertTo(row_i,CV_32F); } return dst; } static Mat toGrayscale(InputArray _src) { Mat src = _src.getMat(); // only allow one channel if(src.channels() != 1) { CV_Error(Error::StsBadArg, "Only Matrices with one channel are supported"); } // create and return normalized image Mat dst; cv::normalize(_src, dst, 0, 255, NORM_MINMAX, CV_8UC1); return dst; } struct params { Mat data; int ch; int rows; PCA pca; string winName; }; static void onTrackbar(int pos, void* ptr) { cout << "Retained Variance = " << pos << "% "; cout << "re-calculating PCA..." << std::flush; double var = pos / 100.0; struct params *p = (struct params *)ptr; p->pca = PCA(p->data, cv::Mat(), PCA::DATA_AS_ROW, var); Mat point = p->pca.project(p->data.row(0)); Mat reconstruction = p->pca.backProject(point); reconstruction = reconstruction.reshape(p->ch, p->rows); reconstruction = toGrayscale(reconstruction); imshow(p->winName, reconstruction); cout << "done! # of principal components: " << p->pca.eigenvectors.rows << endl; } /////////////////////// // Main int main(int argc, char** argv) { cv::CommandLineParser parser(argc, argv, "{@input||image list}{help h||show help message}"); if (parser.has("help")) { parser.printMessage(); exit(0); } // Get the path to your CSV. string imgList = parser.get<string>("@input"); if (imgList.empty()) { parser.printMessage(); exit(1); } // vector to hold the images vector<Mat> images; // Read in the data. This can fail if not valid try { read_imgList(imgList, images); } catch (cv::Exception& e) { cerr << "Error opening file \"" << imgList << "\". Reason: " << e.msg << endl; exit(1); } // Quit if there are not enough images for this demo. if(images.size() <= 1) { string error_message = "This demo needs at least 2 images to work. Please add more images to your data set!"; CV_Error(Error::StsError, error_message); } // Reshape and stack images into a rowMatrix Mat data = formatImagesForPCA(images); // perform PCA PCA pca(data, cv::Mat(), PCA::DATA_AS_ROW, 0.95); // trackbar is initially set here, also this is a common value for retainedVariance // Demonstration of the effect of retainedVariance on the first image Mat point = pca.project(data.row(0)); // project into the eigenspace, thus the image becomes a "point" Mat reconstruction = pca.backProject(point); // re-create the image from the "point" reconstruction = reconstruction.reshape(images[0].channels(), images[0].rows); // reshape from a row vector into image shape reconstruction = toGrayscale(reconstruction); // re-scale for displaying purposes // init highgui window string winName = "Reconstruction | press 'q' to quit"; namedWindow(winName, WINDOW_NORMAL); // params struct to pass to the trackbar handler params p; p.data = data; p.ch = images[0].channels(); p.rows = images[0].rows; p.pca = pca; p.winName = winName; // create the tracbar int pos = 95; createTrackbar("Retained Variance (%)", winName, &pos, 100, onTrackbar, (void*)&p); // display until user presses q imshow(winName, reconstruction); char key = 0; while(key != 'q') key = (char)waitKey(); return 0; } 看了半天,刚开始学习C++,不太懂,望前辈给个傻瓜都能看懂的解答。
ubuntu 安装配置c++的opencv 报错
我在ubuntu 上打算安装和配置c++的Opencv, 下载了opencv3.1.0版本的代码,然后也手动的下载了ippicv_linux_20151201.tgz。创建build文件夹后Cmake命令已经可以编译过去了。 但是在执行make命令的时候,经常会报错: ``` [ 15%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.o [ 15%] Linking CXX shared library ../../lib/libopencv_core.so /usr/bin/ld: CMakeFiles/opencv_core.dir/src/va_intel.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC CMakeFiles/opencv_core.dir/src/va_intel.cpp.o: 无法添加符号: 错误的值 collect2: error: ld returned 1 exit status modules/core/CMakeFiles/opencv_core.dir/build.make:1382: recipe for target 'lib/libopencv_core.so.3.1.0' failed make[2]: *** [lib/libopencv_core.so.3.1.0] Error 1 CMakeFiles/Makefile2:1420: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 ``` 有时候在33%进度的时候报这个错误,有时候就在15%时候报。我整整试了一整天,查遍了各种解决方法都无济于事。请大侠们帮忙解决下吧。跪谢。 是否有直接加载已经编译好的库的方式,可以快速实现配置,因为我急需要用Opencv实现代码。感谢各位大侠了。
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
相关热词 c# clr dll c# 如何orm c# 固定大小的字符数组 c#框架设计 c# 删除数据库 c# 中文文字 图片转 c# 成员属性 接口 c#如何将程序封装 16进制负数转换 c# c#练手项目
立即提问