Click here to Skip to main content
Click here to Skip to main content

2D Fast Wavelet Transform Library for Image Processing

By , 19 Oct 2007
 
Screenshot - fwt2d.jpg

Introduction

I've been involved with wavelet-analysis since my Ph.D studies and over the years developed various wavelet-transforms C++ libraries. This one concerns 2D implementation of the Fast wavelet transform (FWT). The 2D FWT is used in image processing tasks like image compression, denoising and fast scaling. I intended to design the implementation of the 2D FWT with custom filter support and simple in usage. I've equipped it with known filter families: Daubechies, Coiflets and Biorthogonal wavelets. The wavelets used in compression tasks are Bior53 and Bior97. With Daub1 filter you can achieve fast dyadic image scaling algorithm. You may also experiment with other filters for compression and denoising and compare the results, you may also add your custom wavelets. The nice feature of this library is that reconstruction FWT filters are rearranged the way that you perform just convolution operations on the spectrum, which is very important if you'd like MMX optimizations.

Background

You need basic understanding of wavelet transforms to be familiar with the topic discussed. You can learn it from numerous sources available on the Internet, also from Matlab Wavelet Toolbox documentation or have a look at this website. Also some C++ experience with abstract base classes is desirable if you plan to extend the code by deriving your own implementations, numerically optimized for a particular filter.

Using the Code

The GUI for the library has been designed by me using Windows Forms with .NET 2.0 Framework, so anyone can start using it right now without much ado. It provides image visualization, 2D FWT transformation in RGB color space and synthesis. Just unzip the binary file with the \filters directory and run it. Load the image using the File menu, and transform it with the Transforms menu. After clicking FWT2D RGB transform, you'll be presented with a translucent dialog box, where you can select the filter (present in the \filters dir), select the number of scales (usually 3 for image transform) and denoising threshold (in the range of 0 to 128) below which, all the pixels at the high frequency bands will be zeroed. In the FWT library this threshold is decreased 4 times every scale so you do not end up with too much distortion at the reconstructed image. The caption of the image frame is headed with the percent of non-zero coefficients at the FWT spectrum. After reconstruction you are also presented with the error in dB compared to the original, untransformed image.

The C++ library itself is composed of several classes:

  • BaseFWT2D - The abstract base class for the transform
  • FWT2D - The implementation of the 2D FWT, it is a derived class from BaseFWT2D
  • vec1D - The 1D vector wrapper for the filters

The 2D FWT transform and synthesis functions are defined in the BaseFWT2D (trans() and synth()) and they use private virtual functions for transforming and synthesizing rows and columns of the image which are implemented in the FWT2D class. I've designed such an implementation that anyone can derive its own optimized versions of the FWT transform for a particular filter I've mentioned in the Background section. I have written the implementations of MMX optimized versions of Bior53, Bior97 for image compression and Daub1 for fast image scaling and plan to post them in the future in addition to this article.

Quick Start with the FWT Library

To start with the 2D FWT library, you just need to initialize FWT2D object with the filter name, providing full path to its location, check the status after the constructor has been called, initialize desired width and height of the single channel of the image (you need to arrange separate channels, from [RGB] stream copy just R channel to the image Width x Height buffer, also the same for G and B channels, you may also convert them to YUV space or the like, but then you need separate buffers for Y, U and V channels also) and continue with transformation and synthesis. This way every class object is targeted to the specific wavelet filter and image channel (you may use different filters for different channels then).

/* 
unsigned char* pRchannel = new unsigned char[width * height];
for (unsigned int i = 0; i < width * height; i++) {
        //Taking R channels from RGB buffer
        pRchannel[i] = pRGB[3*i + 0];
}
*/
        
unsigned char* pRchannel;  //R channel buffer unsigned char 0...255
unsigned int width;        //R channel width
unsigned int height;       //R channel height
    
const wchar_t* perr;       //error text message returned after status() function
unsigned int status;       //numerical error value 
    
unsigned int scales = 3;    
unsigned int TH = 20;
    
FWT2D r_fwt(L"path\\bior97.flt");
r_fwt.init(width, height);
perr = r_fwt.status(status);
if (perr != 0) {
        //Output text representation of the error pointed by perr
        return;
}
    
//After initialization you can do multiple trans() and synth() calls
//with upcoming image data for analysis or FWT spectrum for synthesis
r_fwt.trans(pRchannel, scales, TH);
r_fwt.synth(pRchannel);
//and so on ...  
    
//clean up before destroying the object
r_fwt.close(); 

If you want to access the FWT spectrum after trans() call for visualization or entropy coding, you can do it with BaseFWT2D functions getspec() or getspec2d(). The first one provides 1D char pointer to the spectrum and the later 2D char pointer so you can access the spectrum as a two dimensional array. Note, that the original color channels are converted to char by subtracting 128 and the FWT spectrum is in char interval too -128 ... 127.

char** pspec = r_fwt.getspec2d();
for (unsigned int j = 0; j < height; j++ ) {
        for (unsigned int i = 0; i < width; i++ ) {
                char val = pspec[j][i];
        }            
}

Detailed Reference to the FWT Library

The nice 1D vector wrapper is implemented in the vec1D class. It allows defining the starting index of the first element in the array. By default, it is 0, as in usual C array, but you can also define positive one, for example 1, to end up with Matlab like array, or negative one, as it is with wavelet filters. If you define -3 as the starting index and 6 as the length of the array (total number of items) you will access the elements of the array with the indices: -3, -2, -1, 0, 1, 2. This way your array is centered around 0, which coincides with particular wavelet filter center for example. The array data itself is 16 bit aligned for performing SSE optimized floating point operations.

//plain C array of 6 elements with indices from 0 to 5 initialized to 0.0f
unsigned int size = 6;
vec1D vec1(size);
vec1(0) = 1.0f; //Set the first element to 1.0
    
//Initialize the array data with external buffer
unsigned int offset = -3;
float data[] = {-3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f};
vec1D vec2(size, offset, data);
    
//Print out the array contents
for (int i = vec2.first(); i <= vec2.last(); i++ ) {
        wprintf(L"%i %f\n", i, vec2(i));  
}

The abstract base class BaseFWT2D provides all the necessary functions for transforming and reconstructing the image, getting the spectrum, dumping loaded wavelet filters, retrieving the number of scales in the spectrum. Start by constructing the object of FWT2D class which publicly derives from BaseFWT2D.

  • FWT2D::FWT2D(const w_char* filter_name);
  • FWT2D::FWT2D(const wchar_t* fname, const float* tH, unsigned int thL, 
        int thZ, const float* tG, unsigned int tgL, int tgZ, const float* H, 
        unsigned int hL, int hZ, const float* G, unsigned int gL, int gZ);

With the first constructor you provide the filters from an external file specifying full path to it. With the second one, you can provide the filters from memory buffers. tH and tG are the low-pass and high-pass filters for image transformation, thL and tgL their length and thZ and tgZ are the first indices values (-3 for example). The same applies to H and G filters but they are used for image synthesis from the spectrum.

  • const wchar_t* BaseFWT2D::status(int& status);

Check the status after constructors. status = 0 indicates success and the function returns a NULL pointer, otherwise inspect the returned error message.

Then you need to initialize the class object with either of the functions:

  • void BaseFWT2D::init(unsigned int width, unsigned int height);
  • void BaseFWT2D::init(char* data, char* tdata, unsigned int width, 
        unsigned int height);

The last one provides an opportunity to supply external buffers to the class object data and tdata both of the width by height size. This way you can fill the data buffer from external source and proceed with:

  • int BaseFWT2D::trans(unsigned int scales, unsigned int th = 0);

The image will be replaced with FWT spectrum in the data buffer in case the function returns NULL on success or -1 if you have not initialized the library.

Or use the init(unsigned int width, unsigned int height) function for initialization and perform the image transformation supplied from external data buffer with two functions:

  • int BaseFWT2D::trans(const char* data, unsigned int scales, unsigned int th = 0);
  • int BaseFWT2D::trans(const unsigned char* data, unsigned int scales, 
        unsigned int th = 0);

The first one transforms the image supplied in the data buffer of type char, that is your data already DC shifted and in the range -128 ? 127. The last one accepts unsigned char buffer and subtracts 128 from it using MMX optimized private function. The functions return NULL if they succeed, otherwise -1 if you have not initialized the library. Note that the image data is kept intact after the transformation. scales defines the number of levels of FWT transform and th is the denoising threshold (0 ... 128).

You can access the FWT spectrum using the following functions:

  • char* BaseFWT2D::getspec();
  • char** BaseFWT2D::getspec2d();

With char* pointer you've got straight width by height array and with char** pointer you can access individual coefficient at (column, row) location as with 2D array pointers.

To reconstruct the image, you use the following functions:

  • int BaseFWT2D::synth();
  • int BaseFWT2D::synth(char* data);
  • int BaseFWT2D::synth(unsigned char* data);

The first one just reconstruct the image from the spectrum to the class's own internal buffers (that can be supplied externally with corresponding init() function). The second and third reconstruct the image and copy it to data buffer in char -128 ... 127 or unsigned char 0 ... 255 format.

You can keep transforming and synthesizing the images any number of times once you created the class object and initialized it with image width and height. After you finished with the class object, call close() method and destroy the object.

  • void BaseFWT2D::close();

You can get and set the number of FWT scales with the functions:

  • unsigned int BaseFWT2D::getJ();
  • void BaseFWT2D::setJ(unsigned int j);

The last one provides the opportunity to change the number of scales before synthesis, so if you've got FWT spectrum with 3 scales you can change it to, say, 1 and perform only one level of FWT synthesis.

If you are planning to extend the code yourself, you need to derive your own class from BaseFWT2D class and provide overrides for transrows(), transcols(), synthrows() and synthcols(). You need to be well versed with 2D FWT analysis also. It is useful if you'd like to implement MMX, SSE optimized versions for a filter of a particular length. As I mentioned before I'm planning to post SSE optimizations for Bior53 and Bior97 wavelet-filters and MMX one for Daub1 filter in the future.

Points of Interest

The tedious point to program was writing BaseFWT2D::makeHGsynth() function, which rearranges the synthesis filters coefficients to odd and even ones. Having these, you can substitute 2*m and 2*m+1 operations of selecting even and odd coefficients from the synthesis filters during reconstruction process and proceed with just straight convolution.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

Chesnokov Yuriy
Engineer
Russian Federation Russian Federation
Member
Former Cambridge University postdoc (http://www-ucc-old.ch.cam.ac.uk/research/yc274-research.html), Department of Chemistry, Unilever Centre for Molecular Informatics, where I worked on the problem of complexity analysis of cardiac data.
 
As a subsidiary result we achieved 1st place in the annual PhysioNet/Computers in Cardiology Challenge 2006: QT Interval Measurement (http://physionet.org/challenge/2006/)
 
My research intrests are: digital signal processing in medicine, image and video processing, pattern recognition, AI, computer vision.
 
My recent publications are:
 
Complexity and spectral analysis of the heart rate variability dynamics for distant prediction of paroxysmal atrial fibrillation with artificial intelligence methods. Artificial Intelligence in Medicine. 2008. V43/2. PP. 151-165 (http://dx.doi.org/10.1016/j.artmed.2008.03.009)
 
Face Detection C++ Library with Skin and Motion Analysis. Biometrics AIA 2007 TTS. 22 November 2007, Moscow, Russia. (http://www.dancom.ru/rus/AIA/2007TTS/ProgramAIA2007TTS.html)
 
Screening Patients with Paroxysmal Atrial Fibrillation (PAF) from Non-PAF Heart Rhythm Using HRV Data Analysis. Computers in Cardiology 2007. V. 34. PP. 459–463 (http://www.cinc.org/archives/2007/pdf/0459.pdf)
 
Distant Prediction of Paroxysmal Atrial Fibrillation Using HRV Data Analysis. Computers in Cardiology 2007. V. 34. PP. 455-459 (http://www.cinc.org/archives/2007/pdf/0455.pdf)
 
Individually Adaptable Automatic QT Detector. Computers in Cardiology 2006. V. 33. PP. 337-341 http://www.cinc.org/archives/2006/pdf/0337.pdf)

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionThe link is brokenmemberlqzhu27 Mar '13 - 14:49 
Would you please send me the copy of 2D Fast Wavelet Transform Library for Image Processing ? The link seems not working. My email:zlq_26@163.com Thank you a lot.
Questionwhy can't I download?memberaleckingcool3 Dec '12 - 20:11 
download failure again and again...
QuestionLossless wavelet transformmemberHMD228 Nov '11 - 23:51 
Hello.
Can you tell me how to modify your source code to make lossless wavelet transformation, without any distortion?
Questionhow to order printf in output in project 2D Fast Wavelet Transform Library for Image Processing?membersahar molani14 Oct '11 - 19:50 
I need print value Variable in same project
Questionhow to get code program 2D Fast Wavelet Transform Library for Image Processing by c#?membersahar molani14 Oct '11 - 19:30 
Hi,
please help me about find project fast wavelet transform image by c#.
I'm very need to project.
 
Thanks
sahar
AnswerRe: how to get code program 2D Fast Wavelet Transform Library for Image Processing by c#?memberChesnokov Yuriy22 Oct '11 - 6:33 
I do not know where to find one
Чесноков

GeneralHow to get raw coefficients?memberMember 800783616 Jun '11 - 4:29 
Thank you for your project!
I am trying to calculate statistics of wavelet coefficients and I find out from code that the array "dest" stores not "raw" coefficients s & d, but "treated" coefficients, treated by mmxround and mmxroundTH.
How can I get raw coefficients?
AnswerRe: How to get raw coefficients?memberChesnokov Yuriy24 Jun '11 - 19:47 
you may set TH=0, in that case no denoising will be implemented
Чесноков

GeneralSaving the imagememberMember 793773227 May '11 - 22:22 
Hey, your program is great, but sadly I've got a problem.
When I try to save m_clone image on my hard disk after wavelet transformation it seems like the image is untoched.
In other words I receive the basic image instead of transformed. Why it happens? D'Oh! | :doh:
AnswerRe: Saving the imagememberChesnokov Yuriy28 May '11 - 6:44 
System::Void transrgbToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
...
setRGB(m_clone, rfwt->getspec(), gfwt->getspec(), bfwt->getspec()); //copy specs to clone image
// after that line wavelet spectrum is in m_clone image
...
}
Чесноков

Generalsomething about init()memberzhangshd12349 May '10 - 19:22 
hello,I'm using your project now,firstly,thank you for writing this good project.I use fwt2d trans a gray bmp,when I use the db filters ,I found that there would be some distortion,the reason is? And then ,this function:
 
void BaseFWT2D::init(char* data, char* tdata, unsigned int width, unsigned int height)
 
the second loop:
spec2d[j+height] = &tspec[j*width];
 
I think it should be
 
:spec2d[j+height] = &spec[j*width];
 
thanks a lot for your project!
GeneralRe: something about init()memberChesnokov Yuriy10 May '10 - 8:11 
there are no distortions in the code for sure, especially related to init() function
Чесноков

GeneralInputs with floating point pixel valuesmemberAli Hormati3 Jun '09 - 5:49 
Thanks for your very helpful code. I want to use it to compute the wavelet coefficients of an image, which each pixel has a floating value instead of a char. How can i use your code to do that?
 
Thanks a lot for your answer.
AnswerRe: Inputs with floating point pixel valuesmemberChesnokov Yuriy10 May '10 - 8:14 
filters are floating points and you needs just to replace 8 byte arrays with floating points for images
Чесноков

GeneralMemory copying speedmemberYanbo Zhou6 May '09 - 7:08 
With respect to your "MMXMEMCPY", I just wondering if you have tried to use run-time function "memcpy" which deals with block memory copying. Instead of looping, memcpy might be faster. Also, this copying issue is more likly falling into SIMD instead of MMX situation.
GeneralHarr WaveletmemberYanbo Zhou5 May '09 - 11:59 
I know this question sounds silly, but just want to double check with you. Does it support Harr Wavelet? If yes, is it optimized for the Harr Wavelet or is there more room for optimization? If you have, would you please send me a Harr Wavelet .flt file?
 
Thanks,
AnswerRe: Harr WaveletmemberChesnokov Yuriy5 May '09 - 20:15 
Haar wavelet present in this package as daub1. You may read my face detection article, there is Haar.cpp optimized for that wavelet
 
Чесноков

GeneralRe: Harr WaveletmemberYanbo Zhou6 May '09 - 4:43 
Do you want to share the link to your face detection article? Thanks,
Questionbior13.flt bior15.flt bad wavelet synthmembereuropelee24 Apr '09 - 7:50 
use bior13.flt and bior15.flt to perform wavelet transform, then reconstruction, but its result is bad.
why?
I hope your help!
AnswerRe: bior13.flt bior15.flt bad wavelet synthmemberChesnokov Yuriy26 Apr '09 - 4:27 
there are filters for data compression, there are for other tasks. these ones were not designed for image compression
 
Чесноков

Question3D face Reconstructionmembercwxiu12 Mar '09 - 17:14 
who have 3D face Reconstruction software or code? I am now in reseach of it and need it very much,if possible,can you upload it for me ? thank you very much !!
QuestionPeak detection, on low frecuenciesmemberneoideo10 Mar '09 - 7:51 
hello, nice document
 
from your code, how far is it to achieve peak detection only on the main "beats" that are lower frecuencies?
 
thanks in advance
 
Cristobal
Generalcoefficients in flt filememberaldo hexosa17 Feb '09 - 23:46 
I am a newbie in wavelet. How do you get the coefficients in the flt files?
what is the differences with the code below (from wikipedia)?
N = length(S);
s1 = S(1:2:N-1) + sqrt(3)*S(2:2:N);
d1 = S(2:2:N) - sqrt(3)/4*s1 - (sqrt(3)-2)/4*[s1(N/2); s1(1:N/2-1)];
s2 = s1 - [d1(2:N/2) d1(1)];
s = (sqrt(3)-1)/sqrt(2) * s2;
d = (sqrt(3)+1)/sqrt(2) * d1;
can you give me some explanation.
thanks
AnswerRe: coefficients in flt filememberChesnokov Yuriy19 Feb '09 - 20:21 
No I can't Smile | :) It is up to you to compare these wierd bits of code. Just look over the internet for wavelet coeffs, I do not remeber exactly the link for now, and compare them to my flt. Otherwise there is matlab wavelet toolbox, you may compare them with mines.
 
Чесноков

GeneralGood codeprojectmemberhpp16 Jan '09 - 21:45 
thanks for your sharing!
this is useful and clean
I learned a lot of thing from your project
 
thanks a lot a lot a lot from my heart
 
Smile | :)
Big Grin | :-D
GeneralRe: Good codeprojectmemberCode Deamon2 Feb '09 - 0:46 
I agree, thank you very much for sharing what you've learned. I am learning a great deal by looking at your code and going over your articles.
 
Thanks!
GeneralRe: Good codeprojectmemberyuhaiyan26 Mar '09 - 17:19 
hi,i want to ask a simple question.i can't display the demo files .why? DO i need a special software except the VC? Confused | :confused:
Generalmmxmemcpy in C#memberRecan_Miracle20 Jul '08 - 23:45 
Hi,
 
Is there any way to implement something like 'mmxmemcpy' in C#? Confused | :confused:
 
Thanks.
GeneralError compiling source codesmemberLuo Kaiyan10 Jun '08 - 3:24 
I've downloaded the source codes and tried to run it in VC++ Express 2008. I get the following error:
 
.\app.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'
 
Can anybody help?
Generalbad reconstructionmemberEmoo27 Mar '08 - 0:09 
Hi Smile | :)
nice code, but quite slow, and you do not deal with edge effect. Simply treat data as a ring. You will get some extra "peaks" on bounderies in the wavelet spectra, but at least - you will rebuild your data perfectly Big Grin | :-D
General1 dimesional datamembershabroz18 Mar '08 - 0:58 
I wish to use wavelets to decompose 1 dimesional data, then do some analysis and maybe remove noise. Is that kind of a thing possible in your code.
 
Thanks
 
SG
AnswerRe: 1 dimesional datamvpChesnokov Yuriy18 Mar '08 - 20:13 
You have not seen all me articles
http://www.codeproject.com/KB/library/ECG_annotation_lib.aspx[^]
 
chesnokov

Generalsome questions.memberAlexandros5423 Jan '08 - 16:10 
Hi!
 
My name is Alex. I found your software very interesting and I wish to implement it to the software I am building. I wish to create a video analysis tool. This tool loads video frames from a video file,one at the time, transformed into a different than RGB colorspace (i.e. HSI, HSV, YCbCr, etc.), each channel is wavelet transformed, and from the resulting outputs various co-occurrence measures are calculated so that texture features of the frame objects are extracted. This is the basic idea. I've been searching for various wavelet packets for a while, until I found yours. Anyway, I have some questions:
 
1) I have already built the basic video frame processing (open the video file, grab a video frame at the time in bmp format, transform it to other colorspaces) in MFC environment. How can I make sure that after having integrated your code into my own that when a video frame is wavelet transformed and the program moves to the next frame, this occupied memory is freed and no memory leaking problems occur? I know that it might sound stupid but since I have to process thousands frames this is a major issue.
 
2) When I used Daub transform with specific images, the results were unsatisfactory, because the synth (inverse wavelet transform) gave messed up images and the original ones. This happens only with all daub transforms. Is this a reported bug?I can send you a sample image to try out.
 
3) As far as the wavelet transforms is concerned, I have a more conceptual question. After the wavelet transform is applied on an image, what do the resulting outputs express? For example, the three big square of the resulted image (top right, bottom right, bottom left) express the high frequencies of the image. The other smaller squares express only low frequencies or not? When I increase the scale what exactly I increase? Resolution? In your program what is TH?
 
I am really sorry for all questions but I am at the start of the project and I wish to have a good picture of all things. I don't have any problem share any upgrades I might perform in your software. Thanks a lot in advance!! Keep up the good job!
AnswerRe: some questions.mvpChesnokov Yuriy23 Jan '08 - 22:12 
Hi! My name is Yuriy Smile | :)
 
I'm actually involved in CBIR project currently and will be doing texture analysis also.
 
HSI, it is HSL.
 
1) you want to be sure with your code for memory leaks or for my one?
My is free from them, every FWT object once allocated to specific image width height is used as many times as you want. There is no allocation in transform or synthesis. You may process 10000000 frames with one object. Once you done with the object just delete it. Build it in MFC application you will see if the mem leaks are there in your code.
 
2) there are no bugs in there, it took me 3 years of post-grad to be an expert in the field. what image width and hight you use and scales number? You can send me it but I will not try it out for free. If you use 64x64 image and select 30 scales with daub2,3,4,... you will not get you image back, that is the wavelet transform nature, the filters length exceed the LLLLL... band size
 
3) http://www.acm.org/crossroads/xrds6-3/sahaimgcoding.html[^]
 
in fig 6(b)
 
TH is how you zeros high freq bands coeffs below that value
 
chesnokov

GeneralRe: some questions.memberAlexandros5422 Feb '08 - 17:02 
I am trying to use your wavelet software. I want to understand how to access using spec2d() wavelet coefficients based on scale. How can I do that?
spec2d() returns char value. How can I change it to integer to make sense? Thanx a lot!
AnswerRe: some questions.mvpChesnokov Yuriy22 Feb '08 - 19:46 
char** BaseFWT2D::getspec2d();
 
It returns 2D char pointer. The coeffs are -128 ... 127 values.
 
char** spec2d = fwt2d.getspec2d();
char val = spec2d[0][0];
upto spec2d[fwt.height() - 1][fwt2d.width() - 1]
 
Depends on the scales you used and size of image try to imagine for the 1 scale left top quater of the image is LL band, and the rest of image quaters are LH, HH, HL bands. So for the scale 2, 3 and so on.
 
See the GUI to that article.
See also my EZW codec paper, it has EZW class that handles 3 scales spectrum.
 
chesnokov

GeneralRe: some questions.memberAlexandros5423 Feb '08 - 6:15 
So to understand this: 1)Scale 1 and LL band coefficients are between spec2d[0][0] upto ?
 
2)But I can't understand how val which is a character type, be used?
How can I make val into integer or float so that I can work with the coefficients?
 
Thanx a lot!
AnswerRe: some questions.mvpChesnokov Yuriy26 Feb '08 - 7:03 
1) see the pic of the article, 2 level fwt, this is the layout of the spectra in 2D buffer.
 
2) type val = (type)(spec2d[y][x]);
where type is short, int, float, double.
 
chesnokov

GeneralRe: some questions. [modified]memberAlexandros547 Mar '08 - 11:52 
Sorry i am writing again. But still i am confused. Let me rephrase the question:
 
How I get the coefficients of a specific scale (ie. scale 1) of an image?
 
I don't if you could give an answer to this question: What do negative and positive coefficients represent?
 
Thanks a lot! I really appreciate your help!
 
modified on Friday, March 7, 2008 6:11 PM

AnswerRe: some questions.mvpChesnokov Yuriy18 Mar '08 - 20:18 
Look at the article picture above. It is 2 level FWT. It is 2D array. It is in getspec2d() return. Can you handle 2D arrays? That picture above is positioned exactly in your 2D array.
Positive and negative coeffs are wavelet coeffs = signal energy.
You have to read the links I replied before.
 
chesnokov

Questionhow to use the demomemberyuhaiyan26 Mar '09 - 17:32 
i can't display the demo and the src files.there's VC software on my computer.what project files is the src?
QuestionHow to use it in vc 6.0?memberMember 89816612 Jan '08 - 16:30 
Hi,because this library used MMX command, but the Compiler of vc6.0 is not support it, so I try install IntelC++Compiler91, but it also didnot work.
Is it need change to vs.net 2003 or higher?
Is it possible to use library in vc6.0?
Thanks!
AnswerRe: How to use it in vc 6.0?mvpChesnokov Yuriy12 Jan '08 - 22:44 
You may rewrite BaseFWT2D::mmxround() routines to x86, and use it in vc6.0
 
chesnokov

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 20 Oct 2007
Article Copyright 2007 by Chesnokov Yuriy
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid