50 - Discrete Cosine Transform

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2024

ความคิดเห็น • 5

  • @anthonywhite7976
    @anthonywhite7976 6 หลายเดือนก่อน

    Thanks for this great explanation!

  • @lucaswoon6118
    @lucaswoon6118 ปีที่แล้ว +2

    This was really helpful!! Thank you so much :D 👍

  • @htchtc203
    @htchtc203 ปีที่แล้ว +2

    Dear Sir. With all respect, do you have a small typing error in the equation starting at time of 12.00min?
    In brackets you do have term exp(-j....) twice. That doesn't result cos term.
    It think it should be exp(-j....)+exp(j....), which will result cos term.

    • @dspfundamentals
      @dspfundamentals  ปีที่แล้ว +5

      You are correct. One of the exp terms should have been positive.

  • @maverick87007
    @maverick87007 ปีที่แล้ว +1

    Hello greetings. I am a fan of A.I. and I'm interested in learning about audio processing. In my search I have come across something of which I have not been able to find much information. This is the discrete cosine transform. I have seen your video and it has helped me a lot, I have only found your video and another one more useful to learn. But there is something in both of them that I cannot understand. It's the exponential factor. How can I remove it out of the summation? and where does the root of 2N come from? I have used the proof of the discrete cosine transform from a discrete Fourier transform of length 2N. And those terms I can't understand I wish I could explain myself better but English is not very good. I have been programming the FFT using time decimation using c and it works quite well. I compare my results with matlab R2019. Using the FFT library, I have made an even extension of x(n) and applied the FFT to it. The output I get matches what matlab gives me, but it doesn't match when I use the DCT command.
    script in matlab
    x=[1,2,3,4]
    X=dct(x)
    f=idct(X)
    xpar=[1,2,3,4,4,3,2,1]
    fx=fft(xpar)
    Result.
    >> DCT
    x =
    1 2 3 4
    X =
    5.0000 -2.2304 0 -0.1585
    f =
    1.0000 2.0000 3.0000 4.0000
    xpar =
    1 2 3 4 4 3 2 1
    fx =
    Columns 1 through 6
    20.0000 + 0.0000i -5.8284 - 2.4142i 0.0000 + 0.0000i -0.1716 - 0.4142i 0.0000 + 0.0000i -0.1716 + 0.4142i
    Columns 7 through 8
    0.0000 + 0.0000i -5.8284 + 2.4142i
    my program written in c:
    Calculate DCT
    [0] = 5.000000
    [1] = -2.230442
    [2] = -0.000000
    [3] = -0.158513
    Calculate IDCT
    [0] = 1.000000
    [1] = 2.000000
    [2] = 3.000000
    [3] = 4.000000
    Calculate FFT
    Rectangular Magnitude
    0) 20.0000 0.0000
    1) -5.8284 -2.4142
    2) 0.0000 0.0000
    3) -0.1716 -0.4142
    4) 0.0000 0.0000
    5) -0.1716 0.4142
    6) 0.0000 0.0000
    7) -5.8284 2.4142
    polar magnitude
    0) 20.0000
    1) 6.3086
    2) 0.0000
    3) 0.4483
    4) 0.0000
    5) 0.4483
    6) 0.0000
    7) 6.3086
    I hope you can help me understand why my program and matlab give the same result and I would really like to contact you to learn. greetings from Chile.