C++代码
嘟嘟love佳
深度学习、C++初学者
展开
-
用容器存储影像中存在分支的线段
# include <stdio.h> # include<iostream> # include <opencv2/opencv.hpp> # include<time.h> #include <algorithm> #include <string> #include <vector> #include&am原创 2018-12-13 21:15:09 · 120 阅读 · 0 评论 -
链表排序---冒泡法按值排序
本文是继上两篇之后的博客:主要展示对链表中的数字,使用冒泡法进行排序; # include<stdio.h> # include<math.h> # include<stdlib.h> using namespace std; typedef struct node { int data; struct node * next; }Node; Node...原创 2019-02-14 21:01:47 · 232 阅读 · 0 评论 -
按值排序---冒泡和选择
# include<stdio.h> # include<stdlib.h> # include<time.h> using namespace std; void sort_pop(int p[], int len); void select_sort(int p[], int len); int main() { int data[10] = { 0 }...原创 2019-02-17 10:47:22 · 114 阅读 · 0 评论 -
由端点找出部分线段+单通道融合为RGB影像
# include<stdio.h> # include<stdlib.h> # include<opencv2/opencv.hpp> using namespace std; using namespace cv; int main() { Mat source = imread("C:\\Users\\93970\\Desktop\\马萨诸塞州影像...原创 2019-02-19 16:56:42 · 116 阅读 · 0 评论 -
C++中关于class(类)的一点基础知识整理
# include<stdio.h> # include<iostream> using namespace std; class data_str { public: data_str(char * name = "C++ is the best language in the world!") { cout << "constructo...原创 2019-03-10 09:25:21 · 410 阅读 · 0 评论 -
类内使用static
# include<iostream> using namespace std; class A { public: void foo() { cout << "void foo()" << endl; foocount++; } static int invoke_foo()//使用静态函数用...原创 2019-03-10 19:42:18 · 682 阅读 · 0 评论 -
遍历文件夹中的文件名
#include <iostream> using namespace std; int main() { _finddata_t file_info; long handle;//32位编译器 如果是64位编译器改为 intptr_t string path = "C:\\Users\\93970\\Desktop\\sci论文相关文件\\VISIO\\*.bmp"; ...原创 2019-06-10 20:06:19 · 514 阅读 · 0 评论 -
自动检索当前文件夹下的文件
# include<iostream> # include<io.h> # include<string> # include<direct.h> # include<vector> using namespace std; int main() { //获取当前路径: char path1[1024]; getcwd(pat...原创 2019-07-08 16:10:10 · 305 阅读 · 0 评论 -
自动获取当前路径下的所有文件
主要是参考他的代码,写的不错,很受用!狠狠的复习了一把递归···· https://www.cnblogs.com/fnlingnzb-learner/p/6424563.html # include<iostream> # include<io.h> # include<string> # include<direct.h> # inclu...转载 2019-07-08 20:48:19 · 540 阅读 · 0 评论 -
链表之头插法,尾插法,显示,长度,查找位置(两种),删除;内联函数小记
# include<stdio.h> # include<stdlib.h> using namespace std; typedef struct node { int data; struct node * next; }Node; inline int len_list(Node * head)//链表长度 { Node* pt = head->nex...原创 2019-01-28 17:29:42 · 296 阅读 · 0 评论 -
存储影像中的光滑线段__源码
# include <stdio.h> # include<iostream> # include <opencv2/opencv.hpp> # include<time.h> using namespace std; using namespace cv; typedef struct loc_and_degree { CvPoint loc...原创 2018-12-13 21:07:09 · 96 阅读 · 0 评论 -
从一张影像中批量裁剪子影像
/* Author:Duyang Data: 2018.10.25 Object:cutting patches-images from only one satellit image */ # define _CRT_SECURE_NO_DEPRECATE # include<iostream> # include<opencv.hpp> # include<...原创 2018-12-18 09:30:21 · 348 阅读 · 0 评论 -
根据txt文件中记录的数据进行绘图
# include <stdio.h> # include<string.h> # include<stdlib.h> # include<opencv2/opencv.hpp> # include<sstream> # include<iostream> using namespace std; using namespa...原创 2018-12-18 09:34:28 · 2976 阅读 · 1 评论 -
关于结构体的一些问题
关于结构体的一些问题: (1)、什么是结构体? (2)、一般在什么情况下用到结构体?(3)、什么是结构体内存对齐?为什么要对齐?怎样对齐? (4)、对齐参数如何设置?可以设置为按照任意字节数对齐吗? 答: (1)结构体是构造类型的一种,是一种根据自身需要,由基本数据类型组成的新的数据类型。 (2)在函数中需要返回多个值时,可以通过构建结构体达到目的;当基本数据类型,不能满足自身需要...原创 2019-01-08 09:32:28 · 351 阅读 · 0 评论 -
规则图像拼接
/* Author: Duyang Data: 2018.10.25 Object: to practice the function that connects patch images into a whole image */ # include <opencv2/opencv.hpp> # include <iostream> # include <st...原创 2019-01-08 09:41:08 · 162 阅读 · 0 评论 -
多组细化代码+膨胀腐蚀
//#include "stdafx.h" #include <iostream> #include <vector> #include <opencv2/opencv.hpp> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp...原创 2019-01-08 09:43:42 · 174 阅读 · 0 评论 -
超详细---链表头插法
# include<stdio.h> # include<stdlib.h> using namespace std; typedef struct node { int data; node * next; }Node; #if 0 头插法: 1.在主函数中创建一个头指针; ···Node * phead = creat_list(); 2.在函数中首先创建...原创 2019-01-24 15:08:27 · 634 阅读 · 0 评论 -
链表尾插法
# include<stdio.h> # include<stdlib.h> using namespace std; typedef struct node { int data; struct node * next; }Node; //尾插法,需要引入第三方变量,保证头指针起到定海神针的作用,最后将头结点的指针返回给头指针 Node * creat_list...原创 2019-01-28 16:11:44 · 1042 阅读 · 0 评论 -
Ubuntu下配置opencv(QT版)和 windows下QT配置opencv免cmake
Ubuntu下配置opencv(QT版) 1. 安装Qt 在Ubuntu下安装qt非常简单,可以参考下面的安装方法: https://blog.csdn.net/wuweifeng_2017/article/details/78322249 2. 安装opencv3.4 从源码安装最新版的opencv可以解决大部分的兼容性问题。 2.1 下载最新源码 从github上下载最新的...转载 2019-07-22 14:21:39 · 463 阅读 · 0 评论