Guest User

Untitled

a guest
Dec 15th, 2019
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ret = lookuptable(grauwert, cumu_histo, num_pixels)
  2. cumu_histo = cumu_histo*num_pixels;
  3. c_min = 0;
  4. for i = (1:length(cumu_histo))
  5. c_min = cumu_histo(i);
  6. if c_min > 0
  7. break;
  8. end
  9. end
  10. ret = round(((cumu_histo(grauwert+1) - c_min)/(num_pixels - c_min)) * (length(cumu_histo)-1));
  11. end
RAW Paste Data