上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 54 下一页

2018年11月12日

摘要: 前言 按照官网步骤安装opencv的过程中进行到98%时一直没有继续进行。 原因 后台一直在编译运行,只需等待即可,参考here; bash 参考 1.stackoverflow; 完 阅读全文
posted @ 2018-11-12 17:01 鹅要长大 阅读(3632) 评论(0) 推荐(0)
摘要: problem Search Insert Position 一种容易想到的是暴力破解法,一种是常用的二分法。 暴力破解法1(不推荐) class Solution { public: int searchInsert(vector<int>& nums, int target) { int ind 阅读全文
posted @ 2018-11-12 16:37 鹅要长大 阅读(241) 评论(0) 推荐(0)
摘要: problem Implement strStr code class Solution { public: int strStr(string haystack, string needle) { if(needle.size()==0) return 0; if( (haystack.size( 阅读全文
posted @ 2018-11-12 16:09 鹅要长大 阅读(204) 评论(0) 推荐(0)
摘要: 常用的技术网站 1.c++网站; cplusplus http://www.cplusplus.com/ 主要用于查找c++一些知识点及其使用。 视频学习: modern_cpp_youtube 2.linux学习; 鸟哥的linux私房菜基础学习篇 http://cn.linux.vbird.or 阅读全文
posted @ 2018-11-12 15:34 鹅要长大 阅读(1040) 评论(0) 推荐(1)
摘要: 找到opencv某个版本的源码文件,进入build目录; 之后再删除源码目录即可; https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html 阅读全文
posted @ 2018-11-12 13:36 鹅要长大 阅读(4266) 评论(0) 推荐(0)

2018年11月11日

摘要: problem RemoveElement class Solution { public: int removeElement(vector<int>& nums, int val) { if(nums.size()==0) return 0; int len = 0; for(size_t i= 阅读全文
posted @ 2018-11-11 17:48 鹅要长大 阅读(168) 评论(0) 推荐(0)
摘要: problem RemoveDuplicatesfromSortedArray 注意数组为空的情况要首先考虑,并给出返回值; 注意也要同时给出新的数组的数值; 注意数组最后两个元素的处理; class Solution { public: int removeDuplicates(vector<in 阅读全文
posted @ 2018-11-11 17:27 鹅要长大 阅读(146) 评论(0) 推荐(0)

2018年11月9日

摘要: problem MergeTwoSortedLists 一种方法是迭代,一种方法是递归; code /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode 阅读全文
posted @ 2018-11-09 12:48 鹅要长大 阅读(262) 评论(0) 推荐(0)

2018年11月8日

摘要: problem Valid Parentheses code class Solution { public: bool isValid(string s) { stack<char> paren; for(const auto& c : s) { switch(c) { case '(': cas 阅读全文
posted @ 2018-11-08 17:27 鹅要长大 阅读(200) 评论(0) 推荐(0)

2018年11月7日

摘要: 前言 /****************************************************************************** * File: get_traindata.cpp * Coder: AMY * Email: happyamyhope@163.co 阅读全文
posted @ 2018-11-07 17:13 鹅要长大 阅读(1118) 评论(0) 推荐(0)
摘要: 字符数组转化成string类型char ch [] = "ABCDEFG";string str(ch);//也可string str = ch;或者char ch [] = "ABCDEFG";string str;str = ch;//在原有基础上添加可以用str += ch;将string类型 阅读全文
posted @ 2018-11-07 16:54 鹅要长大 阅读(603) 评论(0) 推荐(0)
摘要: 前言 在linux系统运行程序,小鹅知道的有3种编译方式,一种是直接命令行编译,一种是使用Cmake,一种是使用脚本文件(*.sh)。本文介绍的是使用命令行编译。 使用过程 注意不同系统的编译器版本可能有所不同,gcc是C语言的编译器,g++是c++的编译器。 1. 使用Jsoncpp开源库 2. 阅读全文
posted @ 2018-11-07 15:31 鹅要长大 阅读(6441) 评论(0) 推荐(0)
摘要: 前言 参考 1. https://www.cnblogs.com/skyfsm/p/7136709.html 完 阅读全文
posted @ 2018-11-07 14:10 鹅要长大 阅读(1208) 评论(0) 推荐(0)
摘要: 前言 标注数据导出文件是json格式的,也就是python的dict格式,需要读取标注结果,可以使用c++或者python,本文使用c++实现的。 JsonCpp简介 JsonCpp是一种轻量级的数据交换格式,是个跨平台的开源库,可以从github和sourceforge上下载源码。查找资料的过程中 阅读全文
posted @ 2018-11-07 10:32 鹅要长大 阅读(5680) 评论(0) 推荐(0)

2018年11月5日

摘要: 前言 其中dsptian的博客不仅给出了LBP的实现,还计算了LBPH,计算LBP过程中有点小瑕疵,评论中有给出修改方法。除了使用power还可以使用bitxor函数实现。 参考 1.LBP特征原理及代码实现; 2. LBP特征的实现及LBP+SVM分类; 3. LBP+KNN; 4. Dsp_Ti 阅读全文
posted @ 2018-11-05 16:40 鹅要长大 阅读(573) 评论(0) 推荐(0)
摘要: 前言 实现分类可以使用SVM方法,但是需要人工调参,具体过程请参考here,这个比较麻烦,小鹅不喜欢麻烦,正好看到SVM可以自动调优,甚好! 注意 1.reshape的使用; https://docs.opencv.org/3.3.1/d3/d63/classcv_1_1Mat.html#a4eb9 阅读全文
posted @ 2018-11-05 11:10 鹅要长大 阅读(1329) 评论(0) 推荐(0)

2018年11月2日

摘要: problem Longest Common Prefix 挨个比较每个字符串的元素是否相同,连续对应位置字符都相同,则为共同字符;否则不是。 code 参考 1.Leetcode-problem; 完 阅读全文
posted @ 2018-11-02 08:45 鹅要长大 阅读(170) 评论(0) 推荐(0)

2018年11月1日

摘要: problem Roman to Integer 每个Roman表示一个数字,可以进行一一映射; 左边字符表示的数字小于右边字符时,减去对应的数字,否则加上; 注意左右字符比较时,最后一个字符不能比较,否则下标会越界; 故最后还需要加上最后一个字符string::back函数; 参考 1.leetc 阅读全文
posted @ 2018-11-01 13:25 鹅要长大 阅读(135) 评论(0) 推荐(0)
摘要: problem Palindrome Number 回文数字; 什么是回文数字? 要求不能使用字符串; 翻转一半的数字; 如何判断数字到一半啦? 参考 1.leetcode-problem; 完 阅读全文
posted @ 2018-11-01 09:29 鹅要长大 阅读(266) 评论(0) 推荐(0)

2018年10月30日

摘要: problem: Reverse Integer 注意考虑是否越界; INT_MAX INT_MIN 32bits or 64bits 调整策略,先从简单的问题开始; 阅读全文
posted @ 2018-10-30 20:34 鹅要长大 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 54 下一页

导航