Error in Solution EX2 normalites_hist.m?

Moderator: Computer Vision

schwanal
Erstie
Erstie
Beiträge: 20
Registriert: 5. Mai 2010 12:56

Error in Solution EX2 normalites_hist.m?

Beitrag von schwanal »

Dear all,

im currently studying the sourcecode of the solutions and im whondering a little bit about normalized_hist.m line 17:

img_gray = floor(img_gray*(num_bins)/255)+1;

this produces values over num_bins (num_bins+1) e.g.
num_bins = 10
img_gray = 255

then img_gray = 11

i think that this is an error becuase we dismiss all white pixels in the picture or am i incorrect?

thank u and have a nice evening,

alexander schwan

diane
Windoof-User
Windoof-User
Beiträge: 25
Registriert: 21. Jun 2009 17:33

Re: Error in Solution EX2 normalites_hist.m?

Beitrag von diane »

You are right, the white color needs to get a special treatment with this solution.
You can also replace 255 by 256 and the formula holds.

Antworten

Zurück zu „Computer Vision“