HELLO,
i need to Extract the thermal height from the map "XC.bmp" (Maximum map size 800x800 pixels can be assumed - the map size will change and read from the file).
and create a "therm_res.txt" coordinate file with their location and updated heights .
each pixel on the map represents 100 meters**
Blue |
131 |
93 |
51 |
125 |
255 |
255 |
189 |
189 |
113 |
Green |
255 |
215 |
138 |
93 |
134 |
213 |
153 |
98 |
70 |
Red |
177 |
93 |
53 |
51 |
52 |
129 |
165 |
199 |
119 |
Height |
2700 |
2400 |
2100 |
1800 |
1500 |
1200 |
900 |
600 |
300 |
How should I move from here?
Code:
#include <stdio.h>
#include <math.h>
#include<Windows.h>
int read_bmp() {
unsigned int size = 0;
int i;
FILE * picXC;
fopen_s(&picXC, "XC.bmp", "rb");
if (!picXC) {
printf("Problem reading XC.bmp file\problems with setting heights");
}
else for (i = 0; i<4; i++) size |= fgetc(picXC) << (i * 8);
// read into "therm_res.txt"
fclose(picXC);
return 0;
}