![]() |
|
#1
|
|||
|
|||
Implementation of dct in opencvi"m trying to implement dct in a jpeg image.
CPP / C++ / C Code:
Unfortunately it gives an error Code:
I tried googling to solve the problem and found cvConvert. So I tried using cvConvert but still no luck Can anyone give comments? Last edited by LuciWiz : 15-Jun-2012 at 01:59.
Reason: Please insert your C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Implementation of dct in opencvQuote:
First, here's a question: Did any of the googlees have success using cvConvert to get a DCT from an OpenCV image of any type? If not, then why did you try to emulate them? If they were successful but you weren't, what did you do that is different from the success stories? Next, here's a suggestion: Stop mixing old-style cvXXX functions and structures with modern ones! (So, instead of using cvConvert(), use convertTo().) Finally, here's some information that isn't obvious from the OpenCV documentation (at least it doesn't exactly jump off the page at you). Whether it is sprinkled around the Google landscape, well I don't know. (I am assuming that if you found a complete working example, your questions would be somewhat more specific, right?)
Here's an example that does that. Then it starts with the merged DCT image and works back (using the Inverse DCT function cv.idct()) to an image that looks a lot like the original: CPP / C++ / C Code:
Regards, Dave __________________
Sometimes I just can't help myself... |
|
#3
|
|||
|
|||
Re: Implementation of dct in opencvOk thank you for your time.
I have another question. I can't use old use old cvXXX functions with modern ones (just want to clear this)? Like if i start my code with old functions/modern ones i should throughout the code just use old ones/modern ones? And I thought i could still use cvConvert() by omitting the cv part of the code? Really sorry still new and still exploring opencv. |
Recent GIDBlog
Configuring iptables for Webmin Servers Index Module by gidnetwork
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenCv C to C++ | stbb24 | C++ Forum | 8 | 30-May-2012 21:18 |
| OpenCV and problems with matrices | ipunished | C++ Forum | 2 | 19-Jul-2011 10:58 |
| Implementation of Chord DHT in ANSI C. | przemnet | C Programming Language | 0 | 17-Jan-2011 05:08 |
| Encryption implementation issue | bigbangman | C Programming Language | 6 | 02-Sep-2004 11:21 |
| tapeplayer implementation | ozzytx | C++ Forum | 0 | 23-Aug-2004 13:14 |
Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The