KR940005830B1 - Decoding method for mh code - Google Patents

Decoding method for mh code Download PDF

Info

Publication number
KR940005830B1
KR940005830B1 KR1019910013056A KR910013056A KR940005830B1 KR 940005830 B1 KR940005830 B1 KR 940005830B1 KR 1019910013056 A KR1019910013056 A KR 1019910013056A KR 910013056 A KR910013056 A KR 910013056A KR 940005830 B1 KR940005830 B1 KR 940005830B1
Authority
KR
South Korea
Prior art keywords
code
tiff file
file
tiff
decoding
Prior art date
Application number
KR1019910013056A
Other languages
Korean (ko)
Other versions
KR930003573A (en
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 KR1019910013056A priority Critical patent/KR940005830B1/en
Publication of KR930003573A publication Critical patent/KR930003573A/en
Application granted granted Critical
Publication of KR940005830B1 publication Critical patent/KR940005830B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The method decreases the decoding time of MH code on the TIFF (Tag Image File Format). The method comprises the steps of: confirming whether it is TIFF file or not after checking the head of TIFF file; setting the parameter variable assigning the memory space for the variable after verifying the last entry of the tag; storing RL value in the buffer after finding the correspondent MH code from the color table; feedbacking to output the MH code of the TIFF file after storing the image data into the auxiliary memory device and converting the color.

Description

MH코드의 디코딩 방법Decoding method of MH code

제 1 도는 본 발명에 의한 MH코드의 디코딩방법을 도시한 순서도.1 is a flowchart showing a method of decoding an MH code according to the present invention.

본 발명은 TIFF(Tag Image File Format ; 이하 TIFF라고 함)파일에서 MH코드(Modified Huffman Code ; 이하 MH코드라고 함)를 디코딩하는 방법에 관한 것으로, 특히 MH코드의 디코딩시 데이타의 처리속도를 보다 향상시켜 디코딩시간이 단축된 MH코드의 디코딩 방법에 관한 것이다.The present invention relates to a method of decoding an MH code (Modified Huffman Code) from a TIFF (Tag Image File Format) file. The present invention relates to a method for decoding an MH code, which has been improved and reduced in decoding time.

일반적으로 거의 모든 종류의 하드웨어에서 화상을 저장하는 방식으로 TIFF파일이 사용된다. 상기 TIFF파일은 구조표에 의한 화상저장방식으로서 화상데이타의 손실없이 디지탈방식으로 화상을 교환할 수 있으며, 하나의 파일내에서 여러장의 화상을 다룰 수 있다. 또한, 상기 TIFF파일의 데이타에서 번번히 발생되는 RL(Run Length ; 이하 RL이라고 함)에 고유의 코드단어를 지정하여 데이타의 인코딩시 각 RL값에 해당되는 코드를 나열하는 RL인코딩의 일종으로서 MH인코딩방법이 일반적으로 사용된다. 이러한 MH인코딩방법을 사용하므로써 저장되는 실제의 화상데이타가 압축되며, 따라서 파일의 크기를 작게할 수 있다.Generally, TIFF files are used to store images on almost any kind of hardware. The TIFF file is an image storage method based on a structure table, and images can be exchanged in a digital manner without losing image data, and a plurality of images can be handled in one file. In addition, MH encoding is a kind of RL encoding that lists codes corresponding to each RL value when data is encoded by assigning a unique code word to RL (Run Length; RL) which occurs frequently in the data of the TIFF file. The method is commonly used. By using this MH encoding method, the actual image data to be stored is compressed, so that the size of the file can be reduced.

본 발명은 TIFF파일에서 MH코드를 디코딩하는 방법에 있어서, 데이타의 처리속도를 보다 향상시켜 MH코드의 디코딩시간을 단축시키는 MH코드의 디코딩방법을 제공함을 목적으로 하고 있다.An object of the present invention is to provide a method of decoding an MH code in a method of decoding an MH code from a TIFF file, which further improves the processing speed of data, thereby reducing the decoding time of the MH code.

상기 목적을 달성하기 위하여, 본 발명은 TIFF파일에서 MH코드를 디코딩하는 방법에 있어서, TIFF파일의 헤더를 독출하여 TIFF파일인가를 확인하는 TIFF파일 확인과정과, TIFF파일이 확인되면 파일의 태그를 독출하고 TIFF파일의 MH코드를 디코딩하는데 필요한 매개변수를 설정한 후 태그의 마지막 엔트리(entry)가 확인되면 상기 매개변수에 필요한 메모리공간을 할당하는 매개변수 설정과정과, TIFF파일의 MH코드를 독출한 후 해당 코드의 색을 판별하여 각 색의 테이블에서 MH코드에 해당되는 RL값을 찾아내어 버퍼에 상기 매개변수인 OBI와 RBI에 필요한 메모리공간을 할당받는다(17). 그런다음, TIFF파일의 MH코드를 버퍼에 읽어들이고(18), 읽어들인 각 MH코드에 해당되는 색을 확인한다(19). MH코드의 색이 백색인 경우에는 해당 MH코드가 의미하는 화상 RL값을 백색테이블에서 찾고(20), MH코드의 색이 흑색인 경우에는 해당 MH코드가 의미하는 화상 RL값을 흑색 테이블에서 찾으므로써(21) 각 MH코드가 해당색에 따라 디코딩된다. 상기 백색 및 흑색 테이블은 실제 화상데이타가 MH코드의 일정단위 비트로 인코딩되는 모든 경우에 대해 상기 MH코드와 해당 RL값이 순차적으로 기록되므로써 구성된다. 상기 백색 및 흑색 테이블에서 디코딩되는 각 MH코드의 화상 RL값을 버퍼에 저장한다(22). 1라인만큼 MH코드가 디코딩되었는가를 확인(23)하여 1라인 디코딩이 완료되지 않은 경우에는 새로운 MH코드를 디코딩하기 전에 화상의 색을 반전시켜(24) 상기 TIFF파일의 MH코드를 독출하는 단계로 피드백시키고, 1라인 디코딩이 완료되면 1라인에 대한 화상데이타를 HDD등의 보조기억장치에 기록한다(25). 그런다음, TIFF파일이 끝났는가를 확인(26)하여 TIFF파일이 끝나지 않은 경우에는 TIFF파일의 MH코드를 버퍼로 읽어들이는 전단계로 피드백하고 TIFF파일이 끝난 경우에는 작업이 종료된다.In order to achieve the above object, the present invention provides a method of decoding an MH code from a TIFF file, the method of verifying whether a TIFF file is read by reading a header of the TIFF file, and if the TIFF file is confirmed, the tag of the file is read. After setting the parameters necessary to read and decode the MH code of TIFF file, if the last entry of the tag is confirmed, the parameter setting process of allocating the memory space required for the parameter and reading the MH code of TIFF file After the identification, the color of the code is determined to find the RL value corresponding to the MH code in the table of each color, and the memory space required for the parameters OBI and RBI is allocated to the buffer (17). Then, the MH code of the TIFF file is read into the buffer (18), and the color corresponding to each read MH code is checked (19). If the color of the MH code is white, the image RL value of the MH code is found in the white table (20). If the color of the MH code is black, the image RL value of the MH code is found in the black table. Thus, each MH code is decoded according to the corresponding color (21). The white and black tables are constructed by sequentially recording the MH code and the corresponding RL value in all cases where the actual image data is encoded in a certain unit bit of the MH code. An image RL value of each MH code decoded in the white and black tables is stored in a buffer (22). Checking whether the MH code has been decoded by one line (23), and if the single line decoding is not completed, inverting the color of the image before decoding the new MH code (24) and reading the MH code of the TIFF file. When the decoding of one line is completed, image data for one line is recorded in an auxiliary storage device such as an HDD (25). Then, it is checked whether the TIFF file is finished (26). If the TIFF file is not finished, the feedback is fed back to the previous step of reading the MH code of the TIFF file into the buffer, and the operation is terminated when the TIFF file is finished.

상술한 바와 같이, 본 발명에 의한 MH코드의 디코딩방법은 각 MH코드 저장하는 과정과, 1라인만큼 MH코드가 디코딩되면 1라인에 대한 화상데이타를 보조기억장치에 저장하고 1라인만큼 MH코드의 디코딩이 완료되지 않은 경우에는 색을 반전시킨후 상기 TIFF파일의 MH코드를 독출하는 단계로 피드백시키는 과정과, TIFF파일의 끝을 확인하여 TIFF파일이 끝난 경우에는 상기 TIFF파일의 MH코드를 독출하는 단계로 피드백시키고 TIFF파일이 끝난 경우에는 작업이 종료되는 과정을 포함하는 것을 특징으로 한다.As described above, the MH code decoding method according to the present invention stores each MH code, and if the MH code is decoded by one line, the image data for one line is stored in the auxiliary storage device and the MH code is stored by one line. If the decoding is not completed, inverting the color and feeding back the MH code of the TIFF file, and checking the end of the TIFF file and reading the MH code of the TIFF file when the TIFF file is finished. It is characterized in that it includes a process of ending the operation when the TIFF file is finished and fed back to the export step.

이하, 첨부한 도면을 참조하여 본 발명을 상세히 기술하기로 한다. 제 1 도에는 TIFF파일에서 MH코드를 디코딩하는 순서가 도시되어 있다. 먼저, TIFF파일을 개방(11)한 후 TIFF파일의 헤더를 버퍼로 읽어들인다(12). 이렇게 버퍼로 읽어들인 내용이 TIFF파일을 의미하는지 확인(13)하여 TIFF파일이 아니면 TIFF파일을 개방(11)하는 처음단계로 되돌아가고, TIFF파일이면 파일의 태그를 확인한다(14). 그런다음, MH코드를 디코딩하는데 필요한 매개변수를 설정한다(15). 이때, 매개변수에는 OBI(Offest Byte Item ; 이하 OBI라고 함)와 RBI(Rows Byte Item)값이 존재해야 한다. 여기서, OBI는 화상의 위치를 일정단위로 가리키는 변수이고, RBI는 상기 OBI가 가리키는 화상의 위치에서 화상을 표현하는 바이트수를 나타낸다. 상기 매개변수가 설정되고 태그의 엔트리가 모두 확인되면(16) MH코드에 해당되는 색을 확인하여 해당 색의 테이블에서 각 MH코드에 해당되는 화상 RL값을 찾으므로써 데이타의 처리속도를 보다 향상시켜 MH코드의 디코딩시간을 단축시키는 효과가 있다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. In Fig. 1, the order of decoding the MH code in the TIFF file is shown. First, the TIFF file is opened (11), and then the header of the TIFF file is read into the buffer (12). If the contents read into the buffer mean a TIFF file (13), the process returns to the first step of opening the TIFF file (11) if the file is not a TIFF file, and checks the tag of the file (14). Then set the parameters needed to decode the MH code (15). At this time, OBI (Offest Byte Item) and RBI (Rows Byte Item) values must exist in the parameter. Here, OBI is a variable indicating the position of an image in a certain unit, and RBI represents the number of bytes representing an image at the position of the image indicated by the OBI. When the parameter is set and all the entries of the tag are confirmed (16), the color corresponding to the MH code is checked to find the image RL value corresponding to each MH code in the table of the color, thereby improving the processing speed of the data. There is an effect of reducing the decoding time of the MH code.

Claims (1)

TIFF파일에서 MH코드를 디코딩하는 방법에 있어서, TIFF파일의 헤더를 독출하여 TIFF파일인가를 확인하는 TIFF파일 확인과정과 ; TIFF파일이 확인되면 파일의 태그를 독출하고 TIFF파일의 MH코드를 디코딩하는데 필요한 매개변수를 설정한 후 태그의 마지막 엔트리가 확인되면 상기 매개변수에 필요한 메모리공간을 할당하는 매개변수 설정과정과 ; TIFF파일의 MH코드를 독출한 후 해당 코드의 색을 판별하여 각 색의 테이블에서 MH코드에 해당되는 RL값을 찾아내어 버퍼에 저장하는 과정과 ; 1라인만큼 MH코드가 디코딩되면 1라인에 대한 화상데이타를 보조기억장치에 저장하고 1라인만큼 MH코드의 디코딩이 완료되지 않은 경우에는 색을 반전시킨 후 상기 TIFF파일의 MH코드를 독출하는 단계로 피드백시키는 과정과 ; TIFF파일의 끝을 확인하여 TIFF파일이 끝나지 않은 경우에는 상기 TIFF파일의 MH코드를 독출하는 단계로 피드백시키고 TIFF파일이 끝난 경우에는 작업이 종료되는 과정을 포함하는 것을 특징으로 하는 MH코드의 디코딩 방법.CLAIMS 1. A method for decoding an MH code from a TIFF file, comprising: reading a TIFF file header to verify whether the TIFF file is a TIFF file; A parameter setting process of setting a parameter necessary to read a tag of the file when the TIFF file is identified and to decode the MH code of the TIFF file, and then allocate memory space required for the parameter when the last entry of the tag is confirmed; Reading the MH code of the TIFF file, determining the color of the code, finding the RL value corresponding to the MH code from the table of each color, and storing it in a buffer; When the MH code is decoded by one line, storing the image data for one line in the auxiliary storage device, and in case the decoding of the MH code is not completed by one line, inverting colors and reading the MH code of the TIFF file. Feedback to the system; Determining the end of the TIFF file, if the TIFF file is not finished, feedback to the step of reading the MH code of the TIFF file, and decoding the MH code, characterized in that the process is terminated when the TIFF file is finished Way.
KR1019910013056A 1991-07-29 1991-07-29 Decoding method for mh code KR940005830B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019910013056A KR940005830B1 (en) 1991-07-29 1991-07-29 Decoding method for mh code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019910013056A KR940005830B1 (en) 1991-07-29 1991-07-29 Decoding method for mh code

Publications (2)

Publication Number Publication Date
KR930003573A KR930003573A (en) 1993-02-24
KR940005830B1 true KR940005830B1 (en) 1994-06-23

Family

ID=19317977

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019910013056A KR940005830B1 (en) 1991-07-29 1991-07-29 Decoding method for mh code

Country Status (1)

Country Link
KR (1) KR940005830B1 (en)

Also Published As

Publication number Publication date
KR930003573A (en) 1993-02-24

Similar Documents

Publication Publication Date Title
US5867112A (en) Software method of compressing text and graphic images for storage on computer memory
US4597057A (en) System for compressed storage of 8-bit ASCII bytes using coded strings of 4 bit nibbles
US4020462A (en) Method and apparatus for form removal from contour compressed image data
US6490649B2 (en) Memory device
EP0050338B1 (en) Picture information processing and storing device
US5060286A (en) Raster row and byte group graphics images data compression method
EP0897579B1 (en) Memory device
JPH04199981A (en) Prompt processing type one-dimensional coder
US4270148A (en) Facsimile transmission apparatus
US6785424B1 (en) Encoding method and apparatus for compressing a data structure having two or more dimensions, decoding method, and storage medium
AU2007249117B2 (en) Variable-length encoding for image data compression
KR940005830B1 (en) Decoding method for mh code
US8463759B2 (en) Method and system for compressing data
US4972497A (en) Image coding system
US5623556A (en) System and method of extracting binary image data
JPH07107303A (en) Decoding method for huffman code
CN115765754A (en) Data coding method and coded data comparison method
GB1427429A (en) Encoding apparatus
JPH0255987B2 (en)
JPS6122499B2 (en)
KR970006033B1 (en) Document editing method for summing image data and text data
CN100579252C (en) Method and system for reporting service voice code
CN114492305A (en) Card reader data output format adapting method, device, equipment and storage medium
JPS63193672A (en) Picture signal encoder
JPS6028371A (en) Data storage system

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee