简体   繁体   中英

how to use cvDCT() in opencv?

i'm trying to use the cvDCT function in opencv that make the descrete cosine transforme , but i don't know how can I use it ! plz give me an example in c++/opencv ??

float data[] = { 1, 2, 3, 4, 5, 6, 7, 8 };

CvMat a, b, c;
a = cvMat(2,4,CV_32FC1,data);
b = cvMat(2,4,CV_32FC1,data); // or initialize b,c
c = cvMat(2,4,CV_32FC1,data);

cvDCT(&a, &b, CV_DXT_FORWARD);
cvDCT(&b, &c, CV_DXT_INVERSE);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM