基于标准C语言的数字图像处理基本框架
2009-10-21 22:25
465 查看
考虑到现有的数字图像处理都是基于Windows平台,都或多或少使用了Win32 API函数,不能移植到Linux或者嵌入式系统中。为了使程序可移植,采用标准C语言建立了数字图像处理的基本框架,如下图所示:
#ifndef BMP_H_INCLUDED
20#define BMP_H_INCLUDED
21
22#include <ctype.h>
23#include <stdio.h>
24#include <stdlib.h>
25#include <malloc.h>
26#include <string.h>
27
28typedef unsigned short WORD;
32typedef unsigned long DWORD;
33typedef long LONG;
34typedef unsigned char BYTE;
35
36
45
60
68
74typedef struct _Bitmap
76
87int CreateBitmap(Bitmap* bmp, int width, int height, int bitCount)
95
157void ReleaseBitmap(Bitmap* bmp)
164
171int CheckPath(char *path)
179
202int ReadBitmap(char* path, Bitmap* bmp)
211
281int SaveBitmap(char* path, Bitmap* bmp)
290
367#endif // BMP_H_INCLUDED
368
369
370
371
372
373
392#ifndef BASICPROCESS_H_
393#define BASICPROCESS_H_
394
395#include "bmp.h"
396#include <math.h>
397int RGB2Gray(Bitmap* src, Bitmap* dst)
401
440int Gray2RGB(Bitmap* src, Bitmap* dst)
450
488int Gray2BW(Bitmap* src, Bitmap* dst, int threshold)
498
539void rgb2hsv(float R, float G, float B, float *H, float *S, float* V)
548
579
580void hsv2rgb(float H, float S, float V, float *R, float *G, float *B)
589
641int HistEqualization(Bitmap* dstBmp, Bitmap* srcBmp)
646
650
654int MedFilt(Bitmap* dstBmp, Bitmap* srcBmp)
655
659#endif /* BASICPROCESS_H_ */
#ifndef BMP_H_INCLUDED
20#define BMP_H_INCLUDED
21
22#include <ctype.h>
23#include <stdio.h>
24#include <stdlib.h>
25#include <malloc.h>
26#include <string.h>
27
28typedef unsigned short WORD;
32typedef unsigned long DWORD;
33typedef long LONG;
34typedef unsigned char BYTE;
35
36
45
60
68
74typedef struct _Bitmap
76
87int CreateBitmap(Bitmap* bmp, int width, int height, int bitCount)
95
157void ReleaseBitmap(Bitmap* bmp)
164
171int CheckPath(char *path)
179
202int ReadBitmap(char* path, Bitmap* bmp)
211
281int SaveBitmap(char* path, Bitmap* bmp)
290
367#endif // BMP_H_INCLUDED
368
369
370
371
372
373
392#ifndef BASICPROCESS_H_
393#define BASICPROCESS_H_
394
395#include "bmp.h"
396#include <math.h>
397int RGB2Gray(Bitmap* src, Bitmap* dst)
401
440int Gray2RGB(Bitmap* src, Bitmap* dst)
450
488int Gray2BW(Bitmap* src, Bitmap* dst, int threshold)
498
539void rgb2hsv(float R, float G, float B, float *H, float *S, float* V)
548
579
580void hsv2rgb(float H, float S, float V, float *R, float *G, float *B)
589
641int HistEqualization(Bitmap* dstBmp, Bitmap* srcBmp)
646
650
654int MedFilt(Bitmap* dstBmp, Bitmap* srcBmp)
655
659#endif /* BASICPROCESS_H_ */
相关文章推荐
- 基于标准C语言的数字图像处理基本框架
- 基于标准C语言的数字图像处理基本框架
- 基于标准C语言的数字图像处理基本框架3
- 基于标准C语言的数字图像处理基本框架(转)
- 基于标准C语言的数字图像处理基本框架2
- 基于标准C语言的数字图像处理基本框架
- 基于QProbe创建基本Android图像处理框架
- 基于matlab的数字图像处理GUI设计
- 数字图像处理入门(一)-基本概念
- 【数字图像处理学习笔记之六】基本灰度级形态学算法
- 数字图像处理成长之路4: C语言与离散傅立叶变换(DFT)
- 数字图像处理中的基本图像类型
- 数字图像处理-编程实现染色体计数 C语言实现
- 数字图像处理基本知识
- 基于mfc的数字图像处理的小软件pdd的诞生-打开图片及保存图片
- 数字图像处理基本软件VC++实现基本处理功能 (二)
- 图像处理之基础---方差、标准差、协方差基本概念
- 数字图像处理的基本概念
- 数字图像处理编成入门笔记——第9章 图象的压缩编码,JPEG压缩编码标准
- 数字图像处理:第十一章基于特征向量的变换