#include < stdio.h > #include < stdlib.h > #include < time.h > void main() { ////////////////////////////////////////////////////////////////////////// //File Write by binary srand( time(0)); float feature[10]; for(int i=0; i<10; ++i) feature[i] = rand()/100; //data confirm for(int i=0; i< 10; ++i) printf("%lf\n", feature[i] ); FILE * fp; fp = fopen("output.txt", "wb"); fwrite(feature, sizeof(float), 10, fp); fclose(fp); printf("//////////////////////////////////////////////////////////////////////////\n"); ////////////////////////////////////////////////////////////////////////// //File Read by binary float feature_r[10]; FILE* fp2; fp2 = fopen("output.txt", "rb"); fread(feature_r, sizeof(float), 10, fp2); fclose(fp2); //data confirm for(int i=0; i< 10; ++i) printf("%lf\n", feature_r[i] ); ////////////////////////////////////////////////////////////////////////// }
1/10/2013
C file Write, Read by Binary - example source code
C file Write, Read by Binary - example source code
Subscribe to:
Post Comments (Atom)
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
//Singular value decomposition : Mat w, u, v; SVDecomp(data, w, u, v); // A = U W V^T //The flags cause U and V to be returned transpose...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
dp parameter is about resolution of voting space. dp is larger, voting resolution is small compare to image size. so dp is larger, circle...
-
Optical Flow sample source code using OpenCV. It programed based on http://feelmare.blogspot.kr/2012/10/make-2-frame-having-time-interv...
-
line, circle, rectangle, ellipse, polyline, fillConvexPoly, putText, drawContours example source code!!. ... //http://study....
-
recent EEG datasets and papers from the last 5 years: OpenNeuro EEG Datasets (2020-Present) DS003190: High-density EEG during motor tasks (...
-
What is TorchOps.cpp.inc ? TorchOps.cpp.inc : This file contains implementations of the operations for the torch-mlir dialect. It is ty...
-
I can know all coordinate from A point to B point using "LineIterator" function in OpenCV. So this source code is applied by this...
-
TensorFlow install using virtualenv on ubuntu environment. The method is same with pip install. http://study.marearts.com/2016/04/tensorf...
No comments:
Post a Comment