📄 algorithm.h
字号:
/*2005-7-30 Image process algorithm.h ,writer:fu anxin
define 2 structure:Rect,Size;
define function:GetBinaryImage,findConnectComp;
************************************************************/
#include <std.h> //DSP/BIOS head file
#include <tsk.h>
#include <sem.h>
#include <gio.h>
#include <stdio.h>
#include <csl_dat.h> //CSL head file
#include <csl_cache.h>
//image size
typedef struct _Size{
int cx;
int cy;
}Size;
//rectangle struct
typedef struct _Rect{
int left;
int right;
int top;
int bottom;
}Rect;
//typedef struct _Color
//{
//int R;
//int G;
//int B;
//}
//Color;
// get a Binary Image from a YUV mode color image;
//Precondition: Image's yuv ,image size,
//post: get a binary image from the source image;
void getBinaryImage(unsigned char *imagey,unsigned char *imagecr, unsigned char *imagecb,Byte *BinaryImage,Size size);
//find the connect component from the binary image;
//precondition: binary image , image size
//post: get some connect component with lable and the number of pixels of the
// commpoent,return the max lable of componets;
int findConnectComp(Byte *img, Byte *Dst,Size size ,int *counter);
//swell function
//precondition: connect component image,image size the index of the component;
//post : return the rect of the connect component;
Rect Swell1(Byte *img,Size size,int index/*表征第几个连通区*/);
//Draw the rectangle which have been found
//void DrawRect(BYTE* Image,Size size,Rect rect,Color color);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -