mvpt_process_assist.h 1.29 KB
#ifndef __MVPT_PROCESS_ASSIST_H__
#define __MVPT_PROCESS_ASSIST_H__

#include <bitset>
#include "opencv2/highgui/highgui.hpp"
#include <cuda.h>
#include <cuda_runtime.h>
#include "sy_common.h"

#include <stdio.h>


#ifdef _MSC_VER
#include <direct.h>
#include <io.h>
#define ACCESS _access
#define MKDIR(a) _mkdir((a))
#else
#include <unistd.h>
#include <stdarg.h>
#include <sys/stat.h>
#define ACCESS access
#define MKDIR(a) mkdir((a),0755)
#endif

#define EDGESIZE 4

using namespace std;

//void showGpuMat(unsigned char* imgdata, int height, int width);
int CreateDir(char *pszDir);
void CreateResultFolder(char* resultFolder, const char* jointFolder);
bool LegalPos(bitset<EDGESIZE> flags, int left, int top, int right, int bottom, int imgHeight, int imgWidth, int minDistance[EDGESIZE]);
bool LegalArea(int maxArea, int lastArea, int left, int top, int right, int bottom);
bool LegalMinArea(int width, int height, sy_rect min_box);
void ExpandMargin(int direction_x, int direction_y, int boundary_w, int boundary_h,
	int &boundary_left, int &boundary_right, int &boundary_top, int &boundary_bottom);
bool validAngle(float roll, float yaw, float pitch, float max_angle, float max_pitch_angle);
bool betterArea(sy_rect& area1, sy_rect& area2);

#endif  // __MVPT_PROCESS_ASSIST_H__