Home

FAWAV User Manual - People Pages - University of Wisconsin

image

Contents

1. o s Modifying thescalogram 2e Inverting scalogratn IRR vx EUR ve RUE e Changing the appearance of the Printing the scalogram Sets qud ROAD EAR ee PR saving the Scalostami suu eve ER E Ene ORE whee a Se ee Se OR Recording information DS Scalogram menu items es 43 1 CENE sine fae dede bem euo sube VIEW bore qe eve AE EHI uude oes e er EXE ms 4 38 37 eo n i RP Ae ds emper eee S EY Mis 484 ee et xg EAE Abe eS The Popup menu for scalograms AIT PILAE Spe Rae x DE 4 92 Blotprapli Rae dure Seu S edet x 49 3 vIhresholdu uu A E eos Bui i0 rep eens BE eee gebe e ecd s 4095 Restor go Be Are WOE velo RO Rear PO A eub 496 Display style 25 55 uote Rum qudm BE REGES 49 7
2. 5 11 6 Transforms The transforms that are available with this menu fall into two categories 1 Fourier see Section 5 6 on p 68 2 Wavelet see Section 5 2 on p 66 and Wavelet Packet see Section 5 4 on p 67 5 11 7 Convolve The three choices on the Convolve menu are described in detail in Section 5 8 on p 71 5 11 8 Analysis The Analysis menu contains 14 items We describe these items in the 14 subsections that follow Statistics This choice produces a printout on the right of the window of various statistics summarizing the data consisting of a signal s values For example if the graph of 2x 4 5 20 is plotted over the square 0 5 0 5 x 0 5 0 5 using 512 points for each dimension and this procedure is invoked then we get the following printout aximum 9 5 inimum 12 5 ean 0 Variance 20 6647958792355 Std Dev 4 54585480182061 Energy 5438313 00194664 Samples used 263169 Theoretical Dim 141270 692331029 Most of these values are elementary statistical measures The Energy is the sum of the squares of the values of the signal The Theoretical Dimisa quantity related to the ability to do a wavelet compression of the signal for more details see the book Wavelet Analysis From Theory to Software by M V Wickerhauser AK Peters 1994 Norm difference This choice allows you to compute various measures of the global difference between functions typically used to express
3. Chppinga portion fa fle s RE A OE ORES vx Ew res 86 6 3 Analyzing asound Clip Gon Deke B Go Se a 86 6 4 Recording sounds e s 2o me a Ae Ae ea eh eb PUR Pe Rege 86 6 5 Menu Items for Audio Editor aaa 86 RS dees te ee e dedu exu eb ep e xe ee xu t e eb ER 87 6 32 Edi cis ee tie BEE AS eed be Sale Subd Oo wa ete ee ate amp 87 6 5 3 NISW he ek al bee ee Segue suisse kg be EE qe 87 6 5 4 Help e uev E wh eee bw me ber EA EN moe qos 87 6 6 The Popup menu for Audio Editor 88 7 Image Processor 89 Tl LoadmganlImage is eos Pes nh RU UR UE OE UR cdo eB 89 7 2 Compressing Image 25 5 9 eK RR oe ee A HR HR ee RR SUR 89 7 24 RepionorlInterest i euer Mies S Arq ee PS 91 7 3 Decompressing amImage 4 uoc ec ko RR UR SUR 91 7 4 Denoising an Image oce Roo EG oS m EOM a dens 91 7 5 Measuring gE EHE Aad Emu ce uem Red e ds 92 7 6 Saving a processed Mages uud YES m oh e p eb es 92 7 1 Menu Items for Image Processor lees 92 CONTENTS 7 7 1 BAD 7 7 3 7 7 4
4. For example suppose 3 graphs are displayed on screen Then the following formula 2gl x 493 x assigns twice the values of graph 1 minus four times the values of graph 3 to the plotted function Warning Do NOT use a graphical function with a higher index than the number of displayed graphs Also FAWAV does not support graph variables beyond 95 That is if there are 6 or more graphs displayed then 96 or higher graph indices will not be accepted 2 1 6 Sums There are four sum operators sumi sumj sumk andsumn For example the formula sumi x i Ni 1 10 produces the same function as the more complicated formula Or the following formula 1 2sumk cos 2 k4 1 pi x k 0 19 Select View Display style and then select the option Dots 18 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM produces the same function as 1 2cos 2zx 2cos 4nx cos 40nz Warning You cannot use a sum operator twice in the same formula For example the formula sumk cos kx 8e 2x 3 sumk kx 3 k 3 5 will not be accepted by FAWAV You should use instead sumk cos kx 3 2x 3 k 3 5 2 1 7 Products There are two operators for performing products and prodq For example the following formula prodp p 4 3 produces the same graph as the following more complicated formula x 4 x 3 2 x 1 x x 1 x 2 x 3 Warning You cannot use a produc
5. Graphing Graphing is useful for selecting a portion of the scalogram and performing modifications of the scalogram For example if you enter the formula 91 0 2 lt x lt 0 7 158 lt y lt 1227 then all values of the scalogram for points x y that are outside of the rectangle 0 2 0 7 x 158 1227 will be set equal to zero and all values for points x y that are within the rectangle will be left as is With a complex valued scalogram i e the Gabor scalogram the variable g1 refers to the magnitude of the scalo gram values only The effect of the formula above on a Gabor scalogram would be the same however The graphing procedure uses methods from the 2D form graphing procedures See Chapter 5 on p 59 for more information There is also online help available just select Help Help for plotting graphs from the scalogram menu when the graphing text box is open Usually an inversion operation is performed after making a graphing modification of the scalogram 4 3 Inverting the scalogram This procedure which is invoked by selecting Graph Invert will perform an inversion of the scalogram back to a signal If you have not modified the scalogram and you made a judicious choice of number of octaves and voices so as to capture a sufficient amount of the frequency content of the original signal then this nvert procedure should produce a good excellent approximation of the original signal 4 4 CHANGING THE APPEARANCE OF
6. also called impulsive noise present It usually performs a more sharply resolved denoising than median denoising 7 5 Measuring error To measure the error between the original and the decompressed image you select Error measures from the menu There are three possible error measures to use 1 Sup 2 PSNR 3 RMS These error measures are computed as follows Sup The Sup supremum error is the largest magnitude error between the two image values at all pixels The Sup error is particularly useful for checking on lossless decompression PSNR The PSNR peak signal to noise ratio is computed by the formula 255 where MSE is the Mean Square Error The Mean Square Error is the sum of the squares of the differences between image values at all pixels divided by the total number of pixels PSNR is used most often in assessing the fidelity of lossy compression its logarithmic character is related to human visual sensitivity RMS The RMS root mean square error is the square root of the Mean Square Error The RMS error can be interpreted in terms of grey scale units Note If a region of interest has been selected then each of the above error measures can be applied only to the region of interest This is done by checking the box labeled Restrict to Region of Interest On the other hand if that box is not checked then these error measures are applied to the whole images 7 6 Saving a processed image To save a processed
7. 2 If you want the right side labels along the vertical to be printed then check the box labeled Right labels 3 If you want the lower labels along the horizontal to be printed then check the box labeled Lower labels 4 If you want the caption for the graph to be printed then check the box labeled Caption 5 Select whether the printout should be Monochrome or Color If you select Color then the printout will work properly if you have a printer that prints in color Otherwise it is best to select Monochrome which usually prints in black and white 6 Click on one of the printout buttons either Print or Print and Eject If you click on Print then the graph will print but will not eject from the printer This allows for several different graphs to be printed on the same page If you want to eject a printed page then click on the button labeled Eject If you want to print the graph and eject the page then click on the button labeled Print and Eject Printing graphs to a file To print graphs on screen to a file you perform the following 2 steps 1 Click on the button labeled Save Printout to File 2 From the dialog box that appears specify a file name for saving the printout data Suppose this file name is fname then the data for printing graphs is saved in two files fname bmp and fname_labels tex The first file contains the bit mapped data needed to create the graph the second file contains the data needed to label the x and y axe
8. 47 which describes how graphing is used for denoising a spectrogram There is also online help available just select Help Help for plotting graphs from the spectrogram menu when the graphing text box is open Usually an inversion operation is performed after making a graphing modification of the spectrogram 3 3 Inverting the spectrogram This procedure which is invoked by selecting Graph Invert will perform an inversion of the spectrogram back to a signal If you have not modified the spectrogram then this Invert procedure should produce an excellent approximation of the original signal equal to the original except for tiny floating point roundoff errors You can also nvert after making modifications This is useful for removing noise after thresholding for example or for capturing a particular frequency band say from a recorded voice or a piece of recorded music by using the graphing method 3 4 Denoising the spectrogram To perform various types of denoising of a spectrogram you select Graph Denoise and denoising function will appear on the left of the window see Figure 3 1 You can then click the Plot button to denoise the spectrogram followed by Grapl Invert to produce a denoised signal You can also modify the denoising function that appears in the graphing window to perform more elaborate denois ing Examples of this are given in A Primer on Wavelets and their Scientific Applications Second Edition 3 5 Changing the
9. 89 for more details 6 Save Reconstructed Image This procedure is used for saving a processed image See Section 7 6 on p 92 for more details 77 2 Edit This item contains two procedures 1 Copy left image and 2 Copy right image You choose one of these procedures to copy an image either the left or right image on the mage Processor form to the WINDOWS clipboard From the clipboard you can paste the copied image into other WINDOWS programs 7 7 3 View This item contains 2 options If you select Arrange windows then you can perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the FAWAV workspace so that you can select which window to be the active one The presently active is marked with a checkmark v 7 7 4 Compress You choose this item in order to compress an image that you have loaded See Section 7 2 on p 89 for more details 7 7 5 Decompress You choose this item in order to decompress an image that you have saved in compressed form See Section 7 3 on p 91 for more details 7 7 6 Denoise You choose this item in order to perform various kinds of denoising of an image that you have loaded See Section 7 4 on p 91 for more details 7 7 7 Error measures You choose this item to calculate various error measures between the image on the left of the form and the image on the
10. B L Yeo Wavelet transforms that map integers to integers Applied and Computational Harmonic Analysis 5 332 369 1998 and the third system 1s described in A Cohen I Daubechies J C Feauveau Biorthogonal bases of compactly supported wavelets Comm Pure Appl Math 45 485 560 1992 3 Specify a bit rate bits per pixel bpp Since the original image is 8 bpp the default choice of 0 25 bpp produces a 32 1 compression Note To produce lossless compression with either the 5 3 or 242 2 wavelet systems you should specify 9 bpp 4 Optional If you have selected a region of interest see Section 7 2 1 on p 91 then you should specify a per centage of bits to ROI This percentage which is a decimal between 0 and 1 specifies the fraction of the Total Bit Budget Total Bit Budget Rows Columns 8 bpp 7 3 DECOMPRESSING AN IMAGE 91 to allocate to the If p is the Percentage of bits to ROI then Total Bit Budget 1 p bits are first allocated to compressing the whole image After this part of the Total Bit Budget is exhausted then the remainder of bits are allocated to the region of interest 5 Once these preliminary steps are carried out you then click on the Go button A dialog box will appear for you to specify the name of the compressed file Since this is a demonstration program it supplies information such as a display of the transformed image and how many symbols are being encoded
11. Energy graph s a Sab 4 41 2 12 0 AIStO Stam gt oso Ses eed Eum SS Bed DERE OA 41 2127 Ge BNE T 41 212 8 Saye Deck ey ete e Re dx 41 2712 9 Pint graphs eI Repo ene ex eb eub E EA 41 2 12 30 CMP ei oue a ee BI pee Sab deh qe dr Qo a 42 2 1244 Copy graph estere Rb ered nal ae eese ede ape eee S rud 42 2 12 12 Paste graph siste es ae ERA n IB e eT P E gren m ren 43 242 13 Remove graph v eA Eg Sues due m be 43 2 12 14 Copy sraph to clipboard s sa s pare tue ok E RR 43 2 12 15 Pastegraphfromclipboard ee 43 2 12 16 Display cursor coordinates ee 43 3 Spectrograms Gabor transforms 45 3 1 Comput ngthespectrogram s scar s s pha pe Rc pA Soups RR EUR Re om UE 45 3 2 Modifying the spectrogram a ta teara a a a E rs 46 3 3 Inverting the spectrogram 0 47 3 4 Denoising the spectrogram rs 47 3 5 Changing the appearance of the 47 3 6 Printing the SpectrOgram us otha S Ere soa Dae Te petri 48 3 7 Savngthespectrogram SR RES ES Ex E 48 3
12. Wavelet packet series x sus bE Ae ee RUN SEIN alee Pee e EORR S Founertransforms 552 ek sod Lose Rok Ru Em SA Ro gode c RR EEG m ES ms SOA ExampleS s AU uq ee ER FIRME eee Fourier seri s E es eR Sm ere ue gs STI Filtering of pu RES IUe eae he Be Convolutions and Correlations lt s s soes eura e a 28 1 Convolution ze Ee of AOS ERS Bhd 2 82 406624 REED Aot 6 CONTENTS 5 8 3 Auto correlation leo eae OE ES V TE RI 71 2 84 sek Sr 72 2 9 image Compression sse Nu e Re UP Sand S SHUT e S 72 5 9 1 Image Compression Workshop ees 72 5 9 2 Savingacompressedimage ee 73 5 10 Image Denoising 2 oon o om Som borse p Ege OS E EUR e e p vor e p Ede ge 74 9 11 M n Items for 2D Form AEG S S 76 cL Soe he Bah otn a Pe e a 76 SAL Edit C ee Ae ed he ead Ue a 77 DATS 6o ent aux RR pur me ee de de eee 78 ILL
13. a ee We e UR s 32 2 994 Examples zones edm Emo m oe vue eoe RR Eom nem eed 32 2 10 Spectrograms and Scalograms see 3 4 33 2 11 Menultemsfor1D Form s 33 Eile nuo be Moet we BE Sh ae secure BAGH 33 4 CONTENTS 2 12 Editi aration abate to Pore EBA ARA QUEUE due Yee RYE SES SI ES 34 2 11 35 View r x pup SR e UI RR sedes ut Eve rPEI m 34 2 11 4 s m xt 5 25 4 08 eeu Dee eet EE RE esit ew 35 2 11 5 Senes zuo meus EROR VECTEUR ee ees 36 2 T Fransforms n eR utm etes fo HR bere cede ptt HS RE us RO A 36 2 11 7 ConvVolve em gt Gan We alate keg eres e deo Ar e NIV TA efus 36 2 11 8 Analysis erm Rep ERR UR toe pde neto UT iude a 36 2 11 0 Hel eoo or diete t det diee Rot eek geb Eod ua et 40 2 12 The Popup menu for RR RETRO USUS Rue E Wes de ee 41 212 1 Zoom s BAAS Aeg RASSE RU gv Se A eee sp En 41 2 12 2 BXpand i o utu eb de xem EUR eu de wee x epe 41 2123 Window x2 45 tem ae eM S dug A dedere quee 41 2 12 4 Sort magnitudes 4 44 406 CR A Re 41 2 12 5
14. arises from approximating continuous frequencies by discrete ones 4 Click on the button labeled Compute This will produce the spectrogram of the graph you have specified 3 2 Modifying the spectrogram There are two ways to modify the spectrogram You can perform a Threshold operation or you can perform a Graphing operation Thresholding To apply a threshold to a spectrogram select Graph Threshold and then enter a value no more than the maximum value displayed above the input box for this threshold and click the Apply button All values of the spectrogram whose magnitudes are less than this value are set equal to zero and the new spectrogram is displayed Thresholding is useful for removing background noise Usually inversion is performed after thresholding 3 3 INVERTING THE SPECTROGRAM 47 Graphing Graphing is useful for selecting a portion of the spectrogram and performing modifications of the spectrogram For example if you enter the formula 91 0 2 lt lt 0 7 158 lt y lt 1227 then all values of the spectrogram for points x y that are outside of the rectangle 0 2 0 7 x 158 1227 will be set equal to zero and all values for points x y that are within the rectangle will be left as is The variable g1 refers to the magnitude of the spectrogram values only The graphing procedure uses methods from the 2D form graphing procedures See Chapter 5 on p 59 for more information See also Section 3 4 on p
15. as the compression is performed 7 21 Region of Interest To specify a region of interest which will be more accurately compressed than the whole image you click on the image with the right mouse button and while holding the right mouse button down draw a rectangle on the screen When you lift up the right mouse button the rectangle is displayed and this rectangle marks off the region of interest If you are performing lossy compression then the region of interest will be preserved with greater fidelity than the rest of the image On the other hand if you are performing lossless compression then the region of interest will be exactly preserved no errors while the rest of the image will be compressed in a lossy fashion how lossy depends on the percentage of bits to ROI value Note turn off the region of interest you click on the image with the left mouse button 7 3 Decompressing an Image To decompress an image you select Decompress from the menu this selection is done automatically when the com pression process finishes You then press the Go button and select the file you wish to decompress If you specify a bpp rate that is less than the bpp rate used for compressing the file then the file will be decompressed using this new bpp rate This is called embedding The compressed file has embedded within it all lower resolution images obtainable from lower bpps This embedded property holds for both lossy and lossless compress
16. 1 this allows you to compare zooms of the two graphs provided you perform the identical zooms The constant P stands for the number of pixels in the specified region RMS If you choose RMS then the following error measure is computed 1 RMS p gui i j where f is the graph you have specified as Graph 1 and g is the graph you have specified as Graph 2 and the sums are over all pixels determined by the region displayed for Graph 1 this allows you to compare zooms of the two graphs provided you perform the identical zooms The constant P stands for the number of pixels in the specified region Norm A Norm of a graph is a numerical measure of its magnitude we discuss this further below To compute the norm of a displayed graph perform the following 4 steps 5 11 MENU ITEMS FOR 2D FORM 81 1 In the text box labeled Graph enter the number for the graph whose norm you want to compute 2 Select the Norm type There are two kinds Sup norm and Power norm More details about these choices will be given below 3 Select whether the norm is to be Absolute or Relative 4 Click on the button labeled Compute The norm will be computed and the result will be given in the text box below the Compute button Note Norms are computed over the region shown on screen This may represent a subregion of the full region over which the graph is defined if you have changed the display region Definitions of various norms We now
17. 5 11 8 on p 79 5 1 Graphing formulas and external data Data can be plotted in the 2D form in one of three ways 1 plotting an elementary formula from algebra or calculus 2 loading an image file 3 loading a data file We describe each of these methods in order 5 1 1 Plotting a formula To plot an elementary formula you select Graph followed by Plot from the menu A dialog box opens up on the right of the window with a text box at the top for entering your formula To graph a formula over an interval perform the following steps Enter a formula in the text box at the top of the dialog box The simplest way to begin graphing formulas is to use the kind that graphing calculators use For example the following two formulas 3x Ty 4sin 3pi xy 2 5cos 4pi xy 5 are both valid formulas in FAWAV The second formula uses the expression pi for the constant For many more examples see Sections 5 1 2 through 5 1 12 Specify the value of L to be used for the domain L L x L L For example if you specify that L 2 then the domain used for graphing will be 2 2 x 2 2 Click on the command button labeled Plot Assuming all the data are correctly specified this will produce a graph in the graph area on the left of the window Formula command buttons There are five command buttons at the bottom of the formula text box Here are descrip tions of each of these command buttons Previous If you h
18. 7 7 5 7 7 6 7 7 7 7 7 8 7 Ele v ee Ge EL Ge ER JM RUNE TA SUA SE 92 Edit eh eae RECEN Se gode tes 93 E den es ue ST re ote Arn 93 Compress 4 e LU Wa Pag su uS MR aee eive tu 93 Decompress Acs ee PEAR ue Reb uk ce pquewu a es Suis 93 Denise sid pietekai 4RxXebat Y Re eb EG PRS BL emu ibd 93 FATOTPANCASULCS DA Aor ose Giese ine esha SGD 93 CONTENTS Chapter 1 Introduction FAWAV is designed as an aid to signal processing of 1D signals especially audio and 2D signals especially images I originally designed FAWAV as a teaching aid for my courses on Digital Signal Processing and Digital Image Processing and as a tool for my own research But I felt that it was good enough to make available as free software for others to use I am pleased that other researchers at institutions such as U C Berkeley the University of Barcelona the University of North Dakota and Washington University St Louis have made use of FAWAV If you have any questions about FAWAV please contact me at the email address given on the title page Or if you have used FAWAV in your own research I would love to hear about that I always enjoy receiving preprints and papers 1 1 Components of FAWAV FAWAV has several major compone
19. 8 Recording information w sesa Gp s Mp s b xeu X GG oy qom Oh ve b ded 49 3 9 Menu Items for Spectrogram form 49 B91 EE Ue VR Arras etes esu e t de eri b ee Ste at 49 3 9 2 Lo oux Benet BR epe IS dei dee bur poe EROR erp Wee fe e d 49 89 35 e RU C RUP ied Butts mur ced verus eS ted Rui ous 50 3 9 4 Helps zd e ee RR BARRERA RR RR AEGRIS toe 50 3 10 The Popup menu for spectrograms 51 eue See he eh ae 51 3 10 2 Blotgraph eR RD enses bp ERR OY vog doe ee RUE we S 51 3 10 3 Threshold 204 604 WIAA URS tone lA GG SEAS ne 51 3 10 4 ene y mue ke la ee 51 iE nost ope de S RIIV Ivo d pg OTROS BA SPs ee Pes md ong 51 3 10 6 Display style Feuer Roe Roe DE EUER RU 51 3 10 7 Copy sionals PS PERLE LEES 51 3 10 82 VerticaEslice nob RE REGERE b RE Re 51 3 10 9 Honzontal slice 2 shi RR Roe ERN eSI RIP uie dtes 51 CONTENTS 4 Scalograms Continuous wavelet transforms 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 Computing thescalogram
20. Copysignal z na wo See DR ESAME eee e EUR FIRM a eR 498 Vertical shee sos eee NES UE pu eges Bat E vvv pe EIS 499 Horizontal doe SRI Sexe Eu 5 Processing 2D Signals 2D form 5 1 2 2 5 3 5 4 5 6 5 7 5 8 Graphing formulas and 1 3 41 Plotting f rmula 02e o RR MRR REM Er 5 1 2 Formulas for 2 dimensional graphs 5 13 Functions supported suo ee Rode ego ee ARES Ein Re SERIE SLA Graph operations c sooo o RUE UD Ro ps SERM SUR TEQUE MENT Em 5 156 Products gt eek Ree etre e n Eee 5 134 LOGIC i2 x mons oo mom Romo RR bee ee SONOS 9o URGE S XR S ud 2 1 8 Inequalities snn i Sa maneo Ree debes mau ees 9 1 9 Command stEngs bed mv BO Wee ed bx ber BS S H REI 5 1310 Eoading an image file g ee a Rp ee RURAL y OE Re SESS 9 11 Savnganamage fil 2 um oe SURINAME RUE SERM EU A REQUE 5 1 12 Loading external binary files 5 1 13 Saving graphs as binary data ee Wavelet transforms io sd be ab 9 Um OR DUE E Ro S m ee a a aus Wavelet Series PE ORE Bed eae e x ERE Oe Enid Wavelet packet transform sini ovp bee Bed ee ee PE ee Bh ee ep ES
21. Menu Items for Spectrogram form 3 9 1 File The File menu has the following 9 items 1 WN A W N New 1D form This allows you to open a new 1D form See Chapter 2 beginning on p 11 New 2D form This allows you to open a new 2D form See Chapter 5 beginning on p 59 New Audio Editor This allows you to open a new Audio Editor form See Chapter 6 beginning on p 85 New Image Processor This allows you to open a new Image Processor form See Chapter 7 beginning on p 89 Open This allows you to open a previously saved spectrogram a file with extension spo Save This allows you to resave a spectrogram file extension spg that you have modified Save As This allows to save a spectrogram form to a file extension spg Print This allows you to print the spectrogram See Section 3 6 on p 48 for further discussion Close This closes the spectrogram form Warning You are not prompted as to whether you wish to save your Work 3 9 View The View menu contains the following 5 items 1 4 View cursor coordinates This is a switch on the View menu switched on and off by clicking on it When this choice is on then by moving the mouse cursor over the spectrogram plot you can read off the approximate coordinates time frequency of the point of the mouse arrow This is especially useful when you want to modify regions of the spectrogram using the Graph Plot procedure Display style This choice a
22. THE SCALOGRAM 55 You can also nvert after making modifications This is useful for removing noise after thresholding for example or for capturing a particular frequency band say from a recorded voice or a piece of recorded music There are three methods that you can choose for inverting These three methods are 1 Wavelets This method produces an inversion by summing multiples of shifts and scalings of the basic wavelet used to produce the scalogram 2 Wavelets and Scaling functions This method includes along with the wavelets low frequency data that produces what are called scaling functions This method will sometimes perform better on signals with a large amount of energy in lower frequencies 3 Damped trigonometric functions This method consists of canceling out the effects of the correlations with the wavelets by simple division It will sometimes work more effectively than the above two methods but it bears no relation to the wavelets used to produce the scalogram 4 4 Changing the appearance of the scalogram You can change the appearance of the spectrogram by selecting Display style from the View menu The dialog box that appears on the right of the window allows you to change the way the spectrogram is displayed in the following three ways 1 Select a method by which Magnitude of the spectrogram s values are computed The four choices are Log global Magnitudes are displayed on a logarithmically graded intensity sca
23. This procedure denoises a signal using either VISUSHRINK when the box labeled Avg is not checked or using CYCLE SPIN averaging when the box labeled Avg is checked You select the type of wavelet to use and the number of levels 4 to 6 works best and then click the Plot button to denoise Median denoise This procedure denoises a signal using a 3 point median filter It is used when there is noise also called impulsive noise present 36 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 8 Adaptive median denoise This procedure denoises a signal using a 3 point adaptive median filter It is used when there is noise also called impulsive noise present It usually performs a better denoising than median denoising 9 Down sample This procedure creates a new graph from the graph that you specify by using only its even indexed values A new window appears that contains the graph of this down sampled graph Note this procedure is not available if the graph consists of only 64 points 10 Interpolate This procedure creates a new graph from the graph that you specify by inserting a new value at each midpoint between each pair of its values There are two ways that this can be done a Haar interpolation Haar interpolation inserts a new value at each midpoint by assigning the immediately preceding function value Thus producing a function which repeats values two at a time b D D 4 2 Interpolate This metho
24. Walker and Y J Chen Image denoising using tree based wavelet subband correlations and shrinkage Optical Engi neering 39 2900 2908 Dec 2000 We first outline the various steps involved in denoising an image and then describe how to perform the methods described in these three papers To denoise an image you need to go through the following five steps in the denoising dialog box see Figure 5 4 5 10 IMAGE DENOISING 75 1 You first specify the graph number of the image that you want to denoise then specify a wavelet to use and a number of levels for the wavelet transform 2 Specify a threshold This will be done automatically by FAWAV if the option Auto is checked If Auto is not checked then you need to specify the threshold yourself 3 Check or uncheck the various options labeled Shrink Refine and Avg If you check the Avg option then select one of the options 1 1D 2 2D 8D These are organized with the fastest performance first choice 1 to the slowest performance last choice 8D but with increasing fidelity in denoising Generally 2D or 4D gives accept able performance without unduly increasing computation time although 8D does not take too long for images smaller than 512 by 512 and produces better denoising The notation D indicates that shifts are performed in both and directions for performing the averaging Generally it is best to choose a D option for averaging 4 Specify the value of
25. a wavelet transform as coefficients where M is the number of coefficients specified in the text box at the right of the label Ascending terms For example suppose that the number of points is 1024 210 then by specifying 1024 2 4 number of ascending terms you will produce the 4 averaged signal Or by specifying 1024 2 3 number of ascending terms you will produce the 3 averaged signal To select this option just click on the label Ascending terms and then enter the number of terms desired By resting the mouse pointer on the text box for the number of coefficients a message should appear which specifies the range of allowed numbers 2 4 Wavelet packet transform To compute a wavelet packet transform of a signal you select Transform Wavelet packet The rest of the steps are the same as described above for wavelet transforms Note FAWAV only computes the simplest type of wavelet packet transform the wavelet packet transform where each subsignal is further transformed up to the highest level More complex transforms are performed by more advanced software such as the ones described in Appendix C of A Primer on Wavelets and their Scientific Applications 2 5 Wavelet packet series To compute a wavelet packet series for a signal you select Transform Wavelet packet The rest of the steps are the same as described above for wavelet series Note FAWAV only computes the simplest type of wavelet packet series where the wavelet packet transf
26. along the vertical axis of the scalogram to frequency values the smaller the width the larger this constant of proportionality c 5 If you choose one of the Gabor wavelets then you also must enter a value for frequency in the text box labeled Freq With Gabor wavelets there is a simple formula that relates width and frequency v to the constant of proportionality c It is c v w 6 To plot the scalogram click on the button labeled Compute The general theory of scalograms is described in Chapter 6 of A Primer on Wavelets and their Scientific Applications and also in the article Time frequency Analysis of Musical Instruments by J S Walker and J F Alm referenced in A Primer on Wavelets and their Scientific Applications The Mexican hat and Gabor scalograms are discussed in detail in A Primer on Wavelets and their Scientific Applications 42 Modifying the scalogram There are two ways to modify the scalogram You can perform a Threshold operation or you can perform a Graphing operation Thresholding To apply a threshold to a scalogram select Graph Threshold and then enter a value no more than the maximum value displayed above the input box for this threshold and click the Apply button values of the scalogram whose magnitudes are less than this value are set equal to zero and the new scalogram is displayed Thresholding is useful for removing background noise Usually inversion is performed after thresholding
27. appearance of the spectrogram You can change the appearance of the spectrogram by selecting Display style from the View menu The dialog box that appears on the right of the window allows you to change the way the spectrogram is displayed in the following three ways 1 Select a method by which Magnitude of the spectrogram s values are computed The four choices are Log global Magnitudes are displayed on a logarithmically graded intensity scale relative to the maximum of all spectrogram magnitudes Log local Magnitudes are displayed on a logarithmically graded intensity scale relative to the maximum of all spectrogram magnitudes along each vertical time slice Linear global Magnitudes are displayed on a linearly graded intensity scale relative to the maximum of all spectrogram magnitudes Linear local Magnitudes are displayed on a linearly graded intensity scale relative to the maximum of all spectrogram magnitudes along each vertical time slice 48 CHAPTER 3 SPECTROGRAMS GABOR TRANSFORMS 2 Select a method for how the signal is displayed at the bottom of the window If you select Dots then the signal values are plotted as isolated dots If you select Lines then line segments are drawn between signal values thus producing a more connected graph 3 Select whether the Magnitude of the spectrogram values are plotted or whether Phase values are plotted When phase values are plotted the darker values are negative and the white
28. completed decompressed image 5 9 IMAGE COMPRESSION 73 5 9 2 Saving a compressed image To save a compressed image in a 2D form you right click on the image and select Save Image from the popup menu You then select either a x jpg format JPEG compression or wc2 format ASWDR wavelet based compression Unless you change the saving options see below the default value of 7096 quality for JPEG and 32 1 compression ratio for ASWDR will be used Changing saving options To change the options used for saving images you select Save options images from the File menu The window shown in Figure 5 3 appears The options for JPEG are mostly self evident the quality factor results in more fidelity in the compressed image when a higher quality factor is chosen there is no simple relation between quality factor and compressed file size The options for TIFF images are described elsewhere we shall not discuss them here as TIFF is rarely used for lossy compression We now turn to the options for wavelet compression wc2 files You can specify the number of levels to use for the wavelet transform You can also choose which wavelet to use for transforming The choices are Daub 9 7 for lossy compression and DD 242 2 Integer and DD 5 3 Integer for lossless compression If you choose to obtain a better program for performing JPEG compression is IMAGE ANALYZER which allows you to specify the compression ratio Wavelet Ima
29. describe the various norms that can be computed First assume that Absolute norms are computed If a Sup norm is chosen then the maximum absolute value of all the specified graph s values is found over the region for which the graph is displayed and this maximum is the Sup norm If a Power norm is selected then the power to be used must be specified in the text box labeled Power The power p must be a number greater than or equal to 1 The power norm is computed by forming a Riemann sum approximation to the integral of the power p of the absolute value of the graph over the region for which the graph is displayed and then taking the pi root of the result Note If you checked the box labeled Normalized then before the root is taken the approximate integral is divided by the area of the region screen Trace This procedure can be used for reading off the values of the displayed graphs As the function values are displayed on the right there are crosshairs drawn on the graphs on the left to indicate where these function values lie on each graph There are a couple ways to change the position of the crosshairs 1 You can click on the screen at a point on a graph whose coordinates you desire If you click with the left mouse button then the crosshairs will move to the position that you have clicked and the values will update on the right side of the screen If you click with the right mouse button then you will also have the option of
30. gri x largest integer that is x Or an equivalent definition is gri x closest integer to the left of x on the number lin The greatest integer function can be used to compute remainders in long division also called Mod functions and to compute periodic functions Mod functions To compute the remainder of P divided by Q where P and Q are positive integers and P gt Q you can use the greatest integer function in the following way Remainder P Q P Qgri P Q The remainder of P Q is often denoted mod Q Hence mod Q P Qgri P Q Periodic functions The function gri can be used to create periodic functions For example the following formula u 2Nu 2x wgri x w defines a periodic extension of x having period w where x is periodically extended from the initial interval 0 w This formula uses substitutions for the variables v and see Section 2 1 10 on p 18 for further discussion of substitution As a second example the following formula cos pi t Nt u w 2Nu v wgri v x w 2 defines a periodic extension of having period w where cos zx is periodically extended from the initial interval w 2 w 2 6 log The natural logarithm function is defined by 109 You can also use Ln 7 sgn The sign function sgn is defined by 1 ifx gt 0 sgn x lt 0 ifx 0 1 ifx lt 0 You can also use sign for the sign function One important use of the sign functio
31. is the maximum magnitude of all wavelet coefficients All wavelet coefficients whose magnitudes are less than this threshold are set equal to zero but no quantization is performed on the values that survive this thresholding b Multiple Thresholds This method involves specifying two thresholds by entering in the text box labeled Value an expression of the form 1 2 m 1 2 n where m and n are positive integers With this option quantization is always performed The first threshold should have the form 1 2 m which produces m 1 bit or m bit quantization of all trend values depending on whether the checkbox labeled Sign bit is checked Likewise the second threshold should have the form 1 2 n which produces an 1 bit or n bit quantization of all fluctuation values depending on whether the checkbox labeled Sign bit is checked Note The tool tip for the text box will provide information on how many bits you are specifying for the threshold values that you have entered 6 Click on the button labeled Plot This will produce the wavelet series 5 4 Wavelet packet transform To compute a wavelet packet transform of a signal you select Transform Wavelet packet The rest of the steps are the same as described above for wavelet transforms Note FAWAV only computes the simplest type of wavelet packet transform the wavelet packet transform where each subsignal is further transformed up to the highest level More complex transforms are performed by
32. it into another 2D form 5 12 7 Paste After a graph has been copied as described in the previous item then this choice is used for pasting it graphing it into a 2D window The graph can be pasted as many times as you wish as long as another graph is not copied in the meantime 84 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 5 12 8 Delete This choice is used to remove the graph that you right clicked on Warning Once the graph has been removed it cannot be restored of its data is lost unless you have saved it 5 12 9 Load This choice can be used for loading a signal There are two choices 1 Graph see Section 5 1 12 on p 66 2 Image see Section 5 1 10 on p 65 5 12 10 Save graph This choice can be used for saving a signal in one of two formats 1 You select Graph to save a signal in binary fb2 format for loading using the Load Graph method 2 You select Image to save a signal in one of the image formats for loading using the Load Image method 5 12 11 Print graphs You can print graphs directly to paper output or print graphs to a file for later use in a document preparation system such as ATEX We now describe each of these methods Printing graphs directly onto paper To print the graphs on screen directly onto paper you perform the following 6 steps 1 From the list of choices choose a method of printing such as Small top left These choices determine the size of the printout and where
33. more advanced software such as the ones described in Appendix C of A Primer on Wavelets and their Scientific Applications The tool tip is the message that appears when a mouse pointer is rested on a text box or other item in a window 68 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 5 5 Wavelet packet series To compute a wavelet packet series for a signal you select Transform Wavelet packet The rest of the steps are the same as described above for wavelet series Note FAWAV only computes the simplest type of wavelet packet series where the wavelet packet transforms for each subsignal are further transformed up to the highest level More complex series are performed by more advanced software such as the ones described in Appendix C of A Primer on Wavelets and their Scientific Applications 5 6 Fourier transforms A Fourier transform or power spectrum of a signal can be calculated by performing the following 9 steps 1 After plotting your signal data select Transforms Fourier from the menu 2 Select one of the two data types either Real or Complex 3 If you selected Real then enter the number of the graph that you want to transform into the text box labeled Graph The values of this signal will constitute the real part of the data the imaginary part will be assumed to be all zero values On the other hand if you selected Complex then enter in the text boxes labeled Real and Imag the numbers of the graphs whose values you want to u
34. now examine 1 New IDim Selecting this item will open new 1D form Each 1D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu New 2Dim Selecting this item will open a new 2D form see Chapter 5 beginning on p 59 Each 2D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu New Audio Editor Selecting this item will open a new Audio Editor window see Chapter 6 beginning on p 85 Each Audio Editor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu New Image Processor Selecting this item will open a new Image Processor window see Chapter 7 beginning on p 89 Each Image Processor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu Open form You select this item in order to open a previously saved form either a 1D form a 2D form a Spectrogram form or a Scalogram form A standard WINDOWS File Open dialog box opens up from which you can select a saved form to load The file extension w1 is used for 1D forms the file extension w2 15 used for 2D forms the file extension spg is used for spectrograms and the file extension scg is used for scalograms Open Sound File wav This item can be used for loading a wav audio file into the 1D form It is recom mended however t
35. on this button in order to get help on creating formulas 2 1 2 Formulas for 1 dimensional graphs Formulas for graphing are constructed using pre defined functions as well as various logical operations or sums or products In Sections 2 1 3 through 2 1 10 we discuss all of the operations that can be employed in graphing formulas 2 1 3 Functions supported There are a number of pre defined functions We list them here in two categories 1 the elementary functions of the kind encountered in calculus and 2 certain special functions of a miscellaneous nature Elementary functions FAWAV employs 11 elementary functions which we now list 1 abs The absolute value function abs returns the absolute value of its argument e g abs 5 5 and abs 5 5 cos cosine function is invoked using cos For example cos 3x cGos x 2 3 3 are both valid formulas involving the cosine function cosh The hyperbolic cosine function cosh returns the hyperbolic cosine of its arguments By definition cosh x satisfies cosh x exp x 2 where exp is the exponential function exp exponential function exp is the standard base e exponential function For example 4 4x are two equivalent expressions using the exponential function CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 5 gri The greatest integer function gri is defined as follows
36. other coefficients are set equal to zero You must specify a non negative number for the threshold 2 8 AUDIO 31 2 7 2 Examples Examples illustrating many of these aspects of computing Fourier series Transforms 2nd Edition can be found in Chapter 4 of Fast Fourier 2 8 Audio FAWAV allows one or more graphs to be played as audio files by performing the following 7 steps 1 Graph the signal s that you want to play Typically this is done by loading an audio file see Section 2 1 11 on 19 for discussion of how to load an audio file although FAWAV allows any graph to be played 2 Select Graph Audio from the menu 3 In the text box labeled Graph s enter either one number or a sequence of numbers separated by commas that specify which graphs you want to play For example suppose there are three graphs displayed Some possible numbers that you could enter are 1 0r3 0r1 2 0r3 2 1 1 2 3 which respectively would tell FAWAV to play the first graph displayed or the third graph displayed or the third graph followed by the second graph followed by the first graph and then repeating in reverse order 4 Choose a bit rate of either 8 bits or 16 bits If you select 8 bits then volume levels are from 128 to 127 that is 28 in all Or if you select 16 bits then volume levels are from 32768 to 32767 that is 216 in all 5 Specify a Sampling rate The allowed values are integers from 441 to 44100 The sampling r
37. plot graphs of elementary functions studied in algebra and calculus see Section 5 1 on p 60 Or you can load external data see Section 5 1 12 on p 66 Or you can load image File Edit view Analysis Help Figure 5 1 The window that opens when New 2D form is selected 59 60 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM files see Section 5 1 10 on p 65 Wavelet transforms These are the Haar DaubJ Coifl transforms and biorthogonal wavelet transforms described in A Primer on Wavelets and their Scientific Applications See Section 5 2 on p 66 Wavelet series These are the Haar DaubJ CoifI series and a selection of biorthogonal wavelets series described in A Primer on Wavelets and their Scientific Applications See Section 5 3 on p 67 Fourier series and transforms These are the classic Fourier series and transforms implemented using FFTs See Section 5 6 on p 68 Convolutions and Correlations There are procedures for calculating the convolution of two signals for calculat ing the correlation between two signals and for calculating an auto correlation of one signal See Section 5 8 on p 71 Image Compression and Denoising Two important methods in image processing are compression Section 5 9 on p 72 and denoising Section 5 10 on p 74 There are also a number of routines for numerical analysis of 2D signals these are grouped under the Analysis choice on the menu see Section
38. right of the form See Section 7 5 on p 92 for more details 7 7 8 Help This choice loads a WINDOWS help file for the Image Processor form
39. suse ak ae Ee Re Bee ae 21 2 3 e Wavelet Sees te ais ud ote ee don Eee foe Met oe ee toe te estes Ant 21 23 1 SenestyDe 2 pope deber BE BE Eee Bee e E Dede gs 22 2 4 Wavelet packet transform 22e ee 23 2 5 Wavelet packet Series en HE EIGENS RE eru 23 2 6 Fo rier transforms sce e RD WU Wee UE I TRO RU e e eere qu 23 2 6 1 Fouriertransform os e Rs 24 26 2 2 mb us ee Poe RE tod Bod ee OR Eris We te qe ds 25 2 6 3 Fouriercosinetransform ee 26 2 6 4 Fourier sine transform 26 2 7 Fourier series sine series amp cosine series 27 2 11 Eitering of Fourier seresa ee Be he be eee 28 27 Examples 2 mon e eom eee TRO RU Ee reme A ae s 31 2 87 me oec sve RUDI ES es Retold ot hed us Petes utar 31 2 9 Convolutions and Correlations 31 29 Convol tl ni u uoo ou he Boe bee ee Pub POE uA dmm 32 2 02 sPalt COmelavOny Jets SANS lend ede res o o me wae ee Ar Peel dete ss 32 2 9 5 Auto correlation a oo Reo eb bo ue
40. the Descent parameter and specify the value of the Depth parameter The significance of these parameters are described in the third paper cited above 5 Click on the button labeled Plot and the image will be denoised Note After the denoised image is displayed you should round its values to integers You can do this by selecting Graph Quantize 8 bit image from the menu This quantization step is unnecessary however if the item Quantize has been checked in the denoising dialog box Denoise Draph 1 Levels g Wavelet type Sm Har Ci paw97 Threshold 64 Auto Descent Depth Shrink v Refine Aval Postprocess Quantize 8 bit v HighSNR Figure 5 4 The dialog box that opens for denoising an image After the denoised image is displayed you can use the menu choice Analysis Norm difference in order to calculate error measures between the original and denoised image As noted above this denoising procedure implements the techniques described in papers 1 3 listed above For instance to implement the VisuShrink method described in paper 1 you should check the Auto option of choosing a threshold check the Shrink and Refine options and uncheck the Avg option Finally set the Depth and Descent values to 0 Usually a 3 level or 4 level transform works best with this method To implement partially the cycle spin threshold method of paper 2 you should check the Auto option of c
41. the amount of error of one graph as approximant to another graph To compute the norm difference between two displayed graphs perform the following 4 steps 1 In the text boxes labeled Graph and Graph2 enter the numbers for the two graphs whose norm difference you want to compute 2 Select the Norm type There are two kinds Sup norm and Power norm More details about these choices will be given below 3 Select whether the norm is to be Absolute or Relative 4 Click on the button labeled Compute The norm difference will be computed and the result will be given in the text box below the Compute button 80 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM Note Norm differences are computed over the region shown on screen This may represent a subregion of the full region over which the two graphs are defined if you have changed the display region In addition to the norm differences listed above you can also compute either SNR or PSNR or RMS error measures We describe each of these below Definitions of various norm differences We now describe the various norm differences that can be computed First assume that Absolute norm differences are computed If a Sup norm is chosen then the maximum absolute value of all differences between the specified signals values is found over the region over which the graph is displayed and this maximum is the Sup norm difference If a Power norm is selected then the power to be used must be specifi
42. the number of the graph to remove Warning you are not prompted with a question about whether or not you really want to remove a graph the graph is simply removed immediately Erase screen Choosing this item will remove all graphs from the screen and from memory Warning graphs will be erased immediately causing you to lose that work unless you have previously saved it Remarks When you select this choice then a text box opens on the right of the form where you can enter remarks describing the work that you have performed in this form This is especially useful for keeping a record of your work if you intend to save the 1D form Caption Choosing this item allows you to edit the caption that appears below the graph area This caption can also be edited by clicking on it Screen capture This choice will create an image of the entire FAWAV window as it appears on screen which you can then paste into word processing documents like WORDPAD documents or other documents in other programs that accept WINDOWS clipboard input via a Paste command 2 41 3 View The menu item View contains 6 items which we now examine 1 Display style This procedure allows you to change the way in which graphs are displayed The different modes for graphing are organized into four categories Grid style Plot style Background color and X Y intervals 2 11 2 3 4 MENU ITEMS FOR 1D FORM 35 a Grid style If you selec
43. to 400 You must specify a value for N between 1 and 30000 rect The rectangle function rect 15 defined by 1 if x lt 0 5 rect x 40 5 if x 0 5 0 if x gt 0 5 For example to create a function equal to 1 over the interval a b and equal to 0 outside that interval you enter the formula rect x c w c atb 2Nw b a sinc The sinc function sinc is defined by sin sinc x TE for x not equal to zero If x 0 then sinc 0 1 2 1 GRAPHING FORMULAS AND EXTERNAL DATA 17 2 1 4 Piecewise functions To illustrate how piecewise functions are graphed consider the following two examples 1 To graph the piecewise function UR us for x lt 2 2x 8 gt 2 enter the formula x 3 lt 2 2x 8 x gt 2 2 To graph the piecewise function 2 for z lt 7 f z 4 cosx for m x 2m 3 for x gt 27 enter the formula 2 x lt pi cos x pi lt x lt 2 1 3 x gt 2 1 Using the Dots option for graphing is often the best way to plot piecewise functions The formulas in these two examples made use of Logic and Inequalities For further discussion of these topics see Section 2 1 8 on p 18 and Section 2 1 9 on p 18 respectively 2 1 5 Graph operations If you have drawn the graph of at least one function on the screen then you can assign values from these function s using the graph variables g1 92 g3 g4 andg5
44. to get the general help for the spectrogram form When a dialog box is open on the right side of the screen there will be a second choice specifically designed to access the desired topic in the help file a form of interactive help 3 10 THE POPUP MENU FOR SPECTROGRAMS 51 3 10 The Popup menu for spectrograms If you right click on the graph area on the left of a spectrogram form then a popup menu will appear with 9 items We now discuss each of these items 3 10 1 Print This selection is used for printing the spectrogram See Section 3 6 on p 48 3 10 2 Plot graph This selection is the same as Graph Plot See Section 3 2 on p 46 3 10 3 Threshold This selection is the same as Graph Threshold See Section 3 2 on p 46 3 10 4 Invert This selection is the same as Graph Invert See Section 3 3 on p 47 3 10 5 Restore This selection is the same as Graph Restore it restores the original spectrogram It is usually invoked after a modifica tion which did not produce the desired results 3 10 6 Display style This selection is the same as View Display style See Section 3 5 on p 47 3 10 7 Copy signal This selection will graph the signal displayed at the bottom of the window in a new 1D form 3 10 8 Vertical slice This selection which is available when the viewing of cursor coordinates has been activated via View View cursor coor dinates will graph the real and imaginary parts of the spectrogram in a new 1D fo
45. will multiply the data function values by the filter function values to produce the filtered function values 5 11 9 Help This item typically has two choices There is a general choice Help for FAWAV 2D which you choose to get the general help for all of the features of the 2D form When a dialog box is open on the right side of the screen there will be a second choice specifically designed to access the desired topic in the help file a form of interactive help 5 12 The Popup menu for 2D Forms If you right click on the graph area on the left of a 2D form then a popup menu will appear with 14 items We now discuss each of these items 5 12 THE POPUP MENU FOR 2D FORMS 83 5 12 1 Zoom This choice will zoom in to a region centered on the coordinates of the tip of the mouse pointer at the time that you right clicked on the graph area 5 12 2 Restore full image This choice will zoom out to the full image that you clicked on 5 12 3 View large size or View small graphs This choice allows you to view either the large version of the graph you clicked on or view small versions of all the graphs 5 12 4 Histogram To compute a histogram of a displayed graph s values perform the following steps 1 In the text box labeled Graph type the number of the graph for which you want to compute a histogram 2 From the list labeled Quantization select the number of levels divisions of the range of values to be used for computing t
46. zooming in on the point you have selected 2 You can also use the button bar on the bottom left of the window which has buttons labeled with the following symbols gt gt gt L R To see how these buttons work it is best to just try them a succinct description of their properties can also be found by simply resting the mouse on them and waiting for a short message to appear Calculator To perform a calculation with the calculator proceed as follows Enter a formula for calculation in the text box at the top Valid formulas are ones that would be accepted by most graphing calculators For example these two formulas cos pi 8 sqr 2a b Na 32 b pi 82 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM are valid formulas Notice that in the last formula we used command strings to substitute the values of 32 in place of a and pi in place of b in the formula More details on the functions available can be found in Section 5 1 beginning on p 60 2 Click on the button labeled Calculate in order to perform the calculation Integral To compute an integral of a displayed graph perform the following 2 steps 1 In the text box labeled Graph type in the number of the graph for which you want to compute an integral 2 Click on the button labeled Compute This will result in the computation of the integral over the region for which the graph is displayed The result which is a trapezoidal rule approximation of the
47. 1 x in 2D that will produce the graph of the values of g1 multiplied by x To graph just the values of graph 1 you would enter just g1 5 1 5 Sums There are four sum operators sumi sumj sumk andsumn For example the formula sumi x i it1 i 1 7 produces the same function as the more complicated formula Xy 2 x 2y 3 x 3y 4 4 5 x 5y 6 x 6y 7 x Ty 8 Warning You cannot use a sum operator twice in the same formula For example the formula sumk cos kxy sumk kx y k 3 5 will not be accepted by FAWAV You should use instead sumk cos kxy kx y k 3 5 5 1 6 Products There are two operators for performing products prodp and prodq For example the following formula p 4 3 produces the same graph as the following more complicated formula 4 xy 3 xy 2 1 xy xy 1 xy 2 xy 3 Warning You cannot use a product operator twice in the same formula For example the formula prodp x p prodp p 3 5 will not be accepted by FAWAV You should use instead prodp x p p 3 5 q 3 5 5 1 GRAPHING FORMULAS AND EXTERNAL DATA 65 5 1 7 Logic There are three logical operations amp and or and not These are Boolean operations which are meant to handle values of either 1 for TRUE or 0 for FALSE For example the following formula x gt 3 or y 2 sin 3x 2 lt amp y lt 3 cos produces a functio
48. 4 Click on the button labeled Compute The norm difference will be computed and the result will be given in the text box below the Compute button Note Norm differences are computed over the region shown on screen This may represent a subinterval of the full intervals over which the two graphs are defined if you have changed the display interval Definitions of various norm differences We now describe the various norm differences that can be computed First assume that Absolute norm differences are computed If a Sup norm is chosen then the maximum absolute value of all differences between the specified signals values is found over the interval on which the graph is displayed and this maximum is the Sup norm difference If a Power norm is selected then the power to be used must be specified in the text box labeled Power The power p must be a number greater than or equal to 1 The power norm difference is computed by forming a Riemann sum approximation to the integral of the power p of the absolute value of the differences between the two graphs over the interval on which the graph is displayed and then taking the root of the result Note If you checked the box labeled Normalized then before the root is taken the approximate integral is divided by the length of the interval on screen If Relative norm differences are computed then the absolute norm differences described above are divided by the norm of the graph specified as Gr
49. A Graph eb dees BO ee ae ie hee RSS mpi 78 DLV SOMES EM 79 23 11 60 Transforms BAS SAR ESR EGER RUE Gg qux ce RS EE Gm s mes 79 Convolve p RR V SAUVER ee 79 9118 AmalyS1So oe x mobi RUE ale es Bie he x eee dee Ee 79 5311 9 ees Be a Ay UT IEEE atu qu eteiesu t 82 5 12 The Popup menu for 2D Forms lee 82 DAD Ie uoo dose e RE CIRCE Ve ente e v Reo eR 83 5 122 Restore full image 55 qe onse ey op UE EM Spo REL 83 5 12 3 View large size or View small graphs 83 9 12 44 Histogrambz Ls soe keen ER a ake ERIS TER Ree wake el 83 25 125 Qipi iid le eat buted Bia dep OM As Ee pe ee eee er OR A Id 83 DA26 COPY opie eke Bend ei Poe Po oA Ig oS Ae Swe Sto iui Rog n 83 23 12 T Paste IR e eed te web EN Oe Geet be etek d 83 2 128 Deletes Se des ES a Beek Se Shae Se PA EO es 84 5 29 Load ALA oe Ae epe sequ ee eit eb ee 84 D1 2 LO Saversraph 41e sub eeu eb do eot Rel ext i eb te Ga 84 5 I2 LI Print graphs s tessa pede goblin See Me s E ay gom moth m 84 5 12 12 Display cursor coordinates 84 6 Audio Editor 85 6 1 Loadmgasoundfhle 3 ain bee BREE eee edd bead Ee S 86 6 2
50. AWAV workspace so that you can select which window to be the active one The presently active one is marked with a checkmark 2 11 4 Graph The Graph menu contains 10 items which we now describe 1 Plot This item opens up the plotting dialog box on the right of the window See Section 2 1 beginning on p 12 for further discussion There is also online help available by selecting Help for Graphing from the Help menu when the plotting dialog box is displayed Audio This item opens up the Audio dialog box on the right of the window See Section 2 8 beginning on p 31 for further discussion There is also online help available by selecting Help for Audio from the Help menu when the Audio dialog box is displayed Quantize 8 bit This procedure rounds graph values to integers between 128 and 127 It can be used for producing 8 bit sound data Quantize 16 bit This procedure rounds graph values to integers between 32768 and 32767 It can be used for producing 16 bit sound data Denoise Gabor With this choice you can denoise a signal via Gabor transforms also known as spectrograms A Blackman spectrogram Gabor transform will be automatically computed and a denoising function will appear as well If you want to use this default denoising function then you click on the Plot button and then select Invert from the spectrogram s menu For more discussion see Section 3 4 beginning on p 47 Denoise Wavelet
51. Although this method can be used it is recommended that you right click on the graph area near the graph you want to save and then select Save graph Sound file from the Popup menu that appears Print This section can be used to either print an individual graph or to print the entire 1D form as itis displayed on screen For further discussion please go to Section 2 12 9 on p 41 Close Selecting this choice will close the 1D form Warning FAWAV does not prompt you to save the 1D form if you have made modifications If you want to save your work be sure and save the form using File Save Form before you close it 2 11 2 Edit The Edit menu contains 6 items which we now examine 1 Points used Choose this item in order to change the number of points that FAWAV is using for plotting graphs The choices are 64 128 256 512 1024 2048 4096 8192 16384 32768 65586 with the presently used number of points preceded by a checkmark v Warning Choosing a new number of points will erase all graphs from the screen and from memory causing you to lose that work unless you have previously saved it Remove graph If you have one or more graphs displayed then you can remove one of them from the screen and from memory by selecting this item If there is just one graph displayed then it will automatically be removed If there is more than one graph displayed then a dialog box opens on the right side of the form in which you enter
52. Compute The approximate derivative will then be displayed Technical note The approximate derivative is accurate to fourth order That is if is the value of the increment separating successive abscissa values then the error between this approximate derivative and the true derivative is a multiple of h whenever the formula used to graph the function has at least 5 continuous derivatives Scalar product To compute a scalar product of two displayed graphs perform the following steps 1 In the text boxes labeled and Graph2 enter the numbers of the graphs for which you want to compute a scalar product 2 Click on the button labeled Compute This will result in the computation of the scalar product integral over the interval shown on screen The result which is a trapezoidal rule approximation of the exact integral is displayed in the text box below the Compute button Histogram To compute a histogram of a displayed graph s values perform the following steps 1 In the text box labeled Graph type the number of the graph for which you want to compute a histogram 2 From the list labeled Quantization select the number of levels divisions of the range of values to be used for computing the histogram 3 If zero levels are to be included this is known as uniform scalar quantization then check the box labeled Include zero values If this box is not checked then the method is known as dead zone quantization If a si
53. If there is more than one graph a dialog box appears on the right of the window and you specify which graph you want to copy by entering its number in the text box labeled Graph and then clicking on the button labeled Copy 2 12 THE POPUP MENU FOR 1D FORMS 43 2 12 12 Paste graph After a graph has been copied as described in the previous item then this choice is used for pasting it graphing it into a 1D window The graph can be pasted as many times as you wish as long as another graph is not copied in the meantime Note If you choose to paste a graph on a screen that is already occupied by a graph that uses a different number of points then a new window is opened and the graph is pasted into the new window 2 12 13 Remove graph This choice is used to remove a graph from the screen If there is only one graph displayed then it is immediately removed If there is more than one graph then a dialog box opens on the right of the screen and you enter the number of the graph that you want to remove in the text box labeled Graph and then click the button labeled Remove Warning Once the graph has been removed it cannot be restored of its data is lost unless you have saved it 2 12 14 Copy graph to clipboard This procedure is used to copy graph data for use in other programs If there is only one graph on screen then the data for this graph is immediately copied into memory from which it can then be pasted onto a 1D form If ther
54. User Manual for FAWAV James S Walker Department of Mathematics University of Wisconsin Eau Claire Eau Claire WI 54702 4004 E mail walkerjs uwec edu Web page http www uwec edu walkerjs Contents 1 Introduction 9 1 1 Componentsof FAWAV jugos 0 X PUERO Rug oe EOD RR Ree E PUE E RA 9 2 Processing 1D Signals 1D form 11 2 1 1 12 2 11 Plotting a formula e ptos UR RS ee EORR SR e e he A CS 12 2 1 2 Formulasforl dimensionadlgraphns 13 2 1 3 Functions supported dd goes oe Rb E SS eue p us 13 2 14 Piecewise functions s o ou oe RUE be Roue RA RR 17 2 15 Graph Operations x ere RE Ce ue pe RUN Aly oe HEINE Rx Oo 17 2 1 6 SUMS re fo Se ete as aries eere xat ad doe e ee Roe Dru Reap d ee ev eere A 17 2 17 Products use RS RR OU x RR m EO Ro oe 18 DRS gt MEO RIC en teg eR in Bod out mede s rd den Wet eol d ds 18 21 9 Inequ lities 4 ome SEX WIE EY xe dE RAE REA NU a 18 2 1 10 Command strings Sb Ae eee A we eh alee opor Rob 18 2 1 11 Loading an audio 16 ee EIE 19 2 1 12 Loading external binary files e 19 2 2 Wavelet transforms i nuce
55. User filter if you entered 0 5 0 5 as the function Energy percentage This filter selects the least number of the highest magnitude Fourier coefficients whose total energy is equal or larger than the percentage of the energy of all the coefficients You will be required to specify this percentage which is a number between 0 and 1 For example if you specify a percentage of 0 99 then the coefficients that are used will have a total energy that is at least 99 of the energy of all the coefficients These will be the least number of coefficients needed because they are of the highest magnitude Highest magnitude This filter selects a specified number of the highest magnitude coefficients for creating the partial sum You specify this number in the text box labeled Harmonics For example if you specify 10 harmonics then the largest 20 or 21 coefficients in magnitude will be used for forming the partial sum Note Because Fourier series are formed from sums of complex exponentials the number of coefficients 1s twice as many as the number of harmonics plus one more coefficient if the constant coefficient is included For Fourier cosine series it will be the largest 10 or 11 coefficients depending on whether the constant term is included while for Fourier sine series it will be the largest 10 coefficients Threshold This filter selects those coefficients whose magnitudes are above a threshold that you specify all
56. a Real Im b Amp Ph and c Power sp We now describe these three Output types a Real Im This output type produces the real and imaginary parts of the DFT of the signal b Amp Ph This output type produces the amplitude and phase of the DFT of the signal The amplitude values are the magnitudes of the complex values of the DFT while the phase values are the angle values in radians of these complex numbers in the plane c Power sp This output type produces a discrete version of the power spectrum of a signal The values of the power spectrum of a signal are the squares of the magnitudes of the complex values of the Fourier transform of the signal For a discrete signal the Fourier transform consists of the DFT of the discrete signal Power spectra are used for describing the global energy of each frequency in a signal At least insofar as a DFT can accurately capture the contribution of that frequency to the signal Choose which exponent type to use The two exponent types are and If you select then discrete sampled versions of the exponentials e 27 are used for computing transforms On the other hand if you select then discrete sampled versions of the exponentials e 7 are used for computing transforms These two types are inverse to each other by Fourier transforming with one exponent type and then Fourier transforming the result with the other exponent type you return to the original data Choo
57. a formula like the following rang x noiseterms 400 In this case N is set equal to 400 You must specify a value for N between 1 and 30000 6 rect The rectangle function rect is defined by 1 if x lt 0 5 rect x 4 0 5 if x 0 5 0 if x gt 0 5 For example to create a function equal to 1 over the rectangle a b x c d and equal to 0 outside that rectangle you enter the formula 64 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM rect x u w rect y v t u atb 2 w b a v ctd 2 t z c Notice that in this formula the parameter z is used instead of d That is because the allowed parameters in 2D are w Z 7 sinc The sinc function sinc is defined by sin 7x 2 for x not equal to zero If x 0 then sinc 0 1 5 1 4 Graph operations If you have drawn the graph of at least one function on the screen then you can assign values from these function s using the graph variables 91 92 93 and g4 For example suppose 3 graphs are displayed on screen Then the following formula 2gl 4g3 assigns twice the values of graph 1 minus four times the values of graph 3 to the plotted function Warning Do NOT use a graphical function with a higher index than the number of displayed graphs Also FAWAV does not support graph variables beyond g4 Notice also that unlike in 1D the graph variables do NOT accept argu ments in 2D For instance if you enter g
58. a such as CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM sumk x k fac k k 0 8 is allowed and returns a partial sum of the Taylor series for e at x 0 ran The random number function ran gives a value that is a random number between 1 and 1 with a mean value of 0 Random values are assigned no matter what the argument of ran is For instance the formula 0 will not produce a constant function It will produce randomly varying function with values between 1 and 1 The values of these random numbers are approximately uniformly distributed i e the values of ran are approximately the values of a random variable with uniform probability density rang The random number function rang gives values that are approximately distributed like that of a Gaussian random variable Random values are assigned no matter what the argument of rang is For instance the formula rang 0 will not produce a constant function It will produce a randomly varying function The function rang is used to create an approximation of random noise with a Gaussian normal probability This type of random noise is called Gaussian white noise The function rang is produced by adding N repetitions of ran and dividing by the square root of N This number N is 144 by default To change the number NN of terms enter a formula like the following rang noiseterms 400 In this case is set equal
59. alues of the autocorrelation by the length of the interval over which the displayed graph is plotted then click on the checkbox labeled Divide by interval length 3 If you want to divide the values of the autocorrelation by the energy of the displayed signal then click on the checkbox labeled Normalize 4 Click on the button labeled Plot This will produce the autocorrelation 2 9 4 Examples Several examples of the use of convolution and correlation are given in the two references A Primer on Wavelets and their Scientific Applications and Fast Fourier Transforms 2nd Edition 5To be precise cyclic convolution For more of the mathematical theory see the treatment of convolution in Fast Fourier Transforms 2nd Edition 2 10 SPECTROGRAMS AND SCALOGRAMS SEE CHAPTERS 3 AND 4 33 2 10 Spectrograms and Scalograms see Chapters 3 and 4 On the Analysis menu there are two choices for time frequency analysis of 1D signals Spectrogram and Scalogram These two choices play such important roles in the field of time frequency analysis that they deserve their own separate chapters We discuss Spectrograms in Chapter 3 beginning on p 45 and we discuss Scalograms in Chapter 4 beginning on p 53 2 41 Menu Items for 1D Form There are 9 menu items on a 1D form File Edit View Graph Series Transforms Convolve Analysis Help We now describe the contents of each of these 9 items 2 41 1 File The File menu contains 13 items which we
60. ample if the graph of 2x 4 is plotted over the interval 0 5 0 5 using 1024 points and this procedure is invoked then we get the following printout aximum 5 inimum 3 ean 4 Variance 334310531616211 Std 578195928398161 Energy 16742 333984375 Number of samples 1025 Theoretical Dim 984 264463088354 2 11 MENU ITEMS FOR 1D FORM 37 Most of these values are elementary statistical measures The Energy is the sum of the squares of the values of the sig nal The Number of samples is 1 more than the number of points because FAWAV always graphs a right endpoint in addition to a left endpoint The Theoretical Dimis a quantity related to the ability to do a wavelet compression of the signal for more details see the book Wavelet Analysis From Theory to Software by M V Wickerhauser AK Peters 1994 Norm difference This choice allows you to compute various measures of the global difference between functions typically used to express the amount of error of one graph as approximant to another graph To compute the norm difference between two displayed graphs perform the following 4 steps 1 In the text boxes labeled Graph and Graph2 enter the numbers for the two graphs whose norm difference you want to compute 2 Select the Norm type There are two kinds Sup norm and Power norm More details about these choices will be given below 3 Select whether the norm is to be Absolute or Relative
61. aphl1 That is the norm difference is relative to the norm of Graph 1 We discuss norms in the next subsection Norm A Norm of a graph is a numerical measure of its magnitude we discuss this further below To compute the norm of a displayed graph perform the following 4 steps 1 In the text box labeled Graph enter the number for the graph whose norm you want to compute 2 Select the Norm type There are two kinds Sup norm and Power norm More details about these choices will be given below 3 Select whether the norm is to be Absolute or Relative 4 Click on the button labeled Compute The norm will be computed and the result will be given in the text box below the Compute button 38 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Note Norms are computed over the interval shown on screen This may represent a subinterval of the full interval over which the graph is defined if you have changed the display interval Definitions of various norms We now describe the various norms that can be computed First assume that Absolute norms are computed If a Sup norm is chosen then the maximum absolute value of all the specified graph s values is found over the interval on which the graph is displayed and this maximum is the Sup norm If a Power norm is selected then the power to be used must be specified in the text box labeled Power The power p must be a number greater than or equal to 1 The power norm is computed by forming a Ri
62. ata should then be graphed There is a second way to load data we recommend the first method but if you are a very experienced programmer you could use this second method You right click on the graph box on the left side of the window and then select Load Graph From the dialog box that appears you then select a file of binary data to load If you want to load data of your own not previously saved from within FAWAV then the data file must have the following format It must end with the extension fb1 and consist of 8 byte double precision numbers except for the number of points which is a 4 byte integer The first number specifies the number of points The number of points must be one of the following 10 numbers 64 128 256 1024 2048 4096 8192 16384 32768 65536 The number of points is saved as 4 byte integer sometimes referred to as a long integer The next two numbers are the left and right endpoints of the interval over which the data are to be plotted There are two acceptable formats for these two numbers either 0 and L or L and L For example the endpoints should be 0 and then 10 when the interval is 0 10 or they should be 5 and then 5 when the interval is 5 5 These two endpoints are specified as 8 byte double precision numbers After the endpoints the time increment is specified as an 8 byte double precision number 2 2 WAVELET TRANSFORMS 21 This time increment is equal to the length of the interval divid
63. ate specifies how many volume levels are played per second by the computer audio system 6 Specify a Volume level The volume level is the factor by which the resulting sound is multiplied For example if you specify a volume level of 2 then the sound will play two times louder than if you specify a volume level of 1 Warning Be careful with volume levels if you change from 16 bits to 8 bits graph that plays moderately at 16 bits will play exceedingly loudly most values at highest magnitude volume levels when played at 8 bits Conversely a graph that plays loudly at 8 bits will be hardly audible if not completely inaudible at 16 bits 7 Click on the button labeled Play 2 9 Convolutions and Correlations FAWAV performs three types of discrete convolution operations These are 1 convolution 2 pair correlation 3 auto correlation We now describe each of these 3 types 4Using an older command window DOS version of FAWAV called FAS 32 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 2 9 4 Convolution To perform a convolution of two displayed graphs perform the following 3 steps 1 Enter the numbers for the displayed graph in the text boxes labeled Graph 1 and Graph 2 2 If you wantto divide the values of the convolution by the length of the interval over which the displayed graphs are plotted then click on the checkbox labeled Divide by interval length Warning If the two signals are defined over different intervals th
64. ave graphed more than one formula then by clicking on this button you can recall previously entered formulas 5 1 GRAPHING FORMULAS AND EXTERNAL DATA 61 Next formula If you have clicked on the Previous button one or more times then you can go forward in the list of formulas by clicking on this button If you have not clicked the Previous button then clicking this button will clear the text box completely and you can enter a new formula Load Click on this button in order to retrieve a formula that you previously saved Save Click on this button in order to save the formula that is presently displayed in the text box Help Click on this button in order to get help on creating formulas 5 1 2 Formulas for 2 dimensional graphs Formulas for graphing are constructed using pre defined functions as well as various logical operations or sums or products In Sections 5 1 3 through 5 1 9 we discuss all of the operations that can be employed in graphing formulas These operations are mostly the same as for 1D formulas with the exception of graph variables and that y is NOT a parameter in 2D but we list them here again for the convenience of the reader 5 1 3 Functions supported There are a number of pre defined functions We list them here in two categories 1 the elementary functions of the kind encountered in calculus and 2 certain special functions of a miscellaneous nature Elementary functions FAWAV employs 11 elementary functio
65. cients with indices m and n by the following convergence factor 5 5cos mmr M 5 5cos na N where M is the row harmonic limit and is the column harmonic limit 5 8 CONVOLUTIONS AND CORRELATIONS 71 5 8 Convolutions and Correlations FAWAV performs three types of discrete convolution operations These are 1 2 3 convolution pair correlation auto correlation We now describe each of these 3 types 5 8 1 Convolution To perform a convolution of two displayed graphs perform the following 3 steps 1 3 Enter the numbers for the displayed graph in the text boxes labeled Graph 1 and 2 If you want to divide the values of the convolution by the area of the square over which the displayed graphs are plotted then click on the checkbox labeled Divide by area Warning If the two signals are defined over different squares then FAWAV will divide by the area of the square for the second function This is confusing and is avoided by restricting to convolutions of functions defined over a common square when selecting Divide by area Click on the button labeled Plot This will produce the convolution 5 8 2 Pair correlation To perform a pair correlation also known simply as correlation of two displayed graphs perform the following 4 steps 1 2 4 Enter the numbers for the displayed graph in the text boxes labeled Graph 1 and Graph 2 If you want to divide the values of the convol
66. click the Apply button values of the scalogram whose magnitudes are less than this value are set equal to zero and the new scalogram is displayed If you are not satisfied with the results you can restore the original scalogram by selecting Restore from the Graph menu Invert This selection inverts the scalogram See Section 4 3 on p 54 Restore This selection restores the original scalogram It is usually invoked after a modification which did not produce the desired results 4 8 4 Help This item typically has two choices There is a general choice Help scalogram which you choose to get the general help for the scalogram form When a dialog box is open on the right side of the screen there will be a second choice specifically designed to access the desired topic in the help file a form of interactive help 58 CHAPTER 4 SCALOGRAMS CONTINUOUS WAVELET TRANSFORMS 4 9 The Popup menu for scalograms If you right click on the graph area on the left of a scalogram form then a popup menu will appear with 9 items We now discuss each of these items 4 9 1 Print This selection is used for printing the scalogram See Section 4 5 on p 55 4 9 2 Plot graph This selection is the same as Graph Plot See Section 4 2 on p 54 4 9 3 Threshold This selection is the same as Graph Threshold See Section 4 2 on p 54 4 9 4 Invert This selection is the same as Graph Invert See Section 4 3 on p 54 4 9 5 Restore T
67. ct the type of wavelet you want to use The choices are Coif Daub Haar and a selection of biorthogonal wavelets If you select Coif or Daub then you must also enter the appropriate number at the left of the wavelet type By resting the mouse pointer on the text box next to the wavelet type a message should appear which tells you the allowed numbers 6 Click on the button labeled Plot This will produce the wavelet transform 2 3 Wavelet series A wavelet series of a displayed graph can be calculated by performing the following steps 1 Choose Series Wavelet from the menu 2 In the text box labeled Graph enter the number of the graph that you want to compute a series for 3 In the text box labeled Levels enter the number of levels to use for the series By resting the mouse pointer on this text box a message should appear which tells you the allowed number of levels 22 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 4 Select the type of wavelet you want to use The choices are Coif Daub Haar and a selection of biorthogonal wavelets If you select Coif or Daub then you must also enter the appropriate number at the left of the wavelet type By resting the mouse pointer on the text box next to the wavelet type a message should appear which tells you the allowed numbers Specify the series type There are four choices e Threshold e Highest mag coefficients e Energy fraction e Ascending terms We will discuss these choic
68. d of interpolation belongs to a type known as Deslauriers Dubuc It is described in more detail in A Wavelet Tour of Signal Processing by Stephane Mallat Academic Press 1999 With this interpolation the new function equals the original at the old data points and has new values at midpoints obtained via an inverse wavelet transform producing a better approximation to a continuous function than with Haar interpolation 2 11 5 Series The series that are available with this menu item fall into two categories 1 Fourier Sine and Cosine 2 Wavelet Wavelet Packet The three choices in the first category are described in detail in Section 2 7 beginning on p 27 And the two choices in the second category are described in detail in Section 2 3 on p 21 and Section 2 5 on p 23 2 11 6 Transforms The transforms that are available with this menu fall into two categories 1 Fourier see Section 2 6 on p 23 Sine see Section 2 6 3 on p 26 and Cosine see Section 2 6 4 on p 26 2 Wavelet see Section 2 2 on p 21 and Wavelet Packet see Section 2 4 on p 23 2 11 7 Convolve The three choices on the Convolve menu are described in detail in Section 2 9 on p 31 2 11 8 Analysis The Analysis menu contains 14 items We describe these items in the 14 subsections that follow Statistics This choice produces a printout on the right of the window of various statistics summarizing the data consisting of a signal s values For ex
69. dow 2 4 WAVELET PACKET TRANSFORM 23 2 Highest mag coefficients This method is used when it is known in advance how many terms will be needed To select this option just click on the label Highest mag coefficients and then enter the number of coefficients de sired The series will use only that many terms whose coefficients are the specified number of highest magnitude For example if you enter 16 then the 16 highest magnitude coefficients will be used and all other coefficients will be set to 0 By resting the mouse pointer on the text box for the number of coefficients a message should appear which specifies the range of allowed numbers 3 Energy fraction This method involves specifying a target fraction of the total energy of the signal A series is then formed from the smallest number of highest magnitude coefficients whose energy sum of their squares is at least as large as this target fraction For example if you enter 0 99 as the fraction then the series will use the smallest number of coefficients needed to capture 9996 of the energy of the signal To select this option just click on the label Energy fraction and then enter the desired energy fraction By resting the mouse pointer on the text box for the energy fraction a message should appear which specifies the range of allowed fractions 4 Ascending terms This method is most useful for generating averaged signals The series is formed using the first M values of
70. e following 4 steps 1 After plotting your signal select Transforms cosine from the menu 2 In the text box labeled Graph enter the number of the graph that you want to transform 3 Select a Filter type The four choices of Filter type are the following i Blackman filter This filter multiplies the signal values f k by 0 42 0 5 cos 2 k N 2 m N 0 08 cos 4 k N 2 m N for k 0 N The symbol N denotes the number of points ii Gauss filter This filter multiplies the signal values f k by the factors e 45B N 2 NP for k 0 N The symbol N denotes the number of points iii Hamming filter This filter multiplies the signal values by the factors 0 54 0 46 cos 2 k N 2 N for k 0 N The symbol N denotes the number of points iv Hanning filter This filter multiplies the signal values f k by the factors 0 5 0 5 cos 2 k N 2 N for k 0 N The symbol N denotes the number of points There is also a default choice of None which performs no filtering of the Fourier cosine transform 4 Click on the button labeled Plot This will produce the Fourier cosine transform 2 6 4 Fourier sine transform A Fourier sine transform can be calculated by performing the following 4 steps 1 After plotting your signal select Transforms sine from the menu 2 In the text box labeled Graph enter the number of the graph that you want to transform 3 Select a Filter type The four choices of Filt
71. e for recording sounds Fortunately however there is a good program for recording sound files on your computer It is called Sound Recorder and it can be found in Programs Accessories Multimedia from the Start button s menu You can also use the free audio editor AUDACITY to do the recording You can use Sound Recorder to record mono sound files that you can then load into Audio Editor Do not record stereo sound files for loading into Audio Editor Audio Editor only works with mono sound files 6 5 Menu Items for Audio Editor There are 4 menu items on the Audio Editor form File Edit View Help We now describe the contents of each of these 4 items 6 5 MENU ITEMS FOR AUDIO EDITOR 87 6 5 1 File The File menu contains 9 items which we now examine 1 New 1Dim Selecting this item will open a new 1D form see Chapter 2 beginning on p 11 Each 1D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 2 New 2Dim Selecting this item will open a new 2D form see Chapter 5 beginning on p 59 Each 2D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 3 New Audio Editor Selecting this item will open a new Audio Editor window Each Audio Editor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 4 New Image Processor Selecting this item will open a new Image Proce
72. e hyperbolic sine of its arguments By definition sinh x satisfies sinh x exp x exp x 2 The positive square root function sqr computes the positive square root of its argument For exam ple sqr 4 2andsqr 9 3 Alsosqr 0 0 The square roots of negative numbers are not real so in FAWAV applying the sqr function to a negative number produces an error message tan The tangent function is invoked using tan For example tan 3x 6y tan 5x 6 x 2y 9 are both valid formulas involving the tangent function Special functions FAWAV employs 7 special functions which we shall now describe 1 bell The function bell is defined as follows If x gt 0 75 then 11 x 0 If x lt 0 25 then bell x 1 Finally if 0 25 lt x lt 0 75 then bell bell x that is the bell function is even and we have for 0 25 lt x lt 0 75 that be11 x is defined by 11 sin aw sin aw a 0 5pi w sin av sin av v sin au sin au u 1 5 2x 5 1 GRAPHING FORMULAS AND EXTERNAL DATA 63 More discussion of the be11 function is given in the 1D chapter see Section 2 1 3 on p 15 2 del The discrete delta function del is defined as follows 0 if x gt 0 del x 1 0 In other words del x isOifx lt Oorx gt 0 1 0 equals 1 3 fac The factorial function fac returns the factorial of a non negative int
73. e is more than one graph then you specify which graph you want to copy by typing in its number in the textbox labeled Graph and then clicking on the button labeled Copy This procedure is included for exporting FAWAV function data to other programs such as EXCEL using the WIN DOWS clipboard If you are just copying and pasting within FAWAV then we recommend that you use the Copy graph method described above 2 12 15 Paste graph from clipboard After a graph has been copied to the clipboard as described above in Copy graph to clipboard then it can be pasted into any 1D form by right clicking on the graphbox and selecting this procedure The graph can be pasted as many times as you wish as long as other data is not copied to the Clipboard in the meantime Note If you choose to paste a graph on a screen that is already occupied by a graph that uses a different number of points then a new window is opened and the graph is pasted into the new window This procedure is mainly included for the purpose of importing external data from programs such as EXCEL or NOTEPAD If you are just copying and pasting within FAWAV then we recommend that you use the methods Copy graph and Paste graph described above 2 12 16 Display cursor coordinates You select this choice in order to provide a readout of coordinates in the graph area Its default setting is off and it is listed without a checkmark v When you select it that setting changes to on and this ch
74. e kt and k coeffi cients by the following factor cos W T kr L where L is the right endpoint of the chosen interval W and are the wave constant and time constant which you are required to input These constants must be non negative For Fourier sine and cosine series this convergence factor multiplies coefficient FresSin The Fresnel sine filter modifies a Fourier series partial sum by multiplying the k and k coefficients by the following factor sin W T kr L where L is the right endpoint of the chosen interval W and 7 are the wave constant and time constant which you are required to input These constants must be non negative For Fourier sine and cosine series this convergence factor multiplies the k coefficient Hamming The Hamming filter modifies a Fourier series partial sum by multiplying the and k coefficients by the following convergence factor 0 54 0 46 cos kn N where NV is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies kt coefficient Hanning The Hanning filter modifies a Fourier series partial sum by multiplying the and K coefficients by the following convergence factor 0 5 0 5 N where NV is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies kt coefficient Heat The Heat filter mod
75. e now discuss each of these topics 3 1 Computing the spectrogram This procedure which can be invoked by selecting Graph Spectrogram from the Spectrogram menu is used to perform a calculation of a spectrogram of the signal displayed at the bottom of the window You perform the following 4 steps 1 In the text box labeled Window length enter the length of the sliding window of data to be transformed You must enter a power of two either 16 32 64 128 256 512 or 1024 In the text box labeled Step size enter the number of values by which the sliding window is shifted for each successive transform This value must be at least 1 and no larger than the window length Warning A bad choice of Window length and Step size will produce a spectrogram that is incomplete This usually occurs when either of these values are too small If this happens then select Help Initialize 45 46 CHAPTER 3 SPECTROGRAMS GABOR TRANSFORMS 3 Choose a Filter from the given list The filters that can be selected are Blackman Gauss Hamming hanning and Boxcar Here are descriptions of each of these choices Blackman This choice called a Blackman window modifies the data within a window of length N by multiplying the signal values from 0 to N by the window function 0 42 0 5 cos km N 0 08 cos 2km N Blackman windowing reduces the leakage or smearing effect that arises from approximating continuous frequenc
76. ea Arrange windows This choice will perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the FAWAV workspace so that you can select which window to be the active one The presently active one is marked with a checkmark 5 11 4 Graph The Graph menu contains 8 items which we now describe 1 Plot This item opens up the plotting dialog box on the right of the window See Section 5 1 beginning on p 60 for further discussion There is also online help available by selecting Help for Graphing from the Help menu when the plotting dialog box is displayed Denoise Wavelet This procedure allows for several types of wavelet based denoisings See Section 5 10 on 74 for more details Median denoise This procedure denoises a signal using a by median filter See Section 5 10 on p 76 for more details Adaptive median denoise This procedure denoises a signal using a 3 by 3 adaptive median filter See Sec tion 5 10 on p 76 for more details Quantize 8 bit This procedure rounds graph values to integers between 0 and 255 It can be used for producing 8 bit gray scale images Down sample This procedure creates a new graph from the graph that you specify by using only its even indexed values A new window appears that contains the graph of this down sampled graph Note t
77. earance of the scalogram See Section 4 4 on 55 Printing the scalogram See Section 4 5 on p 55 Saving the scalogram See Section 4 6 on p 56 ON tA Recording information See Section 4 7 on p 56 8 Scalogram menu items See Section 4 8 on p 56 We now discuss each of these topics 4 1 Computing the scalogram This procedure which is normally invoked by selecting Graph Scalogram from the menu is used to perform a calcu lation of a scalogram of the signal displayed at the bottom of the window You perform the following 6 steps 1 In the text box labeled Octaves enter the number of octaves This should be a positive integer from 1 to 256 Normally this number should be no greater than 8 or 10 2 In the text box labeled Voices enter the number of voices This is a positive integer The product of the number of voices times the number of octaves is restricted to be no greater than 256 3 From the text box labeled Wavelet choose the analyzing wavelet to be used 53 54 CHAPTER 4 SCALOGRAMS CONTINUOUS WAVELET TRANSFORMS 4 In the text box labeled Width enter the width to be used for the wavelet This should be a positive number typically no greater than half the length of the interval over which the signal is displayed The shorter the width the more the energy of the wavelets are concentrated within smaller regions The width determines the constant of proportionality c that relates the reciprocal scale values
78. ed by the number of points For example if the interval is 5 5 and 1024 points are used then the time increment would be 0 009765625 After the time increment the remainder of the data are the values of the signal all 8 byte double precision numbers There should be one more value than the number of points listed above For example if 1024 points are specified then there should be 1025 values specified Here is a sample format for an fb1 file 2 578 The first four numbers specify 128 points over an interval of 0 4 with a time increment of 0 03125 The remaining numbers are the signal values Note again that in this example there should be 129 values following the right endpoint of 4 not 128 This quirky requirement of the 51 format is necessary because of the way FAWAV plots functions and computes Fourier series and Fourier transforms 2 2 Wavelet transforms A wavelet transform of a displayed graph can be calculated by performing the following steps 1 You select Transforms Wavelet 2 In the text box labeled Graph enter the number of the graph that you want to transform 3 In the text box labeled Levels enter the number of levels to use for the transform By resting the mouse pointer on this text box a message should appear which tells you the allowed number of levels 4 If you want to compute an inverse transform then check the checkbox labeled Inverse Otherwise make sure this checkbox is not checked 5 Sele
79. ed for displaying this new data 5 6 4 Examples Examples illustrating many of these aspects of computing Fourier transforms can be found in Chapters 5 and 6 of the book James S Walker Fast Fourier Transforms 2nd Edition CRC Press 1996 which we refer to as Fast Fourier Transforms 2nd Edition Using an older command window DOS version of FAWAV called FAS 5 7 FOURIER SERIES 69 5 7 Fourier series FAWAV allows you to calculate partial sums of Fourier series for 2D data A 2D Fourier series period in each variable has the form T xs 5 where are the Fourier coefficients A Fourier series partial sum can be calculated by performing the following steps 1 In the textbox labeled Graph enter the number of the graph for which you want to compute a Fourier series partial sum 2 In the box labeled Sum type choose which sum type you want to use either Spherical or rectangular If you select Spherical then in the textbox labeled Harmonic limit enter the number of harmonics you want to use The tooltip for this textbox will tell you the allowed range of harmonic limits If you specify say 15 as the harmonic limit then all Fourier series coefficients Cm with indices m and n satisfying n m lt 15 will be used in forming the Fourier series partial sum If you select Rectangular then in the textboxes labeled Row and Col type in the number of harmonics you want to use The tooltip for these textboxes wil
80. ed in the text box labeled Power The power p must be a number greater than or equal to 1 The power norm difference is computed by forming a Riemann sum approximation to the integral of the power p of the absolute value of the differences between the two graphs over the region for which the graph is displayed and then taking the root of the result Note If you checked the box labeled Normalized then before the root is taken the approximate integral is divided by the area of the region on screen If Relative norm differences are computed then the absolute norm differences described above are divided by the norm of the graph specified as Graph1 That is the norm difference is relative to the norm of Graph 1 We discuss norms in the next subsection SNR If you choose SNR then the following error measure is computed ij 2 2 45 4j where f is the graph you have specified as Graph 1 and g is the graph you have specified as Graph 2 and the sums are over all pixels determined by the region displayed for Graph 1 this allows you to compare zooms of the two graphs provided you perform the identical zooms SNR 10 logy PSNR If you choose PSNR then the following error measure is computed 255 1 p fu 913 ij PSNR 10106 where f is the graph you have specified as Graph 1 and g is the graph you have specified as Graph 2 and the sums are over all pixels determined by the region displayed for Graph
81. ed the ROI selection then a specified fraction of the target bit budget a target bit rate is then your only option will be allocated to encoding the zoomed area of the image whichever image you select to save in compressed form Once you have specified all this information for creating a wc2 compressed file you then click the Apply button and return to the 2D form At that point you then right click on the image you want to save and choose the wc2 format option in the Save dialog box that appears 5 10 Image Denoising There are three options for image denoising The first option is Denoise wavelet which is used for removing random Gaussian noise from an image the most common type of noise The second option is Denoise median which is used for removing isolated overflow and underflow noise where the image acquisition device has registered 0 or 255 at various isolated positions in the image sometimes referred to as salt and pepper noise The third option is Denoise adaptive median is a second method for removing salt and pepper noise Denoise wavelet This procedure implements the various wavelet based denoising methods described in the following papers 1 D Donoho and I Johnstone Ideal spatial adaptation via wavelet shrinkage Biometrika 81 425 455 Dec 1994 2 Coifman and D Donoho Translation invariant denoising Technical Report 475 Dept of Statistics Stanford Univer sity May 1995 3 J S
82. ee below the parameter y can also be used 2 Limits for a sum The following formula shows how a command string is used for specifying the limits for a sum 1 2 sumk cos kx k 4 7 Here the sum is from k 4 to k 7 3 Differential equation mode A command string can be used to tell FAWAV to solve certain types of differential equations For example the differential equation 4cos 2x 0 3 can be solved over the interval 0 20 in the following way First select Graphs Plot and then specify an interval of type 0 L with L 20 Then enter the following formula xy 4cos 2x DiffNy 3 The command string Diff tells FAWAV that the formula requires the numerical solution of a differential equa tion and the command string 3 says to use the initial value of y 0 3 FAWAV uses the classic Runge Kutta order 4 method for approximating solutions You can also plot approximations to solutions of higher order differential equations You use the variable y 1 for the first derivative y and y2 for and so on For example graphing the following y Diff Ord 2 y 1 y1 0 over the interval 0 10 approximates the solution of y y with initial conditions y 0 1 and y 0 0 You can approximate a differential equation up to order 10 2 1 11 Loading an audio file FAWAV supports the loading and playing of mono wav files To load wav audio file just click on the grap
83. eger between 0 and 70 For example fac 5 120 If the argument of fac is not an integer then an error message is returned A formula such as sumk x k fac k k 0 8 is allowed and returns a partial sum of the Taylor series for e at x 0 4 ran The random number function ran gives a value that is a random number between 1 and 1 with a mean value of 0 Random values are assigned no matter what the argument of ran is For instance the formula 0 will not produce a constant function It will produce randomly varying function with values between 1 and 1 The values of these random numbers are approximately uniformly distributed i e the values of ran are approximately the values of a random variable with uniform probability density 5 rang The random number function rang gives values that are approximately distributed like that of a Gaussian random variable Random values are assigned no matter what the argument of rang is For instance the formula rang 0 will not produce a constant function It will produce a randomly varying function The function rang is used to create an approximation of random noise with a Gaussian normal probability This type of random noise is called Gaussian white noise The function rang is produced by adding N repetitions of ran and dividing by the square root of This number N is 144 by default To change the number of terms enter
84. elow in Section 2 7 1 Check or uncheck the checkbox labeled Periodic endpoint averaged If you check it then the last signal value is set equal to the first signal value when computing DFTs i e a trapezoidal rule is used for approximating Fourier series coefficients This is done when the discrete Fourier series is computed as an approximation to a Fourier series for an analog signal 6 Click on the button labeled Plot This will produce the Fourier series partial sum 2 7 1 Filtering of Fourier series In this section we describe each of the 19 filtering methods for Fourier series 1 Blackman The Blackman filter modifies a Fourier series partial sum by multiplying the and k coeffi cients by the following convergence factor 0 42 0 5 0 08 cos 2km N where NV is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies kt coefficient Cesaro The Cesaro filter modifies a Fourier series partial sum by multiplying the kt and coefficients by the following convergence factor 1 k N where NV is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies kt coefficient Cos The Cosine filter modifies a Fourier series partial sum by multiplying the kt and k coefficients by the following factor cos W T km L where L is the right endpoint of the ch
85. emann sum approximation to the integral of the power p of the absolute value of the graph over the interval on which the graph is displayed and then taking the pi root of the result Note If you checked the box labeled Normalized then before the root is taken the approximate integral is divided by the length of the interval screen Trace This procedure can be used for reading off the values of the displayed graphs As the function values are displayed on the right there are crosshairs drawn on the graphs on the left to indicate where these function values lie on each graph There are a couple ways to change the position of the crosshairs 1 You can click on the screen at a point on a graph whose coordinates you desire If you click with the left mouse button then the crosshairs will move to the position that you have clicked and the values will update on the right side of the screen If you click with the right mouse button then you will also have the option of zooming in on the point you have selected 2 You can also use the button bar on the bottom left of the window which has buttons labeled with the following symbols lt gt gt gt L R To see how these buttons work it is best to just try them a succinct description of their properties can also be found by simply resting the mouse on them and waiting for a short message to appear Calculator To perform a calculation with the calculator proceed as follow
86. en FAWAV will divide by the length of the interval for the second function This is confusing and is avoided by restricting to convolutions of functions defined over a common interval when selecting Divide by interval length 3 Click on the button labeled P ot This will produce the convolution 2 0 2 Pair correlation To perform a pair correlation also known simply as correlation of two displayed graphs perform the following 4 steps 1 Enter the numbers for the displayed graph in the text boxes labeled Graph 1 and Graph 2 2 If you want to divide the values of the correlation by the length of the interval over which the displayed graphs are plotted then click on the checkbox labeled Divide by interval length Warning If the two signals are defined over different intervals then FAWAV will divide by the length of the interval for the second function This is confusing and is avoided by restricting to correlations of functions defined over a common interval when selecting Divide by interval length 3 If you want to divide the values of the correlation by the energy of the Graph 1 signal then click on the checkbox labeled Normalize 4 Click on the button labeled Plot 2 9 3 Auto correlation To perform an autocorrelation on a displayed graph which is the pair correlation of a graph with itself perform the following 4 steps 1 Enter the number for the displayed graph in the text box labeled Graph 2 If you want to divide the v
87. er sine and cosine series this convergence factor multiplies the kt coefficient Riesz The Riesz filter modifies a Fourier series partial sum by multiplying the kt and coefficients by the following convergence factor 1 k N where N is the number of harmonics in the partial sum and p is called the damping power which you are required to input The damping power must be non negative For Fourier sine and cosine series this convergence factor multiplies kt coefficient Sinc The Sinc filter modifies a Fourier series partial sum by multiplying the k and k coefficients by the following factor T sinc W T k L where L is the right endpoint of the chosen interval W and T are the wave constant and time constant which you are required to input These constants must be non negative For Fourier sine and cosine series this convergence factor multiplies coefficient User The User filter modifies a Fourier series partial sum by multiplying the and coefficients by a factor The function f x is created by you and is assumed to be defined over the interval 0 1 The number N is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies kt coefficient For example the Cesaro filter could be implemented as a User filter if you entered x as the function Or the Hanning filter could be implemented as a
88. er type are the following i Blackman filter This filter multiplies the signal values f k by 0 42 0 5 cos 2 k N 2 m N 0 08 cos 4 k N 2 m N for k 0 N The symbol N denotes the number of points ii Gauss filter This filter multiplies the signal values f k by the factors e 45B 5 N 2 NY for k 0 N The symbol N denotes the number of points 2 7 FOURIER SERIES SINE SERIES amp COSINE SERIES 27 iii Hamming filter This filter multiplies the signal values by the factors 0 54 0 46 cos 2 k N 2 N for k 0 N The symbol N denotes the number of points iv Hanning filter This filter multiplies the signal values f k by the factors 0 5 0 5 cos 2 k N 2 N for k 0 N The symbol N denotes the number of points There is also a default choice of None which performs no filtering of the Fourier sine transform 4 Click on the button labeled Plot This will produce the Fourier sine transform 2 7 Fourier series sine series amp cosine series FAWAV allows you to calculate partial sums of Fourier series and Fourier cosine and Fourier sine series A partial sum of a Fourier series period has the form M Qhrx 2 Arcos Q By sin Q where co and Dj are the Fourier coefficients We say that M is the number of harmonics used in the partial sum Similarly a Fourier cosine series has the form Ay cos Ses k 1 and a F
89. es in Section 2 3 1 6 Click on the button labeled Plot This will produce the wavelet series 2 3 1 Series type There are 4 types of series 1 Threshold 2 Highest mag coefficients 3 Energy fraction 4 Ascending terms We now discuss each of these types 1 Threshold The threshold method 15 a commonly used method of handling wavelet coefficients This is for several reasons First there is the fact that for highly correlated data most of the wavelet coefficients will be near zero Consequently a high compression ratio can be obtained by choosing a proper threshold Second the method is very useful for removing various types of noise especially white noise which is the type of noise that gives the familiar static sound in audio transmissions To specify a threshold make sure that this option is selected by clicking on the label Threshold Then to modify the threshold s click on the button labeled Edit settings After selecting Edit settings there are two methods for defining a threshold Uniform and Multiple Here are descriptions of each of these two methods a Uniform Threshold This method involves specifying a threshold by typing in a value in the text box labeled Value You should enter an expression of the form 1 2 n where n is a positive integer For example 1 2 2 or 1 2 3 etc If the checkbox labeled Quantize is checked then a threshold of the form 1 2 n will produce an n 1 bit or n bit quantization of all wave
90. ese modes were various experiments in scanning through wavelet transform values for performing ASWDR see section 4 5 of A Primer on Wavelets and their Scientific Applications The default option which is shown is to use the method described in A Primer on Wavelets and their Scientific Applications which seems to work best on most images 6 To compress the saved transform press the Encode Transform button A dialog box will appear from which you can select your saved transform Information will be written in the textbox at the bottom of the form that describes the progress of the encoding including a final statement stating the file location of the encoded data 7 To decompress your compressed file you press the Decode transform button A dialog box will appear from which you select the file containing your compressed data When the decoding finishes a statement will be written in the textbox at the bottom of the form that indicates the file location containing the decompressed transform 8 To produce an image from the decompressed transform you return to the 2D form from which you began this process and select Load Graph from the popup menu activated by right clicking on a graph area You then load the decompressed transform from the last step and perform an inverse transform inverse to the transform used on the original image then perform an 8 bit quantization select Graph Quantize 8 bit image on the resulting image to produce the
91. exact integral is displayed in the text box below the Compute button Scalar product To compute a scalar product of two displayed graphs perform the following steps 1 In the text boxes labeled and Graph2 enter the numbers of the graphs for which you want to compute a scalar product 2 Click on the button labeled Compute This will result in the computation of the scalar product integral over the region shown on screen The result which is a trapezoidal rule approximation of the exact integral is displayed in the text box below the Compute button Filtering Filtering is performed typically this is done to a Fourier transform of some signal using the following 3 steps 1 Select the type of Data to be filtered There are two types Real or Complex If you select Real then you must enter the number of the graph for the real data in the text box labeled Graph If you select Complex then you must enter the numbers of the graphs for the real and imaginary parts of the complex data in the text boxes labeled Real and Imag 2 Select the type of Filter There are two types Real or Complex If you select Real then you must enter the number of the graph for the real filter in the text box labeled Graph If you select Complex then you must type in the numbers of the graphs for the real and imaginary parts of the complex filter in the text boxes labeled Real and Imag 3 To perform the filtering click on the button labeled Plot This
92. ge Compression Workshop Encoding ptions Levels 7 Lossy Lossless Rate Distortion Options Achieve compression rate Target bpp 10 25 Decode Transform Achieve PSNR Target value 34 Compression Techniques C Binary Source models Arithmetic O Order 1 0 Mixed Orders Scanning modes ZigZag C Dynamic Tree context predict C Static Tree Dynamic Tree Parent Child Figure 5 2 The window that opens when Image Compression Workshop is selected 74 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM Wavelet compression WC files Encoding Options Quality factor 70 Levels 7 Progressive 1 to 39 E Dau 77 E TIFF Rate Distortion Options Uncompressed CCITRLE COIT Group Fax Compression rate Target rate bpp 0 29 Grey scale C CCIT Group4FAX Pack Bits D C JPEG C Deflate PNG v ROI when image zoomed Interlaced Fraction of bits to ROI 09 Display compressed image Cancel Figure 5 3 The window that opens for changing image saving options target bit rate then you must specify the bits per point bpp value For example a bpp value of 0 25 specifies 32 1 compression of an 8 bpp gray scale image If the selection ROI is checked then you may not select the Distortion rate option By unchecking the ROI selection you can then choose to achieve a target PSNR rate for your compression If you have zoomed on a portion of an image and you have check
93. gn bit is to be included 1 both positive and negative values are quantized then check the box labeled Include sign bit If this box is not checked then only absolute values are quantized 4 perform the histogram calculation click on the button labeled Plot Note The histogram is performed relative to the largest magnitude of the graph s values over the interval displayed and using only displayed values so if you have zoomed in then just the region where you have displayed values is used for the histogram The abscissa values of the histogram are the graph maxima divided by 2 raised to the number of bits used For example if the histogram is a 6 bit histogram with sign bit then it will be graphed over 32 32 so the values 32 correspond to M where M is the maximum absolute value for the graph 40 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Energy graph This procedure produces a plot of the cumulative energy of the signal over its abscissa values You need to perform the following 3 steps 1 In the text box labeled Graph enter the number of the graph for which you want to produce an energy graph 2 If you want the energy plotted according to percentage of total energy then you check the box labeled Percentage If this box is not checked then the energy graph consists of a running total of the squares of the values of the graph that you specified in Step 1 If this box is checked then this running total is div
94. h area Its default setting is on and it is listed with a checkmark Vv When you select it that setting changes to off and the checkmark v is removed The readout is given of the x and y indices and the image value located at the tip of the mouse arrow Chapter 6 Audio Editor This form is used for simple processing of sound files preparing clips of them for analysis by the 1D form When it is selected the form shown in Figure 6 1 loads You can then perform the following tasks 1 Loading a sound file 2 Clipping a portion of a file 3 Analyzing a sound clip 4 Recording sounds which we now describe File Edit view Figure 6 1 The window that opens when New Audio editor is selected 85 86 CHAPTER 6 AUDIO EDITOR 6 1 Loading a sound file To load a wav file WINDOWS sound file choose File Open from the menu The present version of Audio Editor does not handle stereo sound So make sure you load a mono sound file If you are unsure about the nature of the file load the file with the Sound Recorder program found in Pro grams Accessories Multimedia on the Start button s menu You can then select the Properties item on the File menu of Sound Recorder If the file is classified as mono in its list of properties then you can safely load it into Audio Editor You can also use the free sound editor Audacity to convert a selected stereo track to a mono track and then save that mono track for loading into Sound Edi
95. h box on the left side of the window with the right mouse button Then select Load Sound file from the pop up menu A standard Open File dialog box will appear from which you can select a wav file for loading Note If the wav file that you choose to open is too large larger than 275 samples to load directly into the 7D Form the file will be loaded into the Audio editor that is part of FAWAV From this Audio editor you can select a portion of the audio file for analysis See Chapter 6 on p 85 for more details You can also load a sound file from the File menu using Open sound file wav but the method described above 15 preferable FAWAV only supports mono wav files Another common sound file format is mp3 To convert a mono mp3 file toa wav file use the AUDACITY program Load an mp3 file into AUDACITY and then select File Export as WAV to save to a wav file If the mp3 file is a stereo file then select one track in AUDACITY and remove the other track and then export the single track to a wav file 2 1 12 Loading external binary files There are two ways to load external data The easiest way which we recommend is to enter the data in a spreadsheet such as EXCEL or text editor such as NOTEPAD in the following format 20 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM number of points left endpoint right endpoint first function value second function value third function value last function va
96. hat you use the method described in Section 2 1 11 on p 19 instead Using that method will help you to become familiar with the Popup menu technique for 1D forms see Section 2 12 beginning on p 41 for a description of this Popup Menu Open Data File This item can be used for loading an fb1 data file into the 1D form It is recommended however that you use the method described in Section 2 1 12 on p 19 instead Using that method will help you to become familiar with the Popup menu technique for 1D forms see Section 2 12 beginning on p 41 fora description of this Popup Menu Save Form As Select this item in order to save all of your work in the 1D form to a file with extension w1 The saved form can be reloaded later by selecting Open form from the File menu Save Form When you have loaded a previously saved form and then made modifications to that form then this menu item becomes available for resaving the modified form using the same file name 34 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Save Graph This choice allows you to save one of the graphs in the 1D form to a file with extension fb1 Although this method can be used it is recommended that you right click on the graph area near the graph you want to save and then select Save graph Graph from the Popup menu that appears Save Sound File wav This choice allows you to save one of the graphs in the 1D form to a sound file with extension wav
97. he histogram 3 If zero levels are to be included this is known as uniform scalar quantization then check the box labeled Include zero values If this box is not checked then the method is known as dead zone quantization If a sign bit is to be included 1 both positive and negative values are quantized then check the box labeled Include sign bit If this box is not checked then only absolute values are quantized 4 To perform the histogram calculation click on the button labeled Plot Note The histogram is performed relative to the largest magnitude of the graph s values over the region displayed and using only displayed values so if you have zoomed in then just the region where you have displayed values is used for the histogram The abscissa values of the histogram are the graph maxima divided by 2 raised to the number of bits used For example if the histogram is a 6 bit histogram with sign bit then it will be graphed over 32 32 so the values 32 correspond to M where M is the maximum absolute value for the graph 5 12 5 Clip This procedure is used to clip a portion of a graph thereby creating a smaller size graph using less points To clip a portion of a graph isolate that portion on screen by zooming and then right click on the graph area and select Clip graph 5 12 6 Copy This procedure is used to copy the data from the graph that you right clicked on You can then use the Paste command to copy
98. his procedure is not available if the graph consists of only 64 by 64 points Interpolate This procedure creates a new graph from the graph that you specify by inserting a new values in between each of its values There are two ways that this can be done a Haar interpolation Haar interpolation inserts a new value at each midpoint by assigning the immediately preceding function value Thus producing a function which repeats values two at a time This is done for both row and columns Haar interpolation treats a given image as a trend subimage and sets all fluctuation values to 0 and then performs a 1 level inverse Haar transform b D D 4 2 Interpolate This method of interpolation belongs to a type known as Deslauriers Dubuc It is described in more detail in A Wavelet Tour of Signal Processing by Stephane Mallat Academic Press 1999 With this interpolation the new function equals the original at the old data points and has new values at midpoints obtained via an inverse wavelet transform producing a better approximation to a continuous function than with Haar interpolation 5 11 MENU ITEMS FOR 2D FORM 79 5 11 5 Series The series that are available with this menu item fall into two categories 1 Fourier 2 Wavelet Wavelet Packet The first category is described in detail in Section 5 7 beginning on p 69 And the two choices in the second category are described in detail in Section 5 3 on p 67 and Section 5 5 on p 68
99. his selection is the same as Graph Restore it restores the original scalogram It is usually invoked after a modification which did not produce the desired results 4 9 6 Display style This selection is the same as View Display style See Section 4 4 on p 55 4 9 7 Copy signal This selection will graph the signal displayed at the bottom of the window in a new 1D form 4 9 8 Vertical slice This selection which is available when the viewing of cursor coordinates has been activated via View View cursor co ordinates will graph the real and imaginary parts of the scalogram in a new 1D form at the time coordinate displayed when you right click on the scalogram 4 9 9 Horizontal slice This selection which is available when the viewing of cursor coordinates has been activated via View View cursor co ordinates will graph the real and imaginary parts of the scalogram in a new 1D form at the frequency coordinate displayed when you right click on the scalogram 5 Processing 2D Signals 2D form To work with 2D signals click on the File menu and then select New 2 Dim The window shown in Figure 5 1 appears A description of each of the 9 menu items will be given at the end of this chapter see Section 5 11 on p 76 But first we describe how to use this form for basic signal processing The procedures that are available for working with 2D signals include the following 1 Graphing formulas and external data You can
100. hoosing a threshold uncheck the Shrink option check the Refine option and check the Avg option Finally set the Depth and 76 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM Descent values to 0 In order to conserve memory and save time FAWAV does not implement the full cycle spin method which averages over all possible shifts of the image but only implements a finite number of shifts index shifts from x Kto K y K to K where K 1 2 4 or 8 specified by the options ID 2D 4D 8D respectively You specify a value of K when you check the Avg option As described above the values of K 2 or K 4 generally provide acceptable results Experiments with various images have shown that increasing to 8 provides only a slight improvement in denoising To implement the denoising method described in paper 3 called the TAWS algorithm you should check the Auto method of choosing a threshold check the Shrink method check the Refine option and specify non zero values for the Depth and Descent parameters Generally checking the Avg option produces better denoising at the cost of increased time But the TAWS method allows for the Avg option to be either checked or unchecked Generally a value of 1 2 or 3 for the Depth parameter and an equal or greater value for the Descent parameter no greater than the level number however produces the best results Denoise median This procedure denoises an image using a 3 by 3 median f
101. ided in every instance by the sum of all the squares the total energy producing a running percentage of total energy 3 Click on the button labeled P ot This will produce a display of the energy graph Sort magnitudes This procedure rearranges the values of a graph in decreasing order of their magnitudes ignoring signs If there is a tie then the values are left in their original order If there is just one graph displayed then its values are immediately sorted and the resulting graph is displayed If there is more than one graph then you must enter the number for the graph that you want sorted in the text box labeled Graph and click on the button labeled Sort Filtering Filtering is performed typically this is done to a Fourier transform of some signal using the following 3 steps 1 Select the type of Data to be filtered There are two types Real or Complex If you select Real then you must enter the number of the graph for the real data in the text box labeled Graph If you select Complex then you must enter the numbers of the graphs for the real and imaginary parts of the complex data in the text boxes labeled Real and Imag 2 Select the type of Filter There are two types Real or Complex If you select Real then you must enter the number of the graph for the real filter in the text box labeled Graph If you select Complex then you must type in the numbers of the graphs for the real and imaginary parts of the complex filter in
102. ies by discrete ones Gauss This choice called a Gauss window modifies the data within a window of length N by multiplying the signal values from k 0 to k N by the window function e 4 5 Gauss windowing reduces the leakage or smearing effect that arises from approximating continuous frequencies by discrete ones Hamming This choice called a Hamming window modifies the data within a window of length N by multiplying the signal values from 0 to N by the window function 0 54 0 46 N Hamming windowing reduces the leakage or smearing effect that arises from approximating continuous frequencies by discrete ones hanning This choice called a Hanning window modifies the data within a window of length N by multi plying the signal values from k 0 to k N by the window function 0 5 0 5 N Hanning windowing reduces the leakage or smearing effect that arises from approximating continuous frequencies by discrete ones Boxcar This choice called either a Boxcar window or a rectangular window modifies the data within a window of length N by multiplying the signal values from 0 to k N by the window function 1 This choice is included mostly in order to illustrate the need for the other window types If Boxcar window ing is done then the spectrogram will appeared as if it is smeared This smearing effect also known as leakage
103. ifies a Fourier series partial sum by multiplying the k coefficients by the following factor e kr L where L is the right endpoint of the chosen interval W and T are the diffusion constant and time constant which you are required to input These constants must be non negative For Fourier sine and cosine series this convergence factor multiplies kt coefficient Gauss The Gauss filter modifies a Fourier series partial sum by multiplying the and k coefficients by the following convergence factor e 45 N For Fourier sine and cosine series this convergence factor multiplies kt coefficient Kaiser The Kaiser filter modifies a Fourier series partial sum by multiplying the k and k coefficients by the following convergence factor I Tz 1 kx NY I Im where J is the zero order modified Bessel function and is the number of harmonics in the partial sum and is a damping constant which you are required to input The damping constant must be non negative For Fourier sine and cosine series this convergence factor multiplies kt coefficient 30 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Poisson The Poisson filter modifies a Fourier series partial sum by multiplying the amp and k coefficients by the following convergence factor lkl The number r is called the damping ratio which you are required to input It must be between 0 and 1 For Fouri
104. ight clicked on the graph area 2 12 3 Window After zooming in this choice can be used to restore the view to the original graph region 2 12 4 Sort magnitudes See Section 2 11 8 on p 40 2 12 5 Energy graph See Section 2 11 8 on p 40 2 12 6 Histogram See Section 2 11 8 on p 39 2 12 7 Load This choice can be used for loading a signal There are two choices 1 Graph see Section 2 1 12 on p 19 2 Sound see Section 2 1 11 on p 19 2 12 8 Save graph This choice can be used for saving a signal in one of two formats 1 You select Graph to save a signal in binary b1 format for loading using the Load Graph method 2 You select Sound file to save a signal in wav format for loading using the Load Sound method Note when saving a signal as a sound signal wav file make sure that you have played it using the Audio selection on the Graph menu so that the various sound parameters are properly set 2 12 9 Print graphs You can print graphs directly to paper output or print graphs to a file for later use in a document preparation system such as 42 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Printing graphs directly onto paper To print the graphs on screen directly onto paper you perform the following 6 steps 1 From the list of choices choose a method of printing such as Small top left These choices determine the size of the printout and where it is positioned on the page
105. ilter It is used when there is salt and pepper noise also called impulsive noise present You simply specify which image to denoise and click on the button labeled Denoise Denoise adaptive median This procedure denoises an image using a 3 by 3 adaptive median filter The pixel value centered on the 3 by 3 region is only replaced by the median if its value differs from the median by more than 10 It is used when there is salt and pepper noise also called impulsive noise present It usually performs a better denoising than median denoising To denoise you simply specify which image to denoise and click on the button labeled Denoise 5 11 Menu Items for 2D Form There are 9 menu items on a 2D form File Edit View Graph Series Transforms Convolve Analysis Help We now describe the contents of each of these 9 items 5 111 File The File menu contains 12 items which we now examine 1 New 1Dim Selecting this item will open a new 1D form see Chapter 2 beginning on p 11 Each 1D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 2 New 2Dim Selecting this item will open a new 2D form Each 2D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 3 New Audio Editor Selecting this item will open a new Audio Editor window see Chapter 6 beginning on p 85 Each Audio Editor is numbered when it is ope
106. image which appears on the right you select File and then select Save Reconstructed Image A dialog box opens and you can save the processed image as a bmp file 7 Menu Items for Image Processor There are 8 menu items on the mage Processor form File Edit View Compress Decompress Denoise Error measures Help We now describe the contents of each of these 8 items 7 7 1 File The File menu contains 6 items which we now examine 1 New 1Dim Selecting this item will open a new 1D form see Chapter 2 beginning on p 11 Each 1D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 2 New 2Dim Selecting this item will open a new 2D form see Chapter 5 beginning on p 59 Each 2D form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 7 7 MENU ITEMS FOR IMAGE PROCESSOR 93 3 New Audio Editor Selecting this item will open a new Audio Editor window see Chapter 6 beginning on p 85 Each Audio Editor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 4 New Image Processor Selecting this item will open a new Image Processor window Each Image Processor form is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 5 Get Image This procedure is used for loading a new image for processing See Section 7 1 on p
107. ion 5 9 Image Compression There are three ways to perform image compression of gray scale images They are the following 1 Image Compression Workshop see section 5 9 1 2 Saving a compressed image in the 2D form see Section 5 9 2 on p 73 3 Saving a compressed image in the Image Processor form see Section 7 2 on p 89 5 9 Image Compression Workshop This form appears when you select Image compression workshop from the Graph menu see Figure 5 2 To compress an image with this method you should first perform a wavelet or wavelet packet transform of the image and then save this transform in the Compress Data subdirectory of the FAWAV program directory Then by selecting this procedure you can perform a compression using the following 8 step process Enter the number of Levels This number should equal the number of levels used for your transform 2 Select either a lossy or lossless compression option With lossless your transform should be of the integer to integer type 3 Select a Rate Distortion Option You can either choose to obtain a target bit rate bpp or PSNR value For example in the figure a target bit rate of 0 25 bpp is selected which achieves a 32 1 compression of an 8 bit gray scale image 4 Select a compression technique either Binary or Arithmetic compression These two options are explained in section 4 4 of A Primer on Wavelets and their Scientific Applications 5 Choose a scanning mode Th
108. ions 7 4 Denoising an Image Image processor has four different procedures for image denoising TAWS This routine implements the TAWS algorithm as described in the following two references 1 J S Walker and Y J Chen Image denoising using tree adapted wavelet subband correlations and shrinkage Optical Engineering 39 2900 2908 Dec 2000 2 J S Walker Tree adapted wavelet shrinkage Advances in Imaging and Electron Physics 2002 These materials can be obtained from the Publications link of the webpage listed in 7 1 TAWS is used for denoising images corrupted by random Gaussian noise the most common type of noise You can choose from options that allow for shrinkage or no shrinkage as well as averaging or no averaging Best performance although it takes longer time is obtained with averaging SureShrink The second routine is the famous method of SureShrink It is used for denoising images corrupted by random Gaussian noise the most common type of noise Median third method is 3 by 3 median denoising It is used to denoise images that are corrupted by impulse noise also called salt and pepper noise 92 CHAPTER 7 IMAGE PROCESSOR Adaptive median The fourth method denoises an image using 3 by 3 adaptive median filter The pixel value centered on the 3 by 3 region is only replaced by the median if its value differs from the median by more than 10 It is used when there is salt and pepper noise
109. it is positioned on the page If you want the right side labels along the vertical to be printed then check the box labeled Right labels If you want the lower labels along the horizontal to be printed then check the box labeled Lower labels If you want the caption for the graph to be printed then check the box labeled Caption A N Click on one of the printout buttons either Print or Print and Eject If you click on Print then the graph will print but will not eject from the printer This allows for several different graphs to be printed on the same page If you want to eject a printed page then click on the button labeled Eject If you want to print the graph and eject the page then click on the button labeled Print and Eject Printing graphs to a file To print graphs on screen to a file you perform the following 2 steps 1 Click on the button labeled Save Printout to File 2 From the dialog box that appears specify a file name for saving the printout data Suppose this file name is fname then the data for printing graphs is saved in a fname bmp For further information on how to include this image file in the IATEX document preparation system see the article BIEX Graphics with FAWAV which is in the NLaTeX subdirectory of the FAWAV directory as both a file and a PostScript file 5 12 12 Display cursor coordinates You select this choice in order to provide a readout of coordinates in the grap
110. l tell you the allowed range of harmonic limits If you specify say 15 as the row harmonic limit and 25 as the column harmonic limit then all Fourier series coefficients with indices m and n satisfying m lt 15 and n 25 will be used in forming the Fourier series partial sum 3 Select the Series type There are two types Unfiltered and Filtered If you select Unfiltered then the Fourier coefficients are used without any modification when forming the partial sum If you select Filtered then a list box is activated and you can select a filter Most of these filters are functions that modify the Fourier coefficients by multiplying them by different functions The 6 filters that are available are the following Blackman Cesaro Diffraction Diffusion Hamming Hanning We will discuss each of these filters below 4 Click on the button labeled Plot This will produce the Fourier series partial sum 5 7 1 Filtering of Fourier series In this section we describe each of the 6 filtering methods for Fourier series 1 Blackman If a spherical Fourier series is being used then the Blackman filter modifies a Fourier series partial sum by multiplying coefficients Cm n with indices m and n by the following convergence factor 42 5 cos m n2 5 N 08 cos 2 m n2 N where N is the harmonic limit in the partial sum If a rectangular Fourier series is being used then the Blackman filter modifies a Fourier series partial su
111. le relative to the maximum of all spectrogram magnitudes Log local Magnitudes are displayed on a logarithmically graded intensity scale relative to the maximum of all spectrogram magnitudes along each vertical time slice Linear global Magnitudes are displayed on a linearly graded intensity scale relative to the maximum of all spectrogram magnitudes Linear local Magnitudes are displayed on a linearly graded intensity scale relative to the maximum of all spectrogram magnitudes along each vertical time slice 2 Select a method for how the signal is displayed at the bottom of the window If you select Dots then the signal values are plotted as isolated dots If you select Lines then line segments are drawn between signal values thus producing a more connected graph 3 If you are plotting a Gabor scalogram then you can also select whether the Magnitude of the scalogram values are plotted or whether Phase values are plotted When phase values are plotted the darker values are negative and the whiter values are positive 4 5 Printing the scalogram To print the scalogram select Print from the File menu dialog box appears from which you can choose to either print the scalogram window or copy the scalogram window to the clipboard or save the scalogram window to a file as a bmp image Warning In each of these cases the entire window of the scalogram form as it appears on screen is printed or copied or saved If you do no
112. lectron diffraction use the wave constant 0 578 Diffusion The Diffusion filter modifies a Fourier series partial sum by multiplying coefficients with indices m and n by the following convergence factor e Tm En n D where L is the right endpoint for each dimension of the square L L x L L over which the graph is plotted and T is the damping constant which you are required to input The damping constant must be non negative Hamming If a spherical Fourier series is being used then the Hamming filter modifies a Fourier series partial sum by multiplying coefficients with indices m and n by the following convergence factor 54 46 cos m n2 s N where N is the harmonic limit in the partial sum If a rectangular Fourier series is being used then the Hamming filter modifies a Fourier series partial sum by multiplying coefficients with indices m and n by the following convergence factor 54 46 cos mm M 54 46 cos nm where M 15 the row harmonic limit and is the column harmonic limit Hanning If a spherical Fourier series is being used then the Hamming filter modifies a Fourier series partial sum by multiplying coefficients with indices m and n by the following convergence factor 5 5cos m n2 T N where N is the harmonic limit in the partial sum If a rectangular Fourier series is being used then the Hamming filter modifies a Fourier series partial sum by multiplying coeffi
113. let coefficients transform values depending on whether the checkbox labeled Sign bit is checked Note The tool tip for the text box will provide information on how many bits you are specifying for the threshold value that you have entered If the checkbox labeled Quantization is not checked then a value of the form 1 2 n produces a threshold of the form M 2 n Here M is the maximum magnitude of all wavelet coefficients All wavelet coefficients whose magnitudes are less than this threshold are set equal to zero but no quantization is performed on the values that survive this thresholding b Multiple Thresholds This method involves specifying two thresholds by entering in the text box labeled Value an expression of the form 1 2 m 1 2 n where m and n are positive integers With this option quantization is always performed The first threshold should have the form 1 2 m which produces m 1 bit or m bit quantization of all trend values depending on whether the checkbox labeled Sign bit is checked Likewise the second threshold should have the form 1 2 n which produces an n 1 bit or n bit quantization of all fluctuation values depending on whether the checkbox labeled Sign bit is checked Note The tool tip for the text box will provide information on how many bits you are specifying for the threshold values that you have entered The tool tip is the message that appears when a mouse pointer is rested on a text box or other item in a win
114. llows you to change the appearance of the spectrogram It is discussed in detail in Section 3 5 on p 47 Information Selecting View Information allows you to view some basic information about the spectrogram type window length etc You can also write your own information into this box and it will be saved along with the spectrogram saving the spectrogram is discussed in Section 3 7 on p 48 Modification Report This dialog box which is activated by selecting View Modification Report records any modifications that have been made on the spectrogram Such modifications can be done by thresholding or by a graphing operation Warning bug Do not modify the statements made in this box Doing so will corrupt the spectrogram file when you save it This is because FAWAV uses these statements to reconstruct the spectrogram when you open the saved file 5 Arrange This choice will perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the FAWAV workspace so that you can select which window to be the active one The presently active one is marked with a checkmark 50 CHAPTER 3 SPECTROGRAMS GABOR TRANSFORMS 3 9 3 Graph The graph menu has the following 8 items Spectrogram This choice opens up the dialog box for computing a spectrogram See Section 3 1 on p 45 Plot This choice allows yo
115. llows you to print the scalogram See Section 4 5 on p 55 for further discussion 9 Close This closes the scalogram form Warning You are not prompted as to whether you wish to save your work 4 8 2 View The View menu contains the following 6 items 1 View cursor coordinates This is a switch on the View menu switched on and off by clicking on it When this choice is on then by moving the mouse cursor over the scalogram plot you can read off the approximate coordinates time frequency of the point of the mouse arrow This is especially useful when you want to modify regions of the scalogram using the Graph Plot procedure 2 Display style This choice allows you to change the appearance of the scalogram It is discussed in detail in Section 4 4 on p 55 3 View only scalogram This choice removes the right side of the form where dialog boxes appear so that only the region where the scalogram is displayed appears After making this choice it can be undone by clicking on it again 4 Information Selecting View Information allows you to view some basic information about the scalogram type window length etc You can also write your own information into this box and it will be saved along with the scalogram saving the scalogram is discussed in Section 4 6 on p 56 4 8 SCALOGRAM MENU ITEMS 57 5 Modification Report This dialog box which is activated by selecting View Modification Report records any modifications that have bee
116. lue The number of points must be one of the following numbers 64 128 256 1024 2048 4096 8192 16384 32768 65536 The next two numbers are the left and right endpoints of the interval over which the data are to be plotted There are two acceptable formats for these two numbers either 0 and or L For example the endpoints should be 0 and then 10 when the interval is 0 10 or they should be 5 and then 5 when the interval is 5 5 After the endpoints the remainder of the data are the values of the signal There should be one more value than the value of number of points For example if 1024 points are specified then there should be 1025 values specified Here is a sample listing 128 0 4 2 35 1 357 24 538 The first three numbers specify 128 points over an interval of 0 4 The remaining numbers are the signal values Note again that in this example there should be 129 values following the right endpoint of 4 not 128 This quirky requirement of the data format is necessary because of the way FAWAV plots functions and computes Fourier series and Fourier transforms Note If you supply fewer function values than specified by the number of points value then FAWAV supplies 0 values for the extra function values that were not supplied After entering your data you then select it and copy it to the WINDOWS Clipboard and then right click on the FAWAV 1D form and select Paste from Clipboard Your d
117. m by multiplying coefficients with indices m and n by the following convergence factor 42 5 cos mm M 08 cos 2mm M x 42 5 cos mm N 08 cos 2nm N where M 15 the row harmonic limit and is the column harmonic limit 70 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 2 Cesaro If a spherical Fourier series is being used then the Cesaro filter modifies a Fourier series partial sum by multiplying coefficients with indices m and n by the following convergence factor 1 m n N where N is the harmonic limit in the partial sum If a rectangular Fourier series is being used then the Cesaro filter modifies a Fourier series partial sum by multi plying coefficients with indices m and n by the following convergence factor 1 Im M n N where M is the row harmonic limit and is the column harmonic limit Diffraction The Diffraction filter modifies a Fourier series in two ways First by multiplying coefficients with indices m and n by the factor cos WT m n 1 2 where L is the right endpoint for each dimension of the square L L x L L over which the graph is plotted Second by multiplying by the factor sin WT m n n L The result is then created by summing the squares of the values of these two modified Fourier series You are required to supply the values of the Wave constant W and Time constant This filter can be used to create a diffraction pattern for e
118. m the screen and from memory Warning graphs will be erased immediately causing you to lose that work unless you have previously saved it Refresh Choosing this item will replot all graphs Remarks When you select this choice then a text box opens on the right of the form where you can enter remarks describing the work that you have performed in this form This is especially useful for keeping a record of your work if you intend to save the 2D form Screen capture This choice will create an image of the entire FAWAV window as it appears on screen that you can then paste into word processing documents like WORDPAD documents or other documents in other programs that accept WINDOWS clipboard input via a Paste command 78 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 5 11 3 View The menu item View contains 6 items which we now examine 1 Size This choice allows you to toggle between two sizes for displaying images 1 Small where four images can be displayed at once or 2 Large where a single image is displayed and you select which image to view from option buttons on the lower right of the form Zoom This choice activates the Zoom dialog box For more details see Section 5 12 1 on p 83 Clear sidebox This choice will remove any dialog box from the right side of the form End trace This choice will remove the Trace dialog box from the right of the window and its crosshair symbol from the graph ar
119. n is in defining the odd extension of a function For example suppose you graph the function cos x 3 over the interval 0 4 Then graph sign cos abs 3 over 4 4 This second function is the odd extension of the first function 8 sin sine function is invoked using sin For example sin sin 5x 6 x 2 2 1 GRAPHING FORMULAS AND EXTERNAL DATA 15 are both valid formulas involving the sine function sinh The hyperbolic sine function sinh returns the hyperbolic sine of its arguments By definition sinh x satisfies sinh x exp x 2 The positive square root function sqr computes the positive square root of its argument For exam ple sqr 4 2andsqr 9 3 Also 0 0 The square roots of negative numbers are not real so in FAWAV applying the sqr function to a negative number produces an error message tan The tangent function is invoked using tan For example tan 3x tan 5x 6 x 2 are both valid formulas involving the tangent function Special functions FAWAV employs 7 special functions which we shall now describe 1 bell The function bell is defined as follows If x gt 0 75 then 11 x 0 If x lt 0 25 then 11 1 Finally if 0 25 lt x lt 0 75 then bell bell x that is the bell function is even and we have for 0 25 lt x lt 0 75 that be11 x is defi
120. n made on the scalogram Such modifications can be done by thresholding or by a graphing operation Warning bug Do not modify the statements made in this box Doing so will corrupt the scalogram file when you save it This is because FAWAV uses these statements to reconstruct the scalogram when you open the saved file 6 Arrange This choice will perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the FAWAV workspace so that you can select which window to be the active one The presently active one is marked with a checkmark v 4 8 3 Graph The graph menu has the following 6 items Scalogram This choice opens up the dialog box for computing a scalogram See Section 4 1 on p 53 Plot This choice allows you to plot a graph in the scalogram window Using the variable g1 you can modify scalogram values or magnitudes when a Gabor scalogram is computed Examples of graphing are given in Section 3 2 on p 46 More examples are discussed in A Primer on Wavelets and their Scientific Applications Second Edition Audio This choice allows you to play the signal whose scalogram has been computed The options are all discussed in Section 2 8 on p 31 Threshold To apply a threshold to a scalogram you enter a value no more than the maximum value displayed above the input box for this threshold and then
121. n that adds sin 3x if x gt 3 or if y lt 2 to cos x when 2 lt x and y lt 3 5 1 8 Inequalities The inequality operations are gt gt and lt For example the formula 2 lt xy lt 4 sin xy xy 4 cos xy 2 produces a function that equals sin xy for 2 lt xy lt 4 and equals cos xy for xy gt 4 and equals 0 for all other values of x and y 5 1 9 Command strings Command strings are used at the end of a formula for performing substitutions or other tasks They are preceded by the backslash character Here are a few examples of using command strings 1 Substitution The following formula shows how a command string performs several substitutions cos ax bsin c 2 b 2 3 Notice that the parameters be constant variable and that they can invoke other parameters as well The allowed parameters are a b c m t u v w z Note that unlike in 1D the variable y cannot function as a parameter 2 Limits for a sum The following formula shows how a command string is used for specifying the limits for a sum 1 2 sumk cos kxy 2 k 4 7 Here the sum is from k 4 0 k 7 5 1 10 Loading an image file Gray scale images can be loaded into the 2D form Some standard image file formats can be loaded e g bmp jpg etc but they must be N by N square images where N is either 64 128 256 512 or 1024 If a gray scale image is not square
122. ned You can access a list of all opened windows by selecting View from the menu 4 New Image Processor Selecting this item will open a new Image Processor window see Chapter 7 beginning on p 89 Each Image Processor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 5 11 MENU ITEMS FOR 2D FORM 77 Open form You select this item in order to open a previously saved form either a 1D form 2D form a Spectrogram form or a Scalogram form A standard WINDOWS File Open dialog box opens up from which you can select a saved form to load The file extension w1 is used for 1D forms the file extension w2 15 used for 2D forms the file extension spg is used for spectrograms and the file extension scg is used for scalograms Open image file This item can be used for loading an image file into the 2D form It is recommended however that you use the method described in Section 5 1 10 on p 65 instead Using that method will help you to become familiar with the Popup menu technique for 2D forms see Section 5 12 beginning on p 82 for a description of this Popup Menu Open data file This item can be used for loading an fb2 data file into the 2D form It is recommended however that you use the method described in Section 5 1 12 on p 66 instead Using that method will help you to become familiar with the Popup menu technique for 2D forms see Section 5 12 beginning
123. ned by 11 sin aw a 0 5pi w sin av sin av v sin au sin au u 1 5 2x Here are 4 examples that use the be11 function a Graph the function 11 x over the interval 4 4 Use Analysis Trace see p 38 to check that bell x 1 for lt 0 25 11 0 for x gt 0 75 b Graph the function 11 x 4 over the interval 4 4 Use Analysis Trace to check that this function equals 1 over 1 1 and equals 0 for x gt 3 c Graph the function sumk 11 x k k 3 3 over the interval 4 4 This formula uses a sum command see Section 2 1 6 on p 17 for further discussion Use Analysis Trace to check that this function equals 1 over the interval 3 25 3 25 and equals 0 for x gt 3 75 d Graph the function sumk bell x k sin pi k 5 5 over the interval 8 8 Then graph sin pi x over the same interval to check that the first function equals sin x over the interval 5 25 5 25 and equals 0 for x gt 5 75 del The discrete delta function del 15 defined as follows 0 if x gt 0 1 1 0 In other words del isOif x lt Oorx gt 0 del 0 equals 1 fac The factorial function fac returns the factorial of a non negative integer between 0 and 70 For example fac 5 120 If the argument of fac is not an integer then an error message is returned A formul
124. ns which we now list 1 abs The absolute value function abs returns the absolute value of its argument e g abs 5 5 and abs 5 5 cos function is invoked using cos For example cos 3 7 cos 2 y 4 3 6x 8 both valid formulas involving the cosine function cosh The hyperbolic cosine function cosh returns the hyperbolic cosine of its arguments By definition cosh x satisfies cosh x exp x exp x 2 where exp is the exponential function exp exponential function exp is the standard base e exponential function For example exp 4xy 4 are two equivalent expressions using the exponential function 62 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM gri greatest integer function gri is defined as follows gri x largest integer that is lt x Or an equivalent definition is gri x closest integer to the left of x on the number line log The natural logarithm function is defined by 109 You can also use Ln sgn sign function sgn is defined by 1 ifx gt 0 sgn x lt 0 ifx 0 1 ifx lt 0 You can also use sign for the sign function sin The sine function is invoked using sin For example sin sin 5xy 6 xy 2 2 are both valid formulas involving the sine function sinh The hyperbolic sine function sinh returns th
125. nts These components listed on the File menu see Figure 1 1 are 1 New 1Dim Choose this item for processing 1D signals See Chapter 2 on p 11 2 New 2Dim Choose this item for processing 2D signals See Chapter 5 on p 59 3 New Audio editor Choose this item for loading audio signals and selecting portions to process See Chapter 6 on p 85 4 New Image Processor Choose this item for loading gray scale images for various image processing operations such as compression and denoising See Chapter 7 on p 89 In addition to these main items there also several choices for opening various types of files These latter choices will be discussed in the chapters that follow as they are best understood in the context of the various processing windows that open up to handle these various types of files 10 CHAPTER 1 INTRODUCTION A Fourier Wavelet Analyzer y Graph Transform Ive Analysis Help New 1 Dim New 2 Dim New Audio editor New Image processor Open form Open sound file wav Open 1D data File Open image file Open 20 data file Exit Figure 1 1 Initial menu of FAWAV Chapter 2 Processing 1D Signals 1D form To work with 1D signals click on the File menu and then select New Dim The window shown in Figure 2 1 appears A description of each of the 9 menu items will be given at the end of this section see Section 2 11 on p 33 But first we describe how to use this form for basic signal processing The proced
126. oice has a checkmark v attached to it When the setting is on the mouse cursor changes to a crosshair appearance within the graph area and a readout is given of the z and y coordinates located at the central point of this crosshair 44 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM Chapter 3 Spectrograms Gabor transforms To compute a spectrogram for a displayed graph select Analysis and Spectrogram from the 1D form menu as men tioned on p 33 and p 40 If only one graph is displayed then the Spectrogram window opens with that graph displayed at the bottom If more than one graph is displayed then you must enter the number for that graph and press the Select button The Spectrogram window will then open up with the selected graph displayed at the bottom On the right side of the Spectrogram window will be a dialog box for producing the spectrogram There are several aspects to this including the following topics 1 Computing the spectrogram See Section 3 1 on p 45 2 Modifying the spectrogram See Section 3 2 on p 46 3 4 9 Inverting the spectrogram See Section 3 3 on 47 Denoising the spectrogram Section 3 4 on p 47 Changing the appearance of the spectrogram Section 3 5 on p 47 Printing the spectrogram See Section 3 6 on p 48 Saving the spectrogram See Section 3 7 on p 48 Recording information Section 3 8 on p 49 Spectrogram menu items See Section 3 9 on p 49 W
127. om the popup menu A standard file dialog box will appear from which you can select the file containing the graph s data It is possible to load external binary data files not necessarily created by FAWAV The data must be in the following format Except for the initial dimension number which is a 4 byte integer the data should consist of 4 byte single precision numbers The first number specifies the square dimensions of the data either 64 128 256 or 1024 and is saved as a 4 byte integer The next number specifies the square centered at the origin over which the data are to be graphed For example if it is 6 5 then the data will be graphed over the square 6 5 6 5 x 6 5 6 5 The remaining numbers are the image values to be listed according to the scheme for an image array described in Section 4 1 of A Primer on Wavelets and their Scientific Applications with M N and N being one more than the dimension number either 65 129 513 or 1025 5 1 13 Saving graphs as binary data This option which you invoke by right clicking on the graph you want to save and selecting Save graph Graph from the popup menu allows you to save its data in single precision floating point format A standard Save as dialog box will appear and you can specify the name of the file in which the data will be saved The file extension 52 will be appended to the file name you specify The saved data can later be reloaded using Load Graph from the pop
128. on p 82 fora description of this Popup Menu Save Form As Select this item in order to save all of your work in the 2D form to a file with extension w2 The saved form can be reloaded later by selecting Open form from the File menu Save Form When you have loaded a previously saved form and then made modifications to that form then this menu item becomes available for resaving the modified form using the same file name Print This section can be used to either print an individual graph or to print the entire 2D form as itis displayed on screen For further discussion please go to Section 5 12 11 on p 84 Close Selecting this choice will close the 2D form Warning FAWAV does not prompt you to save the 2D form if you have made modifications If you want to save your work be sure and save the form using File Save Form before you close it 5 11 2 Edit The Edit menu contains 5 items which we now examine 1 Points used Choose this item in order to change the number of points that FAWAV is using for plotting graphs The choices are 64 128 256 512 1024 2048 with the presently used number of points preceded by checkmark v If N points are chosen then N x N square images are used Warning Choosing a new number of points will erase all graphs from the screen and from memory causing you to lose that work unless you have previously saved it Erase graphs Choosing this item will remove all graphs fro
129. or form Note to paste the cut portion into a different sound file you should select Clear editor from the Edit menu and then load the new audio file into the present Sound Editor form Copy Choosing this item will copy the specified clipping region from the sound file The copied region will then be available for pasting at the location specified by the left cursor colored green within the present Audio Editor form Note to paste the copied portion into a different sound file you should select Clear editor from the Edit menu and then load the new audio file into the present Sound Editor form Paste If you have cut or copied a portion of a sound file then choosing this item will insert that portion into the sound file beginning at the location specified by the left cursor colored green the sound will be inserted without overwriting any portion of the sound file Chapter 7 Image Processor This form is used for simple processing of image files such as compression and denoising When it is selected the form shown in Figure 7 1 loads You can then perform the following tasks 1 Loading an Image 2 Compressing an Image 3 Decompressing an Image 4 Denoising an Image 5 Measuring error 6 Saving a processed image which we shall now describe 7 1 Loading an Image To load an image you perform the following 3 steps 1 Select File from the menu 2 Select Get image from the File menu 3 Use the standard WINDOWS File O
130. orms for each subsignal are further transformed up to the highest level More complex series are performed by more advanced software such as the ones described in Appendix C of A Primer on Wavelets and their Scientific Applications 2 6 Fourier transforms There are three types of transforms the Fourier transform which utilizes complex exponentials the Fourier cosine transform and the Fourier sine transform We discuss the Fourier transform first the Fourier cosine transform 15 discussed in Section 2 6 3 on p 26 and the Fourier sine transform is discussed in Section 2 6 4 on p 26 24 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 2 6 1 Fourier transform A Fourier transform or power spectrum of a signal can be calculated by performing the following 9 steps 1 2 7 After plotting your signal data select Transforms Fourier from the menu Select one of the two data types either Real or Complex If you selected Real then enter the number of the graph that you want to transform into the text box labeled Graph The values of this signal will constitute the real part of the data the imaginary part will be assumed to be all zero values On the other hand if you selected Complex then enter in the text boxes labeled Real and Imag the numbers of the graphs whose values you want to use for the real and imaginary parts of the data respectively Choose which Output type you want There are three output types to choose from
131. osen interval W and 7 are the wave constant and time constant which you are required to input These constants must be non negative For Fourier sine and cosine series this convergence factor multiplies kt coefficient Diffraction The Diffraction filter modifies a Fourier series in two ways First by multiplying the kt and coefficients by the factor cos W kx L Second by multiplying by the factor sin W T kz L The result is then created by summing the squares of the values of these two modified Fourier series You are required to supply the values of the wave constant W and time constant The result is the same as the sum of the squares of the graphs produced by the Frescos and FresSin filters For Fourier sine and cosine series this convergence factor multiplies kt coefficient This filter can be used to create a diffraction pattern for electron diffraction use the wave constant 0 578 DIVP The de la Vallee Poussin filter modifies a Fourier series partial sum by multiplying the kt and K coefficients by the following convergence factor 1 if 2 k lt N 2 1 k N if N 2 k lt 2N 2 7 FOURIER SERIES SINE SERIES amp COSINE SERIES 29 where N is the number of harmonics in the partial sum For Fourier sine and cosine series this convergence factor multiplies k coefficient FresCos The Fresnel cosine filter modifies a Fourier series partial sum by multiplying th
132. oth valid formulas in FAWAV The second formula uses the expression pi for the constant For many more examples see Section 2 1 2 on p 13 below 2 Select an Interval type by selecting the option L L or the option 0 L 3 Specify the value of L to be used for the interval endpoint s For example if you specify that L 2 and you selected the option L L then the interval used for graphing will be 2 2 Or if you selected 0 L then the interval will be 0 2 4 Click on the command button labeled Plot Assuming all the data are correctly specified this will produce a graph in the graph area on the left of the window 2 1 GRAPHING FORMULAS AND EXTERNAL DATA 13 Formula command buttons There are five command buttons at the bottom of the formula text box Here are descrip tions of each of these command buttons Previous If you have graphed more than one formula then by clicking on this button you can recall previously entered formulas Next formula If you have clicked on the Previous button one or more times then you can go forward in the list of formulas by clicking on this button If you have not clicked the Previous button then clicking this button will clear the text box completely and you can enter a new formula Load Click on this button in order to retrieve a formula that you previously saved Save Click on this button in order to save the formula that is presently displayed in the text box Help Click
133. ourier sine series has the form M krz 1 Bk cos Q k 1 where is the number of harmonics Further discussion of the mathematical details can be found in Fast Fourier Transforms 2nd Edition Chapter 1 These partial sums can all be calculated using FAWAV by the following 6 steps 1 Graph the signal and then select either Series Fourier or Series cosine or Series sine from the menu 2 In the text box labeled Graph enter the number of the graph for which you want to compute a Fourier series partial sum 3 In the text box labeled Harmonics enter the number of harmonics that you want to use in the partial sum 4 Select the Filter type There are two types Unfiltered and Filtered If you select Unfiltered then the Fourier coefficients are used without any modification when forming the partial sum If you select Filtered then a list box is activated and you can select a filter Most of these filters are functions that modify the Fourier coefficients by multiplying them by different functions These filters are the following sixteen linear filters Blackman Cesaro Cos Diffraction DIVP FresCos FresSin Hamming Hanning Heat Gauss Kaiser Poisson Riesz Sinc User 28 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM There are also three other non linear filters which modify the Fourier coefficients in a non linear way They are the following Energy percentage Highest magnitude Threshold of these 19 filters are described b
134. pen dialog box to select an image file Image Processor works with various image formats These must be 8 bit gray scale images 7 2 Compressing an Image Image Processor implements the ASWDR compression algorithm For details about this algorithm consult the follow ing references 1 J S Walker Lossy image codec based on adaptively scanned wavelet difference reduction Optical Engineering 39 1891 1897 July 2000 2 J S Walker and T Q Nguyen Adaptive scanning methods for wavelet difference reduction in lossy image com pression Proceedings ICIP 2000 Sept 2000 89 90 CHAPTER 7 IMAGE PROCESSOR Figure 7 1 The window that opens when New Image processor is selected 3 J S Walker and T Q Nguyen Wavelet based image compression Chapter 6 in Handbook of Transforms and Data Compression CRC Press Boca Raton FL 2000 These materials are available from the Publications link of the following webpage http www uwec edu walkerjs 7 1 To compress an image you perform the following steps 1 Load the image see Section 7 1 on p 89 for more details 2 Specify a wavelet The choices 1 DD 5 3 Integer 2 DD 242 2 Integer 3 Daub 9 7 The first two choices are integer to integer systems which allow for lossless compression and the third is the most popular system for lossy compression The first two systems are described in the following reference A R Calderbank I Daubechies W Sweldens
135. r values are positive 3 6 Printing the spectrogram To print the spectrogram select Print from the File menu A dialog box appears from which you can choose to either print the spectrogram window or copy the spectrogram window to the clipboard or save the spectrogram window to a file as a bmp image Warning In each of these cases the entire window of the spectrogram form as it appears on screen is printed or copied or saved If you do not want the dialog box on the right side of the window to be printed then you must first slide the right edge of the window over so as to hide this dialog box 3 7 Saving the spectrogram To save the spectrogram select Save As from the File menu A standard dialog box appears from which you can choose where to save the spectrogram and what name to save it under Spectrogram 7 r Dem m 8268 75 91191 gt c c 55 sqr 2log 1024 1 1927 sqi 1024 Rem To denoise plot this function and then select Invert Previous Next formula 2756 25 1486 2 229 478040 non zero values 729 42 of total 0 1 1 compression Figure 3 1 Example of a denoising function 3 8 RECORDING INFORMATION 49 3 8 Recording information Selecting View Information allows you to view some basic information about the spectrogram type window length etc You can also write your own information into this box and it will be saved along with the spectrogram see Saving the spectrogram 3 9
136. removed and you can load a different sound file Note You are not prompted for saving the loaded file 6 5 3 View This item contains 2 options If you select Arrange windows then you can perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the FAWAV workspace so that you can select which window to be the active one The presently active is marked with a checkmark v 6 5 4 Help This choice loads a WINDOWS help file for the Audio Editor form 88 CHAPTER 6 AUDIO EDITOR 6 6 The Popup menu for the Audio Editor If you right click on the graph area on the left of the Sound Editor form then a popup menu will appear with 5 items We now discuss each of these items 1 Move clip region If a clip region see Section 6 2 on p 86 has been specified then selecting this item will move the left side of the clip region to the horizontal location marked by the tip of the mouse arrow at the point where you right clicked on the graph area Clip Choosing this item will select a region on the sound file for analysis See Section 6 2 on p 86 for further discussion Cut Choosing this item will cut out the specified clipping region from the sound file The cut out region will then be available for pasting at the location specified by the left cursor colored green within the present Audio Edit
137. rm at the time coordinate displayed when you right click on the spectrogram You can then plot the spectrum of the signal at the time coordinate by plotting the function sqr 91 x 2 92 x 2 or you could plot its power spectrum by plotting g1 x 2 92 x 2 3 10 9 Horizontal slice This selection which is available when the viewing of cursor coordinates has been activated via View View cursor co ordinates will graph the real and imaginary parts of the spectrogram in a new 1D form at the frequency coordinate displayed when you right click on the spectrogram 22 CHAPTER 3 SPECTROGRAMS GABOR TRANSFORMS Chapter 4 Scalograms Continuous wavelet transforms To compute a scalogram for a displayed graph select Analysis and Scalogram from the 1D form menu as mentioned on p 33 and p 40 If only one graph is displayed then the Scalogram window opens with that graph displayed at the bottom If more than one graph is displayed then you must enter the number for that graph and press the Select button The Scalogram window will then open up with the selected graph displayed at the bottom On the right side of the Scalogram window will be a dialog box for producing the scalogram There are several aspects to this including the following topics 1 Computing the scalogram See Section 4 1 on p 53 2 Modifying the scalogram See Section 4 2 on p 54 3 Inverting the scalogram Section 4 3 on p 54 AR Changing the app
138. s Enter a formula for calculation in the text box at the top Valid formulas are ones that would be accepted by most graphing calculators For example these three formulas cos pi 8 sqr 2 91 a 4sqr 5 are all valid formulas Notice that in the last formula we used a command string to substitute the value of 4sqr 5 in place of a in the formula And notice also that this last formula uses the graph variable 91 to indicate that the first displayed graph should be used to compute a value for g1 a More details on the functions available can be found in Section 2 1 beginning on p 12 2 Click on the button labeled Calculate in order to perform the calculation 2 1 MENU ITEMS FOR 1D FORM 39 Integral To compute an integral of a displayed graph perform the following 2 steps 1 In the text box labeled Graph type in the number of the graph for which you want to compute an integral 2 Click on the button labeled Compute This will result in the computation of the integral over the interval on which the graph is displayed The result which is a trapezoidal rule approximation of the exact integral is displayed in the text box below the Compute button Derivative To numerically approximate the first derivative of a displayed graph perform the following steps 1 In the text box labeled Graph type in the number of the displayed graph that you want to approximate the derivative of 2 Click on the button labeled
139. s for this graph For further information on how to include this printout in the document preparation system see the article BIEX Graphics with FAWAV which is in the NLaTeX subdirectory of the FAWAV directory as both a file and a PostScript file 2 12 10 Clip This procedure is used to clip a portion of a graph thereby creating a smaller size graph using less points To clip a portion of a graph isolate that portion on screen by changing the horizontal X interval that is displayed and then right click on the graph area and select Clip graph If there is only one graph on screen then the portion of the graph that is displayed is converted into a separate graph displayed in a new window Note The number of points for the new graph must be a power of two consequently if the portion of the graph displayed on screen does not consist of a power of two number of points the clipped graph will have zeros appended to its end values in order to have a power of two number of points If there is more than one graph then a dialog box appears on the right of the window and you specify which graph you want to clip by entering its number in the text box labeled Graph and then clicking on the button labeled Clip 2 12 11 graph This procedure is used to copy the data from a selected signal If there is only one graph on screen then this graph is immediately copied into memory from which it can then be pasted onto a 1D form
140. se for the real and imaginary parts of the data respectively 4 Choose which Output type you want There are three output types to choose from a Real Im or b Power sp We now describe these two Output types a Real Im This output type produces the real and imaginary parts of the Fourier transform of the signal For a discrete signal the Fourier transform consists of the DFT of the discrete signal c Power sp This output type produces a discrete version of the power spectrum of a signal The values of the power spectrum of a signal are the squares of the magnitudes of the complex values of the Fourier transform of the signal Power spectra are used for describing the global energy of each frequency in a signal At least insofar as a DFT can accurately capture the contribution of that frequency to the signal 5 Choose which exponent type to use The two exponent types are and If you select then discrete sampled versions of the exponentials 527 are used for computing transforms On the other hand if you select then discrete sampled versions of the exponentials 27 are used for computing transforms These two types are inverse to each other by Fourier transforming with one choice and then Fourier transforming the result with the other exponent type you return to the original data 6 Click the button labeled Plot this will produce the Fourier transform or power spectrum A separate window will be creat
141. se the Interval type There are the following four interval types i Interval type L L A A This interval type is used when the signal is defined over an interval of the type L L and it is desired to produce a Fourier transform over an interval of type A When an inverse transform is being performed by choosing the opposite exponent sign then this same interval type should also be selected for performing the inverse transform ii Interval type 0 1 0 A This interval type is used when the signal is defined over an interval of the type 0 L and it is desired to produce a Fourier transform over an interval of type 0 A When an inverse transform is being performed by choosing the opposite exponent sign then this same interval type should also be selected for performing the inverse transform Gii Interval type 0 L A This interval type is used when the signal is defined over an interval of the type 0 L and it is desired to produce a Fourier transform over an interval of type A A When an inverse transform is being performed by choosing the opposite exponent sign then the interval type L L 0 A should be selected for performing the inverse transform iv Interval type L L 0 This interval type is used when the signal is defined over an interval of the type L L and it is desired to produce a Fourier transform over an interval of type 0 A When an in
142. ssage should appear which tells you the allowed number of levels Select the type of wavelet you want to use The choices are Coif Daub Haar and a selection of biorthogonal wavelets If you select Coif or Daub then you must also enter the appropriate number at the left of the wavelet type By resting the mouse pointer on the text box next to the wavelet type a message should appear which tells you the allowed numbers For 2D wavelet series there is only one type of series the threshold type To specify the threshold s click on the button labeled Edit settings After selecting Edit settings there are two methods for defining a threshold Uniform and Multiple Here are descriptions of each of these two methods a Uniform Threshold This method involves specifying a threshold by typing in a value in the text box labeled Value You should enter an expression of the form 1 2 n where is a positive integer For example 1 2 2 or 1 2 3 etc If the checkbox labeled Quantize is checked then a threshold of the form 1 2 n will produce an n 1 bit or n bit quantization of all wavelet coefficients transform values depending on whether the checkbox labeled Sign bit is checked Note The tool tip for the text box will provide information on how many bits you are specifying for the threshold value that you have entered If the checkbox labeled Quantization is not checked then a value of the form 1 2 n produces a threshold of the form M 2 n Here M
143. ssor window see Chapter 7 beginning on p 89 Each Image Processor is numbered when it is opened You can access a list of all opened windows by selecting View from the menu 5 Open audio file Selecting this item will allow you to load a wav file If a wav file is already loaded then this item is not available to make it available you would need to select Clear editor from the Edit menu 6 Open form You select this item in order to open a previously saved form either a 2D form a 2D form a Spectrogram form or a Scalogram form A standard WINDOWS File Open dialog box opens up from which you can select a saved form to load The file extension w1 is used for 1D forms the file extension w2 is used for 2D forms the file extension spg is used for spectrograms and the file extension scg is used for scalograms 7 Save as This item allows you to save the audio file presently loaded into the Sound Editor You save it as a file 8 Save This item allows you to save the audio file to the file specified by the Save as procedure just described 9 Close This item closes the Sound Editor Warning you are not prompted for saving work 6 5 2 Edit This item has the following 2 choices 1 Erase clip lines If you select this item then any clip lines that you have marked on the sound file will be erased 2 Clear editor If you select this item then the sound file that is presently loaded in the Audio Editor will be
144. t Graph paper then the background of the graphs will consist of seven dotted horizontal and seven dotted vertical lines resembling graph paper If you select Axes then a horizontal axis and vertical axis will be drawn on the screen If you select Blank then the background of the graphs will be empty b Plot style 1f you select Lines then the values of graphs will be connected by line segments On the other hand if you select Dots then the values of the graphs will be plotted as isolated values c Background color If you select White then the background of the graphs will be white while if you select Black then the background will be black d X Y intervals Enter the endpoints separated by a comma of the X and Y intervals that you want dis played For instance if you enter 3 3 for the X interval then the X interval for the graphs will be 3 3 Note The graphs will not be recomputed over this interval Window This choice causes the original X and Y intervals that were first used for graphing to be used for regraphing You select this choice after those intervals have been changed in some way and you wish to restore the original intervals Redraw This choice will redraw the graphs on the screen Arrange windows This choice will perform automatic rearrangement of the positions of multiple windows within the main FAWAV window The View menu always has at its end a listing of all the windows that are open within the F
145. t is part of FAWAV and Section 2 1 11 on p 19 for instructions on how to load audio files for signal processing 6 Convolutions and Correlations There are procedures for calculating the convolution of two signals for calculat ing the correlation between two signals and for calculating an auto correlation of one signal See Section 2 9 on p 31 7 Scalograms and spectrograms Two advanced methods for creating time frequency portraits of 1D signals are scalograms and spectrograms See Section 2 10 on p 33 There are also a number of routines for numerical analysis of 1D signals these are grouped under the Analysis choice on the menu see Section 2 11 8 on p 36 2 Graphing formulas and external data Data can be plotted in the 1D form in one of three ways 1 plotting an elementary formula from algebra or calculus 2 loading a sound file 3 loading an external data file We describe each of these methods in order 2 1 1 Plotting a formula To plot an elementary formula you select Graph followed by Plot from the menu A dialog box opens up on the right of the window with a text box at the top for entering your formula To graph a formula over an interval perform the following steps Enter a formula in the text box at the top of the dialog box The simplest way to begin graphing formulas is to use the kind that graphing calculators use For example the following two formulas 3x 7 4sin 3pi x 2 5cos 4pi x 5 are b
146. t operator twice in the same formula For example the formula prodp x p prodp px p 3 5 will not be accepted by Fawav You should use instead prodp x p prodq p 3 5 q 3 5 2 1 8 Logic There are three logical operations amp and or and not These are Boolean operations which are meant to return values of either 1 for TRUE or 0 for FALSE For example the following formula x gt 3 or x 2 sin 3x 2 x amp x 3 cos x produces a function that equals sin 3x if x gt or if x lt 2 and equals cos x if 2 lt x lt 3 2 1 9 Inequalities The inequality operations are gt gt lt and lt For example if you enter the formula 2 lt x lt 4 sin x x gt 4 cos x the function will equal 0 for x lt 2 will equal sin x for 2 x lt 4 and will equal cos x for x gt 4 2 1 10 Command strings Command strings are used at the end of a formula for performing substitutions or other tasks They are preceded by the backslash character Here are a few examples of using command strings 1 Substitution The following formula shows how a command string performs several substitutions cos bsin cx 2 3 2 1 GRAPHING FORMULAS AND EXTERNAL DATA 19 Notice that the parameters can be constant or variable and that they can invoke other parameters as well The allowed parameters are a b c m t u v w z Unless a differential equation is specified s
147. t want the dialog box on the right side of the window to be printed then you must first slide the right edge of the window over so as to hide this dialog box 56 CHAPTER 4 SCALOGRAMS CONTINUOUS WAVELET TRANSFORMS 4 6 Saving the scalogram To save the scalogram select Save As from the File menu A standard dialog box appears from which you can choose where to save the scalogram and what name to save it under 4 7 Recording information Selecting View Information allows you to view some basic information about the scalogram type window length etc You can also write your own information into this box and it will be saved along with the scalogram see Saving the scalogram 4 8 Scalogram menu items 4 8 1 File The File menu has the following 9 items 1 New 1D form This allows you to open a new 1D form See Chapter 2 beginning on p 11 N New 2D form This allows you to open a new 2D form See Chapter 5 beginning on p 59 New Audio Editor This allows you to open a new Audio Editor form See Chapter 6 beginning on p 85 New Image Processor This allows you to open a new Image Processor form See Chapter 7 beginning on p 89 Open This allows you to open a previously saved scalogram file with extension spg Save This allows you to resave a scalogram file extension spg that you have modified t A Save As This allows to save a scalogram form to a file extension spg oo Print This a
148. the factors 0 5 0 5 cos 2kn N for k N 2 0 N 2 when the domain of the function is of the form L L and by the factors 0 5 0 5 cos 2 k N 2 r N for k 0 when the domain of the function is of the form 0 L The symbol N denotes the number of points There is also a default choice of None which performs no filtering of the Fourier transform 8 Either check or uncheck the checkbox labeled Periodic endpoint averaged If this checkbox is checked then the first and last values of the signal are averaged to produce a trapezoidal rule approximation of a Fourier transform thus producing a better approximation to the Fourier transform of an analog signal If however you only want to compute the DFT of a discrete signal then this checkbox should not be checked 9 Click the button labeled Plot this will produce the Fourier transform or power spectrum A separate window will be created for displaying this new data 2 6 2 Examples Examples illustrating many of these aspects of computing Fourier transforms can be found in Chapters 5 and 6 of the book James S Walker Fast Fourier Transforms 2nd Edition CRC Press 1996 which we shall refer to as Fast Fourier Transforms 2nd Edition from now on 3Using an older command window DOS version of FAWAV called FAS 26 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM 2 6 3 Fourier cosine transform A Fourier cosine transform can be calculated by performing th
149. the text boxes labeled Real and Imag 3 To perform the filtering click on the button labeled P ot This will multiply the data function values by the filter function values to produce the filtered function values Scalogram This item allows you to perform a fundamental type of time frequency analysis of a signal known as a scalogram It is described in Chapter 4 beginning on p 53 Spectrogram This item allows you to perform a fundamental type of time frequency analysis of a signal known as a spectrogram It is described in Chapter 3 beginning on p 45 2 11 9 Help This item typically has two choices There is a general choice Help for FAWAV 1D which you choose to get the general help for all of the features of the 1D form When a dialog box is open on the right side of the screen there will be a second choice specifically designed to access the desired topic in the help file a form of interactive help 2 12 THE POPUP MENU FOR 1D FORMS 41 2 12 The Popup menu for 1D Forms If you right click on the graph area on the left of a 1D form then a popup menu will appear with 14 items We now discuss each of these items 2 12 1 Zoom This choice will zoom in to a region centered on the coordinates of the tip of the mouse pointer at the position where you right clicked on the graph area 2 12 2 Expand This choice will zoom out to a region centered on the coordinates of the tip of the mouse pointer at the position where you r
150. then it will be loaded into the Image Processor form see Chapter 7 on p 89 There are no plans at this time for FAWAV to handle color images a good free program for color images is IMAGE ANALYZER To load an image you right click on a graph region and select Load Image from the popup menu A standard file dialog box will appear from which you can select the file containing the graph s data 66 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 5 1 11 Saving an image file To save an image in the form you right click on it and select Save Image from the popup menu dialog box will appear on the screen which will allow you to specify the name of the file and the type of image format to use for saving Warnings 1 If the graph that you want to save is NOT a 256 level gray scale image then saving it using this format will usually produce a corrupted file that you cannot later reload 2 When saving an image file in any format other than do NOT include any periods in the file name For example the file name noisy barb mult noise will lead to an Error saving file message in all formats except pgm format If you change the file name to noisy barb mult noise it will be saved without error Either file name will be saved without error in the pgm format 5 1 12 Loading external binary files To display a graph that was previously saved using Save graph Graph you right click on a graph region and select Load Graph fr
151. tor 6 2 Clipping a portion of a file To clip a portion of a sound file for 1D analysis perform the following 3 steps 1 Left click on the sound graph region on the left side of the Sound Editor window at the place where you want the sound clip to begin A green line will appear to mark this point on the sound signal 2 Left click on the sound graph region at a place to the right of the line marked in step 1 to mark the endpoint of the sound clip A red line will appear to mark this point Note Because the 1D analysis procedures in FAWAV require a power of two for the number of points the end line may not appear at precisely the point you have clicked 3 Right click on the sound graph region From the popup menu that appears select Clip The portion of the sound signal you have marked off will then be graphed in the sound clip box to the right of the Audio Editor window You can then perform analysis on the sound clip by clicking on the Analysis button 6 3 Analyzing a sound clip Once a sound clipping is displayed in the clip window on the right side of the Sound Editor window then you can perform analysis on this clip by clicking on the Analyze button The sound clip is then displayed in a 1D form window and you can then perform all of the various analysis procedures wavelet transforms scalograms etc that are available in the 1D form window 6 4 Recording sounds The present version of Sound Editor does not have a procedur
152. u to plot a graph in the spectrogram window Using the variable g1 you can modify spectrogram magnitudes Examples of graphing are given in Section 3 2 on p 46 More examples are discussed in A Primer on Wavelets and their Scientific Applications Second Edition Audio This choice allows you to play the signal whose spectrogram has been computed The options are all discussed in Section 2 8 on p 31 Threshold To apply a threshold to a spectrogram you enter a value no more than the maximum value displayed above the input box for this threshold and then click the Apply button values of the spectrogram whose magnitudes are less than this value are set equal to zero and the new spectro gram is displayed If you are not satisfied with the results you can restore the original spectrogram by selecting Restore from the Graph menu Denoise This choice allows you to perform denoising For more details see Section 3 4 on p 47 Percussion scalogram This choice is used for analyzing percussion passages in music It is described in A Primer on Wavelets and their Scientific Applications Second Edition Invert This selection inverts the spectrogram See Section 3 3 on p 47 Restore This selection restores the original spectrogram It is usually invoked after a modification which did not produce the desired results 3 9 4 Help This item typically has two choices There is a general choice Help spectrogram which you choose
153. up menu 5 2 Wavelet transforms A wavelet transform of a displayed graph can be calculated by performing the following steps 1 You select Transforms Wavelet 2 In the text box labeled Graph enter the number of the graph that you want to transform 3 In the text box labeled Levels enter the number of levels to use for the transform By resting the mouse pointer on this text box a message should appear which tells you the allowed number of levels 4 If you want to compute an inverse transform then check the checkbox labeled Inverse Otherwise make sure this checkbox is not checked 5 Select the type of wavelet you want to use The choices are Coif Daub Haar and a selection of biorthogonal wavelets If you select Coif or Daub then you must also enter the appropriate number at the left of the wavelet type By resting the mouse pointer on the text box next to the wavelet type a message should appear which tells you the allowed numbers 5 3 WAVELET SERIES 67 6 Click on the button labeled Plot This will produce the wavelet transform 5 3 Wavelet series A wavelet series of a displayed graph can be calculated by performing the following steps 1 Choose Series Wavelet from the menu 2 3 In the text box labeled Graph enter the number of graph that you want to compute a series for In the text box labeled Levels enter the number of levels to use for the series By resting the mouse pointer on this text box a me
154. ures that are available for working with ID signals include the following 1 Graphing formulas and external data You can plot graphs of elementary functions studied in algebra and calculus see Section 2 1 on p 12 Or you can load external data see Section 2 1 12 on p 19 Or you can load audio A Fourier Wavelet Analyzer File Edit View Graph Series Transforms Convolve Analysis Help lt DGraph 1 Figure 2 1 The window that opens when New 1D form is selected Graph area displayed with white background to save ink 11 12 CHAPTER 2 PROCESSING 1D SIGNALS 1D FORM files see Section 2 1 11 on p 19 2 Wavelet transforms These are the Haar DaubJ CoifI transforms and biorthogonal wavelet transforms described in A Primer on Wavelets and their Scientific Applications See Section 2 2 on p 21 3 Wavelet series These are the Haar DaubJ CoifI series and a selection of biorthogonal wavelets series described in A Primer on Wavelets and their Scientific Applications and its Examples amp Exercises manual See Section 2 3 on p 21 4 Fourier series and transforms These are the classic Fourier series and transforms implemented using FFTs See Section 2 6 on p 23 5 Audio The 1D signals can be played over your computer s sound system This is especially helpful for judging the effectiveness of compression and noise removal See Section 2 8 on p 31 for a discussion of the simple Audio Editor tha
155. ution by the area of the square over which the displayed graphs are plotted then click on the checkbox labeled Divide by area Warning If the two signals are defined over different squares then FAWAV will divide by the area of the square for the second function This is confusing and is avoided by restricting to convolutions of functions defined over a common square when selecting Divide by area If you want to divide the values of the correlation by the energy of the Graph 1 signal then click on the checkbox labeled Normalize Click on the button labeled Plot 5 8 3 Auto correlation To perform an autocorrelation on a displayed graph which is the pair correlation of a graph with itself perform the following 4 steps 1 2 Enter the number for the displayed graph in the text box labeled Graph If you want to divide the values of the convolution by the area of the square over which the displayed graphs are plotted then click on the checkbox labeled Divide by area If you want to divide the values of the autocorrelation by the energy of the displayed signal then click on the checkbox labeled Normalize Click on the button labeled Plot This will produce the autocorrelation 72 CHAPTER 5 PROCESSING 2D SIGNALS 2D FORM 5 8 A Examples Several examples of the use of convolution and correlation are given in the two references A Primer on Wavelets and their Scientific Applications and Fast Fourier Transforms 2nd Edit
156. verse transform is being performed by choosing the opposite exponent sign then the interval type 0 2 A A should be selected for performing the inverse transform Select a Filter type The four choices for Filter type are the following 2 6 FOURIER TRANSFORMS 25 i Blackman filter This filter multiplies the signal values f k by the factors 0 42 0 5 cos 2k7 N 0 08 cos 4km N for k N 2 0 N 2 when the domain of the function is of the form L L and by the factors 0 42 0 5 cos 2 k N 2 m N 0 08 cos 4 amp N 2 N for k 0 when the domain of the function is of the form 0 L The symbol N denotes the number of points ii Gauss filter This filter multiplies the signal values f k by the factors e74 5 2k N for k N 2 0 N 2 when the domain of the function is of the form L L and by the factors e 45B N 2 NP for k 0 N when the domain of the function is of the form 0 L The symbol N denotes the number of points iii Hamming filter This filter multiplies the signal values f k by the factors 0 54 0 46 cos 2kn N for k N 2 0 N 2 when the domain of the function is of the form L and by the factors 0 54 0 46 cos 2 k N 2 N for k 0 N when the domain of the function is of the form 0 L The symbol N denotes the number of points iv Hanning filter This filter multiplies the signal values f k by

Download Pdf Manuals

image

Related Search

Related Contents

F4000 - F4024  VAX C90-AS-B-AS    Molloplast® B - Mid-Continental Dental Supply  取扱説明書  取付方法 - 日本アンテナ  CitiDISK DV Quick Usage Guide  notice pour remplir votre déclaration des revenus de 2004  OPERATOR`S MANUAL MANUEL de L`UTILISATEUR MANUAL del  PRELEVEMENT ET ANALYSE DES METAUX DANS LES  

Copyright © All rights reserved.
Failed to retrieve file