# Forum: help

Monitor Forum | Start New Thread
| |

RE: time-frequency pixmap fill it [ Reply ] By: Kamil Adiloglu on 2007-01-05 13:40 | [forum:2560] |

Hi, thanks a lot for your help. I will apply al of them immediately. Regards Kamil |

RE: time-frequency pixmap fill it [ Reply ] By: Emmanuel Ravelli on 2007-01-04 20:28 | [forum:2556] |

Hi again, Sorry, I answered too fast. For the gabor atoms, if the amplitude is positive, it is A=10*log10(A^2)=20*log10(A). However, for the MDCT atoms, you must add an absolute value, A=20*log10(abs(A)) Cheers! Emmanuel |

RE: time-frequency pixmap fill it [ Reply ] By: Emmanuel Ravelli on 2007-01-04 20:12 | [forum:2555] |

Hi Sacha and Kamil, The amplitude of a MDCT atom is not necessarily positive, it could be negative. However the TF-map values are positive as they are the square of the amplitudes. I think the mptk implementation in C++ is fine; but the M-file is not. For the gabor atom, it should be A = atom.amp(channel); A = 20*log10(A^2); instead of A = atom.amp(channel); A = 20*log10(A); All my best and bonne annĂ©e! Emmanuel |

RE: time-frequency pixmap fill it [ Reply ] By: Sacha Krstulovic on 2007-01-04 17:18 | [forum:2554] |

Hi Kamil; The axes should be the time and the frequency. About the negative amplitude values, I will forward your question to Emmanuel Ravelli (http://www.lam.jussieu.fr/src/Membres/Ravelli/index.htm who is the initial developer of the MDCT block. Regards; -*- Sacha K. -*- |

RE: time-frequency pixmap fill it [ Reply ] By: Kamil Adiloglu on 2007-01-04 16:58 | [forum:2553] |

Hi Sacha, thanks for the immediate response :). I tried your sample code, it works. However, I do not understand what the axes mean. On the other hand, I already tried to extend the bookplot with mdct. I took the gabor part as a template, and tried to adapt it, but some of the amplitudes are negative. Therefore the log values of them are imaginary numbers. What is the unit of the amplitude? Maybe, this could help. In any case, I am still working on it. I will inform you, when I'm finished. Regards... Kamil |

RE: time-frequency pixmap fill it [ Reply ] By: Sacha Krstulovic on 2007-01-04 10:55 | [forum:2552] |

Hello Kamil; The .flt files represent the image as a sequence of raw floats. You can load them under matlab with fread(), then use reshape() to set the matrix to the right size, then use image() or mesh() to plot it. Example: % mpview -s256x512 myBook.bin img.flt Then under matlab: >> fid=fopen('img.flt'); >> IMG=fread(fid,inf,'float'); >> fclose(fid); >> IMG=reshape(IMG,256,512); >> image(IMG);axis xy; >> figure; mesh(IMG);shading('interp');axis xy; You may have to play with the axes to get the image in the right direction. (And I may have made a few syntax errors in the above example, please check the relevant commands with Matlab's help.) The MDCT atoms are indeed missing from bookplot(), but the bookplot() code is fairly easy to understand. If you have Matlab knowledge and a little time, your contribution on this point would be very much appreciated, and you would be cited as a contributor to the project. Thanks for using MPTK. Regards; -*- Sacha K. -*- |

time-frequency pixmap fill it [ Reply ] By: Kamil Adiloglu on 2007-01-03 17:33 | [forum:2548] |

Hi, I am a PhD student at the Berlin University of Technology. I am working on efficient coding of natural sounds. I decomposed several sounds by a cosine dictionary, and saved the dictionaries in files. The MatLab function bookplot do not plot my dictionary. It can only plot gabor, harmonic and dirac dictionaries, but not mdct. So I created with the function mpview pixmap files. However I cannot open them with any image processing program. I tried several of them. I also tried to convert them, but without success. Could you tell me how I can open these .flt files or how I can plot my mdct dictionary? Thanks in advance. Regards. Kamil |