
opencv
文章平均质量分 53
xkxsxkx
菜鸡研究生,在线求工作
展开
-
imdecode 源码解读
接上一篇imencode 源码解读,简单写一下代码注释static boolimdecode_( const Mat& buf, int flags, Mat& mat ){ // 图片是否为空 CV_Assert(!buf.empty()); // 传入图片是否连续,这里有一个概念,图像的连续性 /* isContinue可以检查图片在内存中是否是连续的, 比如通过rect裁剪,返回的图片虽然从形式上好像已经被裁剪了, 但就像深原创 2021-08-10 17:42:54 · 1327 阅读 · 0 评论 -
imencode 源码解读
在opencv中,imencode 经常用,但一直不知道它到底干了什么,于是今天来看一下,顺便写点注释,如果有理解错误还请指出/*Parameters- ext File extension that defines the output format.- img Image to be written.- buf Output buffer resized to fit the compressed image.- params Format-specific parameters. See原创 2021-08-09 20:50:40 · 1640 阅读 · 0 评论 -
opencv 使用 forEach 像素遍历(pixel 和 const int* position参数都有介绍)
目录1.简介2.forEach使用方法3.真正可以用的代码建议直接看3,是成功跑通的例子。前面的forEach例子,有官方文档的坑,仅作参考意义。1.简介forEach函数,可以快速遍历mat图像,获得堪比指针的搜索效率,template<typename _Tp , typename Functor >void cv::Mat::forEach(const Functor& operation) 下面是一些通常的遍历方法例子来自官方文档 但关于forEach的例原创 2020-10-11 22:44:14 · 2069 阅读 · 4 评论 -
opencv 骨架提取/图片细化 代码
其实在opencv里面是有骨架提取的代码的只不过是在扩展模块opencv-contribvoid cv::ximgproc::thinning ( InputArray src, OutputArray dst, int thinningType = THINNING_ZHANGSUEN )其代码介绍为Applies a binary blob thinning operation, to achieve a skeletization of the input原创 2020-09-08 23:15:23 · 3690 阅读 · 8 评论 -
以为是 unable to start correctly (0xc0000142) 实际上却是 gfluidimgproc_func.simd.hpp文件找不到的解决方法(含opencv编译使用)
起因注意,下面的内容都是win10情况下发生的在某些时候,我们从比较新的电脑上用vs,编译使用了比较新的opencv4.X库的运行程序,并且打算放到比较旧的电脑上使用时会发现在动态链接库都是完整的情况下,运行程序会出现The application was unable to start correctly (0xc0000142)(那这其实有可能是一个运行包含有opencv4.X程序时会导致的错误)真的令人非常崩溃,很难找出原因。于是我在旧电脑上也安装了一个vs进行重新编译终于发现了问原创 2020-08-08 23:19:31 · 1620 阅读 · 0 评论