Changeset 3669 for trunk/stac/src/stacTransform.c
- Timestamp:
- Apr 5, 2005, 2:08:16 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stacTransform.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stacTransform.c
r3666 r3669 166 166 psImage *image = images->data[n]; // The input image 167 167 psPlaneTransform *map = maps->data[n]; // The map 168 psImage *error = errors->data[n]; // The error image169 168 psImage *outImage = (*outputs)->data[n]; // The output image 170 psImage *outError = (*outErrors)->data[n]; // The output error image 169 psImage *error = NULL; // The error image 170 psImage *outError = NULL; // The output error image 171 if (errors) { 172 error = errors->data[n]; 173 outError = (*outErrors)->data[n]; 174 } 171 175 float offset = 0.0; // Relative offset 172 176 float scale = 1.0; // Relative scale … … 177 181 scale = scales->data.F32[n]; 178 182 } 179 180 #if 0181 // No need for initialisation, since we iterate over the entire output image.182 for (int y = 0; y < outny; y++) {183 for (int x = 0; x < outnx; x++) {184 outImage->data.F32[y][x] = 0.0;185 outError->data.F32[y][x] = 0.0;186 }187 }188 #endif189 183 190 184 // Mask … … 208 202 detector->y, mask, 1, 0.0, 209 203 PS_INTERPOLATE_BILINEAR); 210 // Error is actually the variance 211 outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error, 212 detector->x, 213 detector->y, 214 mask, 1, 0.0); 204 if (error) { 205 // Error is actually the variance 206 outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error, 207 detector->x, 208 detector->y, 209 mask, 1, 0.0); 210 } 215 211 216 212 outImage->data.F32[y][x] = (outImage->data.F32[y][x] - offset) / scale;
Note:
See TracChangeset
for help on using the changeset viewer.
