#ifndef _DOG_PATH_H_
#define _DOG_PATH_H_

#include "zf_common_headfile.h"
#include "zf_common_debug.h"

#include "DOG_data.h"
#include "DOG_cv.h"

struct DOG_PATH;

typedef struct DOG_PATH{
	/* Ա */
	uint16 mid_x;						// ̬
	uint16 path_start_y;				// ·ȡʼ߶
	uint16 path_end_y;					// ·ȡ߶
	uint16 side_extract_start_y;		// ߿ʼȡ߶
	uint16 side_extract_end_y;			// ߽ȡ߶
	uint16 path[MT9V03X_H][2];			// ·xy
	uint16 prediction_point;			// Ԥ߶ȣ꽫Ϊһ֡
	uint16 longest_white_col_x;			// X
	uint16 L_side[MT9V03X_H*3][2];		// 
	uint16 R_side[MT9V03X_H*3][2];		// ұ
	uint16 L_side_point_num;			// ߵ
	uint16 R_side_point_num;			// ұߵ
	uint16 L_frame_point_num;			// ߿
	uint16 R_frame_point_num;			// ұ߿
	uint16 L_bend_point[MT9V03X_H*2][2];// 
	uint16 R_bend_point[MT9V03X_H*2][2];// ұ
	uint16 L_bend_point_num;			// 
	uint16 R_bend_point_num;			// ұ
	int16 path_width[MT9V03X_H];		// 
	uint16 point_distance;				// յ/
	double bend_point_angle_min;		// СǶֵ
	double bend_point_angle_max;		// Ƕֵ
	
	/* Ա */
	void (*longest_white_col)(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W], uint16 control_point);	// 
	void (*path_extract)(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W]);			// ·ȡ
	void (*side_extract)(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W]);			// ȡ
	void (*side_point_kind_judge)(struct DOG_PATH* this);				// ߵж
}DOG_PATH;

// 
void longest_white_col(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W], uint16 control_point);	
// ·ȡ
void path_extract(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W]);	
// ȡ
void side_extract(struct DOG_PATH* this, uint8 input[MT9V03X_H][MT9V03X_W]);		
// ߵж
void side_point_kind_judge(struct DOG_PATH* this);				

// 캯
void path(struct DOG_PATH* this, uint16 path_start, uint16 path_end, uint16 side_extract_start_y, uint16 side_extract_end_y, uint16 prediction_point);
// 
void _path(struct DOG_PATH* this);

#endif