-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.c
More file actions
35 lines (29 loc) · 853 Bytes
/
main.c
File metadata and controls
35 lines (29 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "external.h"
#include "stdio.h"
#include <stdlib.h>
#define SRC_PATH "/home/linzhiqiang/D/buildMapping_CPP/map_R_new_undistort/yuvImage/test"
void main() {
unsigned char *image_data = (unsigned char *)malloc((640 * 480));
char *img_src = malloc(128);
int run = 1;
int index = 351;
FILE *fd;
char m_bool = 0;
init_map_src();
while (run == 1) {
sprintf(img_src, "%s/%05d.yuv", SRC_PATH, index);
fd = fopen(img_src, "rb");
int readsize = fread(image_data, 1, 480 * 640, fd);
fclose(fd);
printf("img_src %s %d\n", img_src, readsize);
if (index == 1160) {
m_bool = 1;
run = 0;
}
maping_world(480, 640, image_data, m_bool);
index++;
}
printf("end !!!!!!!!!!! \n");
free(image_data);
free(img_src);
}