Commit d05dd2b7d1a334ccb0c08a2dc5f61577af226a4c
Merge branch 'stretch_function' into 'master'
changes in stretch function stretch function in image.h has been changed. It needed to be added by desired minimum. See merge request !30
Showing
2 changed files
with
1 additions
and
1 deletions
Show diff stats
stim/image/image.h
... | ... | @@ -403,7 +403,7 @@ public: |
403 | 403 | double range = maxval - minval; //calculate the current range of the image |
404 | 404 | double desired_range = high - low; //calculate the desired range of the image |
405 | 405 | for (size_t n = 0; n < N; n++) { //for each element in the image |
406 | - result.data()[n] = desired_range * (img[n] - minval) / range; | |
406 | + result.data()[n] = desired_range * (img[n] - minval) / range + low; | |
407 | 407 | } |
408 | 408 | return result; |
409 | 409 | } | ... | ... |