First time here? Check out the FAQ!
answered 2015-05-05 16:43:36 -0600
You are mixing types. You have a float * centroidPtr but assign it to one element of destPix[j] in destPix[j][0] = *centroidPtr++;. However, destPix[j] is a uchar so the values are truncated and meaningless.
float * centroidPtr
destPix[j]
destPix[j][0] = *centroidPtr++;