-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAH_RockUtils.h
74 lines (60 loc) · 2.29 KB
/
AH_RockUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef AH_ROCKUTILS
#define AH_ROCKUTILS
/*******************************************************************************
AH_RockUtils.h
Author: Bob Crocco - Jet Propulsion Laboratory - 397Q
History:
07/06/20: B.Crocco. Created.
Usage:
header file to AH_RockUtils.c
*****************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "AH_Rocks.h"
typedef struct _OUTROCK
{
int id;
int tileR;
int tileC;
float shaX;
float shaY;
float rockX;
float rockY;
float tileShaX;
float tileShaY;
int shaArea;
float shaLen;
float rockWidth;
float rockHeight;
float score;
float gradMean;
float Compact;
float Exent;
int Class;
float gamma;
float shaEllipseMajor;
float shaEllipseMinor;
float shaEllipseTheta;
}OUTROCK;
int read_param_file(char* filename, RD_PARMS* src);
EXPORT int write_param_file(char* filename, RD_PARMS* src);
int read_rocklist(char* rockListPath, RD_PARMS* rd_parms, OUTROCK** rocks, int* numRocks);
int compare_rocklist_files(char* rocklist0, char* rocklist1, int ignoreId);
int compare_rocklists(RD_PARMS* parms0, OUTROCK* rocks0, int numRocks0,
RD_PARMS* parms1, OUTROCK* rocks1, int numRocks1, int ignoreId);
//TODO: rework this api
int detect(char* inputImagePath, RD_PARMS* params, OUTROCK** out_rocks, int* num_out_rocks);
EXPORT int detect_per_tile_settings(char* inputImagePath, char* outputRockListPath, int numSettings, RD_PARMS* settingsArray);
EXPORT int detect_from_files(char* inputImagePath, char* paramsPath, char* outputRockListPath);
EXPORT int detect_tile_rocks(char* inputImagePath, unsigned short* labelImg, unsigned char* subimg,
int tRow, int tCol, int frows, int fcols, int nbr, int nbc,
RD_PARMS* params, OUTROCK* rocks, int* maxlab);
//intermediate products
EXPORT int gamma_from_files(char* inputImagePath, float gamma, char* outputGammaPath);
EXPORT int threshold_from_files(char* inputImagePath, float gamma, int thresholdOverride, char* outputShadowPath, int* selectedThreshold);
EXPORT int shadows_from_files(char* inputThresholdImagePath, char* outputShadowsImagePath, int* outNumShadows);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /*AH_ROCKUTILS*/