Reputation: 229
i was wondering how to use cvDCT void in opencv c++
if anyone have an example
Upvotes: 0
Views: 1756
Reputation: 11
You can use the following code:
IplImage* src0 = cvLoadImage(strPath, CV_LOAD_IMAGE_GRAYSCALE);
IplImage* src = cvCreateImage(cvGetSize(src0), IPL_DEPTH_32F, 1);
cvConvert(src0, src);
IplImage* dst = cvCreateImage(cvGetSize(src0), IPL_DEPTH_32F, 1);
cvDCT(src, dst, 0);
//cvDCT (dst, src, 1);
//cvConvert(src, src0);
cvShowImage("Source", src0);
Upvotes: 1
Reputation: 17169
The manual explains both the parameters and the inner workings of the function.
Upvotes: 2