Hondaâs CTX700 DCT doesnât look like a traditional motorcycle, because itâs anything but old fashioned. We got where we are in the world by innovating, and the CTX700 is a perfect example of how innovative a motorcycle can be, while still embracing the best parts of the sport.
I work on a function in Matlab that calculates the DCT (discrete cosine transform) of an image. I don't know what is not working in my code, but I got an output image with the same number. I want to use this formula for my DCT.
Any ideas please.
user3717023
user2827482user2827482
1 Answer
In the inner loop over x and y, you are not reading from the correct place in image_t. You have copied the local block into a location with k,l as the upper left corner for use in processing, but in the inner loop you are always reading from the same block that starts at 1,1 as the upper left corner in image_t.
mikeTronixmikeTronix
Got a question that you canât ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged imagematlabdct or ask your own question.Library
Transforms
visiontransforms
Description
The 2-D DCT block calculates the two-dimensional discrete cosinetransform of the input signal. The equation for the two-dimensionalDCT is
where C(m),C(n)=1/2 for m,n=0 and C(m),C(n)=1 otherwise.
The number of rows and columns of the input signal must be powersof two. The output of this block has dimensions the same dimensionsas the input.
If the data type of the input signal is floating point, theoutput of the block is the same data type.
Use the Sine and cosine computation parameterto specify how the block computes the sine and cosine terms in theDCT algorithm. If you select
Trigonometric fcn ,the block computes the sine and cosine values during the simulation.If you select Table lookup , the block computesand stores the trigonometric values before the simulation starts.In this case, the block requires extra memory.
Fixed-Point Data Types
The following diagram shows the data types used in the 2-D DCTblock for fixed-point signals. Inputs are first cast to the outputdata type and stored in the output buffer. Each butterfly stage processessignals in the accumulator data type, with the final output of thebutterfly being cast back into the output data type.
The output of the multiplier is in the product output data typewhen at least one of the inputs to the multiplier is real. When bothinputs to the multiplier are complex, the result of the multiplicationis in the accumulator data type. For details on the complex multiplicationperformed, refer to Multiplication Data Types. You can set the sine table,product output, accumulator, and output data types in the block maskas discussed in the next section.
Parameters
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |