资源简介
基础的图像处理算法C语言源码,很方便移植到各种arm处理器使用

代码片段和文件信息
#include
#include
#include “imlib.h“
#include “xalloc.h“
#include “fb_alloc.h“
#include “gc.h“
#define MAX_ROW (480)
#define MAX_CORNERS (2000)
#define Compare(X Y) ((X)>=(Y))
typedef struct {
uint16_t x;
uint16_t y;
uint16_t score;
} corner_t;
static int s_width=-1;
static int_fast16_t s_offset0;
static int_fast16_t s_offset1;
static int_fast16_t s_offset2;
static int_fast16_t s_offset3;
static int_fast16_t s_offset4;
static int_fast16_t s_offset5;
static int_fast16_t s_offset6;
static int_fast16_t s_offset7;
static corner_t *agast58_detect(image_t *img int b int* num_corners rectangle_t *roi);
static int agast58_score(const unsigned char* p int bstart);
static void nonmax_suppression(corner_t *corners int num_corners array_t *keypoints);
static kp_t *alloc_keypoint(uint16_t x uint16_t y uint16_t score)
{
// Note must set keypoint descriptor to zeros
kp_t *kpt = xalloc0(sizeof*kpt);
kpt->x = x;
kpt->y = y;
kpt->score = score;
return kpt;
}
static void init5_8_pattern(int image_width)
{
if(image_width==s_width)
return;
s_width=image_width;
s_offset0=(-1)+(0)*s_width;
s_offset1=(-1)+(-1)*s_width;
s_offset2=(0)+(-1)*s_width;
s_offset3=(1)+(-1)*s_width;
s_offset4=(1)+(0)*s_width;
s_offset5=(1)+(1)*s_width;
s_offset6=(0)+(1)*s_width;
s_offset7=(-1)+(1)*s_width;
}
void agast_detect(image_t *image array_t *keypoints int threshold rectangle_t *roi)
{
int num_corners=0;
init5_8_pattern(image->w);
// Find corners
corner_t *corners = agast58_detect(image threshold &num_corners roi);
if (num_corners) {
// Score corners
for(int i=0; i corners[i].score = agast58_score(image->pixels + (corners[i].y*image->w + corners[i].x) threshold);
}
// Non-max suppression
nonmax_suppression(corners num_corners keypoints);
}
// Free corners;
fb_free();
}
static void nonmax_suppression(corner_t *corners int num_corners array_t *keypoints)
{
gc_info_t info;
int last_row;
int16_t row_start[MAX_ROW+1];
const int sz = num_corners;
/* Point above points (roughly) to the pixel above
the one of interest if there is a feature there.*/
int point_above = 0;
int point_below = 0;
/* Find where each row begins (the corners are output in raster scan order).
A beginning of -1 signifies that there are no corners on that row. */
last_row = corners[sz-1].y;
for(int i=0; i row_start[i] = -1;
}
for (int i=0 prev_row=-1; i corner_t *c = &corners[i];
if (c->y != prev_row) {
row_start[c->y] = i;
prev_row = c->y;
}
}
for(int i=0; i corner_t pos = corners[i];
uint16_t score = pos.score;
/*Check left */
if (i > 0) {
if (corners[i-1].x == pos.x-1 && corners[i-1].y == pos.y && Compare(corners[i-1].score sco
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 32434 2018-12-10 11:20 img\agast.c
文件 371793 2018-12-10 11:20 img\apriltag.c
文件 35475 2018-12-10 11:20 img\binary.c
文件 48970 2018-12-10 11:20 img\blob.c
文件 9698 2018-12-10 11:20 img\bmp.c
文件 215433 2018-12-10 11:20 img\cascade.h
文件 20811 2018-12-10 11:20 img\clahe.c
文件 10600 2018-12-10 11:20 img\collections.c
文件 3342 2018-12-10 11:20 img\collections.h
文件 194820 2018-12-10 11:20 img\dmtx.c
文件 13132 2018-12-10 11:20 img\draw.c
文件 5043 2018-12-10 11:20 img\edge.c
文件 4222 2018-12-10 11:20 img\eye.c
文件 205469 2018-12-10 11:20 img\fast.c
文件 35735 2018-12-10 11:20 img\fft.c
文件 1873 2018-12-10 11:20 img\fft.h
文件 69042 2018-12-10 11:20 img\filter.c
文件 4031 2018-12-10 11:20 img\fmath.c
文件 697 2018-12-10 11:20 img\fmath.h
文件 11334 2018-12-10 11:20 img\font.c
文件 406 2018-12-10 11:20 img\font.h
文件 7950 2018-12-10 11:20 img\fsort.c
文件 349 2018-12-10 11:20 img\fsort.h
文件 3700 2018-12-10 11:20 img\gif.c
文件 11016 2018-12-10 11:20 img\haar.c
文件 4295 2018-12-10 11:20 img\hog.c
文件 36078 2018-12-10 11:20 img\hough.c
文件 30502 2018-12-10 11:20 img\imlib.c
文件 52985 2018-12-10 11:20 img\imlib.h
文件 3233 2018-12-10 11:20 img\integral.c
............此处省略32个文件信息
相关资源
- CCS FFT c语言算法
- FFT电流检测 stm32f4
- 基于STM32的音频信号采样与FFT分析
- 高效FFT的C/C++代码实现包括基2的DIF和
- FFT(快速傅里叶变换)C++源程序
- FFT算法c语言代码
- 可解码所有jpeg格式图片的开源JPEG解码
- 信号FFT变换及绘图
- 利用FFT计算频谱图
- FFT的C语言实现
- FFTW3.0快速傅立叶变换库
- 利用c语言实现FFT运算
- 基于JPEG2000的图像编码与解码c++版
- 基于VC++的FFT频谱分析
- jpeg图片解码灰度二值化c语言实现
- mjpeg-streamer远程监控软件
- jpeg jpg解码 C++
- JPEG压缩的c语言实现
- Bmp2jpeg图片格式转换
- 图像FFT卷积
- jpeg压缩纯C语言实现
- JPEG编码之DCT与量化C++
- C语言实现2的指数次点的FFT
- DSP 77个C语言程序 包括FFTFIR IIR等的D
- fftw-3.3.7快速傅里叶变换计算库
- C语言的png和jpeg图片格式转换为bmp格式
- Visual C++实现MPEG/JPEG编解码技术代码集
- JPEG图像压缩c语言算法
- HOG+SVM代码及文档说明
- Visual C++ 实现 MPEG-JPEG 编解码技术.pd
评论
共有 条评论