- 博客(10)
- 收藏
- 关注
原创 V4L2采集摄像头过程中的几点细节
最近打算做一个H.264的图像传输设备,第一步当然是采集图像,了解过相关知识后得知图像采集需要用到V4L2,于是在网上找关于V4L2的资料,昨天终于把V4L2看的差不多,并且把网上的程序封装成了符合我的习惯的一个C++类。关于V4L2采集图像在网上有很多博客讲的都很详细,而我也水平有限,就不写V4L2的详细采集过程了,现在分享几点学习V4L2采集图像时遇到的一些不容易懂或者易错的地方,相信对于初学者
2017-03-19 13:14:00 2480
原创 数据结构-排序算法详解(插入排序,希尔排序,堆排序,归并排序,快速排序,桶式排序)
本文参考Weiss的数据结构与算法分析一书,详细解释了以下几种常用的排序算法:插入排序,希尔排序,堆排序,归并排序,快速排序,桶式排序。
2017-03-08 22:19:54 645
原创 数据结构---散列(哈希表)
本文以C语言描述散列,其中哈希函数可根据自己需要更改,以下是源代码:#include "HashSep.h"typedef uint64_t Index;static Index Hash(const char *Key, uint64_t TableSize){ Index HashVal = 0; while ('\0' != *Key) { HashVal =
2017-02-18 22:03:54 372
原创 数据结构---平衡树
本文用C语言实现平衡书,平衡树相对一般的二叉查找树而言效率稍高,以下是源代码:#include "AvlTree.h"#include "malloc.h"AvlTree CreatAvlTree(void){ return NULL;}AvlTree MakeEmpty(AvlTree T){ if (T != NULL) { MakeEmpty(T->L
2017-02-18 22:00:01 295
原创 数据结构---二叉排序树
本文用C语言实现二叉排序树,以下是源码:#include "search_tree.h"#include "malloc.h"SearchTree CreatSearchTree(void){ return NULL;}SearchTree MakeEmpty(SearchTree T){ if (T != NULL) { MakeEmpty(T->Left);
2017-02-18 21:56:23 255
原创 数据结构---队列(数组实现)
本文用c语言实现队列(数组方法),以下是源码:#include "queue_array.h"PtrToQueue CreatQueue(uint32_t size){ PtrToQueue Q; if (size < 1) { printf("Queue size is too small!\r\n"); return NULL; } Q = (PtrTo
2017-02-18 21:48:08 293
原创 数据结构---栈(数组实现)
本文用C语言描述栈(数组方法实现),以下是源码:#include "stack_array.h"PtrToStack CreatStack(uint32_t size){ PtrToStack S; if (size < MIN_SIZE) { printf("Stack size is too small!\r\n"); return NULL; } S =
2017-02-18 21:44:15 596
原创 数据结构---栈(指针实现)
用C语言描述栈,以下是源代码:#include "stack.h"Stack CreatStack(void){ PtrToNode S = (PtrToNode)malloc(sizeof(Node)); if (S == NULL) { printf("Out of space!\r\n"); return NULL; } S->Next = NULL; memset
2017-02-18 21:38:22 714
原创 最大子序列和问题
#include "MaxSubsequenceSum.h"int64_t MaxSubsequenceSum(const int32_t arg[], const uint32_t length){ int64_t ThisSum = 0, MaxSum = 0; for (uint32_t i = 0; i < length; i++) { ThisSum += arg[i]
2017-01-03 14:16:09 171
原创 数据结构---单链表
本篇用C语言描述单链表。 以下是头文件:#ifndef __LIST_H_#define __LIST_H_#include #include #include #include #include #include typedef struct { char x; uint64_t y;} ElementType;typedef struct node
2017-01-03 14:01:44 266
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人