@Namespace(value="cv")
@NoOffset
public static class opencv_core.FileStorage
extends org.bytedeco.javacpp.Pointer
| Modifier and Type | Field and Description |
|---|---|
static int |
APPEND
enum cv::FileStorage::Mode
|
static int |
BASE64
enum cv::FileStorage::Mode
|
static int |
FORMAT_AUTO
enum cv::FileStorage::Mode
|
static int |
FORMAT_JSON
enum cv::FileStorage::Mode
|
static int |
FORMAT_MASK
enum cv::FileStorage::Mode
|
static int |
FORMAT_XML
enum cv::FileStorage::Mode
|
static int |
FORMAT_YAML
enum cv::FileStorage::Mode
|
static int |
INSIDE_MAP
enum cv::FileStorage::
|
static int |
MEMORY
enum cv::FileStorage::Mode
|
static int |
NAME_EXPECTED
enum cv::FileStorage::
|
static int |
READ
enum cv::FileStorage::Mode
|
static int |
UNDEFINED
enum cv::FileStorage::
|
static int |
VALUE_EXPECTED
enum cv::FileStorage::
|
static int |
WRITE
enum cv::FileStorage::Mode
|
static int |
WRITE_BASE64
enum cv::FileStorage::Mode
|
| Constructor and Description |
|---|
FileStorage()
\brief The constructors.
|
FileStorage(org.bytedeco.javacpp.BytePointer filename,
int flags) |
FileStorage(org.bytedeco.javacpp.BytePointer filename,
int flags,
org.bytedeco.javacpp.BytePointer encoding)
\overload
\copydoc open()
|
FileStorage(long size)
Native array allocator.
|
FileStorage(opencv_core.CvFileStorage fs) |
FileStorage(opencv_core.CvFileStorage fs,
boolean owning)
\overload
|
FileStorage(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
FileStorage(String filename,
int flags) |
FileStorage(String filename,
int flags,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
org.bytedeco.javacpp.BytePointer |
elname()
the currently written element
|
opencv_core.FileStorage |
elname(org.bytedeco.javacpp.BytePointer elname) |
opencv_core.CvFileStorage |
fs()
the underlying C FileStorage structure
|
opencv_core.FileStorage |
fs(opencv_core.CvFileStorage fs) |
opencv_core.FileNode |
get(org.bytedeco.javacpp.BytePointer nodename)
\brief Returns the specified element of the top-level mapping.
|
opencv_core.FileNode |
get(String nodename) |
static org.bytedeco.javacpp.BytePointer |
getDefaultObjectName(org.bytedeco.javacpp.BytePointer filename)
\brief Returns the normalized object name for the specified name of a file.
|
static String |
getDefaultObjectName(String filename) |
opencv_core.FileNode |
getFirstTopLevelNode()
\brief Returns the first element of the top-level mapping.
|
int |
getFormat()
\brief Returns the current format.
|
opencv_core.FileNode |
getNode(org.bytedeco.javacpp.BytePointer nodename)
\overload
|
opencv_core.FileNode |
getNode(String nodename) |
boolean |
isOpened()
\brief Checks whether the file is opened.
|
opencv_core.CvFileStorage |
multiply()
\brief Returns the obsolete C FileStorage structure.
|
boolean |
open(org.bytedeco.javacpp.BytePointer filename,
int flags) |
boolean |
open(org.bytedeco.javacpp.BytePointer filename,
int flags,
org.bytedeco.javacpp.BytePointer encoding)
\brief Opens a file.
|
boolean |
open(String filename,
int flags) |
boolean |
open(String filename,
int flags,
String encoding) |
opencv_core.FileStorage |
position(long position) |
void |
release()
\brief Closes the file and releases all the memory buffers.
|
org.bytedeco.javacpp.BytePointer |
releaseAndGetString()
\brief Closes the file and releases all the memory buffers.
|
opencv_core.FileNode |
root() |
opencv_core.FileNode |
root(int streamidx)
\brief Returns the top-level mapping
|
int |
state()
the writer state
|
opencv_core.FileStorage |
state(int state) |
org.bytedeco.javacpp.BytePointer |
structs()
the stack of written structures
|
opencv_core.FileStorage |
structs(org.bytedeco.javacpp.BytePointer structs) |
void |
write(org.bytedeco.javacpp.BytePointer name,
org.bytedeco.javacpp.BytePointer val)
\overload
|
void |
write(org.bytedeco.javacpp.BytePointer name,
double val)
\overload
|
void |
write(org.bytedeco.javacpp.BytePointer name,
int val)
\brief Simplified writing API to use with bindings.
|
void |
write(org.bytedeco.javacpp.BytePointer name,
opencv_core.GpuMat val) |
void |
write(org.bytedeco.javacpp.BytePointer name,
opencv_core.Mat val)
\overload
|
void |
write(org.bytedeco.javacpp.BytePointer name,
opencv_core.UMat val) |
void |
write(String name,
double val) |
void |
write(String name,
int val) |
void |
write(String name,
opencv_core.GpuMat val) |
void |
write(String name,
opencv_core.Mat val) |
void |
write(String name,
opencv_core.UMat val) |
void |
write(String name,
String val) |
void |
writeComment(org.bytedeco.javacpp.BytePointer comment) |
void |
writeComment(org.bytedeco.javacpp.BytePointer comment,
boolean append)
\brief Writes a comment.
|
void |
writeComment(String comment) |
void |
writeComment(String comment,
boolean append) |
void |
writeObj(org.bytedeco.javacpp.BytePointer name,
org.bytedeco.javacpp.Pointer obj)
\brief Writes the registered C structure (CvMat, CvMatND, CvSeq).
|
void |
writeObj(String name,
org.bytedeco.javacpp.Pointer obj) |
void |
writeRaw(org.bytedeco.javacpp.BytePointer fmt,
byte[] vec,
long len) |
void |
writeRaw(org.bytedeco.javacpp.BytePointer fmt,
ByteBuffer vec,
long len) |
void |
writeRaw(org.bytedeco.javacpp.BytePointer fmt,
org.bytedeco.javacpp.BytePointer vec,
long len)
\brief Writes multiple numbers.
|
void |
writeRaw(String fmt,
byte[] vec,
long len) |
void |
writeRaw(String fmt,
ByteBuffer vec,
long len) |
void |
writeRaw(String fmt,
org.bytedeco.javacpp.BytePointer vec,
long len) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic static final int READ
public static final int WRITE
public static final int APPEND
public static final int MEMORY
public static final int FORMAT_MASK
public static final int FORMAT_AUTO
public static final int FORMAT_XML
public static final int FORMAT_YAML
public static final int FORMAT_JSON
public static final int BASE64
public static final int WRITE_BASE64
public static final int UNDEFINED
public static final int VALUE_EXPECTED
public static final int NAME_EXPECTED
public static final int INSIDE_MAP
public FileStorage(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public FileStorage(long size)
Pointer.position(long).public FileStorage()
The full constructor opens the file. Alternatively you can use the default constructor and then call FileStorage::open.
public FileStorage(@opencv_core.Str org.bytedeco.javacpp.BytePointer filename, int flags, @opencv_core.Str org.bytedeco.javacpp.BytePointer encoding)
public FileStorage(@opencv_core.Str org.bytedeco.javacpp.BytePointer filename, int flags)
public FileStorage(@opencv_core.Str String filename, int flags, @opencv_core.Str String encoding)
public FileStorage(@opencv_core.Str String filename, int flags)
public FileStorage(opencv_core.CvFileStorage fs, @Cast(value="bool") boolean owning)
public FileStorage(opencv_core.CvFileStorage fs)
public opencv_core.FileStorage position(long position)
position in class org.bytedeco.javacpp.Pointer@Cast(value="bool") public boolean open(@opencv_core.Str org.bytedeco.javacpp.BytePointer filename, int flags, @opencv_core.Str org.bytedeco.javacpp.BytePointer encoding)
See description of parameters in FileStorage::FileStorage. The method calls FileStorage::release before opening the file.
filename - Name of the file to open or the text string to read the data from.
Extension of the file (.xml, .yml/.yaml or .json) determines its format (XML, YAML or JSON
respectively). Also you can append .gz to work with compressed files, for example myHugeMatrix.xml.gz. If both
FileStorage::WRITE and FileStorage::MEMORY flags are specified, source is used just to specify
the output file format (e.g. mydata.xml, .yml etc.). A file name can also contain parameters.
You can use this format, "*?base64" (e.g. "file.json?base64" (case sensitive)), as an alternative to
FileStorage::BASE64 flag.flags - Mode of operation. One of FileStorage::Modeencoding - Encoding of the file. Note that UTF-16 XML encoding is not supported currently and
you should use 8-bit encoding instead of it.@Cast(value="bool") public boolean open(@opencv_core.Str org.bytedeco.javacpp.BytePointer filename, int flags)
@Cast(value="bool") public boolean open(@opencv_core.Str String filename, int flags, @opencv_core.Str String encoding)
@Cast(value="bool") public boolean open(@opencv_core.Str String filename, int flags)
@Cast(value="bool") public boolean isOpened()
public void release()
Call this method after all I/O operations with the storage are finished.
@opencv_core.Str public org.bytedeco.javacpp.BytePointer releaseAndGetString()
Call this method after all I/O operations with the storage are finished. If the storage was opened for writing data and FileStorage::WRITE was specified
@ByVal public opencv_core.FileNode getFirstTopLevelNode()
@ByVal public opencv_core.FileNode root(int streamidx)
streamidx - Zero-based index of the stream. In most cases there is only one stream in the file.
However, YAML supports multiple streams and so there can be several.@ByVal public opencv_core.FileNode root()
@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str org.bytedeco.javacpp.BytePointer nodename)
nodename - Name of the file node.@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str String nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(@Cast(value="const char*") org.bytedeco.javacpp.BytePointer nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(String nodename)
@Name(value="operator *") public opencv_core.CvFileStorage multiply()
public void writeRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="const uchar*") org.bytedeco.javacpp.BytePointer vec, @Cast(value="size_t") long len)
Writes one or more numbers of the specified format to the currently written structure. Usually it is
more convenient to use operator << instead of this method.
fmt - Specification of each array element, see \ref format_spec "format specification"vec - Pointer to the written array.len - Number of the uchar elements to write.public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="const uchar*") byte[] vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") org.bytedeco.javacpp.BytePointer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str org.bytedeco.javacpp.BytePointer fmt, @Cast(value="const uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") byte[] vec, @Cast(value="size_t") long len)
public void writeObj(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, @Const org.bytedeco.javacpp.Pointer obj)
name - Name of the written object.obj - Pointer to the object.for details.public void writeObj(@opencv_core.Str String name, @Const org.bytedeco.javacpp.Pointer obj)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, int val)
name - Name of the written objectval - Value of the written objectpublic void write(@opencv_core.Str String name, int val)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, double val)
public void write(@opencv_core.Str String name, double val)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, @opencv_core.Str org.bytedeco.javacpp.BytePointer val)
public void write(@opencv_core.Str String name, @opencv_core.Str String val)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, @ByVal opencv_core.Mat val)
public void write(@opencv_core.Str String name, @ByVal opencv_core.Mat val)
public void write(@opencv_core.Str String name, @ByVal opencv_core.UMat val)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, @ByVal opencv_core.UMat val)
public void write(@opencv_core.Str org.bytedeco.javacpp.BytePointer name, @ByVal opencv_core.GpuMat val)
public void write(@opencv_core.Str String name, @ByVal opencv_core.GpuMat val)
public void writeComment(@opencv_core.Str org.bytedeco.javacpp.BytePointer comment, @Cast(value="bool") boolean append)
The function writes a comment into file storage. The comments are skipped when the storage is read.
comment - The written comment, single-line or multi-lineappend - If true, the function tries to put the comment at the end of current line.
Else if the comment is multi-line, or if it does not fit at the end of the current
line, the comment starts a new line.public void writeComment(@opencv_core.Str org.bytedeco.javacpp.BytePointer comment)
public void writeComment(@opencv_core.Str String comment, @Cast(value="bool") boolean append)
public void writeComment(@opencv_core.Str String comment)
@opencv_core.Str public static org.bytedeco.javacpp.BytePointer getDefaultObjectName(@opencv_core.Str org.bytedeco.javacpp.BytePointer filename)
filename - Name of a file@opencv_core.Str public static String getDefaultObjectName(@opencv_core.Str String filename)
public int getFormat()
@opencv_core.Ptr public opencv_core.CvFileStorage fs()
public opencv_core.FileStorage fs(opencv_core.CvFileStorage fs)
@opencv_core.Str public org.bytedeco.javacpp.BytePointer elname()
public opencv_core.FileStorage elname(org.bytedeco.javacpp.BytePointer elname)
@Cast(value="char*") @StdVector public org.bytedeco.javacpp.BytePointer structs()
public opencv_core.FileStorage structs(org.bytedeco.javacpp.BytePointer structs)
public int state()
public opencv_core.FileStorage state(int state)
Copyright © 2018. All rights reserved.