KR100924710B1 - Method for allocating address and method for writing/reading image to/from memory - Google Patents

Method for allocating address and method for writing/reading image to/from memory Download PDF

Info

Publication number
KR100924710B1
KR100924710B1 KR1020080019331A KR20080019331A KR100924710B1 KR 100924710 B1 KR100924710 B1 KR 100924710B1 KR 1020080019331 A KR1020080019331 A KR 1020080019331A KR 20080019331 A KR20080019331 A KR 20080019331A KR 100924710 B1 KR100924710 B1 KR 100924710B1
Authority
KR
South Korea
Prior art keywords
image
memory
pixels
line
pixel
Prior art date
Application number
KR1020080019331A
Other languages
Korean (ko)
Other versions
KR20090093668A (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 KR1020080019331A priority Critical patent/KR100924710B1/en
Publication of KR20090093668A publication Critical patent/KR20090093668A/en
Application granted granted Critical
Publication of KR100924710B1 publication Critical patent/KR100924710B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Optical Distance (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Abstract

본 발명은 이미지의 픽셀들을 라인(Line) 별로 판독하는 단계와; 상기 판독된 이미지의 각 라인의 픽셀들을 입력받는 단계와; 상기 이미지의 픽셀들을 컬럼(column) 단위로 순차 어드레스들을 부여하는 단계를 포함하는 것을 특징으로 하는 이미지에 대한 어드레스 부여 방법을 제공한다.The present invention includes the steps of reading pixels of an image line by line; Receiving pixels of each line of the read image; And providing sequential addresses to the pixels of the image in column units.

스테레오 영상, 깊이 지도, SAD, 매칭 윈도우, 메모리 제어기 Stereo image, depth map, SAD, matching window, memory controller

Description

어드레스 부여 방법 및 이미지를 메모리에 읽고 쓰는 방법{METHOD FOR ALLOCATING ADDRESS AND METHOD FOR WRITING/READING IMAGE TO/FROM MEMORY}METHOD FOR ALLOCATING ADDRESS AND METHOD FOR WRITING / READING IMAGE TO / FROM MEMORY}

본 발명은 영상기기 기술에 관한 것으로, 특히 양안시를 사용해 획득되어진 스테레오 영상을 처리하여 깊이-지도를 생성하기 위해, 이미지를 메모리에 읽고 쓰는 방법에 관한 것이다.TECHNICAL FIELD The present invention relates to imaging device technology, and more particularly, to a method of reading and writing an image into a memory for processing a stereo image obtained using binocular vision to generate a depth-map.

양안시(Stereo Vision), 예컨대 2대의 카메라를 통해 촬영된 정지영상을 기반으로, 획득되어진 스테레오 영상을 처리하여, 깊이-지도를 생성하는 것은 컴퓨터 비전 분야에서 외부 세계에 대한 3차원 정보를 수집하기 위해 널리 사용하는 방법이다. 일반적으로 . 깊이-지도를 실제 응용에 적용하기 위해서는 초당 30프레임 이상으로 실시간 생성하는 것이 필수적이다.Based on stereo vision, for example, still images captured by two cameras, processing the acquired stereo images, and creating depth-maps is a method of collecting three-dimensional information about the outside world in the field of computer vision. It is a widely used method. Generally . In order to apply the depth-map to a real application, it is necessary to generate in real time more than 30 frames per second.

이하에서는, 양안시(Stereo Vision)를 사용하여 깊이-지도를 생성하는 일반적인 이론을 설명한다.In the following, the general theory of generating depth-map using binocular vision is described.

도 1a 내지 도 1d는 양안시를 이용한 깊이-지도 획득 개념도이다. 1A to 1D are conceptual views of depth-map acquisition using binocular vision.

도 1a에 도시된 바와 같이, 2개의 카메라를 이용하여 피사체를 촬영하면, 도 1b에 도시된 바와 같이 2개의 카메라 위치의 디스페리티(disparity)에 따라도 1c에 도시된 바와 같이 각 카메라에서 촬영된 영상(Left Image와 Right Image)은 상이하게 된다.As shown in FIG. 1A, when a subject is photographed using two cameras, as shown in FIG. 1C, the camera photographs a subject according to the disparity of the two camera positions as shown in FIG. 1B. Left image and right image are different.

이와 같이 상이한 2개의 영상을 하나의 영상으로 표현하면, 도 1d와 같이 상기 디스페리티에 상응하는 깊이-지도를 생성할 수 있다.When two different images are represented as one image, a depth-map corresponding to the disparity may be generated as shown in FIG. 1D.

이와 같은 깊이-지도는 다음의 수식 (1)에 근거하여 수평선 상에 놓인 두개의 카메라로부터 얻어진 스테레오 영상 사이의 디스페리티(disparity)에 대응하여 생성된다.Such a depth-map is generated corresponding to the disparity between stereo images obtained from two cameras lying on the horizontal line based on the following equation (1).

Figure 112008015347259-pat00001
(1)
Figure 112008015347259-pat00001
(One)

식(1)에서, SAD 는 Sum of Absolute Difference 의 약자이며, 각 기호의 의미는 다음과 같다.In Equation (1), SAD stands for Sum of Absolute Difference, and the meaning of each symbol is as follows.

x: 카메라 센서로부터 얻어진 이미지에서 가로 방향의 좌표.x: The horizontal coordinate in the image obtained from the camera sensor.

y: 카메라 센서로부터 얻어진 이미지에서 세로 방향의 좌표. y: The vertical coordinate in the image obtained from the camera sensor.

예를 들어 640*480의 이미지인 경우,x의 범위는 0~639 가 되고, y의 범위는 0~479 가 된다.For example, in the case of an image of 640 * 480, the range of x is 0 to 639, and the range of y is 0 to 479.

d: 디스페리티 범위(Disparity Range). 도 1B에서 나타내었듯이 매칭 윈도우(Matching Window)가 횡축으로 움직이는 범위를 말한다. 예를 들어 d가 64라면 매칭 윈도우가 움직일 수 있는 범위는 64 픽셀(pixel) 만큼이다.d: Disparity Range. As shown in FIG. 1B, it refers to a range in which a matching window moves along the horizontal axis. For example, if d is 64, the range that the matching window can move is 64 pixels.

n: 매칭 윈도우(Matching Window)의 한 변의 길이. 예를 들어 n이 11이라면 11*11 pixels 크기를 가지는 매칭 윈도우를 의미한다. n: Length of one side of the matching window. For example, n equals 11 means a matching window that is 11 x 11 pixels in size.

i: 매칭 윈도우 내에서의 가로 방향의 픽셀 위치.i: Pixel position in the horizontal direction within the matching window.

j: 매칭 윈도우 내에서의 가로 방향의 픽셀 위치. 예를 들어 n이 11 인 경우, i와 j는 0~10의 범위를 갖는다.j: Pixel position in the horizontal direction within the matching window. For example, when n is 11, i and j range from 0 to 10.

Ileft : 양안시 카메라에서 왼쪽 이미지.I left : Left image from the binocular camera.

Iright : 양안시 카메라에서 오른쪽 이미지. 예를 들어, Iright (120, 110) 이라 하면 오른쪽 이미지에서 좌측 최상단을 원점으로 하여 우측 가로방향으로 120 픽셀만큼 이동, 아래 세로방향으로 110 픽셀만큼 이동한 위치에 있는 픽셀 값을 의미한다. 일반적으로 픽셀 값은 그 픽셀의 밝기 값을 사용한다. I right : Right image from the binocular camera. For example, I right (120, 110) means a pixel value located at a position shifted by 120 pixels in the right horizontal direction and 110 pixels in the bottom vertical direction with the left uppermost point as the origin in the right image. In general, a pixel value uses the brightness value of that pixel.

수식(1)의 의미는 도 1에서 도시한 바와 같이, 양안시 카메라에서 얻어진 두 개의 이미지에서 나타나는 물체의 위치 차이를 가로방향의 윈도우 기반 차이를 이용해 구하고, 차이를 비교하는 영역은 d 만큼이며 이러한 비교작업을 이미지 전체 영역에 대해서 수행하는 것을 의미한다. Equation (1) means that as shown in Figure 1, the difference in the position of the object appearing in the two images obtained by the binocular camera using the window-based difference in the horizontal direction, the area to compare the difference is as much as d This means performing a comparison on the entire image area.

이렇게 하여 구해진 각 픽셀 위치에서의 SAD 값은 이미지에서 나타나는 물체들이 카메라를 기준으로, 한 상대적인 위치를 알려주는 지표로 활용된다. 즉, 디스페리티 범위 d 내에서 SAD값이 가장 작은 위치의 값이 물체의 거리를 나타내는 거리(depth) 값이 되며, 이미지 전체에 대해서 이 값을 구하면 깊이-지도(Depth Map)가 완성된다.The SAD value obtained at each pixel position is used as an index indicating the relative position of objects appearing in the image with respect to the camera. That is, the value of the position where the SAD value is the smallest within the disperity range d becomes a depth value representing the distance of the object. When the value is obtained for the entire image, a depth map is completed.

윈도우 기반 차이와 매칭 윈도우에 대한 부연설명을 하면 다음과 같다. 양안시 카메라에서 오른쪽에서 얻어지는 이미지와 왼쪽에서 얻어지는 이미지는 시 차(view point) 때문에, 이미지에서 나타나는 물체의 위치가 차이가 나게 된다. 이러한 차이를 특정한 크기의 윈도우를 사용해 오른쪽 이미지와 왼쪽이미지의 차이를 구하게 된다. 여기서, 차이를 구하기 위해 사용하는 특정한 크기의 윈도우를 '매칭 윈도우(Matching Window)'라 하며, 매칭 윈도우를 사용해 구한 왼쪽과 오른쪽의 이미지 차이를 '윈도우 기반 차이' 라 한다. The following explains the window-based difference and matching window. In the binocular camera, the image obtained from the right side and the image obtained from the left side are different from each other due to the viewing point, and thus the position of the object appearing in the image is different. This difference is then used to find the difference between the right and left images using a window of a certain size. Here, a window of a specific size used to find a difference is called a matching window, and an image difference between the left and right sides obtained by using a matching window is called a window-based difference.

또한, 일반적으로 차이(Difference)라 함은 두 픽셀의 밝기 값 간에 절대값 차이(Absolute Difference)를 말하며, 오른쪽과 왼쪽 이미지에서 윈도우 내의 모든 픽셀들의 절대 값 차이를 더하여(SAD: Sum of Absolute Difference) 이미지 간의 유사성을 판단하고 물체 위치의 차이를 추정한다. In addition, a difference generally refers to an absolute difference between brightness values of two pixels, and is a sum of absolute difference between all pixels in a window in a right and left image (SAD: Sum of Absolute Difference). Determine the similarity between the images and estimate the difference in object position.

이해를 도모하기 위해 전술한 내용을 간략히 요약하면, 깊이-지도를 생성하는 과정은 2개의 영상 중 어느 하나를 기준 영상으로 정하고, 상기 기준 영상(예를 들어, 왼쪽 영상)의 이미지 패치를 대상 영상(예를 들어, 오른쪽 영상)의 특정 구간(Max Disparity Range)에서 이동하며, 상기 SAD 값을 구하고 이 중에서 가장 낮은 값을 나타낸 위치를 구함으로써, 달성된다.Briefly summarizing the above for the purpose of understanding, the process of generating the depth-map sets one of the two images as the reference image, and the image patch of the reference image (for example, the left image) is the target image. This is achieved by moving in a specific interval (eg, Max Disparity Range) of the right image (eg, the right image) and obtaining the SAD value and the lowest value among them.

이와 같은 깊이-지도를 생성하는 과정은 주로 PC와 같은 연산장치를 통해 이루어지는데, 이를 위해서는 먼저 상기 영상이 메모리로 입력되어야 한다. 상기 영상이 상기 메모리 내에 입력되면, 상기 메모리로부터 각 영상의 픽셀에 대해 읽기 동작을 수행하고, 상기 읽혀진 픽셀을 통해 상기 SAD를 연산을 수행한다.The process of generating such a depth-map is mainly performed through a computing device such as a PC. To this end, the image must first be input into a memory. When the image is input into the memory, a read operation is performed on pixels of each image from the memory, and the SAD operation is performed through the read pixels.

이때, 예를 들어 NxN 크기의 상기 매칭 윈도우(Matching Window)를 기반으 로, R 구간에 상기 SAD를 할 경우, 양쪽 영상으로부터 (R+1)N2 번의 메모리 읽기 동작(Read Operation)을 수행해야 한다. 즉, 기준 영상(예를 들어, 왼쪽 영상)에서 N2 번 메모리 읽기 동작을 수행해야 하고, 대상 영상(예를 들어, 오른쪽 영상)에서 RN2 번 메모리 읽기 동작을 수행해야 한다, At this time, for example, when the SAD is performed in the R section based on the matching window of NxN size, (R + 1) N two memory read operations must be performed from both images. do. That is, the N 2 memory read operation should be performed on the reference image (eg, the left image), and the RN 2 memory read operation should be performed on the target image (eg, the right image).

결국, NxN 크기의 상기 매칭 윈도우(Matching Window)를 이용하여, 하나의 영상 프레임(예를 들어, H(horizontal)xV(vertical) 크기의 영상 프레임)의 스테레오 매칭을 위해선, HxV(R+1)N2번 메모리 읽기 동작을 수행해야 한다. Finally, for stereo matching of one image frame (eg, H (horizontal) x V (vertical) size) using a matching window of NxN size, HxV (R + 1) N 2 times memory read operation should be performed.

그러나, 이러한 매우 빈번히 메모리 읽기 동작을 수행하는 것은, 즉 높은 메모리 참조량은 실시간 스테레오 매칭 시스템을 구현하기 어렵게 만든다. However, performing such very frequent memory read operations, i.e., high memory references, makes it difficult to implement a real-time stereo matching system.

또한, 상기 메모리로부터 영상의 픽셀을 읽는 과정은 상기 영상의 가로 방향의 순서로 읽혀지는 반면, 상기 매칭 윈도우는 2차원 NxN 에 의해서 이루어지므로, 즉 가로 방향과 세로 방향을 동시에 참조를 해야한다. In addition, the process of reading the pixel of the image from the memory is read in the order of the horizontal direction of the image, while the matching window is made by two-dimensional NxN, that is, the horizontal direction and the vertical direction must be referred to at the same time.

또한, 상기 영상이 상기 메모리로 입력되는 과정과 상기 메모리로부터 상기 영상의 픽셀에 대한 읽기 과정이 거의 동시에 일어나므로, 기존의 방법으로는 메모리 제어 구조가 매우 복잡해진다.In addition, since the process of inputting the image into the memory and the process of reading the pixel of the image from the memory occur at about the same time, the memory control structure becomes very complicated in the conventional method.

이와 같은 문제점으로 인해 발열, 전력소비 급증, 동작 온도 범위의 제한, 제조단가상승, 제품수율하락 등 다양한 면에 나쁜 영향을 끼친다.Such problems have a bad effect on various aspects such as heat generation, power consumption surge, operating temperature range limitation, manufacturing unit price increase, product yield drop.

따라서, 본 발명의 목적은 상기한 문제점을 해결하기 위한 것으로서, 메모리 참조량, 즉 메모리 읽기 동작을 최소한으로 줄이고, 메모리 제어 구조를 간단화 시키는 것에 있다.Accordingly, an object of the present invention is to solve the above problems, and to reduce the memory reference amount, that is, the memory read operation to a minimum, and to simplify the memory control structure.

또한, 본 발명의 다른 목적은 상기와 같이 메모리 참조량을 줄이고, 메모리 제어 구조를 간단히 함으로써, 실시간 스테레오 매칭 장치를 쉽게 개발할 수 있도록 함에 있다.In addition, another object of the present invention is to reduce the memory reference amount as described above, and to simplify the memory control structure, it is possible to easily develop a real-time stereo matching device.

상기와 같은 목적을 달성하기 위해서, 본 발명은 이미지의 픽셀들을 라인(Line) 별로 판독하는 단계와; 상기 판독된 이미지의 각 라인의 픽셀들을 입력받는 단계와; 상기 이미지의 픽셀들을 컬럼(column) 단위로 순차 어드레스들을 부여하는 단계를 포함하는 것을 특징으로 하는 이미지에 대한 어드레스 부여 방법을 제공한다.In order to achieve the above object, the present invention includes the steps of reading the pixels of the image line by line; Receiving pixels of each line of the read image; And providing sequential addresses to the pixels of the image in column units.

또한, 상기와 같은 목적을 달성하기 위해서, 본 발명은 이미지의 각 라인의 픽셀들을 입력받는 단계와; 상기 이미지의 픽셀들을 컬럼(column) 단위로 순차 어드레스를 부여하는 단계와; 상기 어드레스에 따라 상기 입력받은 픽셀들을 세로 방향으로 저장하는 단계를 포함하는 것을 특징으로 하는 이미지를 메모리에 쓰기하는 방법을 제공한다.In addition, to achieve the above object, the present invention comprises the steps of receiving the pixels of each line of the image; Assigning sequential addresses to the pixels of the image in columns; And storing the input pixels in a vertical direction according to the address.

또한, 상기와 같은 목적을 달성하기 위해서, 본 발명은 이미지의 픽셀들에 대해 컬럼(column) 단위로 순차 어드레스들을 부여하는 단계와; 상기 이미지의 제 1 라인의 픽셀들을 상기 순차적인 어드레스들에 따라 저장하는 단계와; 상기 어드레스들 중 제 1 어드레스를 이용하여, 상기 제 1 라인의 첫 번째 픽셀을 읽으면서, 상기 제 2 라인의 첫 번째 픽셀을 저장하는 단계를 포함하는 것을 특징으로 하는 메모리 읽기 쓰기 방법을 제공한다.In addition, in order to achieve the above object, the present invention provides a method comprising the steps of: assigning sequential addresses in columns for pixels of an image; Storing pixels of a first line of the image according to the sequential addresses; And storing the first pixel of the second line while reading the first pixel of the first line by using the first of the addresses.

또한, 상기와 같은 목적을 달성하기 위해서, 본 발명은 이미지의 픽셀들에 대해 컬럼(column) 단위로 순차 어드레스들을 부여한 후, 상기 이미지의 제 1 라인의 픽셀들을 상기 순차적인 어드레스들에 따라 메모리에 쓰기 동작을 수행하고, 상기 어드레스들 중 제 1 어드레스를 이용하여 상기 제 1 라인의 첫 번째 픽셀을 읽기 동작을 수행하면서, 상기 제 2 라인의 첫 번째 픽셀을 쓰기 동작을 수행하는 메모리 제어기를 제공한다.In addition, in order to achieve the above object, the present invention assigns sequential addresses to the pixels of the image in column units, and then assigns pixels of the first line of the image to the memory according to the sequential addresses. A memory controller performs a write operation and performs a read operation on the first pixel of the first line by using a first address among the addresses, and performs a write operation on the first pixel of the second line. .

또한, 상기와 같은 목적을 달성하기 위하여, 본 발명은 상기 메모리 제어기를 포함하는 메모리를 제공한다.In addition, in order to achieve the above object, the present invention provides a memory including the memory controller.

본 발명은 스테레오 매칭 연산시 메모리 참조량을 최소한으로 줄이고, 메모리 제어구조 역시 여러 개의 동작을 하나의 동작으로 줄임으로써 적은 비용으로 실시간으로 매칭 연산이 가능하도록 한다.The present invention reduces the memory reference amount during the stereo matching operation to a minimum, and the memory control structure also enables the matching operation in real time at a low cost by reducing several operations into one operation.

또한, 본 발명은 스테레오 매칭 시스템을 보다 안정적이고 낮은 가격에 제조할 수 있도록 하며, 소비 전력을 줄이는 효과가 있다.In addition, the present invention allows the stereo matching system to be manufactured more stably and at a low cost, and has an effect of reducing power consumption.

본 연구는 정보통신부 및 정보통신연구진흥원의 IT신성장동력핵심기술개발사업의 일환으로 수행하였음[2005-S-111-02, 지능형 로봇 센서]This study was conducted as part of the IT new growth engine core technology development project of the Ministry of Information and Communication and the Ministry of Information and Communication Research and Development. [2005-S-111-02, Intelligent Robot Sensor]

이하, 본 발명의 실시예들을 첨부된 도면을 이용하여 구체적으로 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 2는 일반적인 방식에 따른 영상을 메모리로 저장하는 순서를 나타내는 도면이며, 도 3은 일반적인 방식에 따른 메모리 저장방식을 나타내는 도면이고, 도 4는 스테레오 매칭의 SAD 처리 방법을 나타내는 도면이다. 2 is a diagram illustrating a procedure of storing an image according to a general scheme into a memory, FIG. 3 is a diagram illustrating a memory storage scheme according to a general scheme, and FIG. 4 is a diagram illustrating a SAD processing method of stereo matching.

도 2를 참조하여 알 수 있는 바와 같이, 영상은 픽셀들로 이루어지는데,영상을 메모리로 저장하기 위해, 센서가 영상을 판독하는 과정은 가로 순서(1)로 이루어진다. 즉, 라인(line) 단위로 판독을 한다. 예를 들어, 2개의 영상 중 좌측 영상을 메모리로 저장하기 위해, 이미지 센서가 상기 영상을 판독하는 과정은 영상 프레임에서 가로 방향의 1번째 라인(Line)을 구성하는 픽셀들을 판독한 후, 가로 방향의 2 번째 라인을 구성하는 픽셀들을 판독하는 순으로 이루어진다. As can be seen with reference to Figure 2, the image is made of pixels, in order to store the image into the memory, the process of reading the image by the sensor in a horizontal order (1). That is, reading is performed in units of lines. For example, in order to store the left image of the two images into the memory, the process of reading the image by the image sensor reads the pixels constituting the horizontal first line (Line) in the image frame, and then the horizontal direction The pixels constituting the second line of the circuit are read in order.

도 3을 참조하여 알 수 있는 바와 같이, 상기 센서에 의해서 판독된 영상을 메모리에 저장하기 위해서는 어드레스를 부여하여야 하는데, 이때 가로방향의 각 라인(Line)에 대해서 어드레스가 부여된다. 즉, 라인(Line) 단위로 하나씩 어드레스가 부여된다. 예를 들면, 상기 영상의 상기 1번째 라인에 대해서는 가장 낮은 어드레스 예를 들어 A0번의 어드레스가 부여되고, 상기 2 번째 라인에 대해서는 차순위로 낮은 어드레스 예를 들어 A1번의 어드레스가 부여된다. As can be seen with reference to Figure 3, in order to store the image read by the sensor in the memory should be given an address, in this case, an address is given to each line (Line) in the horizontal direction. That is, addresses are given one by one in a line unit. For example, the lowest address, for example, A0, is assigned to the first line of the image, and the second lowest address, for example, A1, is assigned to the second line.

이와 같은 순서로 부여된 어드레스에 따라, 영상의 각 라인의 픽셀들은 메모리에서 가로방향으로 저장된다. 즉, 도 3에 도시된 바와 같이, A0 어드레스를 갖는 상기 1번째 라인(Line)이 저장이 된 후, A1 어드레스를 갖는 2번째 라인(Line)이 저장된다. 그리고, 각 라인 내의 픽셀들도 마찬가지로 가로방향으로 저장되는데, 예를 들면, 상기 A0 어드레스를 갖는 1번째 라인에서는 첫 번째 픽셀(P0), 두 번째 픽셀(P1), 세 번째 픽셀(P2) 순으로 가로 방향으로 저장이 된다.According to the addresses given in this order, the pixels of each line of the image are stored horizontally in the memory. That is, as shown in FIG. 3, after the first line having the A0 address is stored, the second line having the A1 address is stored. The pixels in each line are similarly stored in the horizontal direction. For example, in the first line having the A0 address, the first pixel P0, the second pixel P1, and the third pixel P2 are in order. It is stored in the horizontal direction.

그러나, 도 4를 참조하여 알 수 있는 바와 같이, SAD를 수행하는 과정은 NxN 크기의 매칭 윈도우(Matching Window)(2)를 통해 이루어지므로, 영상에서 일련의 가로 방향 픽셀들뿐만 아니라 일련의 세로 방향 픽셀들이 동시에 필요로 된다. 즉, SAD를 수행하기 위해서는 세로 방향의 일련의 픽셀들(5)이 필요하나, 도 3에 도시된 메모리 저장 방식으로는 상기 세로 방향의 일련의 픽셀들을 한번에 읽을 수 없다. 이유는, 세로 방향의 픽셀을 읽기 위해서는 다수의 어드레스가 필요로 되는데, 상기 메모리에 대한 읽기 동작은 하나의 어드레스를 제공하고, 그 출력이 나오면, 다음 어드레스를 제공하는 방식으로 이루어지기 때문이다.However, as can be seen with reference to FIG. 4, the process of performing the SAD is performed through a matching window 2 having an N × N size, so that not only a series of horizontal pixels but also a series of vertical directions in the image. Pixels are needed at the same time. That is, in order to perform the SAD, a series of vertical pixels 5 are required, but the memory storage method shown in FIG. 3 cannot read the series of vertical pixels at once. This is because a plurality of addresses are required to read the pixels in the vertical direction. The read operation of the memory is performed by providing one address, and outputting the next address.

도 5a 및 도 5b는 본 발명에 따른 메모리 저장 방법의 개념을 나타내는 도면이다. 5A and 5B illustrate a concept of a memory storage method according to the present invention.

도 5a를 참조하여 알 수 있는 바와 같이, 본 발명에 따른 메모리 저장 방법은 영상의 세로 방향의 줄 단위(column) 단위로 어드레스를 부여한다. 즉, 본 발명은 가로 방향의 1 라인(Line)에 대해서 어드레스를 부여하는 것이 아니라, 세로 방향의 줄(column) 단위로 어드레스를 부여한다. As can be seen with reference to Figure 5a, the memory storage method according to the present invention gives an address in the column unit of the vertical direction of the image. That is, the present invention does not give an address to one line in the horizontal direction, but gives an address in units of vertical columns.

다시 말해서, 세로 방향으로 영상의 첫 번째 줄(column)에 대해서 어드레스 A0를 부여하고, 그리고 영상의 두 번째 줄(column)에 대해서 A1어드레스를 부여한 다. In other words, address A0 is assigned to the first column of the image in the vertical direction, and A1 address is assigned to the second column of the image.

이때, 상기 영상이 예를 들어 320x240 픽셀들로 이루어졌다면, 도 5b를 참조하여 알 수 있는 바와 같이, 첫번째 줄을 구성하는 픽셀들 P0, P320, P640,...에 대해서 어드레스 A0가 부여되고, 두 번째 줄을 구성하는 픽셀들 P1, P321, P641,...에 대해서 어드레스 1가 부여된다. At this time, if the image is composed of, for example, 320x240 pixels, as shown in FIG. 5B, an address A0 is assigned to the pixels P0, P320, P640, ... constituting the first row, Address 1 is assigned to the pixels P1, P321, P641, ... that make up the second row.

그러나, 도 2에 도시된 바와 같이 상기 센서는 상기 영상을 가로 방향(1), 즉 라인(line) 단위의 일련의 픽셀들 P0, P1, P2, ...을 판독하여, 상기 메모리로 출력하나, 상기 어드레스는 세로 방향, 즉 줄(Column) 단위의 일련의 픽셀들 P0, P320, P640,... 에 대해서 부여되므로, 상기 메모리의 저장 방식은 변경될 필요가 있다. 즉, 상기 세로 방향의 줄 단위(Column)로 어드레스를 부여하여, 메모리에 저장하기 위해서는 메모리 제어 방식을 바꿀 필요가 있다. 이에 대해서, 도 6을 참조하여 설명하기로 한다.However, as shown in FIG. 2, the sensor reads the image in a horizontal direction (1), that is, a series of pixels P0, P1, P2, ... in a line unit, and outputs the image to the memory. Since the address is assigned to a series of pixels P0, P320, P640, ... in the vertical direction, that is, in a column unit, the storage method of the memory needs to be changed. That is, it is necessary to change the memory control scheme in order to give an address in the column direction in the vertical direction and to store it in the memory. This will be described with reference to FIG. 6.

도 6a 내지 6d는 본 발명에 따른 메모리 저장 방법을 나타낸 예시도이다.6A to 6D are exemplary views illustrating a memory storing method according to the present invention.

도 6a 내지 6d를 참조하여 알 수 있는 바와 같이, 본 발명에 따른 메모리 저장 방법은 상기 가로 방향인 라인 단위의 영상을 상기 어드레스에 따라 세로 방향으로 저장한다. As can be seen with reference to Figures 6a to 6d, the memory storage method according to the present invention stores the image of the line unit in the horizontal direction in the vertical direction according to the address.

예를 들면, 도 6a에서와 같이, 첫 번째 줄(Column)의 픽셀 P0(어드레스 A0), 픽셀 P1(어드레스 A1), 픽셀 P2(어드레스 A2), 픽셀 P3(어드레스 A3), 픽셀 P4(어드레스 A4),... 상기 메모리로 입력되면, 상기 메모리는 상기 픽셀들을 상기 어드레스 A0, A1, A2, A3, A4에 따라 상기와 같이 세로 방향으로 저장한다. 즉, For example, as in FIG. 6A, the pixel P0 (address A0), pixel P1 (address A1), pixel P2 (address A2), pixel P3 (address A3), and pixel P4 (address A4) of the first column When input to the memory, the memory stores the pixels in the vertical direction as described above according to the addresses A0, A1, A2, A3, and A4. In other words,

이어서, 도 6b에서와 같이 두 번째 줄(Column)의 픽셀 P320(어드레스 A0), 픽셀 P321(어드레스 A1), 픽셀 P322(어드레스 A2), 픽셀 P323(어드레스 A3),... 이 상기 메모리로 입력되면, 상기 메모리는 상기 픽셀 P320의 어드레스가 A0이므로 상기 픽셀 P0의 옆에 저장하고, 상기 픽셀 P321의 어드레스가 A1이므로 상기 픽셀 P1의 옆에 저장하는 방식으로, 세로로 저장한다.Then, as shown in Fig. 6B, the pixels P320 (address A0), pixel P321 (address A1), pixel P322 (address A2), pixel P323 (address A3), ... of the second column are input into the memory. If the address of the pixel P320 is A0, the memory is stored next to the pixel P0. Since the address of the pixel P321 is A1, the memory is stored vertically.

그리고, 도 6c와 같이 세 번째 줄(Column)의 픽셀 P640(어드레스 A0), 픽셀 P641(어드레스 A1), 픽셀 P642(어드레스 A2),.. 가 입력되면, 상기 메모리는 상기 픽셀들을 세로로 저장한다.When the pixels P640 (address A0), pixel P641 (address A1), pixel P642 (address A2),... Of the third column are input as shown in FIG. 6C, the memory stores the pixels vertically. .

이와 같이 픽셀들이 세로로 저장된 메모리는 도 6d와 같다.The memory in which the pixels are stored vertically is as shown in FIG. 6D.

도 7은 본 발명에 따른 메모리 읽기/쓰기 방법을 나타낸 예시도이다.7 is an exemplary view illustrating a memory read / write method according to the present invention.

도 7을 참조하여 알 수 있는 바와 같이, 본 발명에 따른 메모리는 예컨대, 한번에 하나의 픽셀을 쓸 수 있지만, 한번에 N개의 픽셀을 읽을 수 있다. 예를 들어, 영상이 320x240 픽셀들로 이루어지고, 각 픽셀은 8bit로 이루어진다고 가정하면, 한번에 하나의 픽셀 8bit만을 쓸 수 있지만, 읽을 때에는 상기 매칭 윈도우의 크기 N개 만큼의 픽셀을 읽을 수 있다. 또는 상기 한 줄(column)의 픽셀들, 즉 240개의 픽셀을 한번에 읽을 수 있다. 따라서, 본 발명에 따른 메모리는 메모리 쓰기 동작은 빈번하지 않은반면, 메모리 읽기 동작이 빈번한 경우 매우 유용하다. As can be seen with reference to Fig. 7, the memory according to the invention can, for example, write one pixel at a time, but can read N pixels at a time. For example, assuming that an image consists of 320x240 pixels and each pixel consists of 8 bits, only one pixel of 8 bits can be written at a time, but the read can read as many as N pixels of the matching window. Alternatively, the column of pixels, that is, 240 pixels, may be read at a time. Therefore, the memory according to the present invention is very useful when the memory write operation is not frequent, while the memory read operation is frequent.

따라서, 본 발명에 따르면 매칭 윈도우(Matching Window)의 세로 크기 만큼이 상기 메모리로부터 한 번에 읽혀지므로, 메모리 참조량이 기존 HW(R+1)N^2에서 HW(R+1)N*2 로 줄어든다.Therefore, according to the present invention, since the vertical size of the matching window is read from the memory at one time, the memory reference amount is changed from HW (R + 1) N ^ 2 to HW (R + 1) N * 2. Decreases.

한편, 도 7을 참조하여 알 수 이는 바와 같이, 본 발명에 따른 메모리 제어 구조는 연관된 데이터끼리 정렬하여 저장하는 Read-Shift-Write 구조를 갖는다. 일반적인, 메모리 제어 방식은 읽기(Read) / 쓰기(Write)가 각기 별개의 동작으로 수행되는 반면, 본 발명에서는 읽기/쓰기가 하나의 동작으로 수행된다. 즉, 일반적인 메모리 제어 구조에서는 매번 픽셀 데이터를 참조할 때마다 어드레스/제어/데이터(Address/Control/Data) 신호를 주어야 하지만, 본 발명에서는 하나의 어드레스(Address)를 제공하면, 동시에 Read-Shift-Write가 동시에 수행된다. 다시 말해서, 도 6b와 같이 메모리에 이미지의 첫 라인의 픽셀 P0, 픽셀 P2, 픽셀 P3, 픽셀 P4, 픽셀 P5, 픽셀 P6이 저장되어 있는 경우, 어드레스 A0를 제공하면, 상기 픽셀 P0를 읽을 수 있을 뿐만 아니라, 동시에 상기 두 번째 라인의 픽셀 P320도 쓰기 동작을 할 수가 있다. 마찬가지로, 이미지의 첫 번째 라인의 첫 픽셀 P1을 상기 메모리로부터 읽으면서, 동시에 상기 메모리에 상기 두 번째 라인의 두번 째 픽셀 P321을 쓸 수 있다.On the other hand, as can be seen with reference to Figure 7, the memory control structure according to the present invention has a Read-Shift-Write structure for storing the associated data aligned. In general, in the memory control scheme, read / write are performed in separate operations, whereas in the present invention, read / write is performed in one operation. That is, in a general memory control structure, an address / control / data signal should be given every time pixel data is referenced, but in the present invention, if one address is provided, simultaneously Read-Shift- Write is executed at the same time. In other words, when the pixel P0, the pixel P2, the pixel P3, the pixel P4, the pixel P5 and the pixel P6 of the first line of the image are stored in the memory as shown in FIG. 6B, if the address A0 is provided, the pixel P0 can be read. In addition, at the same time, the pixel P320 of the second line can also perform a write operation. Similarly, while reading the first pixel P1 of the first line of the image from the memory, it is possible to write the second pixel P321 of the second line to the memory at the same time.

결론적으로, 상기 영상의 픽셀들에 대해 세로 방향의 줄(Column) 단위로 어드레스를 부여하여, 상기 메모리에 저장하면, 도 4에 도시된 NxN 크기의 매칭 윈도우(Matching Window)(2)를 통해 SAD를 수행하더라도, 상기 세로 방향의 일련의 픽셀들을 상기 메모리로부터 한번에 읽을 수 있으므로, 메모리 읽기 동작은 기존 HxV(R+1)N2번에서 HxV(R+1)N*2번으로 현저하게 감소된다. 예를 들어, 상기 매칭 윈도우가 11x11 크기를 가질 경우, 상기 메모리 읽기 동작은 종래에 비해 84.62%감소 되어, 15.38%에 불과하게 된다. As a result, when the pixels of the image are addressed in a column unit in the vertical direction and stored in the memory, the SAD is provided through a matching window 2 having an NxN size shown in FIG. 4. Even though, the series of pixels in the vertical direction can be read from the memory at one time, the memory read operation is significantly reduced from HxV (R + 1) N 2 to HxV (R + 1) N * 2. . For example, when the matching window has a size of 11 × 11, the memory read operation is reduced by 84.62% compared to the prior art, which is only 15.38%.

여기까지 설명된 본 발명에 따른 방법은 소프트웨어, 하드웨어, 또는 이들의 조합으로 구현될 수 있다. 예를 들어, 본 발명에 따른 방법은 저장 매체(예를 들어, 메모리, 플래쉬 메모리, 하드 디스크, 기타 등등)에 저장될 수 있고, 프로세서(예를 들어, 마이크로 프로세서)에 의해서 실행될 수 있는 소프트웨어 프로그램 내에 코드들 또는 명령어들로 구현될 수 있다. The method according to the invention described thus far can be implemented in software, hardware, or a combination thereof. For example, the method according to the present invention may be stored in a storage medium (eg, memory, flash memory, hard disk, etc.) and may be a software program executable by a processor (eg a microprocessor). It may be implemented with codes or instructions within.

이상에서는 본 발명의 바람직한 실시예를 예시적으로 설명하였으나, 본 발명의 범위는 이와 같은 특정 실시예에만 한정되는 것은 아니므로, 본 발명은 본 발명의 사상 및 특허청구범위에 기재된 범주 내에서 다양한 형태로 수정, 변경, 또는 개선될 수 있다.In the above description of the preferred embodiments of the present invention by way of example, the scope of the present invention is not limited only to these specific embodiments, the present invention is in various forms within the scope of the spirit and claims of the present invention Can be modified, changed, or improved.

도 1a 내지 도 1d는 양안시를 이용한 깊이-지도 획득 개념도.1A to 1D are conceptual diagrams of depth-map acquisition using binocular vision.

도 2는 일반적인 방식에 따른 영상을 메모리로 저장하는 순서를 나타내는 도면이다. 2 is a diagram illustrating a procedure of storing an image in a memory according to a general scheme.

도 3은 일반적인 방식에 따른 메모리 저장방식을 나타내는 도면이다. 3 is a diagram illustrating a memory storage method according to a general method.

도 4는 스테레오 매칭의 SAD 처리 방법을 나타내는 도면이다. 4 is a diagram illustrating a SAD processing method of stereo matching.

도 5a 및 도 5b는 본 발명에 따른 메모리 저장 방법의 개념을 나타낸 예시도이다. 5A and 5B are exemplary views illustrating the concept of a memory storage method according to the present invention.

도 6a 내지 6d는 본 발명에 따른 메모리 저장 방법을 나타낸 예시도이다.6A to 6D are exemplary views illustrating a memory storing method according to the present invention.

도 7은 본 발명에 따른 메모리 읽기/쓰기 방법을 나타낸 예시도이다.7 is an exemplary view illustrating a memory read / write method according to the present invention.

Claims (6)

삭제delete 이미지의 각 라인의 픽셀들을 입력받는 단계와;Receiving pixels of each line of the image; 상기 이미지의 픽셀들을 컬럼(column) 단위로 순차 어드레스를 부여하는 단계와;Assigning sequential addresses to the pixels of the image in columns; 상기 어드레스에 따라 상기 입력받은 픽셀들을 세로 방향으로 저장하는 단계를 포함하는 것을 특징으로 하는 이미지를 메모리에 쓰기하는 방법.And storing the input pixels in a vertical direction according to the address. 제 2항에 있어서,The method of claim 2, 상기 순차 부여된 어드레스 중 임의의 어드레스를 통해 상기 저장된 픽셀을 읽음과 동시에, 상기 픽셀과 라인 방향으로 이웃한 픽셀을 저장하는 것을 특징으로 하는 이미지를 메모리에 쓰기하는 방법.And reading the stored pixel through any one of the sequentially assigned addresses, and storing neighboring pixels in the line direction with the pixel. 이미지의 픽셀들에 대해 컬럼(column) 단위로 순차 어드레스들을 부여하는 단계와;Assigning sequential addresses on a column-by-column basis to pixels of an image; 상기 이미지의 제 1 라인의 픽셀들을 상기 순차적인 어드레스들에 따라 저장하는 단계와;Storing pixels of a first line of the image according to the sequential addresses; 상기 어드레스들 중 제 1 어드레스를 이용하여, 상기 제 1 라인의 첫 번째 픽셀을 읽으면서, 상기 제 2 라인의 첫 번째 픽셀을 저장하는 단계를 포함하는 것을 특징으로 하는 메모리 읽기 쓰기 방법.And storing the first pixel of the second line while reading the first pixel of the first line using a first one of the addresses. 이미지의 픽셀들에 대해 컬럼(column) 단위로 순차 어드레스들을 부여한 후, 상기 이미지의 제 1 라인의 픽셀들을 상기 순차적인 어드레스들에 따라 메모리에 쓰기 동작을 수행하고, 상기 어드레스들 중 제 1 어드레스를 이용하여 상기 제 1 라인의 첫 번째 픽셀을 읽기 동작을 수행하면서, 상기 제 2 라인의 첫 번째 픽셀을 쓰기 동작을 수행하는 메모리 제어기.After assigning sequential addresses to columns of the image in column units, writes pixels of the first line of the image into memory according to the sequential addresses, and writes a first address among the addresses. And performing a read operation on the first pixel of the first line while performing a write operation on the first pixel of the second line. 이미지의 픽셀들에 대해 컬럼(column) 단위로 순차 어드레스들을 부여한 후, 상기 이미지의 제 1 라인의 픽셀들을 상기 순차적인 어드레스들에 따라 메모리에 쓰기 동작을 수행하고, 상기 어드레스들 중 제 1 어드레스를 이용하여 상기 제 1 라인의 첫 번째 픽셀을 읽기 동작을 수행하면서, 상기 제 2 라인의 첫 번째 픽셀을 쓰기 동작을 수행하는 메모리 제어기를 포함하는 메모리.After assigning sequential addresses to columns of the image in column units, writes pixels of the first line of the image into memory according to the sequential addresses, and writes a first address among the addresses. And a memory controller configured to perform a write operation on the first pixel of the first line while performing a read operation on the first pixel of the first line.
KR1020080019331A 2008-02-29 2008-02-29 Method for allocating address and method for writing/reading image to/from memory KR100924710B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080019331A KR100924710B1 (en) 2008-02-29 2008-02-29 Method for allocating address and method for writing/reading image to/from memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080019331A KR100924710B1 (en) 2008-02-29 2008-02-29 Method for allocating address and method for writing/reading image to/from memory

Publications (2)

Publication Number Publication Date
KR20090093668A KR20090093668A (en) 2009-09-02
KR100924710B1 true KR100924710B1 (en) 2009-11-04

Family

ID=41302123

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080019331A KR100924710B1 (en) 2008-02-29 2008-02-29 Method for allocating address and method for writing/reading image to/from memory

Country Status (1)

Country Link
KR (1) KR100924710B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5511151A (en) 1992-06-10 1996-04-23 Canon Information Systems, Inc. Method and apparatus for unwinding image data
KR19990023405A (en) * 1997-08-06 1999-03-25 구자홍 Data preposition device and method
KR20060123632A (en) * 2004-04-15 2006-12-01 마쯔시다덴기산교 가부시키가이샤 Burst memory access method to rectangular area

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5511151A (en) 1992-06-10 1996-04-23 Canon Information Systems, Inc. Method and apparatus for unwinding image data
KR19990023405A (en) * 1997-08-06 1999-03-25 구자홍 Data preposition device and method
KR20060123632A (en) * 2004-04-15 2006-12-01 마쯔시다덴기산교 가부시키가이샤 Burst memory access method to rectangular area

Also Published As

Publication number Publication date
KR20090093668A (en) 2009-09-02

Similar Documents

Publication Publication Date Title
US10368062B2 (en) Panoramic camera systems
CN110998659B (en) Image processing system, image processing method, and program
US10778949B2 (en) Robust video-based camera rotation estimation
US20160328882A1 (en) Pass-through display of captured imagery
US10915998B2 (en) Image processing method and device
CN101632102B (en) Method and apparatus for generating stereoscopic image from two-dimensional image by using mesh map
US20160035139A1 (en) Low latency stabilization for head-worn displays
CN104699842A (en) Method and device for displaying pictures
CN103247031A (en) Method, terminal and system for correcting aberrant image
CN110517211B (en) Image fusion method based on gradient domain mapping
CN111080776B (en) Human body action three-dimensional data acquisition and reproduction processing method and system
CN104574331A (en) Data processing method, device, computer storage medium and user terminal
Miyajima et al. A real-time stereo vision system with FPGA
CN103440664A (en) Method, system and computing device for generating high-resolution depth map
JP7082713B2 (en) Rolling Shutter Correction for images / videos using convolutional neural networks in applications for image / video SFM / SLAM
CN110310325B (en) Virtual measurement method, electronic device and computer readable storage medium
CN115035456A (en) Video denoising method and device, electronic equipment and readable storage medium
CN115008454A (en) Robot online hand-eye calibration method based on multi-frame pseudo label data enhancement
JP2011039801A (en) Apparatus and method for processing image
Jawed et al. Real time rectification for stereo correspondence
JP6429483B2 (en) Information processing apparatus, imaging apparatus, information processing system, information processing method, and program
KR100924710B1 (en) Method for allocating address and method for writing/reading image to/from memory
JP5906033B2 (en) Image processing apparatus, image processing method, and program
CN115546027A (en) Image stitching line determining method, device and storage medium
CN114463405A (en) Method, device and system for accelerating surface scanning line laser 3D camera and FPGA

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121011

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20130930

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20141219

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee