|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cyberlab.support.FileStorage
public class FileStorage
Class implementing various file storage operations needed by the framework and made available to the framework user.
Constructor Summary | |
---|---|
FileStorage()
|
Method Summary | |
---|---|
static ImageFeatures |
loadImageFeatures(java.io.File file)
Loads ImageFeatures from a file. |
static LICOVModel |
loadLICOVmodel(byte[] bytes)
Load LICOVmodel from byte array |
static LICOVModel |
loadLICOVmodel(java.io.File file)
Loads LICOmodel from file. |
static org.opencv.core.Mat |
loadMat(java.io.File file)
Loads Mat object from file |
static java.lang.String |
readTextFile(java.lang.String enc,
java.io.File textFile)
Method for reading text files. |
static boolean |
saveLICOVmodel(java.io.File file,
LICOVModel lm)
Saves LICOmodel to file. |
static boolean |
saveMat(java.io.File file,
org.opencv.core.Mat mat)
Saves a Mat object to file |
static boolean |
saveMat(java.io.File file,
org.opencv.core.Mat mat,
java.lang.String descriptorType,
java.lang.String keypointType)
Saves an image converted to a Mat object together with a string representation of its descriptor type and keypoint type. |
static boolean |
writeBytesToFile(java.io.File out,
byte[] bytes)
Writes a byte array to file |
static boolean |
writeTextFile(java.io.File textFile,
java.lang.String text,
java.lang.String enc)
Writes a string to textfile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileStorage()
Method Detail |
---|
public static java.lang.String readTextFile(java.lang.String enc, java.io.File textFile)
enc
- a string representing the encoding to use when translating this stream to a string.textFile
- a file containing text
public static boolean writeBytesToFile(java.io.File out, byte[] bytes)
out
- where the bytes are to be storedbytes
- the bytes
public static boolean writeTextFile(java.io.File textFile, java.lang.String text, java.lang.String enc)
textFile
- where the text are to be storedtext
- the text itselfenc
- a string representing the encoding to use when translating this stream to a string.
public static boolean saveMat(java.io.File file, org.opencv.core.Mat mat)
file
- legal filemat
- the mat object
java.lang.IllegalArgumentException
- Illegal file extensionpublic static org.opencv.core.Mat loadMat(java.io.File file)
file
- legal file
java.lang.IllegalArgumentException
- Illegal file extensionpublic static boolean saveMat(java.io.File file, org.opencv.core.Mat mat, java.lang.String descriptorType, java.lang.String keypointType)
file
- legal file with .xml of .yml extensionmat
- the image as a matdescriptorType
- descriptor typekeypointType
- feature type
java.lang.IllegalArgumentException
- Illegal file extensionpublic static ImageFeatures loadImageFeatures(java.io.File file)
file
- legal file with extension .xml or .yml
java.lang.IllegalArgumentException
- Illegal file extensionpublic static boolean saveLICOVmodel(java.io.File file, LICOVModel lm)
file
- Legal file with extension .xml or .ymllm
- The LICOmodel
java.lang.IllegalArgumentException
- Illegal file extensionpublic static LICOVModel loadLICOVmodel(java.io.File file)
file
- Legal file with extension .xml or .yml
java.lang.IllegalArgumentException
- Illegal file extensionpublic static LICOVModel loadLICOVmodel(byte[] bytes)
bytes
- the byte representation of the LICOVmodel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |