KR102025494B1 - Apparatus based on visually lossless compression method for compression of bayer image and method therefor - Google Patents

Apparatus based on visually lossless compression method for compression of bayer image and method therefor Download PDF

Info

Publication number
KR102025494B1
KR102025494B1 KR1020180061583A KR20180061583A KR102025494B1 KR 102025494 B1 KR102025494 B1 KR 102025494B1 KR 1020180061583 A KR1020180061583 A KR 1020180061583A KR 20180061583 A KR20180061583 A KR 20180061583A KR 102025494 B1 KR102025494 B1 KR 102025494B1
Authority
KR
South Korea
Prior art keywords
pixel
channel
pixels
line
current
Prior art date
Application number
KR1020180061583A
Other languages
Korean (ko)
Inventor
김용준
Original Assignee
주식회사 아이닉스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 아이닉스 filed Critical 주식회사 아이닉스
Priority to KR1020180061583A priority Critical patent/KR102025494B1/en
Application granted granted Critical
Publication of KR102025494B1 publication Critical patent/KR102025494B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction
    • H04N1/411Bandwidth or redundancy reduction for the transmission or storage or reproduction of two-tone pictures, e.g. black and white pictures
    • H04N1/413Systems or arrangements allowing the picture to be reproduced without loss or modification of picture-information
    • H04N1/417Systems or arrangements allowing the picture to be reproduced without loss or modification of picture-information using predictive or differential encoding
    • H04N1/4175Systems or arrangements allowing the picture to be reproduced without loss or modification of picture-information using predictive or differential encoding involving the encoding of tone transitions with respect to tone transitions in a reference line
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/21Intermediate information storage
    • H04N1/2104Intermediate information storage for one or a few pictures
    • H04N1/2112Intermediate information storage for one or a few pictures using still video cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention relates to a method for encoding a Bayer image including an RGB channel, which comprises the following steps: (a-1) estimating a value of a previous pixel using a plurality of pixels before a current pixel; (b-1) estimating variation between the plurality of pixels before the current pixel; (c-1) generating a plurality of lookup tables using a previous image frame; (d-1) selecting one of the plurality of lookup tables generated in the step (c-1) by using the variation estimated in the step (b-1); (e-1) subtracting the previous pixel estimated in the step (a-1) from the current pixel, and outputting the difference thereof; and (f-1) receiving a differential value of the step (e-1) to perform fixed length encoding by using the lookup table selected in the step (d-1).

Description

베이어 영상 압축을 위한 시각적 무손실 압축 기법에 기반한 장치 및 그 방법{APPARATUS BASED ON VISUALLY LOSSLESS COMPRESSION METHOD FOR COMPRESSION OF BAYER IMAGE AND METHOD THEREFOR}Apparatus and Method Based on Visual Lossless Compression Technique for Bayer Image Compression {APPARATUS BASED ON VISUALLY LOSSLESS COMPRESSION METHOD FOR COMPRESSION OF BAYER IMAGE AND METHOD THEREFOR}

본 발명은 베이어 영상 압축을 위한 시각적 무손실 압축 기법에 기반한 장치 및 그 방법에 관한 것으로, 더욱 상세하게는 적응적 DPCM(Differential Pulse Code Modulation)을 이용한 시각적 무손실 압축 기법에 기반한 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and method based on visual lossless compression for Bayer image compression, and more particularly, to an apparatus and method based on visual lossless compression using adaptive differential pulse code modulation (DPCM). .

최근 카메라 센서의 해상도 UHD로 발달함에 따라 카메라 ISP에서 처리해야 되는 데이터와 메모리, 대역폭 등이 급격하게 증가하게 되었다. 특히 ISP 기능 중 이전 프레임 정보를 요구하는 모듈(WDR, 3DNR 등)의 경우, 외부 메모리가 필요한데 해상도가 UHD로 증가함에 따라 필요한 메모리 용량이 증가하고 요구하는 대역폭이 증가하게 된다. 이와 같은 문제 때문에 UHD 데이터를 처리하기 위해 ISP의 메모리를 고사양으로 변경하여 영상 처리를 수행한다. 하지만, 고사양으로 변경하여 영상 처리를 수행할 경우 고사양의 메모리 변경에 따른 카메라 ISP(Image Signal Processor)의 제조 단가 상승이 야기된다.Recently, with the development of the camera sensor's resolution UHD, the data, memory, and bandwidth to be processed by the camera ISP have dramatically increased. Especially for modules that require previous frame information among ISP functions (WDR, 3DNR, etc.), external memory is required. As the resolution increases to UHD, the required memory capacity increases and the required bandwidth increases. For this reason, the image processing is performed by changing the ISP memory to a high specification in order to process UHD data. However, when the image processing is performed by changing to the high specification, the manufacturing cost of the camera ISP (Image Signal Processor) increases due to the change of the high specification memory.

처리되는 데이터양을 줄여주는 방법으로는 데이터 압축 기법이 있다.데이터 압축 기법은 크게 무손실(Lossless) 기법, 시각적 무손실(Visually Lossless) 기법 및 손실(Lossy) 기법이 있다. 종래의 무손실 기법의 경우 데이터 손실은 없지만 연산의 복잡도가 커서 ISP의 로직 크기(Logic Size)가 크게 증가한다. 반면 시각적 무손실 기법의 경우 데이터 손실은 있지만 무손실 기법에 비해 연산 복잡도가 낮아 로직 크기가 작은 편이다. 아울러, 종래 손실(Lossy) 기법의 경우 YC 또는 RGB 데이터 처리에 적합한 형태이며 베이어(Bayer) 데이터 처리에는 효율이 크게 떨어지게 된다. 따라서 연산의 복잡도가 낮으며 베이어 데이터를 처리할 수 있는 시각적 무손실 기법의 필요하다. To reduce the amount of data that is processed, there are data compression techniques, which include lossless techniques, visually lossless techniques, and lossy techniques. In the conventional lossless technique, there is no data loss, but the complexity of the operation greatly increases the logic size of the ISP. On the other hand, the visual lossless technique has data loss but the logic size is small compared to the lossless technique due to the low computational complexity. In addition, the conventional lossy technique is a type suitable for processing YC or RGB data, and the efficiency is greatly reduced for Bayer data processing. Therefore, the computational complexity is low and a visual lossless technique that can process Bayer data is required.

본 발명은 전술한 바와 같은 기술적 과제를 해결하는 데 목적이 있는 발명으로서, 로직(Logic)의 복잡도가 낮은 적응적 DPCM(Differential Pulse Code Modulation) 기반의 베이어 영상 압축을 위한 시각적 무손실 압축(Visually Lossless Compression) 기법에 기반한 장치 및 그 방법에 그 목적이 있다.Disclosure of Invention The present invention aims to solve the above technical problem, and is a visually lossless compression for Bayer image compression based on adaptive DPCM (Differential Pulse Code Modulation) with low logic complexity. The purpose is to provide a device based on the method and a method thereof.

본 발명의 RGB 채널을 포함하는 베이어 영상을 위한 인코딩 방법은, (a-1) 현재 픽셀 이전의 다수의 픽셀을 이용하여, 이전의 픽셀의 값을 추정하는 단계; (b-1) 상기 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계; 및 (c-1) 이전 영상 프레임을 이용하여, 다수의 룩업 테이블을 생성하는 단계;를 포함한다.An encoding method for a Bayer image including an RGB channel of the present invention includes: (a-1) estimating a value of a previous pixel using a plurality of pixels before the current pixel; (b-1) estimating the amount of change between the plurality of pixels before the current pixel; And (c-1) generating a plurality of lookup tables using the previous image frame.

아울러, 본 발명의 인코딩 방법은, (d-1) 상기 (b-1) 단계에서 추정된 변화량을 이용하여, 상기 (c-1) 단계에서 생성된 다수의 룩업 테이블 중 하나를 선택하는 단계; (e-1) 상기 현재 픽셀로부터 상기 (a-1) 단계에서 추정된 이전 픽셀을 차분하여 출력하는 단계; 및 (f-1) 상기 (d-1) 단계에서 선택된 룩업 테이블을 이용하여, 상기 (e-1) 단계의 차분값을 입력받아 고정 길이 인코딩(Fixed Length Encoding)을 실시하는 단계;를 더 포함하는 것을 특징으로 한다.In addition, the encoding method of the present invention, (d-1) using the amount of change estimated in the step (b-1), selecting one of a plurality of lookup table generated in the step (c-1); (e-1) differentially outputting the previous pixel estimated in the step (a-1) from the current pixel; And (f-1) performing a fixed length encoding by receiving the difference value of the step (e-1) using the lookup table selected in the step (d-1). Characterized in that.

바람직하게는, 상기 (a-1) 단계는, 상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다. 구체적으로, 상기 (a-1) 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; 및 상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다. 아울러, 상기 (a-1) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및 상기 A1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다.Preferably, step (a-1) comprises: at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs, to estimate the value of the previous pixel. Specifically, the (a-1) step, the current pixel (G 0) is G, a channel, G the current pixel of the pixel of the channel (G 0) of G 1-pixel-pixel of the G-channel which is located immediately before; A G 2 pixel, which is a pixel located behind a pixel of the G channel of the previous line of the line where the current pixel G 0 is located, among the pixels of the G channel adjacent to the current pixel G 0 ; A G 3 pixel, which is a pixel located in front of a pixel of the G channel of the previous line of the line where the current pixel G 0 is located, among the pixels of the G channel adjacent to the current pixel G 0 ; And the G 1 pixel is located in one pixel of the G channel of the previous line of the line, the pixel which is located in front of the pixel of the adjacent G-channel and the G 1 pixel G 4 pixels; using the to estimate the value of the previous pixel . In addition, in the step (a-1), when the current pixel A 0 is an R channel or a B channel, A 1 which is a pixel of the corresponding channel located immediately before the current pixel A 0 among the pixels of the corresponding channel. pixel; A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; And a G 4 pixel which is a pixel of a G channel adjacent to the A 1 pixel among the pixels of the G channel of the previous line of the line where the A 1 pixel is located.

또한, 상기 (b-1) 단계는, 상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다. 구체적으로, 상기 (b-1) 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; 상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀; G 채널의 픽셀 중 상기 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀; G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및 상기 G5 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G5 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정한다. 아울러, 상기 (b-1) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 해당 채널의 픽셀 중 상기 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀; G 채널의 픽셀 중 상기 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및 G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정한다.In addition, the step (b-1) may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs. Specifically, the (b-1) step, the current pixel (G 0) is G, a channel, G the current pixel of the pixel of the channel (G 0) of G 1-pixel-pixel of the G-channel which is located immediately before; A G 2 pixel, which is a pixel located behind a pixel of the G channel of the previous line of the line where the current pixel G 0 is located, among the pixels of the G channel adjacent to the current pixel G 0 ; A G 3 pixel, which is a pixel located in front of a pixel of the G channel of the previous line of the line where the current pixel G 0 is located, among the pixels of the G channel adjacent to the current pixel G 0 ; Of the G pixel of the first pixel of the G channel of the previous line of the line is located, the pixel which is located in front of the pixel of the adjacent channel and the G pixel G 1 G 4 pixels; A G 5 pixel which is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel; A G 6 pixel that is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel; And the G pixels 7 pixels which is located in front of the pixels of the G pixel is in line 5 G channel of the pixel of the G channel of the previous line, and the adjacent pixels of the G 5; using, estimates the amount of change. In addition, in the step (b-1), when the current pixel A 0 is an R channel or a B channel, A 1 which is a pixel of the corresponding channel located immediately before the current pixel A 0 among the pixels of the corresponding channel. pixel; An A 2 pixel which is a pixel of the channel located immediately before the A 1 pixel among the pixels of the channel; A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 2 pixel which is a pixel of the G channel located immediately after the G 3 pixels among the pixels of the G channel; And a G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel.

바람직하게는, 상기 (c-1) 단계는, 이전 프레임을 구성하는 픽셀 각각에 대해, 추정된 바로 앞에 위치하는 인접한 이전 픽셀과의 차분값의 분포의 조밀도를 이용하여, 상기 다수의 룩업 테이블을 생성하는 것을 특징으로 한다. 구체적으로, 상기 (c-1) 단계는, 상기 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 이하인 경우에는 1차 방정식에 의해 코드 값을 생성하고, 상기 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 초과하는 경우에는 2차 방정식에 의해 코드 값을 생성한다.Preferably, the step (c-1) is performed for each of the pixels constituting the previous frame, using the density of the distribution of the difference value with the adjacent previous pixel located immediately before the estimated number of lookup tables. It characterized in that to generate. Specifically, in the step (c-1), when codes of each of the plurality of lookup tables are less than or equal to a predetermined threshold, a code value is generated by a linear equation, and codes of each of the plurality of lookup tables are predetermined. If the threshold is exceeded, the code value is generated by the quadratic equation.

아울러, 상기 (d-1) 단계는, 상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 한다. 구체적으로, 상기 (d-1) 단계는, 상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고, 상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 상기 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것이 바람직하다.In the step (d-1), it is determined whether at least one of the plurality of changes estimated in the step (b-1) is equal to or greater than a value of a predetermined position of one of the plurality of lookup tables. It is done. Specifically, in the step (d-1), if at least one of the plurality of changes estimated in the step (b-1) is equal to or greater than a value of a predetermined position of one of the plurality of lookup tables. When a lookup table is selected and at least one of the plurality of changes estimated in the step (b-1) is less than a value of a predetermined position of one lookup table of the plurality of lookup tables, the corresponding one of the plurality of lookup tables is selected. It is preferable to select a lookup table other than the lookup table.

본 발명의 RGB 채널을 포함하는 베이어 영상을 위한 디코딩 방법은, (a-2) 현재 픽셀 이전의 다수의 픽셀을 이용하여, 이전의 픽셀의 값을 추정하는 단계; (b-2) 상기 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계; 및 (c-2) 상기 (b-2) 단계에서 추정된 변화량을 이용하여, 미리 저장된 다수의 룩업 테이블 중 하나를 선택하는 단계;를 포함한다.A decoding method for a Bayer image including an RGB channel of the present invention includes: (a-2) estimating a value of a previous pixel using a plurality of pixels before the current pixel; (b-2) estimating the amount of change between the plurality of pixels before the current pixel; And (c-2) selecting one of a plurality of pre-stored lookup tables using the change amount estimated in step (b-2).

아울러, 본 발명의 디코딩 방법은, (d-2) 상기 (c-2) 단계에서 선택된 룩업 테이블을 이용하여, 입력된 데이터의 고정 길이 디코딩(Fixed Length Decoding)을 실시하는 단계; 및 (e-2) 상기 현재 픽셀로부터 상기 (a-2) 단계에서 추정된 이전 픽셀을 가산하여 출력하는 단계;를 더 포함하는 것을 특징으로 한다.In addition, the decoding method of the present invention, (d-2) performing a fixed length decoding of the input data using the look-up table selected in the step (c-2); And (e-2) adding and outputting the previous pixel estimated in the step (a-2) from the current pixel.

바람직하게는, 상기 (a-2) 단계는, 상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다. 구체적으로, 상기 (a-2) 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀; 및 상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다. 아울러, 상기 (a-2) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및 상기 A1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다.Preferably, step (a-2) comprises: at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs, to estimate the value of the previous pixel. Specifically, the (a-2) step, the current pixel (G 0) is G, a channel, G the current pixel of the pixel of the channel (G 0) of G 1-pixel-pixel of the G-channel which is located immediately before; The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind; The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel; And G 4 pixels of the pixel of the G-channel which is located in front of the two pixels of the pixel of the G channel of the previous line of the line is the G 1 pixels located adjacent to the G 1 pixels; using a, the value of the previous pixel Estimate. In addition, in the step (a-2), when the current pixel A 0 is an R channel or a B channel, A 1 , which is a pixel of the corresponding channel located immediately before the current pixel A 0 , among the pixels of the corresponding channel. pixel; A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; And a G 4 pixel which is a pixel of a G channel adjacent to the A 1 pixel among the pixels of the G channel of the previous line of the line where the A 1 pixel is located.

또한, 상기 (b-2) 단계는, 상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다. 구체적으로, 상기 (b-2) 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀; 상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀; 상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀; G 채널의 픽셀 중 상기 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀; G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및 상기 G5 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G5 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정한다. 아울러, 상기 (b-2) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 해당 채널의 픽셀 중 상기 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀; 상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀; G 채널의 픽셀 중 상기 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및 G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정한다. In addition, the step (b-2) may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs. Specifically, the (b-2) stage, the current pixel (G 0) is G, a channel, G the current pixel of the pixel of the channel (G 0) of G 1-pixel-pixel of the G-channel which is located immediately before; The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind; The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel; Wherein the G 1 pixels among the pixels of the G channel of the previous line of the line is located, the pixels of the G-channel which is located in front of the two pixels adjacent to the pixel G 1 G 4 pixels; A G 5 pixel which is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel; A G 6 pixel that is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel; 7 and G pixel is the pixel of the G-channel which is located in front of the two pixels of the pixel of the G channel, and the adjacent G 5 pixels in the previous line of the line is the G pixels located 5; using, estimates the amount of change. In addition, in the step (b-2), when the current pixel A 0 is an R channel or a B channel, A 1 , which is a pixel of the corresponding channel located immediately before the current pixel A 0 , among the pixels of the corresponding channel. pixel; An A 2 pixel which is a pixel of the channel located immediately before the A 1 pixel among the pixels of the channel; A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; A G 2 pixel which is a pixel of the G channel located immediately after the G 3 pixels among the pixels of the G channel; And a G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel.

바람직하게는, 상기 (c-2) 단계는, 상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 한다. 구체적으로, 상기 (c-2) 단계는, 상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고, 상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 상기 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택한다.Preferably, the step (c-2) may include determining whether at least one of the plurality of changes estimated in the step (b-2) is equal to or greater than a value of a predetermined position of one of the plurality of lookup tables. It is characterized by. Specifically, in the step (c-2), if at least one of the plurality of changes estimated in the step (b-2) is equal to or greater than a value of a predetermined position of one of the plurality of lookup tables. Selecting a lookup table, and when at least one of the plurality of changes estimated in step (b-2) is less than a value of a predetermined position of one of the plurality of lookup tables, the corresponding one of the plurality of lookup tables; Select a lookup table other than the lookup table.

본 발명에 따르면, 로직(Logic)의 복잡도가 낮은 적응적 DPCM(Differential Pulse Code Modulation) 기반의 베이어 영상 압축을 위한 시각적 무손실 압축(Visually Lossless Compression) 기법에 기반한 장치 및 그 방법을 제공할 수 있다.According to the present invention, an apparatus and a method based on a visually lossless compression technique for Bayer image compression based on adaptive DPCM (Differential Pulse Code Modulation) having low logic complexity can be provided.

도 1은 본 발명의 시각적 무손실 압축 기법이 적용된 ISP 시스템의 구성도.
도 2는 본 발명의 바람직한 일실시예에 따른 시각적 무손실 압축 방법을 위한 인코딩 장치의 구성도.
도 3은 본 발명의 바람직한 일실시예에 따른 시각적 무손실 압축 방법을 위한 디코딩 장치의 구성도.
도 4는 G 채널의 이전 픽셀의 추정 방법에 대한 설명도.
도 5는 R 채널 또는 B 채널의 이전 픽셀의 추정 방법에 대한 설명도.
도 6은 G 채널의 이전 픽셀 간의 변화량 추정 방법에 대한 설명도.
도 7은 R 채널 또는 G 채널의 이전 픽셀 간의 변화량 추정 방법에 대한 설명도.
도 8은 차분 히스토그햄의 분포에 따른 룩업 테이블의 변화 그래프.
도 9 및 도 10은 각각 룩업 테이블을 테이블 2(Tb2) 및 테이블 1(Tb1)을 사용했을 경우의 예시도.
1 is a block diagram of an ISP system to which the visual lossless compression technique of the present invention is applied.
2 is a block diagram of an encoding apparatus for a visual lossless compression method according to an embodiment of the present invention.
3 is a block diagram of a decoding apparatus for a visual lossless compression method according to an embodiment of the present invention.
4 is an explanatory diagram for a method of estimating a previous pixel of a G channel.
5 is an explanatory diagram for a method of estimating a previous pixel of an R channel or a B channel;
6 is an explanatory diagram for explaining a method for estimating variation between previous pixels of a G channel.
7 is an explanatory diagram for explaining a method for estimating variation between previous pixels of an R channel or a G channel;
8 is a graph of changes in the lookup table according to the distribution of differential histogram ham.
9 and 10 are exemplary diagrams when the lookup table uses Table 2 (Tb2) and Table 1 (Tb1), respectively.

이하, 첨부된 도면을 참조하면서 본 발명의 실시예에 따른 베이어 영상 압축을 위한 시각적 무손실 압축 기법에 기반한 장치 및 그 방법에 대해 상세히 설명하기로 한다.Hereinafter, an apparatus and a method based on a visual lossless compression technique for Bayer image compression according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 하기의 실시예는 본 발명을 구체화하기 위한 것일 뿐 본 발명의 권리 범위를 제한하거나 한정하는 것이 아님은 물론이다. 본 발명의 상세한 설명 및 실시예로부터 본 발명이 속하는 기술 분야의 전문가가 용이하게 유추할 수 있는 것은 본 발명의 권리 범위에 속하는 것으로 해석된다.The following examples of the present invention are intended to embody the present invention, but not to limit or limit the scope of the present invention. From the detailed description and examples of the present invention, those skilled in the art to which the present invention pertains can easily be interpreted as belonging to the scope of the present invention.

본 발명에서는 베이어(Bayer) 영상을 효율적으로 압축하기 위한 적응적 DPCM(Differential Pulse Code Modulation) 기반 시각적 무손실 압축(Visually Lossless Compression, VLC) 기법을 제안한다. 카메라 센서가 UHD로 발달함에 따라 카메라 ISP(Image Signal Processor)에서 소모하는 외부 메모리 용량 및 대역폭이 크게 증가하게 된다. 따라서 외부 메모리 제어기의 입출력에 기반 시각적 무손실 압축 인코딩 장치(210) 및 디코딩 장치(220)를 설계하여 위와 같은 문제를 해결한다. 종래 기반 시각적 무손실 압축 기법의 경우 YC 또는 RGB 환경에서 이루어지지만 카메라 ISP의 경우 베이어(Bayer) 환경에서의 영상 처리가 많기 때문에 VLC 또한 베이어 환경에서 이루어져야 된다. 또한, 종래 기반 시각적 무손실 압축 모듈의 로직(Logic) 크기가 크게 되면 생산 단가를 증가시키는 요인이 될 수 있기 때문에 이를 고려하여 내부 SRAM 사용량이 최소화되도록 설계한다. 이러한 점을 고려하여 본 발명에서는 베이어 압축을 위한 저 복잡도의 적응적 DPCM 기반 기반 시각적 무손실 압축 기법을 제안한다.The present invention proposes an adaptive DPCM (Visually Lossless Compression) technique for efficiently compressing Bayer images. As the camera sensor develops into UHD, the external memory capacity and bandwidth consumed by the camera image signal processor (ISP) are greatly increased. Therefore, the above problem is solved by designing a visual lossless compression encoding apparatus 210 and a decoding apparatus 220 based on input / output of an external memory controller. Conventional-based visual lossless compression technique is performed in YC or RGB environment, but in case of camera ISP, VLC should also be performed in Bayer environment because there is much image processing in Bayer environment. In addition, since the logic size of the conventional visual lossless compression module may be a factor to increase the production cost, it is designed to minimize the internal SRAM usage in consideration of this. In view of this point, the present invention proposes a low complexity adaptive DPCM-based visual lossless compression scheme for Bayer compression.

즉, 본 발명의 주요한 특징은 다음과 같다. 본 발명에서는 카메라 해상도 증가에 따른 카메라 ISP의 메모리 용량 및 대역폭 증가 문제를 해결하기 위해 로직의 복잡도가 낮은 적응적 DPCM 기반의 기반 시각적 무손실 압축 기법을 개발하였다. 카메라 ISP의 경우 베이어 데이터 처리가 많기 때문에 베이어 압축을 기반으로 하였다. 베이어 압축인 것으로 고려하여 제 1 예측기(211) 또는 제 2 예측기(221)에서 기존 LOCO-I(Low Complexity Lossless Compression for Images) 방식을 변형하여 적용하였으며, 이전 G 채널 간의 변화량을 추정하여 DPCM 수행 후 얻은 차분 데이터를 양자화할 때 적응적으로 테이블을 선택하도록 한다. 또한, 변동 길이 코딩(Variable Length Coding-1)으로 할 경우 메모리 제어기의 복잡도가 매우 증가한다는 점을 고려하여 고정 길이 코딩(Fixed Length Coding)으로 코딩한다. 본 발명을 통해 고해상도의 카메라 ISP 개발 시 간단한 기반 시각적 무손실 압축 모듈을 추가하여 제조 단가 증가를 최소화시킬 수 있다.That is, the main features of the present invention are as follows. In the present invention, in order to solve the problem of increasing the memory capacity and bandwidth of the camera ISP according to the increase of the camera resolution, an adaptive DPCM-based visual lossless compression technique with low logic complexity is developed. The camera ISP is based on Bayer compression because it has a lot of Bayer data processing. In consideration of Bayer compression, the existing Low Complexity Lossless Compression for Images (LOCO-I) scheme is applied to the first predictor 211 or the second predictor 221, and the DPCM is performed after estimating the change amount between the previous G channels. When quantizing the difference data obtained, the table is adaptively selected. In addition, in the case of variable length coding (Variable Length Coding-1), since the complexity of the memory controller is greatly increased, coding is performed using fixed length coding. The present invention can minimize the increase in manufacturing cost by adding a simple based visual lossless compression module when developing a high resolution camera ISP.

본 발명에서는, 외부 메모리 제어기의 복잡도를 고려하여 변동 길이 방식 대신 고정 길이 방식으로 적용한다.In the present invention, in consideration of the complexity of the external memory controller, the fixed length method is applied instead of the variable length method.

본 발명의 시각적 무손실 기법은 베이어 영상의 압축이기 때문에 인접한 화소 간에 연관성이 떨어진다는 점을 고려한 적응적 DPCM 방식을 이용한다. 먼저, 제 1 예측기(211) 또는 제 2 예측기(221)에서는 입력 데이터가 베이어 영상이라는 점을 고려하여 변형된 LOCO-I 방식을 적용하여 이전 데이터를 추정한다. 그런 다음 추정된 데이터와 현재 픽셀의 데이터의 차분 값을 이전 데이터들 간의 변화량을 추정하여 선택된 룩업 테이블(Lookup Table)의 코드값으로 고정 길이 인코딩한다. The visual lossless technique of the present invention uses an adaptive DPCM scheme considering that the association between adjacent pixels is poor because it is the compression of the Bayer image. First, the first predictor 211 or the second predictor 221 estimates previous data by applying a modified LOCO-I method in consideration of the fact that the input data is a Bayer image. Then, the difference between the estimated data and the data of the current pixel is estimated by the amount of change between the previous data and fixed-length encoded to the code value of the selected lookup table.

본 발명은 베이어 영상의 시각적 무손실 압축 기법을 통해 카메라 센서의 해상도에 따른 메모리 용량 및 대역폭 문제를 개선한다. 최종적으로 사람의 눈으로 화질 저하를 느낄 수 없는 수준의 압축 기법으로 비압축 결과와 주관적 화질 측면에서 유사하면서 고사양의 외부 메모리를 사용하지 않아도 되어 카메라 ISP 제조 단가는 많이 증가하지 않는 개선된 결과를 얻을 수 있다. 고사양의 외부 메모리를 사용하더라도 압축을 통해 확보된 메모리를 이용하여 고사양의 UHD ISP 생산이 가능해질 것으로 전망된다.The present invention improves memory capacity and bandwidth problems according to the resolution of the camera sensor through a visual lossless compression technique of Bayer image. Finally, it is a compression technique that can not feel the deterioration of quality with the human eye, and is similar in terms of the uncompressed result and subjective image quality, but does not require the use of high-definition external memory, so that the camera ISP manufacturing cost does not increase much. Can be. Even if a high specification external memory is used, it is expected that a high specification UHD ISP can be produced using the memory obtained through compression.

도 1은 본 발명의 시각적 무손실 압축 기법이 적용된 ISP 시스템(100)의 구성도를 나타낸다. ISP의 기능 중 프레임 메모리가 필요로 하는 WDR(Wide Dynamic Range), DNR(Digital Noise Reducion)의 경우 DDR과 같은 메모리(170)가 필요하다. 이때 센서(Sensor)의 해상도가 증가하게 되면 메모리(170)의 용량과 대역폭도 증가하게 된다. 최근 카메라 센서가 UHD로 발달하게 되면서 필요한 메모리(170)의 용량과 대역폭이 증가하게 되고 이로 인해 ISP 생산 단가가 증가하게 된다. 따라서 본 발명에서는 도 1과 같이 시각적 무손실 압축 기법에 의한 인코딩 장치(210) 및 디코딩 장치(220)를 메모리(170)가 필요한 모듈의 입력과 출력, 즉 메모리 제어기(180)의 앞단에 추가하여 메모리(170)의 용량과 대역폭을 확보할 수 있다.1 is a block diagram of an ISP system 100 to which the visual lossless compression technique of the present invention is applied. Among the functions of the ISP, a memory 170 such as DDR is required in the case of a wide dynamic range (WDR) or a digital noise reduction (DNR) that requires a frame memory. At this time, if the resolution of the sensor increases, the capacity and bandwidth of the memory 170 also increase. Recently, as the camera sensor is developed into UHD, the capacity and bandwidth of the required memory 170 are increased, thereby increasing the production cost of the ISP. Accordingly, in the present invention, as shown in FIG. 1, the encoding device 210 and the decoding device 220 by the visual lossless compression technique are added to the input and output of the module requiring the memory 170, that is, the front of the memory controller 180. Capacity and bandwidth of 170 can be secured.

참고로, 도 1로부터 알 수 있는 바와 같이 일반적인 ISP 시스템(100)은, 센서로부터 입력된 신호를 렌즈 쉐이딩(Lens Shading)부(110), 결함 정정(Defect Correction)부(120), WDR부(130), DNR부(140), 디모자이싱(Demosaicing)부(150) 및 컬러 토닝(Color Toning)부(160)를 거쳐 HDMI 출력을 하게 된다.For reference, as can be seen from FIG. 1, the general ISP system 100 includes a lens shading unit 110, a defect correction unit 120, and a WDR unit. 130, the DNR unit 140, the demosaicing unit 150, and the color toning unit 160 outputs the HDMI.

본 발명의 베이어 영상 압축을 위한 시각적 무손실 압축 기법에 기반한 장치로는 인코딩 장치(210) 및 디코딩 장치(220)를 예로 들 수 있다.Examples of the apparatus based on the visual lossless compression technique for compressing the Bayer image may include the encoding apparatus 210 and the decoding apparatus 220.

하기에 본 발명의 인코딩 장치(210) 및 디코딩 장치(220)에 대해 구체적으로 설명하기로 한다.Hereinafter, the encoding device 210 and the decoding device 220 of the present invention will be described in detail.

본 발명의 인코딩 장치(210) 및 디코딩 장치(220)는 컴퓨터 프로그램의 형태로 MCU, DSP, CPU 등과 같은 프로세서의 적어도 일부에 의해 구현될 수 있다.The encoding device 210 and the decoding device 220 of the present invention may be implemented by at least a part of a processor such as MCU, DSP, CPU, etc. in the form of a computer program.

도 2는 본 발명의 바람직한 일실시예에 따른 시각적 무손실 압축 방법을 위한 인코딩 장치(210)의 구성도를 나타낸다. 본 발명의 인코딩 장치(210)는, 기존 DPCM 방식에서 베이어 압축을 수행할 수 있도록 변형하였다.2 is a block diagram of an encoding apparatus 210 for a visual lossless compression method according to an exemplary embodiment of the present invention. The encoding apparatus 210 of the present invention has been modified to perform Bayer compression in the existing DPCM scheme.

도 2로부터 알 수 있는 바와 같이, 본 발명의 인코딩 장치(210)는, 제 1 예측기(211), 제 1 테이블 생성기(212), 제 1 테이블 선택기(213), 제 1 차분값 출력기(214), 제 1 가산기(215) 및 제 1 인코더(216)를 포함한다.As can be seen from FIG. 2, the encoding device 210 of the present invention includes a first predictor 211, a first table generator 212, a first table selector 213, and a first difference value output device 214. And a first adder 215 and a first encoder 216.

제 1 예측기(211)에서는 입력 영상이 베이어 구조라는 점을 고려하여 같은 채널 간의 상관성을 이용하여 이전 픽셀을 예측한다. 또한, 제 1 예측기(211)는 이전 데이터들의 변화량을 측정하여 현재 위치의 에지(Edge) 세기를 예측한다. 즉, 제 1 예측기(211)는, 현재 픽셀 이전의 다수의 픽셀을 이용하여, 현재 픽셀과 유사한 이전의 픽셀의 값을 추정하고, 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 역할을 한다.The first predictor 211 predicts a previous pixel by using correlation between the same channels in consideration of the fact that the input image has a Bayer structure. In addition, the first predictor 211 estimates an edge strength of the current position by measuring a change amount of previous data. That is, the first predictor 211 estimates the value of a previous pixel similar to the current pixel by using the plurality of pixels before the current pixel, and estimates the amount of change between the plurality of pixels before the current pixel. .

제 1 테이블 생성기(212)는, 이전 영상의 데이터를 분석하여 현재 프레임 장면(Scene)에 적합한 룩업 테이블을 생성한다. 즉, 제 1 테이블 생성기(212)는, 이전 영상 프레임을 이용하여, 현재 영상 프레임을 위한 다수의 룩업 테이블을 생성하는 역할을 한다.The first table generator 212 analyzes the data of the previous image to generate a lookup table suitable for the current frame scene. That is, the first table generator 212 generates a plurality of lookup tables for the current image frame by using the previous image frame.

제 1 테이블 선택기(213)에서는 제 1 예측기(211)로부터 예측된 에지 세기를 이용하여 제 1 인코더(216)에서 사용할 룩업 테이블을 결정한다. 즉, 제 1 테이블 선택기(213)는, 추정된 변화량을 이용하여, 제 1 테이블 생성기(212)에서 생성된 다수의 룩업 테이블 중 하나를 선택하는 역할을 한다.The first table selector 213 determines the lookup table to be used by the first encoder 216 using the edge strength predicted from the first predictor 211. That is, the first table selector 213 selects one of a plurality of lookup tables generated by the first table generator 212 using the estimated change amount.

제 1 차분값 출력기(214)는, 현재 픽셀로부터 제 1 예측기(211)에서 추정된 이전 픽셀을 차분하여 출력하는 역할을 한다.The first difference value output unit 214 serves to differentially output the previous pixel estimated by the first predictor 211 from the current pixel.

제 1 가산기(215)는, 제 1 예측기(211)의 출력 및 제 1 차분값 출력기(214)의 출력을 가산하여 제 1 예측기(211)로 입력하는 역할을 한다.The first adder 215 adds the output of the first predictor 211 and the output of the first difference value output unit 214 to input the first predictor 211.

제 1 인코더(216)에서는 주어진 차분 데이터의 절대값과 결정된 룩업 테이블 값을 보고 오차가 가장 적은 룩업 테이블 값으로 코딩한다. 이를 통해 고정된 길이의 인코딩 데이터를 얻을 수 있다. 인코딩된 데이터는 부호비트와 테이블 코드 값을 가진다. 즉, 제 1 인코더(216)는, 제 1 테이블 선택기(213)에서 선택된 룩업 테이블을 이용하여, 제 1 차분값 출력기(214)의 차분값을 입력받아 고정 길이 인코딩(Fixed Length Encoding)을 실시하는 역할을 한다.The first encoder 216 codes the absolute value of the given difference data and the determined lookup table value into a lookup table value having the least error. In this way, a fixed length of encoded data can be obtained. The encoded data has a sign bit and a table code value. That is, the first encoder 216 receives the difference value of the first difference value output unit 214 using the lookup table selected by the first table selector 213 to perform fixed length encoding. Play a role.

도 3은 본 발명의 바람직한 일실시예에 따른 시각적 무손실 압축 방법을 위한 디코딩 장치(220)의 구성도를 나타낸다. 본 발명의 디코딩 장치(220)는, 기존 DPCM 방식에서 베이어 압축된 데이터를 복원할 수 있도록 변형하였다.3 is a block diagram of a decoding apparatus 220 for a visual lossless compression method according to an exemplary embodiment of the present invention. The decoding apparatus 220 of the present invention has been modified to restore Bayer compressed data in the existing DPCM scheme.

도 3으로부터 알 수 있는 바와 같이, 본 발명의 디코딩 장치(220)는, 제 2 예측기(221), 제 2 테이블 선택기(222), 제 2 디코더(223) 및 제 2 가산기(224)를 포함한다.As can be seen from FIG. 3, the decoding device 220 of the present invention includes a second predictor 221, a second table selector 222, a second decoder 223, and a second adder 224. .

본 발명의 디코딩 장치(220)에서는 상술한 본 발명의 인코딩 장치(210)와 동일한 룩업 테이블 정보를 가지며, 제 2 예측기(221)에서 얻어진 주변 정보의 변화량을 가지고 제 2 테이블 선택기(222)가 결정한 룩업 테이블의 코드 값을 구하고 부호 비트를 판단한다. 그런 다음 제 2 예측기(221)로부터 결정된 이전 데이터와 제 2 가산기(224)에서 가산한다. 이러한 과정을 통해 복원된 베이어 영상을 얻을 수 있다. In the decoding device 220 according to the present invention, the second table selector 222 has the same look-up table information as the encoding device 210 of the present invention and the amount of change in the peripheral information obtained by the second predictor 221. Get the code value of the lookup table and determine the sign bit. Then, the previous data determined from the second predictor 221 and the second adder 224 are added. Through this process, a restored Bayer image can be obtained.

정리하자면, 제 2 예측기(221)는, 현재 픽셀 이전의 다수의 픽셀을 이용하여, 현재 픽셀과 유사한 이전의 픽셀의 값을 추정하고, 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 역할을 한다. 아울러, 제 2 테이블 선택기(222)에서는, 제 2 예측기(221)에서 추정된 변화량을 이용하여, 인코딩 장치(210)의 제 1 테이블 생성기(212)에 의해 생성되어 공유를 위해 미리 저장된 다수의 룩업 테이블 중 하나를 선택하는 역할을 한다. In summary, the second predictor 221 estimates a value of a previous pixel that is similar to the current pixel by using a plurality of pixels before the current pixel, and estimates a change amount between the plurality of pixels before the current pixel. do. In addition, in the second table selector 222, a plurality of lookups generated by the first table generator 212 of the encoding apparatus 210 and stored in advance for sharing using the amount of change estimated by the second predictor 221. It selects one of the tables.

또한, 제 2 디코더(223)는, 제 2 테이블 선택기(222)에서 선택된 룩업 테이블을 이용하여, 입력된 데이터의 고정 길이 디코딩(Fixed Length Decoding)을 실시하는 한다. 아울러, 제 2 가산기(224)는, 현재 픽셀로부터 제 2 예측기(221)에서 추정된 이전 픽셀을 가산하여 출력한다.In addition, the second decoder 223 performs fixed length decoding of the input data by using the lookup table selected by the second table selector 222. In addition, the second adder 224 adds and outputs the previous pixel estimated by the second predictor 221 from the current pixel.

하기에 본 발명의 인코딩 장치(210)와 디코딩 장치(220)의 주요 구성에 대해 보다 구체적으로 설명하기로 한다.Hereinafter, the main components of the encoding device 210 and the decoding device 220 of the present invention will be described in more detail.

제 1First 예측기(211),  Predictor 211, 제 22nd 예측기(221) Predictor (221)

제 1 예측기(211) 또는 제 2 예측기(221)는 연산 복잡도가 낮은 LOCO-I(Low Complexity Lossless Compression for Images)(참고문헌 : The LOCO-I lossless image compression algorithm: principles and standardization into JPEG-LS, TIP 2000)을 베이어 환경에 맞게 변형하여 적용한다. 제 1 예측기(211) 또는 제 2 예측기(221)는 크게 두 가지 기능을 수행한다. 먼저, 제 1 예측기(211) 또는 제 2 예측기(221)는, 현재 값과 차분을 구하기 위한 이전 값을 추정하는 기능과 제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)에서 사용하는 이전 값의 변화량을 추정하는 기능이 있다. The first predictor 211 or the second predictor 221 is a low complexity lossless image compression algorithm (LOCO-I) for low computational complexity (Reference: The LOCO-I lossless image compression algorithm: principles and standardization into JPEG-LS, TIP 2000) is adapted to the Bayer environment. The first predictor 211 or the second predictor 221 performs two functions. First, the first predictor 211 or the second predictor 221 includes a function of estimating a previous value for obtaining a difference from a current value and a transfer used by the first table selector 213 or the second table selector 222. There is a function to estimate the amount of change in the value.

이전 픽셀을 추정하는 방법에 하기와 같다. 아울러, 베이어 환경이기 때문에 RGB 채널별로 서로 다른 방법으로 이전 픽셀을 추정한다. The method of estimating the previous pixel is as follows. In addition, since the Bayer environment, the previous pixel is estimated by different methods for each RGB channel.

도 4는 G 채널의 이전 픽셀의 추정 방법에 대한 설명도이다. 4 is an explanatory diagram for a method of estimating a previous pixel of a G channel.

G 채널의 경우, [수학식 1] 및 [수학식 2]를 이용하여 추정한다. 여기서

Figure 112018053019012-pat00001
이고
Figure 112018053019012-pat00002
이다.In the case of the G channel, Equation 1 and Equation 2 are used to estimate. here
Figure 112018053019012-pat00001
ego
Figure 112018053019012-pat00002
to be.

D1, D2는 이전 데이터의 변화량으로 다음과 같다.

Figure 112018053019012-pat00003
,
Figure 112018053019012-pat00004
다. α는 현재 픽셀과 변화량 사이의 거리를 보상하기 위한 가중치이다. D 1 and D 2 are changes in the previous data as follows.
Figure 112018053019012-pat00003
,
Figure 112018053019012-pat00004
All. α is a weight for compensating the distance between the current pixel and the amount of change.

[수학식 1] 및 [수학식 2]로부터 알 수 있는 바와 같이, G 채널의 경우, 수평과 수직의 에지의 방향성을 고려하여 현재 라인에서 현재 픽셀(G0)의 이전의 동일한 G 채널의 픽셀인 G1 픽셀과 이전 라인에서 현재 픽셀(G0)과 인접한 다른 채널의 픽셀 인 G2' 픽셀 중 현재 픽셀(G0)과 유사한 이전의 픽셀을 추정한다. 수평과 수직의 에지의 방향성을 고려시의 추정된 값이 일정 조건을 만족하지 않으면, 현재 라인에서 현재 픽셀(G0)의 이전의 동일한 G 채널의 픽셀인 G1 픽셀, G2' 픽셀 이전의 G2' 픽셀과 동일한 채널의 픽셀인 G3' 픽셀을 이용하여, 현재 픽셀(G0)과 유사한 이전의 픽셀을 추정하게 된다.As can be seen from [Equation 1] and [Equation 2], in the case of the G channel, the pixel of the same G channel before the current pixel G 0 in the current line in consideration of the directionality of the horizontal and vertical edges. which estimates the transfer of pixel 1 is similar to the G pixels and the current pixel in the previous line (G 0) of the current pixel G 2 'pixel of pixels adjacent to the other channel (G 0). If the estimated value considering the directionality of the horizontal and vertical edges does not satisfy a certain condition, the G 1 pixel, G 2 'pixel before the current pixel G 0 in the current line By using the G 3 'pixel, which is a pixel of the same channel as the G 2 ' pixel, the previous pixel similar to the current pixel G 0 is estimated.

Figure 112018053019012-pat00005
Figure 112018053019012-pat00005

Figure 112018053019012-pat00006
Figure 112018053019012-pat00006

도 5는 R 채널 또는 B 채널의 이전 픽셀의 추정 방법에 대한 설명도이다. 5 is an explanatory diagram for a method of estimating a previous pixel of an R channel or a B channel.

본 발명에서는 메모리 사용량을 최소화시키기 위해 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우에도, 이전 라인의 G 채널만 제 1 예측기(211) 또는 제 2 예측기(221)에서 고려한다. 그렇기 때문에 R 채널인 경우에는 [수학식 3]을, B 채널인 경우에는 [수학식 4]를 이용하여 추정한다. 여기서 β, γ는 현재 픽셀과 서로 다른 채널인 G 채널의 변화량을 보상하기 위한 가중치이다. In the present invention, even when the current pixel A 0 is an R channel or a B channel, only the G channel of the previous line is considered by the first predictor 211 or the second predictor 221 in order to minimize memory usage. Therefore, in case of the R channel, Equation 3 is estimated, and in case of the B channel, Equation 4 is used. Β and γ are weights for compensating for the amount of change in the G channel, which is a different channel from the current pixel.

[수학식 3] 및 [수학식 4]로부터 알 수 있는 바와 같이, R 채널 또는 B 채널인 경우, 수평과 수직의 에지의 방향성을 고려하여 현재 라인에서 현재 픽셀(A0)의 이전의 동일한 채널의 픽셀인 A1 픽셀과 이전 라인에서 현재 픽셀(A0)과 인접한 다른 채널의 픽셀인 G3 픽셀 중 현재 픽셀(A0)과 유사한 이전의 픽셀을 추정한다. 수평과 수직의 에지의 방향성을 고려시의 추정된 값이 일정 조건을 만족하지 않으면, 현재 라인에서 현재 픽셀(A0)의 이전의 동일한 채널의 픽셀인 A1 픽셀, G3 픽셀 이전의 G3 픽셀과 동일한 채널의 픽셀인 G4 픽셀을 이용하여, 현재 픽셀(A0)과 유사한 이전의 픽셀을 추정하게 된다.As can be seen from [Equation 3] and [Equation 4], in the case of the R channel or the B channel, the same channel before the current pixel A 0 in the current line in consideration of the directionality of the horizontal and vertical edges. of the pixel a 1 of the pixel in the previous line of pixels in the other channel adjacent to the current pixel (a 0) G 3 pixels to estimate the previous pixel is similar to the current pixel (a 0). The estimated value at the time of considering the direction of the horizontal or vertical edge does not satisfy the predetermined condition, the previous same pixel in the channel A 1-pixel, G 3 pixels prior to the current pixel (A 0) in the current line G 3 Using the G 4 pixel, which is the pixel of the same channel as the pixel, the previous pixel similar to the current pixel A 0 is estimated.

Figure 112019040540434-pat00033
Figure 112019040540434-pat00033

Figure 112019040540434-pat00034
Figure 112019040540434-pat00034

즉, 제 1 예측기(211) 또는 제 2 예측기(221)는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다. That is, the first predictor 211 or the second predictor 221 may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs, to estimate the value of the previous pixel.

구체적으로, 현재 픽셀(G0)이 G 채널인 경우, 제 1 예측기(211) 또는 제 2 예측기(221)는, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; 및 G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다. 아울러, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및 A1 픽셀이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것이 바람직하다.In detail, when the current pixel G 0 is a G channel, the first predictor 211 or the second predictor 221 is a pixel of the G channel that is located immediately before the current pixel G 0 of the pixels of the G channel. G 1 pixel; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; G 1 and G pixels are pixels of 4 pixels which is located in front of the pixels of the G channel of the previous line adjacent to the pixel of G 1 in the line; using, characterized in that for estimating the value of the previous pixel. In addition, when the current pixel A 0 is an R channel or a B channel, an A 1 pixel which is a pixel of the corresponding channel located immediately before the current pixel A 0 among the pixels of the corresponding channel; A G 3 pixel that is a pixel of the G channel adjacent to the current pixel A 0 of the previous line of the line where the current pixel A 0 is located; And a G 4 pixel which is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the A 1 pixel is located, it is preferable to estimate the value of the previous pixel.

제 1 예측기(211) 또는 제 2 예측기(221)에서 이전 값의 변화량의 추정 역시 채널 별로 서로 다르게 적용된다. The estimation of the change amount of the previous value in the first predictor 211 or the second predictor 221 is also applied differently for each channel.

도 6은 G 채널의 이전 픽셀 간의 변화량 추정 방법에 대한 설명도이다. 6 is an explanatory diagram for explaining a method for estimating variation between previous pixels of a G channel.

G 채널의 이전 픽셀 간의 변화량 추정은 [수학식 5]와 같이 나타낼 수 있다. [수학식 5]에서

Figure 112018053019012-pat00009
은 이전 픽셀 간의 변화량을 나타낸다.The estimation of the change amount between the previous pixels of the G channel may be expressed as shown in [Equation 5]. In [Equation 5]
Figure 112018053019012-pat00009
Represents the amount of change between the previous pixels.

Figure 112018053019012-pat00010
Figure 112018053019012-pat00010

도 7은 R 채널 또는 G 채널의 이전 픽셀 간의 변화량 추정 방법에 대한 설명도이다. 7 is an explanatory diagram illustrating a method of estimating the amount of change between previous pixels of an R channel or a G channel.

R 채널은 [수학식 6]과 같이, B 채널은 [수학식 7]과 같이 이전 픽셀 중 같은 채널의 변화량과 G 채널의 변화량을 추정한다.

Figure 112018053019012-pat00011
,
Figure 112018053019012-pat00012
는 이전 픽셀 간의 변화량을 나타낸다. As shown in [Equation 6], the R channel estimates the change amount of the same channel among the previous pixels and the change amount of the G channel as shown in [Equation 7].
Figure 112018053019012-pat00011
,
Figure 112018053019012-pat00012
Represents the amount of change between the previous pixels.

Figure 112018053019012-pat00013
Figure 112018053019012-pat00013

Figure 112018053019012-pat00014
Figure 112018053019012-pat00014

즉, 제 1 예측기(211) 또는 제 2 예측기(221)는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다.That is, the first predictor 211 or the second predictor 221 may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs.

구체적으로, 제 1 예측기(211) 또는 제 2 예측기(221)는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀; G 채널의 픽셀 중 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀; G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및 G5 픽셀이 위치한 라인의 이전 라인의 G5 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다. In detail, when the current pixel G 0 is the G channel, the first predictor 211 or the second predictor 221 may include a pixel of the G channel that is located immediately before the current pixel G 0 of the pixels of the G channel. G 1 pixel; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; The G 1 pixel in the pixel which is located in front of the pixels of the G channel adjacent to the pixel of the previous line of the line G 1 G 4 pixels; A G 5 pixel that is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel; A G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel; G 5 and G pixel is a pixel in the pixel 7 which is located in front of the pixels of the G channel 5 adjacent to the G pixel in the previous line of the line located; using, characterized in that for estimating the amount of change.

아울러, 제 1 예측기(211) 또는 제 2 예측기(221)는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 해당 채널의 픽셀 중 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀과 인접한 G 채널의 픽셀인 G3 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀; G 채널의 픽셀 중 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및 G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다.In addition, when the current pixel A 0 is an R channel or a B channel, the first predictor 211 or the second predictor 221 includes a corresponding channel located immediately before the current pixel A 0 among pixels of the corresponding channel. A 1 pixel which is a pixel of; An A 2 pixel which is a pixel of the channel located immediately before A 1 pixel among the pixels of the channel; A G 3 pixel that is a pixel of a G channel adjacent to the current pixel of the previous line of the line where the current pixel A 0 is located; A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the current pixel A 0 is located; A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel of the previous line of the line where the current pixel A 0 is located; A G 2 pixel that is a pixel of the G channel located immediately after G 3 pixels among the pixels of the G channel; And a G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel.

제 1First 테이블 생성기(212) Table generator (212)

제 1 테이블 생성기(212)에서는 이전 장면(Scene)을 분석하여 현재 장면에 적합한 룩업 테이블을 생성한다. 이전 장면을 분석하는 방식은 차분 값의 히스토그램을 보고 판단한다. The first table generator 212 analyzes a previous scene to generate a lookup table suitable for the current scene. The way of analyzing the previous scene is determined by looking at the histogram of the difference value.

도 8은 차분 히스토그햄의 분포에 따른 룩업 테이블의 변화 그래프를 나타낸다.8 shows a graph of a change in the lookup table according to the distribution of differential histogram ham.

도 8에서와 같이 조밀하게 갈 경우, 코드 값(Code Value)을 조밀하게 가져가고, 넓게 갈 경우 코드 값을 더 넓혀준다. 이러한 개념을 가지고 현재 장면에 적합한 테이블을 생성한다. 룩업 테이블은 1차 및 2차 방정식을 기반으로 생성한다. 테이블 2(Tb2)의 생성 방식은 [수학식 8]과 같고 테이블 1(Tb1)의 생성 방식은 [수학식 9]와 같다. 여기서 x는 코드(Code)이고, y는 코드 값(Code Value)을 의미한다. th1, th2는 조밀한 영역을 결정하기 위한 문턱 값이며, max_dif는 이전 영상의 최대 차분 값을 의미하고, mid_dif는 이전 영상의 차분 히스토그램의 누적 분포가 미리 정해진 값, 예를 들면 누적 분포가 85% 되는 지점의 차분 값을 의미한다.As shown in FIG. 8, the code value is taken densely, and the code value is wider when the code value is wider. With this concept, we create a table suitable for the current scene. Lookup tables are generated based on linear and quadratic equations. The generation method of Table 2 (Tb2) is shown in [Equation 8], and the generation method of Table 1 (Tb1) is shown in [Equation 9]. Here, x is a code and y is a code value. th1, th2 are threshold values for determining the dense area, max_dif means the maximum difference value of the previous image, and mid_dif is a predetermined value of the cumulative distribution of the difference histogram of the previous image, for example, the cumulative distribution is 85% It means the difference value of the point.

Figure 112018053019012-pat00015
Figure 112018053019012-pat00015

(여기서,

Figure 112018053019012-pat00016
임.)(here,
Figure 112018053019012-pat00016
being.)

Figure 112018053019012-pat00017
Figure 112018053019012-pat00017

(여기서,

Figure 112018053019012-pat00018
임.)(here,
Figure 112018053019012-pat00018
being.)

즉, 제 1 테이블 생성기(212)는, 이전 프레임을 구성하는 픽셀 각각에 대해, 추정된 바로 앞에 위치하는 인접한 이전 픽셀과의 차분값의 분포의 조밀도를 이용하여, 다수의 룩업 테이블을 생성하는 것을 특징으로 한다. 구체적으로 제 1 테이블 생성기(212)는, 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 이하인 경우에는 1차 방정식에 의해 코드 값을 생성하고, 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 초과하는 경우에는 2차 방정식에 의해 코드 값을 생성하는 것을 특징으로 하는 인코딩 방법.That is, the first table generator 212 generates a plurality of lookup tables for each pixel constituting the previous frame by using the density of the distribution of the difference value with the adjacent previous pixel positioned immediately before the estimated one. It is characterized by. In detail, the first table generator 212 generates a code value by a linear equation when a code of each of the plurality of lookup tables is less than or equal to a predetermined threshold, and codes of each of the plurality of lookup tables exceed a predetermined threshold. The encoding method, characterized in that for generating a code value by a quadratic equation.

제 1First 테이블 선택기(213) 또는  Table selector (213) or 제 22nd 테이블 선택기(222) Table Selector (222)

제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)는 제 1 예측기(211) 또는 제 2 예측기(221)로부터 얻은 이전 데이터들 간의 변화량

Figure 112018053019012-pat00019
,
Figure 112018053019012-pat00020
을 이용하여 최적의 룩업 테이블을 결정한다. The first table selector 213 or the second table selector 222 is a change amount between previous data obtained from the first predictor 211 or the second predictor 221.
Figure 112018053019012-pat00019
,
Figure 112018053019012-pat00020
Determine the optimal lookup table using.

제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)에 의한 룩업 테이블의 선택은, [수학식 10]과 같이 나타낼 수 있다.The selection of the lookup table by the first table selector 213 or the second table selector 222 may be expressed as shown in [Equation 10].

Figure 112018053019012-pat00021
Figure 112018053019012-pat00021

도 9 및 도 10은 각각 룩업 테이블을 테이블 2(Tb2) 및 테이블 1(Tb1)을 사용했을 경우의 예시도이다.9 and 10 are exemplary diagrams in the case where Table 2 (Tb2) and Table 1 (Tb1) are used as the lookup table, respectively.

즉,

Figure 112018053019012-pat00022
의 변화량이 Tb1의 15번 값보다 크면 현재 위치에서 인코딩 할 때 Tb2를 사용하여 코딩한다. 이를 통해 에지 영역이나 평탄 영역에서 효과적으로 압축이 가능하다.In other words,
Figure 112018053019012-pat00022
If the amount of change is greater than the value of Tb1, it is coded using Tb2 when encoding at the current position. This enables effective compression in the edge or flat areas.

즉, 제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)는, 제 1 예측기(211) 또는 제 2 예측기(221)에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 한다.That is, in the first table selector 213 or the second table selector 222, at least one of the plurality of changes estimated by the first predictor 211 or the second predictor 221 may be one of the plurality of lookup tables. It is characterized by determining whether or not a value of a predetermined position of the lookup table.

구체적으로 제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)는, 제 1 예측기(211) 또는 제 2 예측기(221)에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고, 제 1 예측기(211) 또는 제 2 예측기(221)에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것을 특징으로 한다.In more detail, in the first table selector 213 or the second table selector 222, at least one of the plurality of changes estimated by the first predictor 211 or the second predictor 221 may be one of the plurality of lookup tables. If the lookup table is equal to or larger than a predetermined value, one corresponding lookup table is selected, and at least one of the plurality of changes estimated by the first predictor 211 or the second predictor 221 is one of the lookup tables. When the value is less than a predetermined position of the table, a lookup table other than the corresponding one lookup table is selected from among the plurality of lookup tables.

제 1First 인코더(216) 또는  Encoder 216 or 제 22nd 디코더(223) Decoder (223)

제 1 인코더(216)는 제 1 테이블 선택기(213)에서 얻어진 룩업 테이블 정보를 가지고 정해진 길이로 인코딩한다. 아울러, 제 2 디코더(223)는, 제 2 테이블 선택기(222)에서 얻어진 룩업 테이블 정보를 가지고 정해진 길이로 디코딩한다. 고정 길이 코딩의 경우 복잡도가 낮으며 어느 장면에 상관없이 동일한 압축 성능을 가지기 때문에 이점이 있다. The first encoder 216 encodes the lookup table information obtained by the first table selector 213 into a predetermined length. In addition, the second decoder 223 decodes the lookup table information obtained by the second table selector 222 to a predetermined length. Fixed-length coding has the advantage of low complexity and the same compression performance in any scene.

하기에 본 발명의 바람직한 일실시예에 따른 RGB 채널을 포함하는 베이어 영상을 위한 인코딩 방법에 대해 설명하기로 한다.Hereinafter, an encoding method for a Bayer image including an RGB channel according to an exemplary embodiment of the present invention will be described.

본 발명의 바람직한 일실시예에 따른 RGB 채널을 포함하는 베이어 영상을 위한 인코딩 방법은 상술한 인코딩 장치(210)를 사용하므로, 별도의 설명이 없더라고 인코딩 장치(210)의 모든 특징을 포함하고 있음은 물론이다. 본 발명의 인코딩 방법은 컴퓨터 프로그램의 형태로 MCU, DSP, CPU 등과 같은 프로세서의 적어도 일부에 의해 실시될 수 있다.Since the encoding method for the Bayer image including the RGB channel according to the preferred embodiment of the present invention uses the above-described encoding apparatus 210, the encoding apparatus 210 includes all the features of the encoding apparatus 210 without further description. Of course. The encoding method of the present invention may be implemented by at least part of a processor such as MCU, DSP, CPU, etc. in the form of a computer program.

본 발명의 인코딩 방법은, 현재 픽셀 이전의 다수의 픽셀을 이용하여, 현재 픽셀과 유사한 이전의 픽셀의 값을 추정하는 단계(S110); 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계(S120); 이전 영상 프레임을 이용하여, 현재 영상 프레임을 위한 다수의 룩업 테이블을 생성하는 단계(S130); S120 단계에서 추정된 변화량을 이용하여, S130 단계에서 생성된 다수의 룩업 테이블 중 하나를 선택하는 단계(S140); 현재 픽셀로부터 S110 단계에서 추정된 이전 픽셀을 차분하여 출력하는 단계(S150); 및 S140 단계에서 선택된 룩업 테이블을 이용하여, S150 단계의 차분값을 입력받아 고정 길이 인코딩(Fixed Length Encoding)을 실시하는 단계(S160);를 포함한다.The encoding method of the present invention includes estimating a value of a previous pixel similar to the current pixel by using a plurality of pixels before the current pixel (S110); Estimating an amount of change between the plurality of pixels before the current pixel (S120); Generating a plurality of lookup tables for the current image frame by using the previous image frame (S130); Selecting one of a plurality of lookup tables generated in step S130 by using the change amount estimated in step S120 (S140); Differentially outputting the previous pixel estimated in step S110 from the current pixel (S150); And performing a fixed length encoding by receiving the difference value of step S150 using the lookup table selected in step S140 (S160).

구체적으로 S110 단계는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다.In more detail, operation S110 may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs, to estimate the value of the previous pixel.

즉, S110 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; 및 G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정한다.In other words, step S110, the current pixel (G 0) is G, a channel, G-channel of the current pixel of the pixel (G 0) of the pixel G 1 pixels of the G-channel which is located immediately before; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; G 1 and G 4 pixels of the pixel located in front of the pixels of the G channel adjacent to the pixel G 1 of the previous line of the line of pixels is located; using the to estimate the value of the previous pixel.

아울러, S110 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및 A1 픽셀이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다.In addition, in operation S110, when the current pixel A 0 is an R channel or a B channel, an A 1 pixel which is a pixel of the corresponding channel located immediately before the current pixel A 0 among the pixels of the corresponding channel; A G 3 pixel that is a pixel of the G channel adjacent to the current pixel A 0 of the previous line of the line where the current pixel A 0 is located; And a G 4 pixel, which is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the A 1 pixel is located, to estimate the value of the previous pixel.

바람직하게는 S120 단계는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다.Preferably, step S120 includes: at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs.

즉, S120 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀; G 채널의 픽셀 중 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀; G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및 G5 픽셀이 위치한 라인의 이전 라인의 G5 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정한다.In other words, step S120, the current pixel (G 0) is G, a channel, G-channel of the current pixel of the pixel (G 0) of the pixel G 1 pixels of the G-channel which is located immediately before; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; The G 1 pixel in the pixel which is located in front of the pixels of the G channel adjacent to the pixel of the previous line of the line G 1 G 4 pixels; A G 5 pixel that is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel; A G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel; G 5 and G pixel is a pixel in the pixel 7 which is located in front of the pixels of the G channel 5 adjacent to the G pixel in the previous line in the line; using, it estimates the amount of change.

아울러, S120 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 해당 채널의 픽셀 중 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀; G 채널의 픽셀 중 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및 G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다.In addition, in operation S120, when the current pixel A 0 is an R channel or a B channel, an A 1 pixel that is a pixel of a corresponding channel positioned immediately before the current pixel A 0 among pixels of the corresponding channel; An A 2 pixel which is a pixel of the channel located immediately before A 1 pixel among the pixels of the channel; A G 3 pixel that is a pixel of the G channel adjacent to the current pixel A 0 of the previous line of the line where the current pixel A 0 is located; A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the current pixel A 0 is located; A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel of the previous line of the line where the current pixel A 0 is located; A G 2 pixel that is a pixel of the G channel located immediately after G 3 pixels among the pixels of the G channel; And a G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel.

또한, S130 단계는, 이전 프레임을 구성하는 픽셀 각각에 대해, 추정된 바로 앞에 위치하는 인접한 이전 픽셀과의 차분값의 분포의 조밀도를 이용하여, 다수의 룩업 테이블을 생성하는 것을 특징으로 한다. 즉, S130 단계는, 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 이하인 경우에는 1차 방정식에 의해 코드 값을 생성하고, 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 초과하는 경우에는 2차 방정식에 의해 코드 값을 생성하는 것이 바람직하다.In operation S130, a plurality of lookup tables may be generated for each pixel constituting the previous frame by using the density of the distribution of the difference value with the adjacent previous pixel positioned immediately before the estimated value. That is, in step S130, when the codes of the plurality of lookup tables are less than or equal to a predetermined threshold, the code values are generated by the first equation, and when the codes of each of the plurality of lookup tables exceed the predetermined threshold, the second order is generated. It is desirable to generate code values by equations.

아울러, S140 단계는, S120 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 한다. 구체적으로 S140 단계는, S120 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고, S120 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것이 바람직하다.In addition, the step S140, characterized in that it is determined whether at least one of the plurality of changes estimated in the step S120 is equal to or greater than a value of a predetermined position of one lookup table of the plurality of lookup tables. In detail, in step S140, when at least one of the plurality of changes estimated in step S120 is equal to or greater than a value of a predetermined position of one lookup table among the plurality of lookup tables, the corresponding lookup table is selected, and in step S120, When at least one of the amounts of changes is less than a value of a predetermined position of one lookup table of the plurality of lookup tables, it is preferable to select a lookup table other than the corresponding one lookup table among the plurality of lookup tables.

하기에 본 발명의 바람직한 일실시예에 따른 RGB 채널을 포함하는 베이어 영상을 위한 디코딩 방법에 대해 설명하기로 한다.Hereinafter, a decoding method for a Bayer image including an RGB channel according to an exemplary embodiment of the present invention will be described.

본 발명의 바람직한 일실시예에 따른 RGB 채널을 포함하는 베이어 영상을 위한 디코딩 방법은 상술한 인코딩 장치(210)를 사용하므로, 별도의 설명이 없더라고 디코딩 장치(220)의 모든 특징을 포함하고 있음은 물론이다. 본 발명의 디코딩 방법은 컴퓨터 프로그램의 형태로 MCU, DSP, CPU 등과 같은 프로세서의 적어도 일부에 의해 실시될 수 있다.The decoding method for the Bayer image including the RGB channel according to the preferred embodiment of the present invention uses the above-described encoding apparatus 210, and thus includes all the features of the decoding apparatus 220 without further explanation. Of course. The decoding method of the present invention may be implemented by at least a part of a processor such as MCU, DSP, CPU, etc. in the form of a computer program.

본 발명의 디코딩 방법은, 현재 픽셀 이전의 다수의 픽셀을 이용하여, 현재 픽셀과 유사한 이전의 픽셀의 값을 추정하는 단계(S210); 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계(S220); S220 단계에서 추정된 변화량을 이용하여, 미리 저장된 다수의 룩업 테이블 중 하나를 선택하는 단계(S230); S230 단계에서 선택된 룩업 테이블을 이용하여, 입력된 데이터의 고정 길이 디코딩(Fixed Length Decoding)을 실시하는 단계(S240); 및 현재 픽셀로부터 S210 단계에서 추정된 이전 픽셀을 가산하여 출력하는 단계(S250);를 포함한다.The decoding method of the present invention includes estimating a value of a previous pixel similar to the current pixel by using a plurality of pixels before the current pixel (S210); Estimating an amount of change between the plurality of pixels before the current pixel (S220); Selecting one of a plurality of previously stored lookup tables by using the change amount estimated in step S220 (S230); Performing fixed length decoding of the input data using the lookup table selected in step S230 (S240); And adding and outputting the previous pixel estimated in step S210 from the current pixel (S250).

S210 단계는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다.Step S210 may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs, to estimate the value of the previous pixel.

즉, S210 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; 및 G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것이 바람직하다.In other words, step S210, the current pixel (G 0) is G, a channel, G-channel of the current pixel of the pixel (G 0) of the pixel G 1 pixels of the G-channel which is located immediately before; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; G 1 and G pixels are pixels of 4 pixels which is located in front of the pixels of the G channel of the previous line adjacent to the pixel of G 1 in the line; using, it is preferable to estimate the value of the previous pixel.

아울러, S210 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및 A1 픽셀이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 한다.In addition, in step S210, when the current pixel A 0 is an R channel or a B channel, an A 1 pixel which is a pixel of the corresponding channel located immediately before the current pixel A 0 among the pixels of the corresponding channel; A G 3 pixel that is a pixel of the G channel adjacent to the current pixel A 0 of the previous line of the line where the current pixel A 0 is located; And a G 4 pixel, which is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the A 1 pixel is located, to estimate the value of the previous pixel.

S220 단계는, 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 한다.Step S220 may include at least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And at least one pixel belonging to the G channel of the previous line of the line to which the current pixel belongs.

즉, S220 단계는, 현재 픽셀(G0)이 G 채널인 경우, G 채널의 픽셀 중 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 뒤에 위치하는 픽셀인 G2 픽셀; 현재 픽셀(G0)이 위치한 라인의 이전 라인의 현재 픽셀(G0)과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G3 픽셀; G1 픽셀이 위치한 라인의 이전 라인의 G1 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G4 픽셀; G 채널의 픽셀 중 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀; G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및 G5 픽셀이 위치한 라인의 이전 라인의 G5 픽셀과 인접한 G 채널의 픽셀 중 앞에 위치하는 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정한다.In other words, step S220, the current pixel (G 0) is G, a channel, G-channel of the current pixel of the pixel (G 0) of the pixel G 1 pixels of the G-channel which is located immediately before; Of the current pixel (G 0) of the pixel which is located behind the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of the line in G 2 pixels; Of the current pixel (G 0) of pixels which is located in front of the pixel of the current pixel (G 0) and the adjacent G channel of the previous line of pixels in the line G 3; The G 1 pixel in the pixel which is located in front of the pixels of the G channel adjacent to the pixel of the previous line of the line G 1 G 4 pixels; A G 5 pixel that is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel; A G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel; G 5 and G pixel is a pixel in the pixel 7 which is located in front of the pixels of the G channel 5 adjacent to the G pixel in the previous line in the line; using, it estimates the amount of change.

아울러, S220 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우, 해당 채널의 픽셀 중 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀; 해당 채널의 픽셀 중 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀; 현재 픽셀(A0)이 위치한 라인의 이전 라인의 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀; G 채널의 픽셀 중 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및 G 채널의 픽셀 중 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정하는 것이 바람직하다.In addition, in operation S220, when the current pixel A 0 is an R channel or a B channel, an A 1 pixel which is a pixel of a corresponding channel located immediately before the current pixel A 0 among pixels of the corresponding channel; An A 2 pixel which is a pixel of the channel located immediately before A 1 pixel among the pixels of the channel; A G 3 pixel that is a pixel of the G channel adjacent to the current pixel A 0 of the previous line of the line where the current pixel A 0 is located; A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel of the previous line of the line where the current pixel A 0 is located; A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel of the previous line of the line where the current pixel A 0 is located; A G 2 pixel that is a pixel of the G channel located immediately after G 3 pixels among the pixels of the G channel; And a G 6 pixel which is a pixel of the G channel located immediately after the G 2 pixels among the pixels of the G channel, it is preferable to estimate the amount of change.

또한, S230 단계는, S220 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단한다.In operation S230, it is determined whether at least one of the plurality of changes estimated in operation S220 is equal to or greater than a value of a predetermined position of one of the plurality of lookup tables.

구체적으로 S230 단계는, S220 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고, S220 단계에서 추정된 다수의 변화량 중 적어도 하나가, 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것을 특징으로 한다.In detail, in step S230, when at least one of the plurality of changes estimated in step S220 is equal to or greater than a value of a predetermined position of one lookup table among the plurality of lookup tables, the corresponding one lookup table is selected, and the number estimated in step S220 is selected. When at least one of the amount of change is less than a value of a predetermined position of one of the lookup tables of the plurality of lookup tables, a lookup table other than the corresponding one of the plurality of lookup tables is selected.

상술한 바와 같은, 본 발명의 특징을 정리하면 다음과 같다. As described above, the features of the present invention are summarized as follows.

(1) 저 복잡도의 베이어 압축(1) Bayer compression of low complexity

Bayer CFA를 통해 얻은 베이어 영상을 베이어 환경에 맞게 변형된 LOCO-I 을 적용함으로써 연산 복잡도를 낮추고 해상도에 가장 밀접한 G 채널 정보를 R/B채널을 압축할 때 이용하여 제 1 예측기(211) 또는 제 2 예측기(221)에서 최소한의 메모리 자원을 가지고 적절한 이전 값을 추정할 수 있다. 또한, 어떠한 변환 과정(Bayer RGB, Bayer YC) 없이 바로 압축함으로써 연산 자원을 절약할 수 있는 이점이 있다. 본 발명을 통해 개발된 저 복잡도의 베이어 압축 기술의 발명으로 기존 ISP에 약간에 로직 추가를 통해 메모리 자원을 줄일 수 있어 ISP 생산 단가를 낮출 수 있다.By applying LOCO-I modified Bayer image obtained through Bayer CFA to Bayer environment, the first predictor 211 or the first predictor 211 is used to reduce the computational complexity and use the G channel information closest to the resolution when compressing the R / B channel. The predictor 221 may estimate an appropriate previous value with a minimum of memory resources. In addition, there is an advantage that it is possible to save the computational resources by compressing immediately without any conversion process (Bayer RGB, Bayer YC). The invention of the low complexity Bayer compression technology developed through the present invention can reduce the memory resources by adding a little logic to the existing ISP, thereby lowering the ISP production cost.

(2) 장면 2 scenes 적응적Adaptive 베이어 압축 Bayer Compression

제 1 테이블 생성기(212)에서 이전 영상의 차분 히스토그램을 분석하여 현재 영상에 적합한 테이블을 생성한다. 이를 통해 장면에 따라 적응적으로 대응할 수 있어 고정 테이블 방식보다 더 좋은 화질을 얻을 수 있다. 또한, 제 1 예측기(211) 또는 제 2 예측기(221)에서 얻은 이전 픽셀의 변화량을 제 1 테이블 선택기(213) 또는 제 2 테이블 선택기(222)에서 확인하여 에지 영역과 평탄 영역을 구분하여 적절한 룩업 테이블을 결정하여 동일한 table을 적용했을 때보다 더 효과적으로 압축되도록 한다. 이전 픽셀의 변화량을 측정할 때 이전 라인의 정보도 사용하는데 이 때 해상도에 가장 큰 연관성이 있는 G 채널만을 고려하여 변화량을 추정한다. 이를 통해 에지 영역과 평탄 영역도 효과적으로 구분할 수 있고 G 채널만을 고려하기 때문에 라인 메모리도 1/2로 줄일 수 있다.The first table generator 212 analyzes the difference histogram of the previous image to generate a table suitable for the current image. Through this, it is possible to adapt adaptively according to the scene, thereby obtaining better image quality than the fixed table method. In addition, the amount of change of the previous pixel obtained by the first predictor 211 or the second predictor 221 is checked by the first table selector 213 or the second table selector 222 to distinguish the edge region from the flat region, and to appropriately look up. Determine the table so that it is compressed more effectively than if you applied the same table. When measuring the change amount of the previous pixel, the information of the previous line is also used. In this case, the change amount is estimated by considering only the G channel which is most related to the resolution. This effectively distinguishes edge and flat areas, and reduces line memory to half because only G channels are considered.

(3) (3) 제 1First 인코더(216) 및  Encoder 216 and 제 22nd 디코더(223) Decoder (223)

본 발명에서는 JPEG, MPEG 등에서 사용하는 엔트로피 코딩(Entropy Coding) 기법이 아닌 룩업 테이블기반의 고정 길이 코딩 기법을 사용한다. 고정 길이 코딩 기법은 모든 장면에 대해 동일한 압축률 유지할 수 있다는 장점이 있다. 따라서, 이를 관리하는 메모리 제어기의 복잡도가 엔트로피 코딩 기법을 적용한 것과 비교하였을 때 현저히 낮아진다. 이와 같은 고정 길이 코딩 기법을 통해 적은 로직에 의해 안정적인 압축이 가능하다. In the present invention, a lookup table-based fixed length coding technique is used instead of an entropy coding technique used in JPEG, MPEG, and the like. The fixed length coding technique has the advantage of maintaining the same compression ratio for all scenes. Therefore, the complexity of the memory controller managing this is significantly lower than that of applying the entropy coding technique. This fixed length coding technique enables stable compression with less logic.

100 : ISP 시스템
110 : 렌즈 쉐이딩부 120 : 결함 정정부
130 : WDR부 140 : DNR부
150 : 디모자이싱부 160 : 컬러 토닝부
170 : 메모리 180 : 메모리 제어기
210 : 인코딩 장치 220 : 디코딩 장치
211 : 제 1 예측기 212 : 제 1 테이블 생성기
213 : 제 1 테이블 선택기 214 : 제 1 차분값 출력기
215 : 제 1 가산기 216 : 제 1 인코더
221 : 제 2 예측기 222 : 제 2 테이블 선택기
223 : 제 2 디코더 224 : 제 2 가산기
100: ISP system
110: lens shading unit 120: defect correction unit
130: WDR section 140: DNR section
150: demosaicing unit 160: color toning unit
170: memory 180: memory controller
210: encoding device 220: decoding device
211: first predictor 212: first table generator
213: first table selector 214: first difference value output
215: first adder 216: first encoder
221: second predictor 222: second table selector
223: second decoder 224: second adder

Claims (22)

RGB 채널을 포함하는 베이어 영상을 위한 인코딩 방법에 있어서,
(a-1) 현재 픽셀 이전의 다수의 픽셀을 이용하여, 이전의 픽셀의 값을 추정하는 단계;
(b-1) 상기 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계;
(c-1) 이전 영상 프레임을 이용하여, 다수의 룩업 테이블을 생성하는 단계;
(d-1) 상기 (b-1) 단계에서 추정된 변화량을 이용하여, 상기 (c-1) 단계에서 생성된 다수의 룩업 테이블 중 하나를 선택하는 단계;
(e-1) 상기 현재 픽셀로부터 상기 (a-1) 단계에서 추정된 이전 픽셀을 차분하여 출력하는 단계; 및
(f-1) 상기 (d-1) 단계에서 선택된 룩업 테이블을 이용하여, 상기 (e-1) 단계의 차분값을 입력받아 고정 길이 인코딩(Fixed Length Encoding)을 실시하는 단계;를 포함하는 것을 특징으로 하는 인코딩 방법.
An encoding method for a Bayer image including an RGB channel,
(a-1) estimating a value of a previous pixel using a plurality of pixels before the current pixel;
(b-1) estimating the amount of change between the plurality of pixels before the current pixel;
(c-1) generating a plurality of lookup tables using previous image frames;
(d-1) selecting one of a plurality of lookup tables generated in the step (c-1) using the change amount estimated in the step (b-1);
(e-1) differentially outputting the previous pixel estimated in the step (a-1) from the current pixel; And
(f-1) using the lookup table selected in step (d-1), receiving the difference value of step (e-1) and performing fixed length encoding; Characterized by the encoding method.
삭제delete 제1항에 있어서,
상기 (a-1) 단계는,
상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및
상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 1,
Step (a-1),
At least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And
And estimating a value of a previous pixel using at least one pixel belonging to a G channel of a previous line of the line to which the current pixel belongs.
제3항에 있어서,
상기 (a-1) 단계는, 현재 픽셀(G0)이 G 채널인 경우,
G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀; 및
상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 3,
In the step (a-1), when the current pixel G 0 is a G channel,
A G 1 pixel, which is a pixel of a G channel located immediately before the current pixel G 0 , among pixels of a G channel;
The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind;
The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel; And
Estimating a value of a previous pixel using a G 4 pixel, which is a pixel of a G channel located in front of two pixels adjacent to the G 1 pixel, among the pixels of the G channel of the previous line of the line where the G 1 pixel is located; The encoding method characterized in that.
제3항에 있어서,
상기 (a-1) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우,
해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및
상기 A1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 3,
In the step (a-1), when the current pixel A 0 is an R channel or a B channel,
An A 1 pixel which is a pixel of the channel located immediately before the current pixel A 0 among the pixels of the channel;
A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; And
An encoding method of estimating a value of a previous pixel using a G 4 pixel which is a pixel of a G channel adjacent to the A 1 pixel among the pixels of the G channel of the previous line of the line where the A 1 pixel is located; .
제1항에 있어서,
상기 (b-1) 단계는,
상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및
상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 1,
Step (b-1),
At least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And
And a change amount is estimated using at least one pixel belonging to a G channel of a previous line of the line to which the current pixel belongs.
제6항에 있어서,
상기 (b-1) 단계는, 현재 픽셀(G0)이 G 채널인 경우,
G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀;
상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀;
G 채널의 픽셀 중 상기 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀;
G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및
상기 G5 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G5 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 6,
In the step (b-1), when the current pixel G 0 is a G channel,
A G 1 pixel, which is a pixel of a G channel located immediately before the current pixel G 0 , among pixels of a G channel;
The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind;
The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel;
Wherein the G 1 pixels among the pixels of the G channel of the previous line of the line is located, the pixels of the G-channel which is located in front of the two pixels adjacent to the pixel G 1 G 4 pixels;
A G 5 pixel which is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel;
A G 6 pixel that is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel; And
Estimating a change amount by using a G 7 pixel which is a pixel of a G channel located in front of two pixels adjacent to the G 5 pixel among the pixels of the G channel of the previous line of the line where the G 5 pixels are located; Encoding method.
제6항에 있어서,
상기 (b-1) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우,
해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀;
해당 채널의 픽셀 중 상기 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀;
G 채널의 픽셀 중 상기 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및
G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 인코딩 방법.
The method of claim 6,
In the step (b-1), when the current pixel A 0 is an R channel or a B channel,
An A 1 pixel which is a pixel of the channel located immediately before the current pixel A 0 among the pixels of the channel;
An A 2 pixel which is a pixel of the channel located immediately before the A 1 pixel among the pixels of the channel;
A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 2 pixel which is a pixel of the G channel located immediately after the G 3 pixels among the pixels of the G channel; And
And a variation amount is estimated using a G 6 pixel which is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel.
제1항에 있어서,
상기 (c-1) 단계는,
이전 프레임을 구성하는 픽셀 각각에 대해, 추정된 바로 앞에 위치하는 인접한 이전 픽셀과의 차분값의 분포의 조밀도를 이용하여, 상기 다수의 룩업 테이블을 생성하는 것을 특징으로 하는 인코딩 방법.
The method of claim 1,
Step (c-1),
And for each of the pixels constituting the previous frame, generating the plurality of lookup tables using the density of the distribution of the difference values with adjacent previous pixels located immediately before the estimated.
제9항에 있어서,
상기 (c-1) 단계는,
상기 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 이하인 경우에는 1차 방정식에 의해 코드 값을 생성하고, 상기 다수의 룩업 테이블 각각의 코드가 미리 정해진 문턱값 초과하는 경우에는 2차 방정식에 의해 코드 값을 생성하는 것을 특징으로 하는 인코딩 방법.
The method of claim 9,
Step (c-1),
Codes are generated by the first equation when the codes of the plurality of lookup tables are less than or equal to a predetermined threshold. An encoding method comprising generating a value.
제1항에 있어서,
상기 (d-1) 단계는,
상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 하는 인코딩 방법.
The method of claim 1,
Step (d-1),
And determining whether at least one of the plurality of changes estimated in the step (b-1) is equal to or greater than a value of a predetermined position of one lookup table of the plurality of lookup tables.
제11항에 있어서,
상기 (d-1) 단계는,
상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고,
상기 (b-1) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 상기 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것을 특징으로 하는 인코딩 방법.
The method of claim 11,
Step (d-1),
Selecting at least one lookup table when at least one of the plurality of changes estimated in step (b-1) is equal to or greater than a value of a predetermined position of one lookup table of the plurality of lookup tables,
When at least one of the plurality of changes estimated in step (b-1) is less than a value of a predetermined position of one of the plurality of lookup tables, a lookup table other than the corresponding one of the plurality of lookup tables Encoding method, characterized in that for selecting.
RGB 채널을 포함하는 베이어 영상을 위한 디코딩 방법에 있어서,
(a-2) 현재 픽셀 이전의 다수의 픽셀을 이용하여, 이전의 픽셀의 값을 추정하는 단계;
(b-2) 상기 현재 픽셀 이전의 다수의 픽셀 사이의 변화량을 추정하는 단계; 및
(c-2) 상기 (b-2) 단계에서 추정된 변화량을 이용하여, 미리 저장된 다수의 룩업 테이블 중 하나를 선택하는 단계;를 포함하는 것을 특징으로 하는 디코딩 방법.
A decoding method for a Bayer image including an RGB channel,
(a-2) estimating a value of a previous pixel using a plurality of pixels before the current pixel;
(b-2) estimating the amount of change between the plurality of pixels before the current pixel; And
(c-2) selecting one of a plurality of previously stored lookup tables by using the change amount estimated in the step (b-2).
제13항에 있어서,
상기 디코딩 방법은,
(d-2) 상기 (c-2) 단계에서 선택된 룩업 테이블을 이용하여, 입력된 데이터의 고정 길이 디코딩(Fixed Length Decoding)을 실시하는 단계; 및
(e-2) 상기 현재 픽셀로부터 상기 (a-2) 단계에서 추정된 이전 픽셀을 가산하여 출력하는 단계;를 더 포함하는 것을 특징으로 하는 디코딩 방법.
The method of claim 13,
The decoding method,
(d-2) performing fixed length decoding of the input data using the lookup table selected in step (c-2); And
and (e-2) adding and outputting the previous pixel estimated in the step (a-2) from the current pixel.
제14항에 있어서,
상기 (a-2) 단계는,
상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및
상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 14,
Step (a-2),
At least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And
And estimating a value of a previous pixel by using at least one pixel belonging to a G channel of a previous line of the line to which the current pixel belongs.
제15항에 있어서,
상기 (a-2) 단계는, 현재 픽셀(G0)이 G 채널인 경우,
G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀; 및
상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 15,
In the step (a-2), when the current pixel G 0 is a G channel,
A G 1 pixel, which is a pixel of a G channel located immediately before the current pixel G 0 , among pixels of a G channel;
The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind;
The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel; And
Estimating a value of a previous pixel using a G 4 pixel, which is a pixel of a G channel located in front of two pixels adjacent to the G 1 pixel, among the pixels of the G channel of the previous line of the line where the G 1 pixel is located; Decoding method characterized in that.
제15항에 있어서,
상기 (a-2) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우,
해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀; 및
상기 A1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;을 이용하여, 이전의 픽셀의 값을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 15,
In the step (a-2), when the current pixel A 0 is an R channel or a B channel,
An A 1 pixel which is a pixel of the channel located immediately before the current pixel A 0 among the pixels of the channel;
A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located; And
A G 4 pixel which is a pixel of a G channel adjacent to the A 1 pixel among the pixels of the G channel of the previous line of the line where the A 1 pixel is located; .
제14항에 있어서,
상기 (b-2) 단계는,
상기 현재 픽셀이 속한 라인의 현재 픽셀과 동일한 채널에 속한 적어도 하나의 픽셀; 및
상기 현재 픽셀이 속한 라인의 이전 라인의 G 채널에 속한 적어도 하나의 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 14,
Step (b-2),
At least one pixel belonging to the same channel as the current pixel of the line to which the current pixel belongs; And
And estimating a change amount using at least one pixel belonging to a G channel of a previous line of the line to which the current pixel belongs.
제18항에 있어서,
상기 (b-2) 단계는, 현재 픽셀(G0)이 G 채널인 경우,
G 채널의 픽셀 중 상기 현재 픽셀(G0) 바로 이전에 위치하는 G 채널의 픽셀인 G1 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 뒤에 위치하는 G 채널의 픽셀인 G2 픽셀;
상기 현재 픽셀(G0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(G0)과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G3 픽셀;
상기 G1 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G1 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G4 픽셀;
G 채널의 픽셀 중 상기 G1 픽셀 바로 이전에 위치하는 G 채널의 픽셀인 G5 픽셀;
G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀; 및
상기 G5 픽셀이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 G5 픽셀과 인접한 2개의 픽셀 중에서 앞에 위치하는 G 채널의 픽셀인 G7 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 18,
In the step (b-2), when the current pixel G 0 is a G channel,
A G 1 pixel, which is a pixel of a G channel located immediately before the current pixel G 0 , among pixels of a G channel;
The current pixel (G 0) of a pixel in the G channel of the previous line of the line, the current pixel (G 0) and the two adjacent pixels of the pixel of the G channel from the G 2 pixel located behind;
The current pixel is (G 0) of pixels of the G-channel which is located in front of the pixels of the G channel of the previous line of the line is located, the current pixel and the two pixels adjacent to (G 0) 3 G pixel;
Wherein the G 1 pixels among the pixels of the G channel of the previous line of the line is located, the pixels of the G-channel which is located in front of the two pixels adjacent to the pixel G 1 G 4 pixels;
A G 5 pixel which is a pixel of the G channel located immediately before the G 1 pixel among the pixels of the G channel;
A G 6 pixel that is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel; And
Estimating a change amount by using a G 7 pixel which is a pixel of a G channel located in front of two pixels adjacent to the G 5 pixel among the pixels of the G channel of the previous line of the line where the G 5 pixels are located; Decoding method.
제18항에 있어서,
상기 (b-2) 단계는, 현재 픽셀(A0)이 R 채널 또는 B 채널인 경우,
해당 채널의 픽셀 중 상기 현재 픽셀(A0) 바로 이전에 위치하는 해당 채널의 픽셀인 A1 픽셀;
해당 채널의 픽셀 중 상기 A1 픽셀 바로 이전에 위치하는 해당 채널의 픽셀인 A2 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 현재 픽셀(A0)과 인접한 G 채널의 픽셀인 G3 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A1 픽셀과 인접한 G 채널의 픽셀인 G4 픽셀;
상기 현재 픽셀(A0)이 위치한 라인의 이전 라인의 G 채널의 픽셀 중, 상기 A2 픽셀과 인접한 G 채널의 픽셀인 G7 픽셀;
G 채널의 픽셀 중 상기 G3 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G2 픽셀; 및
G 채널의 픽셀 중 상기 G2 픽셀 바로 이후에 위치하는 G 채널의 픽셀인 G6 픽셀;을 이용하여, 변화량을 추정하는 것을 특징으로 하는 디코딩 방법.
The method of claim 18,
In the step (b-2), when the current pixel A 0 is an R channel or a B channel,
An A 1 pixel which is a pixel of the channel located immediately before the current pixel A 0 among the pixels of the channel;
An A 2 pixel which is a pixel of the channel located immediately before the A 1 pixel among the pixels of the channel;
A G 3 pixel that is a pixel of a G channel adjacent to the current pixel A 0 , among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 4 pixel that is a pixel of a G channel adjacent to the A 1 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 7 pixel that is a pixel of a G channel adjacent to the A 2 pixel among pixels of a G channel of a previous line of the line where the current pixel A 0 is located;
A G 2 pixel which is a pixel of the G channel located immediately after the G 3 pixels among the pixels of the G channel; And
And a G 6 pixel, which is a pixel of a G channel located immediately after the G 2 pixels among the pixels of a G channel, to estimate the amount of change.
제14항에 있어서,
상기 (c-2) 단계는,
상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 지를 판단하는 것을 특징으로 하는 디코딩 방법.
The method of claim 14,
Step (c-2),
And determining whether at least one of the plurality of changes estimated in the step (b-2) is equal to or greater than a value of a predetermined position of one lookup table of the plurality of lookup tables.
제21항에 있어서,
상기 (c-2) 단계는,
상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 이상인 경우 해당 하나의 룩업 테이블을 선택하고,
상기 (b-2) 단계에서 추정된 다수의 변화량 중 적어도 하나가, 상기 다수의 룩업 테이블 중 하나의 룩업 테이블의 일정 위치의 값 미만인 경우 상기 다수의 룩업 테이블 중 해당 하나의 룩업 테이블 이외의 룩업 테이블을 선택하는 것을 특징으로 하는 디코딩 방법.
The method of claim 21,
Step (c-2),
Selecting at least one lookup table when at least one of the plurality of changes estimated in step (b-2) is equal to or greater than a value of a predetermined position of one lookup table of the plurality of lookup tables,
If at least one of the plurality of changes estimated in the step (b-2) is less than a value of a predetermined position of one of the plurality of lookup tables, a lookup table other than the corresponding one of the plurality of lookup tables Decoding method characterized in that for selecting.
KR1020180061583A 2018-05-30 2018-05-30 Apparatus based on visually lossless compression method for compression of bayer image and method therefor KR102025494B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180061583A KR102025494B1 (en) 2018-05-30 2018-05-30 Apparatus based on visually lossless compression method for compression of bayer image and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180061583A KR102025494B1 (en) 2018-05-30 2018-05-30 Apparatus based on visually lossless compression method for compression of bayer image and method therefor

Publications (1)

Publication Number Publication Date
KR102025494B1 true KR102025494B1 (en) 2019-09-25

Family

ID=68068218

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180061583A KR102025494B1 (en) 2018-05-30 2018-05-30 Apparatus based on visually lossless compression method for compression of bayer image and method therefor

Country Status (1)

Country Link
KR (1) KR102025494B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100359181B1 (en) * 1997-06-30 2002-11-01 인텔 코오퍼레이션 A memory based vlsi architecture for image compression
JP2006517065A (en) * 2003-01-13 2006-07-13 ノキア コーポレイション Image processing using a limited number of bits
KR20130037843A (en) * 2011-10-07 2013-04-17 삼성전자주식회사 Predicted pixel producing apparatus and method thereof
US20160249064A1 (en) * 2015-02-23 2016-08-25 Teledyne Dalsa, Inc. Lossless data compression and decompression apparatus, system, and method
JP2018513634A (en) * 2015-05-29 2018-05-24 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Video processing method and video processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100359181B1 (en) * 1997-06-30 2002-11-01 인텔 코오퍼레이션 A memory based vlsi architecture for image compression
JP2006517065A (en) * 2003-01-13 2006-07-13 ノキア コーポレイション Image processing using a limited number of bits
KR20130037843A (en) * 2011-10-07 2013-04-17 삼성전자주식회사 Predicted pixel producing apparatus and method thereof
US20160249064A1 (en) * 2015-02-23 2016-08-25 Teledyne Dalsa, Inc. Lossless data compression and decompression apparatus, system, and method
JP2018513634A (en) * 2015-05-29 2018-05-24 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd Video processing method and video processing system

Similar Documents

Publication Publication Date Title
US11368699B2 (en) Methods and systems for masking multimedia data
JP4624321B2 (en) Transcoder and coded image conversion method
JP5893002B2 (en) Rate control in video coding.
CN107615761B (en) Methods, devices and computer readable media for pixel processing and encoding
US9014268B2 (en) Video encoder and its decoder
JP6822122B2 (en) Image processing equipment, image processing methods and programs
JPH08322052A (en) Method and apparatus for predicting and coding video information
JP2018101863A (en) Image processing system, image processing method, and program
US9767542B2 (en) Method and device for selecting an image dynamic range conversion operator
JP6149707B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, and moving picture photographing apparatus
JP2018101867A (en) Image processing device, image processing method and program
CN1695381A (en) Sharpness enhancement in post-processing of digital video signals using coding information and local spatial features
US20060098881A1 (en) Method and apparatus for encoding and decoding image data
US10477219B2 (en) Image-processing apparatus and lossless image compression method using intra-frame prediction
KR100209409B1 (en) Object-based encoding method and apparatus using an object warping
KR0159370B1 (en) Method and apparatus for encoding a video signals using a boundary of an object
JP3429429B2 (en) Visual error processing method and image coding apparatus using this method
US10491896B2 (en) Method of fixed-rate line-based embedded video compression and image processing apparatus using the same
Ito et al. A coding method for high bit-depth images based on optimized bit-depth transform
JP2001251627A (en) Coder, coding method and recording medium recorded with program
US8428381B2 (en) Image compression method with variable quantization parameter
KR102025494B1 (en) Apparatus based on visually lossless compression method for compression of bayer image and method therefor
US7738726B2 (en) Block distortion reduction apparatus
CN113196762A (en) Image component prediction method, device and computer storage medium
CN112383774B (en) Encoding method, encoder and server

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant