Ask Your Question
0

get memory allocation error/ normalization

asked 2014-01-27 07:03:53 -0600

ati gravatar image

updated 2014-01-27 07:29:11 -0600

To do normalization using opencv I am using this function:

cvNormalize(Src.data, Src.data, 255, 0, CV_MINMAX);

type of the input is Mat...to be able to use it as a pointer I have used .data but I get memory allocation error when I try this function...

Does anyone have any idea?

Thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-27 07:39:47 -0600

berak gravatar image

since Src seems to be a cv::Mat, try

cv::normalize(Src,Src,255,0,CV_MINMAX)

instead.

passing pixel-pointers is definitely wrong !

(also, try to avoid old c-api functions [cvBlah(), IplImages and such], stick with the c++ api !)

edit flag offensive delete link more

Comments

Thanks a lot :)

ati gravatar imageati ( 2014-01-27 08:10:00 -0600 )edit

Question Tools

Stats

Asked: 2014-01-27 07:03:53 -0600

Seen: 170 times

Last updated: Jan 27 '14