Alexander Alekhin
576d2dbac0
refactor: don't use CV_ErrorNoReturn() internally
7 years ago
Alexander Alekhin
12e8e33144
build: enable -Wimplicit-fallthrough warning for OpenCV modules
7 years ago
Alexander Alekhin
7d8f1dde26
core(persistence): disable checks for base64 streams
7 years ago
Alexander Alekhin
f4c4b01455
core: added checks and "fixit" items for persistence parsers
...
To raise errors with proper messages of the problems.
7 years ago
Maksim Shabunin
e225850cc6
Split persistence.cpp into smaller pieces ( #10788 )
...
* Extracted base64 persistence functionality
* Extracted YML persistence functionality
* Extracted JSON persistence functionality
* Extracted XML persistence functionality
* Extracted public C and C++ interfaces implementation in persistence
* Persistence: cleanup and fixes
* fixup! Persistence: cleanup and fixes
7 years ago
Pavel Rojtberg
2d674fc151
persistence: replace arbitrary limit of cn to 4 by CV_CN_MAX ( #10636 )
...
* persistence: replace arbitrary limit of cn to 4 by CV_CN_MAX
* python: added persistence test, remove temp files
* fixup! python: added persistence test, remove temp files
* fixup! python: added persistence test, remove temp files
7 years ago
Alexander Alekhin
825b14278e
core: fix persistence with deprecated traits
7 years ago
Maksim Shabunin
7349b8f5ce
Build for embedded systems
7 years ago
Alexander Alekhin
0451629e22
core(persistence): resolve DMatch/KeyPoint problem
8 years ago
Vladislav Sovrasov
5e68b28ad3
core: fix file not closed when exception in FS
8 years ago
dkurt
583b327523
Fix JSON booleans without quotes
8 years ago
dkurt
3515f6ec33
Missed NAMED bit of JSON nodes tag
8 years ago
Alexander Alekhin
ec7ce81401
core: fix FileStorage format detection in case of .gz archives
8 years ago
Alexander Alekhin
5bc291937f
test: FileStorage format regression test
8 years ago
PkLab.net
6dd9e18b2e
add std::string overload for cv::read()
8 years ago
Vladislav Sovrasov
5b833db558
core: forbid conversion real->int in some cases in FileStorage
8 years ago
Maksim Shabunin
a769d69a9d
Fixed several issues found by static analysis
8 years ago
Alexander Alekhin
006966e629
trace: initial support for code trace
8 years ago
Maksim Shabunin
b04ed5956e
Fixed several issues found by static analysis in core module
8 years ago
Alexander Alekhin
75f28245a8
core: fix persistence bug in RAW I/O code
...
- persistence.cpp code expects special sizeof value for passed structures
- this assumption is lead to memory corruption problems
- fixed/workarounded test to prevent memory corruption on Linux 32-bit systems
8 years ago
Yuriy Solovyov
26ccc09c46
Fix zlib issue on iOS
8 years ago
chacha21
74abbd0898
Fix compilation when USE_ZLIB is false
...
create a dummy gzFile type
8 years ago
chacha21
aa1b031274
get rid of warning C4800 under VS2010
...
the "std::basic_ios::operator bool" differs between C++98 and C++11. The
"double not" syntax is portable and covers both cases with equivalent
meaning
8 years ago
Vladislav Sovrasov
c321d025c4
Fix DMatch and Keypoint I/O in FileStorage
8 years ago
Vladislav Sovrasov
896c34fab3
Add support of type headings from YAML1.2
8 years ago
Matt Bennett
c3a8db6d6c
Merge pull request #7952 from mattmyne:JSONWriteFixTrailingDecimalPoint
...
Append zero to trailing decimal place for FileStorage JSON write of a float or double value (#7952 )
* Fix for FileStorage JSON write of a float or double value that has no fractional part; appends a zero character after the trailing decimal place to meet JSON standard.
* strlen return to size_t type rather than unnecessary cast to int
8 years ago
mshabunin
e941259434
Persistence: fixed valgrind warning in base64 decoder
8 years ago
mshabunin
a0e771f545
Fixed valgrind issues in persistence functions
8 years ago
Vladislav Sovrasov
e955d17c51
Add new error messages
8 years ago
Vladislav Sovrasov
38483fe7a7
Skip UTF-8 BOM in FileStorage
8 years ago
fegorsch
ddf0554fff
Use colon in "%YAML:1.0" directive when persisting to YAML-files
...
In YAML 1.0 the colon is mandatory. See http://yaml.org/spec/1.0/#id2558635 .
This also allows prior releases to read YAML files created with the current version.
8 years ago
MYLS
47f2e618ee
Add two tests.
...
- one test for type_id;
- another for comments in JSON;
9 years ago
Pavel Vlasov
30a6cee2fe
Instrumentation for OpenCV API regions and IPP functions;
9 years ago
MYLS
d99832163a
solve warnings and do some cleaning.
9 years ago
MYLS
8596e82d98
Add JSON support.
...
a JSON emitter, a parser, tests and some basic doc.
9 years ago
MYLS
1da8a19af3
fixed two bugs that I caused.
9 years ago
MYLS
86238d2748
make some changes according to the code review.
...
- use `std::string` instead of `new char`;
- reserve 1 MB for buffer;
9 years ago
MYLS
08911cbfae
change `code` to `snippet` and do some cleaning.
...
- use `@snippet` instead of `@code` in docs.
- remove some functions that were not used.
9 years ago
MYLS
cf2d6f6721
solve errors and warnings
...
Modified performance test and solve a problem caused by an enum type.
9 years ago
MYLS
78ca5ddd45
solve errors and warnings
9 years ago
Ilya Lavrenov
87ae4e0564
fixed clone of empty matrix
9 years ago
MYLS
617df09143
Modify Base64 functions and add test and documentation
...
Major changes:
- modify the Base64 functions to compatible with `cvWriteRawData` and so
on.
- add a Base64 flag for FileStorage and outputs raw data in Base64
automatically.
- complete all testing and documentation.
9 years ago
Philipp Hasper
00112bbe10
persistence: fixing crash with space-only values
9 years ago
MYLS
7c92ee2e6e
Split `cvWriteRawData_Base64` into three functions
...
The three new functions:
```cpp
void cvStartWriteRawData_Base64(::CvFileStorage * fs, const char* name,
int len, const char* dt);
void cvWriteRawData_Base64(::CvFileStorage *
fs, const void* _data, int len);
void
cvEndWriteRawData_Base64(::CvFileStorage * fs);
```
Test is also updated. (And it's remarkable that there is a bug in
`cvWriteReadData`.)
9 years ago
MYLS
29921d055d
change the parameter to `CvMat` and `CvMatND`
...
```cpp
cvWriteMat_Base64(::cv::FileStorage & fs, ::cv::String const & name,
::cv::Mat const & mat)
```
becomes:
```cpp
CV_EXPORTS void cvWriteMat_Base64(::CvFileStorage* fs, const char* name,
const ::CvMat* mat);
CV_EXPORTS void
cvWriteMatND_Base64(::CvFileStorage* fs, const char* name, const
::CvMatND* mat);
```
9 years ago
MYLS
9faa2a7fd0
solve warning for IOS
...
Two test are still needed:
1. Verify the Base64 data.
2. Read an old YML file for compatibility test.
9 years ago
MYLS
958263d245
Solve warnings, and adjusted the test case.
9 years ago
MYLS
882e4221e7
fix errors from test.
...
Two other test are still needed.
1. Verify the Base64 data.
2. Read an old YML file for compatibility test.
9 years ago
MYLS
d1b097f409
fix most coding style warnings and errors
9 years ago
MYLS
ecd827fc8e
Add Base64 support for FileStorage
...
[GSoC] FileStorage:
Add base64 support for reading and writting XML\YML file.
The two new functions:
```
void cvWriteRawData_Base64(cv::FileStorage & fs, const void* _data, int
len, const char* dt);
void cvWriteMat_Base64(cv::FileStorage & fs, cv::String const & name,
cv::Mat const & mat);
```
9 years ago