34 #include "iclass_local_proto.h" 49 G_debug(3,
"I_iclass_init_signatures()");
52 for (
unsigned int i = refer->
nfiles; i--;) {
74 G_debug(3,
"I_iclass_add_signature()");
88 sigs->
sig[sn - 1].
r =
r;
89 sigs->
sig[sn - 1].
g =
g;
90 sigs->
sig[sn - 1].
b =
b;
92 for (b1 = 0; b1 < sigs->
nbands; b1++) {
94 for (b2 = 0; b2 <= b1; b2++) {
113 G_debug(3,
"I_write_signatures(): file_name=%s", file_name);
118 G_warning(
_(
"Unable to open output signature file '%s'"), file_name);
int G_str_to_color(const char *, int *, int *, int *)
Parse color string and set red,green,blue.
int I_iclass_init_signatures(struct Signature *sigs, struct Ref *refer)
Initialize signatures.
FILE * I_fopen_signature_file_new(const char *)
Create signature file.
float var_signature(IClass_statistics *statistics, int band1, int band2)
Helper function for computing variance for signature file.
int I_iclass_write_signatures(struct Signature *sigs, const char *file_name)
Write signtures to signature file.
void G_warning(const char *,...) __attribute__((format(printf
char * Rast_get_semantic_label_or_name(const char *, const char *)
Get a raster map semantic label or fall back to its name.
int I_new_signature(struct Signature *)
void I_iclass_add_signature(struct Signature *sigs, IClass_statistics *statistics)
Add one signature.
int G_debug(int, const char *,...) __attribute__((format(printf
int I_init_signatures(struct Signature *, int)
Initialize struct Signature before use.
int I_write_signatures(FILE *, struct Signature *)
Write signatures to file.