1 Efficient rendering of terrain elevation model
3 start with some top level cells
9 views from google earth
11 image data + info viewing / illumination
16 projection of imagery is not linear lon/lat
17 use gdal library to open file and get projection, and translate between projections
18 found another source of elevation data
19 3arcsec srtm with voids filled in using high resolution relief maps
20 1arcsec same format but made before the above with same maps
21 higher res, but SRTM is more accurate
22 elevation interpolation
23 tried bilinear and bicubic
28 [ ] comparing two regions in different datasets
29 [ ] get source from shadow guys
32 using discontinuity measure with mid range IR
33 mir lights up rocks not in shadow, so discontinuity *(1-mir) could work
34 initially working with discontinuity measurement
35 saturation screws up with a lot of it
36 its then that i realised that of course shadow is never saturated
37 any saturated area can be discounted as non-shadow
38 shadows are generally dark throughout the channels
39 so multiply by (1- each channel value)
40 low (unsnowed) vegetation still shows up as shadow
41 is that because its shadows in the complexity of trees etc?
42 these areas have accurate SRTM data
43 perhaps we can use this to prove that they cannot be in shadow
44 characteristics of a cast shadow as travel away from light
46 area of self shadow - we can find this from the elevation data
49 therefore an area of light followed by an area of shadow
50 without self shadow in between is false
54 simple, per pixel towards light until hits terrain
56 edges of sun visibility projected into floor
59 negative product might not work as with rgb, but quite good here
60 doesn't work well in non snowy areas
61 constraints transititions along light path of illuminated, self shadow, cast shadow
64 shadow classification isn't great using simple method
65 we could use some PAT techniques
66 features could be log chromaticity values
67 classifications are shadow/non-shadow
68 could restrict to only pixels negative-product classifies as shadow
70 menu export->condition in selection
71 condition is channel and threshold (=0.5)
72 list of available channels
73 list of output channels
74 buttons to transfer between, and move up and down
75 generalised negative product
76 now product of powers of negative channels
77 can bias channels, so thermal IR has more effect at eliminating shadows than the others
80 [ ] improve shadow classification using self-shadow -> cast-shadow constraint
81 [ ] start terrain improvements
85 [X] error function in terms of parameters
86 [ ] find derivitive (numerically)
88 [X] threshold as another parameter or minimise threshold each step
89 [ ] could plot wavelength - importance to shadow classification
90 [X] whether throwing away channels would help - minimiser would solve
91 [ ] test that constraint equations hold on training data (russion relief maps)
92 [ ] take some lines in direction of sun, and do the plot
93 [ ] smooth out small variations between shadow types
94 [ ] ambient occlusion with hemispheres
95 [ ] "shape from shading on a cloudy day"
96 [ ] shape from shading - two images - intersection of cones
97 [ ] scatter plot between angle and colour in shadows
98 [ ] look good on report
99 [ ] lit review before christmas
103 hold off on thresholding
104 error = number of incorrect classifications
105 as threshold goes from 0 to 1, crossing a pixel value
106 pixels in shadow go incorrect
107 pixels in light go correct
108 create a number of bins in range, e.g. for each slider value
109 single pass through pixels
110 if classified as shadow: +1 to bin
111 as threshold hits that value, error will increase
112 if classified as non-shadow: -1 from bin
113 as threshold hits that value, error will decrease
116 gradient descent comes up with something like:
117 threshold: 2.47319e-6
118 0.9, 1.2, 0.8, 2.6, 19.5, 14, 10.7, 8.5, 3.3
119 when adapted to larger terrain, optimal threshold is: 1.8692e-6
121 another gradient descent:
122 threshold: 0.000581442
123 0.1, 0.8, 0.9, 0.9, 15.8, 7.2, 6.2, 6.9, 2.8
127 added elevation channel, showing void
128 when change lambertian shading to light from top, and go high resolution
129 do voids appear darker, i.e. significantly steeper?
130 there's definitely some relationship, but its not entirely accurate
134 about 6 papers per section
136 any attempt at estimation
137 Edwin did radar shape from shading
138 "francot" "chalaper" - surface integration
139 shape from shading from snow covered terrain
143 section on data sources
147 try gradient descent on big terrain area
148 check if it holds generally
150 normal angle to sun / value
151 normal z component / value
154 shadow edge dictionary - low level (finding edges) -> higher level (meaning)
156 will ?[cg]ause? any problem
157 tree/graph/finite state automata
158 tree of allowed rules
159 Consistency - what to do when not
161 confidence in how good
164 general rules - state machine
165 do sample - check consistent
170 change of height values (appropriately scaled)
172 shadow entrance constraints
173 difference of gradients to tangential
174 (-dh/dw - sin(elev_sun))^2
175 negative change in gradient
177 elevation relative to transition exit, from elevation of sun
178 (h_exit+(w_enter-w_exit)*sin(elev_sun) - h)^2
179 total rate of change of gradient (smoothness) in both directions
182 shadow elevation constraint - below line between entrance and exit
183 (max(0, h - (h_exit*(w_exit-w) + h_enter*(w-w_enter)) / (w_exit-w_enter)))^2
184 lit pixels must be facing the sun
185 min(0, -dh/dw - sin(elev_sun))^2
186 angle between normals and shape-from-shading/occlusion normals
187 factoring in reliability of shape-from-shading (e.g. snow/rock)
189 quick access to a pixel's sun direction shadow entrance/exit
190 elevation field upsampled to match imagery?
193 [ ] plot theta(N,L)/I to check shading is accurate
194 for shadow and non shadow
195 should look like cos in sun
196 tell us albedo (x=0), reflection when face on
197 [ ] what shape for shadow region?
198 integrate over L for occlusion
199 imagine hemisphere on surface (slanted)
200 the bottom part is cut off (horizon)
201 -- we integrate from one side to the other, across the slope
202 -- integrate the L.N across the points in the arc of a circle
203 albedo*L*int(0,pi, int(theta,pi, L.N dx) dy)
205 -- L is (cos(x)*sin(y), cos(y), sin(x)*sin(y))
206 -- L.N = sin(x)*sin(y)
207 albedo*L*int(0,pi, int(theta,pi, sin(x)*sin(y) dx) dy)
208 -- sin(y) doesn't depend on x
209 albedo*L*int(0,pi, sin(y)*int(theta,pi, sin(x) dx) dy)
210 -- int sin(x) dx = -cos(x)
211 albedo*L*int(0,pi, sin(y)*[-cos(pi)+cos(theta)] dy)
213 albedo*L*int(0,pi, sin(y)*[1+cos(theta)] dy)
214 -- [1+cos(theta)] doesn't depend on y
215 albedo*L*[1+cos(theta)]*int(0,pi, sin(y) dy)
216 albedo*L*[1+cos(theta)]*[-cos(pi) + cos(0)]
217 -- cos(pi) = -1, cos(0) = 1
218 albedo*L*[1+cos(theta)]*2
220 2*albedo*L*(1+cos(theta))
223 so to implement the above cost function, we need at each pixel:
224 current elevation (turn into height map)
225 gradient in light directions
226 rate of change of gradient in x, y, light direction
227 whether classified as shadow, or lit
228 whether on a boundary of shadow and light
229 sun elevation and direction
231 distance to and current elevation at shadow entrance and exit in light direction
234 [ ] seems - not important
235 [ ] when creating texture for region, don't up sample, select larger area
239 [X] selection of channels to display
240 [ ] more sensible sampling of elevation data
241 [X] edges of box should interpolate
242 [X] inner vertices should be sensible
244 [X] basic linear interpolation
245 [X] spline interpolation
246 [X] gui to toggle {flat, unprocessed, corrected -> refined}
247 [ ] self shadow lines
248 [ ] different colours for ridges and valleys
250 [X] focus extended altitude
251 [X] mouse click -> lon lat transformation
252 [ ] terrain grab while dragging
253 [X] selection of region
254 [ ] region image preview (full resolution)
255 [ ] multiple viewports
256 [ ] interaction (observers) can be locked together
257 [ ] data view can be locked together
259 [ ] should be able to add processing bands to those on the colour mapper
260 [X] input bands should be derivable from digital elevation model
261 e.g. could do calculations in world space instead of texture space
262 [X] get texture space normal at a pixel
263 [X] get texture space lighting direction at a pixel
264 [X] get elevation at a pixel
265 [X] get geographical coordinate at a pixel
268 [X] lambertian shading (automatic self shadow detection)
269 [ ] combination of the two (pixel product)
270 [ ] chromaticity based on lambertian shading shows colour
272 [X] in region, detect shadow areas
274 [X] from elevation data using raytracing
276 [ ] border and highlight in both views
281 8401 x 7461 - 63MB x6
282 4201 x 3731 - 16MB x2
283 16801 x 14921 - 250MB x1
286 downsample entire image to a reasonable size
287 1/8 x 1/8 = 1/64th size = ~10MB
288 or use the thumbnail in each image
289 when a portion of the image is desired in higher detail
290 reload portion of the image at full resolution
291 1/8 x 1/8 = 1/64th size of image
292 when a portion of the image is no longer being used
304 image data should be made up of channels
305 some channels are source bands from GeoTIFF files
306 some are derived from other channels
308 manages a set of channels that are referred to in a colour map widget
310 functionality for keeping data around so as not to have to reload
311 after creating GL texture
312 results can be floating point, bytes, bits
313 histograms and various plots based on the pixel data
314 data changed event triggers invalidation of textures
315 and invalidation of channels derived from this channel
316 tcChannelConstant : tcImageChannel
317 constant colour - e.g. black (for a null channel to avoid clicking rgb each time)
318 tcChannelFile : tcImageChannel
319 data from a GeoTIFF file
321 acts on a number of input channels to produce a number of output channels
322 can be configured with a gui
323 tcChannelProcessChromaticity : tcChannelProcess
324 divide a set of channels by another channel or a value
326 tcChannelProcessIlluminantInvariant : tcChannelProcess
327 input log chromaticities
328 can configure illuminant direction
329 if two dimentions, use a dial
330 for > 2 dimentions, select a shadow / non shadow adjascent bit of image
331 or select multiple such known shadow changes and average
332 find variation vector from this
333 easy to reuse this vector
334 tcChannelProcessIlluminantDiscontinuity : tcChannelProcess
336 shows discontinuity between adjascent pixels in x or y direction
337 i.e. you might show two of these in different colour channels
340 determine if we need to subdivide quality in this cell
341 if we're close, then we do
342 find distance from each corner
343 use distance[i] < max(dist(corner[i], corner[j]))*factor
344 if we should subdivide
345 renderCell on each of the 4 subdivisions
346 determine the quality at this level
347 find distance to center
348 apply magic function to find detail level
349 render the cell in this detail level