#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)
-
Google Coral USB Edge TPU Implementation Guide 1. Installation and Troubleshooting 1.1 Hardware Requirements Google Coral USB Accelerator ...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
Video stabilization example source code. The principle is like that... Firstly, to obtain 2 adjacent images extract good feature to t...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
see the this source code ... #define N 10 //(33*1024) __global__ void add(int *c){ int tid = threadIdx.x + blockIdx.x * gridDim.x; if(...
-
This is my cmd for training lora with kohya-ss/sd-scripts python -m accelerate.commands.launch --num_cpu_threads_per_process=8 \ ... --enab...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
ONNX Runtime with ROCm (AMD GPU) Setup Guide Installation Prerequisites ROCm installed (6.0+ recommended) Python 3.8-3.10 Install ONNX Runti...
-
I tired to save sub model in seq-to-seq model which is encoder part. What I used for save and load is like follow code and I failed with e...
No comments:
Post a Comment