Jpeg

압축방법 세부 선택

DCT method

You'd have to be a mathemetician or something to fully understand it, but essentially it's the compression formula. It's self- explained in the export dialog (not sure about the regular save dialog). Fast is fast but results in a larger file (not much larger though). Slow is in the middle, and float gets the best compression but is the slowest.

Smoothing factor

Just what it says, it smooths out the image. Zoom to 100% on the preview on the export dialog & try changing it between 1 & 10, you'll see the diff if you look closely. This can marginally improve the visual quality of the image, but it's main purpose is to reduce filesize.

Progressive

A normal (non-progressive) jpg will load line by line, at full quality, from the top down. A progressive one will load the whole image at a low quality, then gradually increase the quality as the image loads. This aspect of it is purely for use in photos you want on the web. However, there is a secondary benefit to this: A progressive jpg will have a noticably smaller filesize than a regular one (at least on most images). This is in direct contrast to the similar "interlaced" setting for pngs & gifs, which actually INcrease the size of the png/gif.

Subsampling

Have you ever noticed how a jpg image will usually have washed out colors (especially reds)? That's due to subsampling. The subsampling setting will greatly impact both the size & quality of your image. "Default" is the lowest quality/filesize, the 1x1,1x1,1x1 option is the best. If you use the high quality setting, you can get a jpg that looks almost as good as a lossless image, but at a fraction of the filesize. (It's a myth that jpgs have to look like crap due to being jpgs, it's just that the vast majority of jpgs one encounters were made using the crappiest subsampling setting.)

허프만 부호화 방식

JPEG에서 사용하는 엔트로피 코딩은 Huffman coding과 Arithmetic coding의 두 가지이다. 이 두 가지를 모두 사용하는 것은 아니고 파일에 따라서 어떤 파일은 Huffman coding을, 어떤 파일은 Arithmetic coding을 사용하는 것이다. Huffman coding은 허프만이란 사람이 개발한 코드로 구현하기 쉽고 사용료가 없기 때문에 가장 많이 사용되는 코드이다. Arithmetic coding은 IBM에서 개발한 코드로, 압축률은 Huffman coding보다 약간 좋다고 알려져 있지만, 실수연산을 하기 때문에 코드가 복잡하고 IBM에 사용료를 지불해야 하기 때문에 잘 사용하지 않는다.((출처}} 디지털 전송에서 평균 부호의 길이를 가장 짧게 할 수 있는 가변 길이 부호(variable length code)의 하나. 주어진 신호의 발생 확률 분포에 대하여 최소의 평균 부호 길이를 실현하는 부호이다.

예를 들면, 어두운 부분이 많은 영상에서는 신호의 레벨 분포가 낮은 쪽으로 치우쳐 있다. 이와 같이 신호의 발생 분포가 편재된 경우, 발생 확률이 높은 기호에는 짧은 부호를, 낮은 기호에는 긴 부호를 할당하는 가변 길이 부호를 사용함으로써 전체 부호량을 감축할 수 있다.

허프만 부호는 팩스 전송이나 제이페그(JPEG), 엠페그(MPEG) 등 각종 화상 정보의 압축·부호화 표준 규격에도 널리 사용되고 있다.

허프만 부호를 구성하는 방식. 허프만 부호를 구성할 때의 순서는 다음과 같다.

  1. 발생 확률이 가장 낮은 2개의 기호를 선정한다.
  2. ㉠에서 선정한 2개의 기호를 합해서 하나의 새로운 기호로 하고, 발생 확률은 그 둘의 합으로 한다(전체 기호 수가 하나 감소된다).
  3. 기호 수가 1이 될 때까지 ㉠과 ㉡의 조작을 반복한다.
  4. 하나가 된 기호로부터, 기호 수가 2개였던 상태로 거슬러 올라가서 분기된 2개의 기호에 0 또는 1을 할당한다.
  5. 기호를 감소해 나간 조작을 거슬러 올라가서 0 또는 1을 이때까지 할당되어 있는 부호의 뒤에 놓아, 그 기호의 부호어로 한다.
  6. 기호 수가 원래의 수가 될 때까지 ㉤의 조작을 반복한다.

예로서, 아래의 표와 같이 발생 확률에 제시되어 있는 차분 펄스 부호 변조(DPCM)의 예측 오차 신호에 대한 허프만 부호를 위와 같은 순서로 구성하면, 구성된 허프만 부호의 길이는 2.14비트로 엔트로피에 가장 가까운 값이 된다.

The huffman table optimization is a lossless (reversible) process that has absolutely no effect on the resulting image quality. If one has the option, it is almost always best to enable JPEG optimization. The extra file size savings can't hurt. However, as it may potentially reduce compatibility with some bad JPEG decoders, this may be enough of a reason for you to disable it.

출 처 : 네이버 백과사전

■ 내용 정리

허프만 부호화방식(Huffman encoding)

1. 개요 - 데이터 전체를 나타내는 정보의 발생확률값이 서로 다르게 발생되는데 착안한 부호화 기법 - 정보 신호의 발생 분포가 편재된경우, 발생확율이 높은 기호는 짧은 부호를, 발생확율이 낮은 기호는 긴 부호를 할당함. - 가변 길이 부호 (Variable length code)이며, 주어진 신호의 발생 확률 분포에 대하여 최소의 평균 길이를 실현하는 부호화방식.

2. 동작원리 ① 발생확률이 높은 순서대로 부호를 정렬한후, 최소 발생확률 2개 부호를 선정함. ② 최소 발생확률 2개 부호를 합한 값을 구한후, 발생확률이 높은 순서대로 부호 정렬 ③ ①과 ②의 과정을 부호 값이 1이 될때 까지 반복함 ④ 원래 확률값과 각각의 확률값을 합산하여 나온 결과값에 각각 0과1을 순차적으로 부여함.

3. 특징 - 팩스전송, JPEG, MPEG등 화상 정보 압축 부호화 표준규격에 사용 - 차분펄스부호변조(DPCM)방식의 예측 오차신호에 대해 허프만 부호를 적용하면 엔트로피에 가장 근접한 값이됨 - 무손실 부호화 기법

누구나 수정하실 수 있습니다. 문법은 Formatting Syntax참조하세요.

역링크