The code shows how to perform zigzag scan on a NxN matrix and is written in C++. Zigzag scanning is used in many different applications including JPEG Compression using DCT Transform.
The application is written in C++ in console mode. There are two important functions in the code:
- ZigZagGetScan()
- ZigZagPutScan()
Which can be used to obtain the data in the form of a zigzag scan order as well as put it back.
A NxN matrix is used as a simple example to demonstrates the functionality.