+1 vote
2,190 views
ZigZag scan is one of the steps in JPEG coding .What does happen in ZigZag scan ?
Category
asked Nov 24, 2015
edited Oct 14, 2018 | 2,190 views

## 3 Answers

0 votes
zig zag scanning is a transform based coding .it is employed for nonuniform quantization of NxN DCT coefficients. Lower coefficients have most of the energy and it is distributed circularly symmetric about the origin.The net result is that , it results in 1D sequence, after certain number of non zero coefficients most of the remaining become 0.

The category/run length encoding is such that it counts the no. of consequtive zeroes in scanned sequence before coding a non-zero coefficient into a two part symbol sym1 and sym2. Sym1 is based on magnitude of coded coefficient and sym2 is based on no. of zeroes before non zero coefficient.

zig zag scanning, therefore , orders the DCT coefficients into an efficient manner for this category/run coding phase to take advantage of this structure.
answered Jan 11, 2016 by
0 votes
Zigzag scanning will order the DCT coefficients so that ones with higher energy appear first, then lower after. There will inevitably be a few non-zero coefficients, followed by many zeroes due to the infrequent occurrence of high frequency high energy coefficients. This ordering is quite optimal for lossless compression algorithms (Huffman, Arithmetic, etc.). DCT coefficient compression happens after zigzag ordering. The final output bitstream will be considerably less than a non-zigzagged order.
answered Jan 12, 2016
0 votes
The spectrum of frequencies falls off with increasing frequency. To make the runlength encoding efficient, the highest frequencies should be visited last, since there will be a lot of zeros there. The zigzag pattern basically goes through the 2D frequency space from low (starting at 0,0 aka DC) to high.
answered Jan 17, 2016