blob: 40bd1094d06760f487808f0c9833356e73dd2981 (
plain) (
blame)
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
75
76
77
78
|
/******************************************************************************
* Copyright (C) 2018 Alejandro Colomar Andrés *
* SPDX-License-Identifier: GPL-2.0-only *
******************************************************************************/
/******************************************************************************
******* include guard ********************************************************
******************************************************************************/
#pragma once /* vision-artificial/save/save.hpp */
/******************************************************************************
******* headers **************************************************************
******************************************************************************/
#include <cstdio>
#include <opencv2/core/core.hpp>
#include <libalx/base/compiler/restrict.hxx>
/******************************************************************************
******* macros ***************************************************************
******************************************************************************/
# define ENV_HOME "HOME"
# define USER_PROG_DIR "vision-artificial/"
# define USER_SAVED_DIR "vision-artificial/saved/"
# define SAVED_NAME_DEFAULT "saved"
/******************************************************************************
******* enums ****************************************************************
******************************************************************************/
/******************************************************************************
******* structs / unions *****************************************************
******************************************************************************/
/******************************************************************************
******* variables ************************************************************
******************************************************************************/
extern class cv::Mat image;
extern char home_path [FILENAME_MAX];
extern char user_prog_path [FILENAME_MAX];
extern char saved_path [FILENAME_MAX];
extern char saved_name [FILENAME_MAX];
/******************************************************************************
******* extern functions *****************************************************
******************************************************************************/
extern "C"
{
void save_init (void);
void save_cleanup (void);
void save_reset_fpath(void);
void load_image_file (const char *fpath, const char *fname);
void save_image_file (const char *fpath, const char *save_as);
}
/******************************************************************************
******* static inline functions (prototypes) *********************************
******************************************************************************/
/******************************************************************************
******* static inline functions (definitions) ********************************
******************************************************************************/
/******************************************************************************
******* end of file **********************************************************
******************************************************************************/
|