KR102712092B1 - Electronic device for image reduction and reduction method therefor - Google Patents
Electronic device for image reduction and reduction method therefor Download PDFInfo
- Publication number
- KR102712092B1 KR102712092B1 KR1020230095762A KR20230095762A KR102712092B1 KR 102712092 B1 KR102712092 B1 KR 102712092B1 KR 1020230095762 A KR1020230095762 A KR 1020230095762A KR 20230095762 A KR20230095762 A KR 20230095762A KR 102712092 B1 KR102712092 B1 KR 102712092B1
- Authority
- KR
- South Korea
- Prior art keywords
- image
- value
- increment
- output active
- pixel
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4023—Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
이미지를 축소할 수 있는 전자 장치에 있어서, 제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 생성하는 제1 이미지 축소부;를 포함하되, 상기 제1 이미지 축소부는, 제1 출력 활성 위치값을 산출하고, 상기 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정하고, 상기 제1 출력 활성 위치의 픽셀; 및 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 상기 제1 출력 활성 위치값을 이용하여 상기 제3 영상을 구성하는 픽셀을 생성한다.An electronic device capable of reducing an image, comprising: a first image reduction unit which receives a second image and reduces the image size in a first direction, which is one of a horizontal direction and a vertical direction, to generate a third image; wherein the first image reduction unit calculates a first output active position value, determines a first output active position using the first output active position value, and generates pixels constituting the third image using pixel information of at least one of a pixel of the first output active position; and a pixel prior to the pixel of the first output active position; and the first output active position value.
Description
본 명세서에서 개시되는 실시예들은 이미지를 축소할 수 있는 전자 장치 및 그 축소 방법에 관한 것이다. Embodiments disclosed herein relate to an electronic device capable of reducing an image and a method for reducing the image.
컴퓨터 그래픽 및 디지털 이미징에서 이미지 스케일링은 디지털 이미지의 크기 조정을 의미한다. 그 중 이미지 축소 방향의 스케일링을 다운스케일링(Downscaling) 이라 한다. 래스터 그래픽 이미지의 크기를 다운스케일링을 실시할 때 픽셀 수가 원본보다 더 작은 새로운 이미지를 생성해야 한다. 이 경우 일반적으로 가시적인 품질 손실이 발생하게 된다.In computer graphics and digital imaging, image scaling refers to the resizing of digital images. Among them, scaling in the direction of image reduction is called downscaling. When downscaling the size of a raster graphic image, a new image with a smaller number of pixels than the original must be created. In this case, visible quality loss usually occurs.
디지털 신호 처리의 관점에서 래스터(Raster) 그래픽 이미지의 스케일링은 샘플 속도 변환의 2차원 예가 되며, 이산 디지털 신호를 샘플링 속도에 맞추어서 다른 신호로 변환하는 것으로 볼 수 있다. From a digital signal processing perspective, scaling a raster graphic image is a two-dimensional example of sample rate conversion, which can be viewed as converting a discrete digital signal into another signal at a sampling rate that matches the sampling rate.
실시간으로 입력되는 래스터 그래픽 이미지의 축소에는, DDA(Digital Differential Analyzer) 알고리즘이 매우 적합하다. 입력 영상 크기를 출력 영상 크기로 나누는 것에 의해 증분을 산출하고, 매 출력 픽셀마다 증분만큼 누적하면서 입력 픽셀의 위치를 취득하는 방법으로, 하드웨어 자원이 많이 필요한 곱셈기와 부동소수점 연산의 사용을 최소화할 수 있다.For the reduction of raster graphic images input in real time, the DDA (Digital Differential Analyzer) algorithm is very suitable. By calculating the increment by dividing the input image size by the output image size, and accumulating the increment for each output pixel, the location of the input pixel is acquired, which minimizes the use of multipliers and floating point operations that require a lot of hardware resources.
DDA 알고리즘을 이용할 경우, 증분이 정수배가 아닌 경우를 대비해 소수부 연산을 위한 자원인 소수점의 비트(Fractional Bit)가 추가로 필요하다.When using the DDA algorithm, an additional fractional bit is required as a resource for decimal operations in case the increment is not an integer multiple.
본 명세서에서 개시되는 실시예들은, 소수부 연산 시 소수점 비트의 자원 부족에 따른 증분 누적값 오차에 대한 보상을 실시하는 것에 의해 적은 자원으로 DDA 알고리즘을 적용하여 이미지를 축소할 수 있는 전자 장치 및 그 축소 방법을 제공하는 것에 그 목적이 있다. The purpose of the embodiments disclosed in this specification is to provide an electronic device and a reduction method thereof capable of reducing an image by applying a DDA algorithm with a small number of resources by compensating for an incremental accumulation value error due to a lack of decimal point bit resources during a decimal operation.
이미지를 축소할 수 있는 전자 장치는, 제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 생성하는 제1 이미지 축소부;를 포함하되, 상기 제1 이미지 축소부는, 제1 출력 활성 위치값을 산출하고, 상기 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정하고, 상기 제1 출력 활성 위치의 픽셀; 및 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 상기 제1 출력 활성 위치값을 이용하여 상기 제3 영상을 구성하는 픽셀을 생성한다. An electronic device capable of reducing an image comprises a first image reduction unit which receives a second image and reduces the image size in a first direction, which is one of a horizontal direction and a vertical direction, to generate a third image; wherein the first image reduction unit calculates a first output active position value, determines a first output active position using the first output active position value, and generates pixels constituting the third image using pixel information of at least one of a pixel of the first output active position; and a pixel prior to the pixel of the first output active position; and the first output active position value.
구체적으로, 상기 제1 출력 활성 위치는, 상기 제2 영상 중의 상기 제1 방향의 픽셀의 위치 정보이고, 상기 제1 출력 활성 위치값은, 상기 제1 출력 활성 위치 여부를 판단하는 정보; 및 상기 제1 출력 활성 위치의 픽셀과 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀의 사이의 위치 정보인 증분 위치 정보;를 포함하는 값이다. Specifically, the first output active position is position information of a pixel in the first direction among the second images, and the first output active position value is a value including: information for determining whether it is the first output active position; and incremental position information, which is position information between a pixel of the first output active position and a pixel preceding the pixel of the first output active position.
아울러, 상기 제1 이미지 축소부는, 상기 제2 영상의 제1 방향의 크기로부터, 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제1 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값을 뺀 값에 해당하는 값을 갖는 제1 차이값; 및 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제2 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값으로부터, 상기 제2 영상의 제1 방향의 크기를 뺀 값에 해당하는 값을 갖는 제2 차이값;을 산출한다.In addition, the first image reduction unit calculates a first difference value having a value corresponding to a value obtained by subtracting a product of a first increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image from the size in the first direction of the second image; and a second difference value having a value corresponding to a value obtained by subtracting a size in the first direction of the second image from a product of a second increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image.
상기 제1 증분은 상기 제2 영상의 제1 방향의 크기를 상기 제3 영상의 제1 방향의 크기로 나눈 값에 해당하고, 상기 제2 증분은 상기 제1 증분의 가장 낮은 소수점의 자리에 해당하는 비트에 이진수 1을 더한 값에 해당한다. The above first increment corresponds to a value obtained by dividing the size of the second image in the first direction by the size of the third image in the first direction, and the second increment corresponds to a value obtained by adding binary 1 to the bit corresponding to the lowest decimal place of the first increment.
아울러, 상기 제1 증분 및 상기 제2 증분 각각은, N비트의 소수점의 자릿수를 갖는 숫자이다, 여기서, 상기 N은, 1 이상의 정수이다.In addition, each of the first increment and the second increment is a number having a decimal point of N bits, where N is an integer greater than or equal to 1.
또한, 상기 제1 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제2 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응하고, 상기 제2 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제1 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응한다.Additionally, the first difference value corresponds to the number of incremental positions arranged at an interval of the second increment with respect to the size in the first direction of the second image, and the second difference value corresponds to the number of incremental positions arranged at an interval of the first increment with respect to the size in the first direction of the second image.
또한, 상기 제1 이미지 축소부는, 상기 제1 증분 및 상기 제2 증분 중 하나의 증분으로, 상기 제2 영상의 상기 제1 방향의 픽셀 각각이 속한 증분을 분류하기 위한 제1 증분 분류값을 산출한다. 아울러, 상기 제1 이미지 축소부는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수인 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제2 차이값을 더하고, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수가 아닌 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제1 차이값을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 증분 분류값을 산출한다.In addition, the first image reduction unit calculates a first incremental classification value for classifying the increment to which each pixel of the second image in the first direction belongs, as one of the first increment and the second increment. Furthermore, the first image reduction unit calculates the first incremental classification value at the position of the corresponding pixel by adding the second difference value to the first incremental classification value at the position of the corresponding pixel when the first incremental classification value at the position of the previous pixel of the second image in the first direction is negative, and by subtracting the first difference value from the first incremental classification value at the position of the corresponding pixel when the first incremental classification value at the position of the previous pixel of the second image in the first direction is not negative.
또한, 상기 제1 이미지 축소부는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 출력 활성 위치값에, 상기 제2 영상의 상기 제1 방향의 해당 픽셀의 위치가 상기 제1 출력 활성 위치인 경우 상기 제1 증분 분류값에 의해 분류된 증분의 값을 더하고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1보다 큰 경우 1을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출한다.In addition, the first image reduction unit calculates the first output active position value at the position of the corresponding pixel in the first direction of the second image by adding a value of an increment classified by the first increment classification value to the first output active position value at the position of the previous pixel in the first direction of the second image if the position of the corresponding pixel in the first direction of the second image is the first output active position, and by subtracting 1 if the first output active position value at the position of the previous pixel is greater than 1.
상기 제1 이미지 축소부는, 해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값을 이용하여, 상기 제1 출력 활성 위치를 결정한다. 또한, 상기 제1 이미지 축소부는, 상기 제1 출력 활성 위치값의 소수 부분의 값인 상기 증분 위치를 이용하여, 상기 제3 영상을 구성하는 픽셀을 생성한다.The first image reduction unit determines the first output active position by using the integer part of the first output active position value at the position of the corresponding pixel. In addition, the first image reduction unit generates pixels constituting the third image by using the incremental position, which is the decimal part of the first output active position value.
이미지를 축소할 수 있는 전자 장치 및 그 축소 방법에 따르면, 소수부 연산 시 소수점 비트의 자원 부족에 따른 증분 누적값 오차에 대한 보상을 실시하는 것에 의해 적은 자원으로 DDA 알고리즘을 적용 가능하다.According to an electronic device capable of reducing an image and a method for reducing the image, a DDA algorithm can be applied with fewer resources by compensating for an error in incremental accumulation due to a lack of decimal point bit resources during decimal part calculation.
도 1은 일실시예에 따른 이미지를 축소할 수 있는 전자 장치의 구성도.
도 2는 정수의 증분을 갖는 경우의 제1 이미지 축소부의 동작 설명도.
도 3은 소수의 증분을 갖는 경우의 제1 이미지 축소부의 동작 설명도.
도 4는 일실시예에 따른 제1 이미지 축소부의 구성도.
도 5는 제1 차이값과 제2 차이값에 대한 설명도.FIG. 1 is a block diagram of an electronic device capable of reducing an image according to one embodiment.
Figure 2 is a diagram explaining the operation of the first image reduction unit when there is an integer increment.
Figure 3 is a diagram explaining the operation of the first image reduction unit in the case of a small number of increments.
Figure 4 is a configuration diagram of a first image reduction unit according to an embodiment.
Figure 5 is an explanatory diagram for the first difference value and the second difference value.
이하, 첨부된 도면을 참조하면서 본 개시의 실시예들에 따른 이미지를 축소할 수 있는 전자 장치 및 그 축소 방법에 대해 상세히 설명하기로 한다. 본 개시의 하기의 실시예들은 본 개시를 구체화하기 위한 것일 뿐 본 개시의 권리 범위를 제한하거나 한정하는 것이 아님은 물론이다. 본 개시의 상세한 설명 및 실시예들로부터 본 개시가 속하는 기술 분야의 전문가가 용이하게 유추할 수 있는 것은 본 개시의 권리 범위에 속하는 것으로 해석된다. Hereinafter, an electronic device capable of reducing an image according to embodiments of the present disclosure and a reduction method thereof will be described in detail with reference to the attached drawings. It should be noted that the following embodiments of the present disclosure are intended only to concretize the present disclosure and do not limit or restrict the scope of the rights of the present disclosure. It is interpreted that what a specialist in the technical field to which the present disclosure belongs can easily infer from the detailed description and embodiments of the present disclosure falls within the scope of the rights of the present disclosure.
도 1은 일실시예에 따른 이미지를 축소할 수 있는 전자 장치(100)의 구성도를 나타낸다.FIG. 1 illustrates a configuration diagram of an electronic device (100) capable of reducing an image according to one embodiment.
도 1로부터 알 수 있는 바와 같이, 일실시예에 따른 이미지를 축소할 수 있는 전자 장치(100)는, 제1 이미지 흐림부(10), 제1 이미지 축소부(20), 제2 이미지 흐림부(30), 제2 이미지 축소부(40) 및 출력 선택부(50)를 포함하여 구성된다.As can be seen from FIG. 1, an electronic device (100) capable of reducing an image according to an embodiment of the present invention comprises a first image blurring unit (10), a first image reduction unit (20), a second image blurring unit (30), a second image reduction unit (40), and an output selection unit (50).
제1 이미지 흐림부(10), 제1 이미지 축소부(20), 제2 이미지 흐림부(30), 제2 이미지 축소부(40) 및 출력 선택부(50) 각각은, 메모리; 및 로직 회로로 구성된 하드웨어; 중 적어도 하나를 포함하여 구성될 수 있다. Each of the first image blurring unit (10), the first image reduction unit (20), the second image blurring unit (30), the second image reduction unit (40), and the output selection unit (50) may be configured to include at least one of hardware consisting of a memory; and a logic circuit.
제1 이미지 흐림부(10)는, 제1 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향으로 앤티 에일리어싱(Anti-Aliasing) 처리에 의해, 흐리게 만들어 제2 영상을 출력한다. 여기서 수평 방향은 각각의 영상을 구성하는 픽셀의 열의 방향, 즉 x축 방향에 해당한다. 아울러, 수직 방향은 각각의 영상을 구성하는 픽셀의 행의 방향, 즉 y축 방향에 해당한다. The first image blurring unit (10) receives a first image, blurs it in a first direction, either horizontal or vertical, through anti-aliasing processing, and outputs a second image. Here, the horizontal direction corresponds to the direction of the column of pixels constituting each image, i.e., the x-axis direction. In addition, the vertical direction corresponds to the direction of the row of pixels constituting each image, i.e., the y-axis direction.
다운스케일링 시 출력 픽셀의 샘플링 속도가 입력보다 느리기 때문에 에일리어싱이라 불리는 신호의 일그러짐이 발생하게 된다. 이에 대한 문제를 최소화하기 위해 이미지를 축소하기 전 영상을 미리 뭉개는 앤티 에일리어싱 처리에 의해 이미지 축소 이후의 계단 현상을 줄여줄 수 있다.When downscaling, the sampling rate of the output pixels is slower than the input, which causes signal distortion called aliasing. To minimize this problem, anti-aliasing is used to blur the image before downscaling. It can reduce the stair-stepping effect after image reduction through processing.
앤티 에일리어싱은 다음의 [수학식 1]의 가우시안 코어를 사용하여 로우 패스 필터(Low Pass Filter) 계수를 만들어 적용한다.Anti-aliasing is applied by creating low pass filter coefficients using the Gaussian core of the following [Mathematical Formula 1].
[수학식 1]에서 a는 제1 방향의 값을 나타낸다. 즉, 제1 방향이 수평 방향인 경우 a는 x축의 값을 나타내고, 제1 방향이 수직 방향인 경우 a는 y축의 값을 나타낸다.In [Mathematical Formula 1], a represents a value in the first direction. That is, when the first direction is a horizontal direction, a represents a value in the x-axis, and when the first direction is a vertical direction, a represents a value in the y-axis.
아울러, σ는 영상을 흐리게 하는, 즉 뭉개는 정도를 다운스케일링 비율(ScaleRatio)에 따라 적용해 줄 수 있도록 하는 계수이다. In addition, σ is a coefficient that allows the degree of blurring, or blurring, of the image to be applied according to the downscaling ratio (ScaleRatio).
σ는 다음의 [수학식 2]와 같이 나타낼 수 있다.σ can be expressed as the following [Mathematical Formula 2].
[수학식 2]에서 strn은 상황에 맞춰 앤티 에일리어싱 정도를 조절할 수 있는 계수를 나타낸다.In [Mathematical Formula 2], strn represents a coefficient that can adjust the degree of anti-aliasing according to the situation.
디지털 영상에서 래스터(Raster) 그래픽 이미지는 정사각형 픽셀 그리드를 통해 픽셀 단위의 너비와 높이를 갖는 2차원 이미지로 특징 지어진다. 래스터 그래픽 이미지의 축소를 위해서는 축소 비율에 따라서 필요한 픽셀만 취득하는 데시메이션(Decimation) 방법이 사용될 수 있다.In digital images, a raster graphic image is characterized as a two-dimensional image with a width and height in pixel units through a square pixel grid. To reduce a raster graphic image, a decimation method can be used to acquire only the necessary pixels according to the reduction ratio.
제1 이미지 축소부(20)는, 제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 출력하는 역할을 한다. The first image reduction unit (20) receives a second image, reduces the image size in the first direction, which is either the horizontal or vertical direction, and outputs a third image.
즉, 제3 영상의 제1 방향의 이미지 크기는 제2 영상의 제1 방향의 이미지 크기로부터 축소되지만, 제3 영상의 제2 방향의 이미지 크기는 제2 영상의 제2 방향의 이미지 크기와 동일하게 유지된다. 제2 방향은, 수평 방향 또는 수직 방향 중 다른 하나의 방향이다. 만약 제1 방향이 수평 방향이라면, 제2 방향은 수직 방향이 된다.That is, the image size of the third image in the first direction is reduced from the image size of the second image in the first direction, but the image size of the third image in the second direction is maintained the same as the image size of the second image in the second direction. The second direction is the other direction among the horizontal direction and the vertical direction. If the first direction is the horizontal direction, the second direction becomes the vertical direction.
구체적으로 제1 이미지 축소부(20)는, 제1 출력 활성 위치값을 산출하고, 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정한다. 아울러, 제1 이미지 축소부(20)는, 제1 출력 활성 위치의 픽셀; 및 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 제1 출력 활성 위치값을 이용하여 제3 영상을 구성하는 픽셀을 생성한다. 제1 이미지 축소부(20)는, 제2 영상을 픽셀 단위로 입력받아 각 픽셀별로 제1 출력 활성 위치값을 산출한다.Specifically, the first image reduction unit (20) calculates a first output active position value and determines a first output active position using the first output active position value. In addition, the first image reduction unit (20) generates pixels constituting a third image using pixel information of at least one of a pixel of the first output active position; and a pixel before the pixel of the first output active position; and the first output active position value. The first image reduction unit (20) receives a second image in pixel units and calculates a first output active position value for each pixel.
제1 출력 활성 위치는, 제3 영상을 구성하는 픽셀을 생성하기 위해 사용되는 제2 영상 중의 제1 방향의 픽셀의 위치 정보이다. 아울러, 제1 출력 활성 위치값은, 제1 출력 활성 위치 여부를 판단하는 정보; 및 제1 출력 활성 위치의 픽셀과 제1 출력 활성 위치의 픽셀 이전의 픽셀의 사이의 위치 정보인 증분 위치 정보;를 포함하는 값이다. The first output active position is position information of a pixel in the first direction among the second images used to generate pixels constituting the third image. In addition, the first output active position value is a value including: information for determining whether it is the first output active position; and incremental position information, which is position information between the pixel of the first output active position and the pixel preceding the pixel of the first output active position.
도 2는 정수의 증분을 갖는 경우의 제1 이미지 축소부(20)의 동작 설명도이다. Figure 2 is a diagram explaining the operation of the first image reduction unit (20) in the case of having an integer increment.
여기서 증분이라는 것은, 제3 영상을 구성하는 픽셀을 생성하기 위한 제2 영상 중의 픽셀의 위치의 변화값을 나타낸다. 예를 들면, 제1 방향으로 300픽셀의 제2 영상으로부터 제1 방향으로 150픽셀의 제3 영상으로 이미지의 축소 시, 증분은 2 픽셀이 된다. Here, the increment refers to the change in the position of pixels in the second image for generating pixels constituting the third image. For example, when reducing an image from a second image of 300 pixels in the first direction to a third image of 150 pixels in the first direction, the increment is 2 pixels.
제1 이미지 축소부(20)는, 데시메이션 방법에 의해 이미지 크기를 축소할 수 있다. 다만, 데시메이션 방법은 원본 영상인 제2 영상과 축소 영상인 제3 영상의 비율이 정수인 경우에 한해 적용이 가능하므로, 임의의 원본 영상과 축소 영상의 비율을 갖는 경우에 대해서는 추가의 대응 방법이 필요하다. The first image reduction unit (20) can reduce the image size by a decimation method. However, the decimation method can only be applied when the ratio of the original image, the second image, and the reduced image, the third image, is an integer, so an additional response method is required for cases where the ratio of the original image and the reduced image is arbitrary.
도 3은 소수의 증분을 갖는 경우의 제1 이미지 축소부(20)의 동작 설명도이다. Figure 3 is a diagram explaining the operation of the first image reduction unit (20) in the case of a small number of increments.
제1 이미지 축소부(20)는, 임의의 제2 영상과 제3 영상의 비율을 처리하기 위해 가상의 소수점 공간을 두어 증분을 소수점 단위가 될 수 있도록 구현하였다. The first image reduction unit (20) is implemented so that the increment can be a decimal unit by providing a virtual decimal space to process the ratio of an arbitrary second image and a third image.
누적된 증분 위치가 소수점인 경우 소수점 값을 이용하여 인접한 두 픽셀 간의 합성 비율을 결정할 수 있다. 여기서 증분 위치는, 제1 방향으로 증가 시 해당되는 제2 영상의 위치값을 나타낸다.If the accumulated incremental position is a decimal point, the synthesis ratio between two adjacent pixels can be determined using the decimal point value. Here, the incremental position represents the position value of the corresponding second image when increasing in the first direction.
도 3과 같이 증분이 1.5픽셀이므로, 제2 영상에서 해당 증분 위치의 좌측 픽셀과 우측 픽셀을 0.5의 비율로 합성하는 것에 의해, 제3 영상을 구성하는 픽셀을 생성할 수 있다.As shown in Fig. 3, since the increment is 1.5 pixels, pixels constituting the third image can be generated by synthesizing the left and right pixels of the corresponding incremental position in the second image at a ratio of 0.5.
다만, 제1 이미지 축소부(20)에서는 증분 위치의 소수점의 자릿수는 하드웨어 자원을 감안하여 N비트를 갖도록 한다. N은 1 이상의 정수이다. 따라서, 증분의 위치가 정수 위치가 아닌 경우 소수점 값에 따라서 양단 원본 픽셀값에 가중치를 두어 합성하는 이중선형보간법(Bilinear Interpolation)을 이용할 수 있다. 즉, 증분 누적 위치의 소수점의 비트값이 0001인 경우 좌측 픽셀 값과 우측 픽셀 값을 15:1의 비율로 합성하게 된다. However, in the first image reduction unit (20), the decimal point of the incremental position is set to have N bits in consideration of hardware resources. N is an integer greater than or equal to 1. Therefore, if the incremental position is not an integer position, a bilinear interpolation method can be used to weight and synthesize original pixel values on both sides according to the decimal point value. That is, if the bit value of the decimal point of the incremental accumulation position is 0001, the left pixel value and the right pixel value are synthesized at a ratio of 15:1.
참고로, 제1 이미지 축소부(20)는, 소수인 증분의 위치뿐만 아니라, 증분 위치에 대응하는 정수인 제1 출력 활성 위치를 사용한다. 만약 제1 픽셀과 제2 픽셀 사이에 증분 위치가 있을 경우, 제1 출력 활성 위치는 우측의 제2 픽셀의 위치가 된다. 다만, 제1 이미지 축소부(20)는, 제2 픽셀의 위치가 제1 출력 활성 위치일 지라도, 제1 출력 활성 위치값의 소수 부분의 값인 증분 위치를 이용하는 것에 의해 제1 픽셀과 제2 픽셀을 보간하여 제3 영상을 구성하는 픽셀을 생성한다.For reference, the first image reduction unit (20) uses not only the position of the decimal increment, but also the first output active position, which is an integer corresponding to the increment position. If there is an increment position between the first pixel and the second pixel, the first output active position becomes the position of the second pixel on the right. However, the first image reduction unit (20) interpolates the first pixel and the second pixel by using the increment position, which is the value of the decimal part of the first output active position value, even if the position of the second pixel is the first output active position, to generate pixels constituting the third image.
하기에 제1 이미지 축소부(20)에 대해 구체적으로 설명하기로 한다.Below, the first image reduction unit (20) will be described in detail.
증분을 소수점으로 하더라도 여전히 모든 다운스케일링 비율을 만족하는 증분을 만들어내기 위한 소수점 단위의 크기는 무한하게 되므로, 단순히 소수점 자리를 추가하여 이를 구현하는 건 불가능하다. 컴퓨터 연산의 경우 고정 소수점 부분과 지수 부분의 둘로 나누어 높은 정밀도의 연산을 구현해 내는 부동 소수점 연산을 사용하기도 하지만, 효율적인 작은 하드웨어 구현을 위하여 부동 소수점 연산 방법은 고려하지 않는다.Even if the increment is a decimal point, the size of the decimal point unit to create an increment that still satisfies all downscaling ratios is infinite, so it is impossible to implement it by simply adding decimal places. In the case of computer operations, floating point operations are sometimes used to implement high-precision operations by dividing them into fixed point parts and exponent parts, but floating point operations are not considered for efficient small hardware implementation.
대신 제1 이미지 축소부(20)에서는 제한된 소수점 자리를 갖는 증분에서의 피할 수 없는 증분 누적 오차를 보상하는 기법을 사용한다. 즉, 제1 이미지 축소부(20)에서는, 제1 증분만을 사용할 경우 발생할 수 있는 누적 오차를, 제2 증분도 사용하는 것에 의해 보상할 수 있다. Instead, the first image reduction unit (20) uses a technique for compensating for the inevitable incremental cumulative error in increments with limited decimal places. That is, in the first image reduction unit (20), the cumulative error that may occur when only the first increment is used can be compensated for by also using the second increment.
도 4는 일실시예에 따른 제1 이미지 축소부(20)의 구성도를 나타낸다.Figure 4 shows a configuration diagram of a first image reduction unit (20) according to one embodiment.
도 4로부터 알 수 있는 바와 같이 일실시예에 따른 제1 이미지 축소부(20)는, 증분 및 오차 산출기(21), 제1 증분 분류값 산출기(22), 제1 출력 활성 위치값 산출기(23) 및 제3 영상 생성기(24)를 포함하여 구성된다.As can be seen from FIG. 4, the first image reduction unit (20) according to one embodiment is configured to include an increment and error calculator (21), a first incremental classification value calculator (22), a first output active position value calculator (23), and a third image generator (24).
증분 및 오차 산출기(21)는, 제1 증분, 제2 증분, 제1 차이값 및 제2 차이값을 산출한다.The increment and error calculator (21) calculates a first increment, a second increment, a first difference value, and a second difference value.
제1 증분 및 제2 증분은 각각, 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보이다. 즉, 제2 영상의 증분 위치 사이의 간격은, 제1 증분 및 제2 증분 중 하나의 증분으로 설정된다.The first increment and the second increment are candidates for the interval between one increment position and another increment position, respectively. That is, the interval between the increment positions of the second image is set to one of the first increment and the second increment.
아울러, 제1 증분 및 제2 증분 각각은, N비트의 소수점의 자릿수를 갖는 숫자이다. 여기서 N은 1 이상의 정수이다. 예를 들면 N이 4인 경우, 제1 증분 및 제2 증분 각각은, 4비트의 소수점의 자릿수를 갖는다.In addition, each of the first increment and the second increment is a number having a decimal point of N bits, where N is an integer greater than or equal to 1. For example, when N is 4, each of the first increment and the second increment has a decimal point of 4 bits.
구체적으로, 제1 증분은, 제2 영상의 제1 방향의 크기를 제3 영상의 제1 방향의 크기로 나눈 값에 해당한다. 만약 제1 방향으로 300픽셀의 제2 영상으로부터 제1 방향으로 120픽셀의 제3 영상으로 이미지의 축소 시, 제1 증분은, (300/120)으로 2.5의 값을 갖는다. 즉, 제1 증분의 정수 부분에 대해 4비트로 나타내면 0010이 되고, 제1 증분의 소수 부분을 4비트로 나타내면 1000이 된다.Specifically, the first increment corresponds to the value obtained by dividing the size of the second image in the first direction by the size of the third image in the first direction. When reducing an image from a second image of 300 pixels in the first direction to a third image of 120 pixels in the first direction, the first increment has a value of 2.5, which is (300/120). That is, if the integer part of the first increment is expressed in 4 bits, it becomes 0010, and if the decimal part of the first increment is expressed in 4 bits, it becomes 1000.
아울러, 제2 증분은, 제1 증분의 가장 낮은 소수점의 자리에 해당하는 비트에 이진수 1을 더한 값에 해당한다. 즉, 만약 제1 방향으로 300픽셀의 제2 영상으로부터 제1 방향으로 120픽셀의 제3 영상으로 이미지의 축소 시, 제2 증분의 정수 부분을 4비트로 나타내면 제1 증분의 정수 부분과 동일하게 0010이 되고, 제2 증분의 소수 부분을 4비트로 나타내면 (1000+0001)이 된다.In addition, the second increment corresponds to the value obtained by adding binary 1 to the bit corresponding to the lowest decimal place of the first increment. That is, when reducing an image from a second image of 300 pixels in the first direction to a third image of 120 pixels in the first direction, if the integer part of the second increment is represented with 4 bits, it becomes 0010, the same as the integer part of the first increment, and if the decimal part of the second increment is represented with 4 bits, it becomes (1000+0001).
도 5는 제1 차이값과 제2 차이값에 대한 설명도를 나타낸다.Figure 5 shows an explanatory diagram for the first difference value and the second difference value.
제1 차이값은, 제1 증분으로 제2 영상의 제1 방향으로 증가시켜갈 때 누적된 오차이다. 구체적으로 제1 차이값은 제2 영상의 제1 방향의 크기로부터, 제1 증분과 제3 영상의 제1 방향의 크기를 곱한 값을 뺀 값에 해당하는 값을 갖는다.The first difference value is the accumulated error when increasing the first direction of the second image by the first increment. Specifically, the first difference value has a value corresponding to the value obtained by subtracting the product of the first increment and the first direction size of the third image from the size of the first direction of the second image.
아울러, 제2 차이값은, 제2 증분으로 제2 영상의 제1 방향으로 증가시켜갈 때 누적된 오차이다. 구체적으로 제2 차이값은 제2 증분과 제3 영상의 제1 방향의 크기를 곱한 값으로부터, 제2 영상의 제1 방향의 크기를 뺀 값에 해당하는 값을 갖는다.In addition, the second difference value is an accumulated error when increasing the second image in the first direction by the second increment. Specifically, the second difference value has a value corresponding to the value obtained by subtracting the size of the second image in the first direction from the value obtained by multiplying the second increment by the size of the third image in the first direction.
즉, 제1 차이값(d1)) 및 제2 차이값(d2)은 각각, 다음의 [수학식 3] 및 [수학식 4]와 같이 나타낼 수 있다.That is, the first difference value (d1) and the second difference value (d2) can be expressed as in the following [Mathematical Formula 3] and [Mathematical Formula 4], respectively.
[수학식 3] 및 [수학식 4]에서 S2는 제2 영상의 제1 방향의 크기, S3는 제3 영상의 제1 방향의 크기, INC1은 제1 증분, INC2는 제2 증분을 각각 나타낸다.In [Mathematical Expressions 3] and [Mathematical Expressions 4], S2 represents the size of the second image in the first direction, S3 represents the size of the third image in the first direction, INC1 represents the first increment, and INC2 represents the second increment, respectively.
[수학식 3] 및 [수학식 4]를 합치면, 제2 차이값(d2)은 다음의 [수학식 5]와 같이 나타낼 수 있다.Combining [Mathematical Expression 3] and [Mathematical Expression 4], the second difference value (d2) can be expressed as in the following [Mathematical Expression 5].
(INC2-INC1)의 값은 N비트 중 가장 낮은 소수점의 자리에 해당하는 비트의 값이 1인 이진수이므로, 제2 차이값(d2)의 이진수 값은 제3 영상의 제1 방향의 크기(S3)에 1을 곱한 값으로부터 제1 차이값(d1)을 뺀 값으로 나타난다.Since the value of (INC2-INC1) is a binary number in which the value of the bit corresponding to the lowest decimal place among N bits is 1, the binary value of the second difference value (d2) is expressed as the value obtained by subtracting the first difference value (d1) from the value obtained by multiplying the size (S3) of the first direction of the third image by 1.
즉, 제1 차이값과 제2 차이값을 합한 값은 제3 영상의 제1 방향의 크기와 동일하다.That is, the sum of the first difference value and the second difference value is equal to the size of the first direction of the third image.
즉, 제1 차이값은, 제2 영상 중의 제1 방향의 크기에 대해, 제2 증분의 간격으로 배치되는 증분 위치의 개수에 대응한다. 아울러, 제2 차이값은, 제2 영상 중의 제1 방향의 크기에 대해, 제1 증분의 간격으로 배치되는 증분 위치의 개수에 대응한다. That is, the first difference value corresponds to the number of incremental positions arranged at the interval of the second increment with respect to the size in the first direction of the second image. In addition, the second difference value corresponds to the number of incremental positions arranged at the interval of the first increment with respect to the size in the first direction of the second image.
결론적으로, 제2 증분을 제1 차이값에 해당하는 횟수만큼 적절히 분배하여 주면 증분에 의한 누적 오류가 없이 증분의 최종 누적 위치가 설정될 수 있다.In conclusion, if the second increment is appropriately distributed as many times as the first difference value, the final accumulated position of the increment can be set without cumulative error due to the increment.
제1 증분과 제2 증분의 비율을 제2 차이값과 제1 차이값에 맞추어서 배치해 주면 제2 증분을 최대한 서로 먼 간격으로 배치할 수 있는데, 그러면 증분 보상에 의한 부자연스러움을 최소화할 수 있다. If the ratio of the first increment and the second increment is arranged to match the second difference value and the first difference value, the second increments can be arranged as far apart as possible, which minimizes the unnaturalness caused by incremental compensation.
이를 로직 회로를 이용한 하드웨어적으로 구현하기 위해서는, 0에서 시작하는 변수인 제1 증분 분류값을 둔다. To implement this in hardware using a logic circuit, the first incremental classification value is set as a variable starting from 0.
즉, 제1 증분 분류값 산출기(22)는, 제1 증분 및 제2 증분 중 하나의 증분으로, 제2 영상의 제1 방향의 픽셀 각각이 속한 증분을 분류하기 위한 제1 증분 분류값을 산출한다. 아울러, 제1 증분 분류값의 초기값은 0으로 설정된다.That is, the first incremental classification value generator (22) calculates a first incremental classification value for classifying the increment to which each pixel in the first direction of the second image belongs, by one of the first increment and the second increment. In addition, the initial value of the first incremental classification value is set to 0.
제1 증분 분류값은 매 증분 시마다 갱신될 필요가 있다.The first incremental classification value needs to be updated at every increment.
구체적으로 제1 증분 분류값 산출기(22)는, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수인 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 제2 차이값을 더하고, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수가 아닌 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 제1 차이값을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 증분 분류값을 산출한다.Specifically, the first incremental classification value calculator (22) calculates the first incremental classification value at the position of the pixel by adding the second difference value to the first incremental classification value at the position of the previous pixel when the first incremental classification value at the position of the previous pixel in the first direction of the second image is negative, and by subtracting the first difference value from the first incremental classification value at the position of the previous pixel when the first incremental classification value at the position of the previous pixel in the first direction of the second image is not negative.
즉, 해당 픽셀에서의 제1 증분 분류값이 음수인 경우에는 해당 픽셀은 제2 증분에 속하고, 해당 픽셀에서의 제1 증분 분류값이 음수가 아닌 경우에는 해당 픽셀은 제1 증분에 속하게 된다.That is, if the first incremental classification value at the pixel is negative, the pixel belongs to the second increment, and if the first incremental classification value at the pixel is not negative, the pixel belongs to the first increment.
즉, 제1 증분 분류값의 음의 부호; 및 0 또는 양의 부호;가 설정되는 비율이 제1 차이값과 제2 차이값과 동일하게 된다.That is, the ratio at which the negative sign of the first incremental classification value; and 0 or positive sign; is set is the same as that of the first difference value and the second difference value.
제2 영상은 래스터 입력 단위를 기준으로 하였으므로, 매 픽셀의 입력마다 다운스케일링 결과가 유효한지를 나타내는 출력 활성화 위치를 생성해야 한다. 증분 누적에 따라 증가하는 정수부 크기에 해당하는 입력 횟수마다 출력을 한 번씩 활성화하면 되므로, 제1 출력 활성 위치값을 이용하여 출력 활성화 위치를 결정할 수 있다.Since the second image is based on the raster input unit, it is necessary to generate an output activation position indicating whether the downscaling result is valid for each pixel input. Since the output is activated once for each input number corresponding to the integer size that increases according to the incremental accumulation, the output activation position can be determined using the first output activation position value.
제1 출력 활성 위치값 산출기(23)는, 제1 출력 활성 위치값을 산출한다.The first output active position value calculator (23) calculates the first output active position value.
제1 출력 활성 위치값은, 초기값이 0인 변수이다. 제1 출력 활성 위치값은, 최소 0으로부터 최대 해당 픽셀이 속한 증분의 올림값 사이의 범위를 갖는 유리수이다. 제1 출력 활성 위치값의 정수 부분은 증분 시 건너 뛸 제2 영상의 픽셀의 횟수를 나타낼 수 있는 데, 제1 출력 활성 위치값 산출기(23)는 해당 픽셀의 위치에서의 제1 출력 활성 위치값이 2 미만인 경우, 제2 영상 중의 다음 픽셀에서의 위치를 제1 출력 활성 위치로 결정한다. 즉, 제1 출력 활성 위치값 산출기(23)는, 해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값을 이용하여 제1 출력 활성 위치를 결정하되, 이때 결정되는 제1 출력 활성 위치는 다음 픽셀로, 제1 출력 활성 위치에 해당하는 픽셀을 그 이전 픽셀에서 미리 결정할 수 있다. 즉, 해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값이, 제1 출력 활성 위치 여부를 판단하는 정보이다.The first output active position value is a variable whose initial value is 0. The first output active position value is a rational number having a range from a minimum of 0 to a maximum of the increment to which the corresponding pixel belongs. The integer part of the first output active position value can represent the number of pixels of the second image to be skipped during the increment, and the first output active position value calculator (23) determines the position of the next pixel in the second image as the first output active position when the first output active position value at the position of the corresponding pixel is less than 2. That is, the first output active position calculator (23) determines the first output active position using the integer part of the first output active position value at the position of the corresponding pixel, and the first output active position determined at this time can determine in advance the pixel corresponding to the first output active position from the previous pixel as the next pixel. That is, the integer part of the first output active position value at the position of the corresponding pixel is information for determining whether or not it is the first output active position.
제1 출력 활성 위치값은, 매 입력 마다 갱신해주면 되는데, 제1 출력 활성 위치에서 제1 증분 분류값 부호에 따라 결정되어진 증분을 더해 준다. 또한, 제1 출력 활성 위치 여부에 상관없이 제1 출력 활성 위치값이 1보다 큰 경우에는 그 값에 1을 빼 준다.The first output active position value can be updated for each input, and the increment determined according to the sign of the first increment classification value is added to the first output active position. In addition, regardless of whether the first output active position is present or not, if the first output active position value is greater than 1, 1 is subtracted from the value.
즉, 제1 출력 활성 위치값 산출기(23)는, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 출력 활성 위치값에, 제2 영상의 제1 방향의 해당 픽셀의 위치가 제1 출력 활성 위치인 경우 제1 증분 분류값에 의해 분류된 증분의 값을 더하고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1보다 큰 경우 1을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출한다.That is, the first output active position value calculator (23) calculates the first output active position value at the position of the corresponding pixel in the first direction of the second image by adding the value of the increment classified by the first increment classification value to the first output active position value at the position of the previous pixel in the first direction of the second image if the position of the corresponding pixel in the first direction of the second image is the first output active position, and by subtracting 1 if the first output active position value at the position of the previous pixel is greater than 1.
만약 해당 픽셀의 위치가 제1 출력 활성 위치이고, 제1 증분으로 판단되고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1.5인 경우, 해당 픽셀에서의 제1 출력 활성 위치값은, {1.5+(제1 증분)-1)}로 산출될 수 있다.If the position of the corresponding pixel is the first output active position and is determined as the first increment, and the first output active position value at the position of the previous pixel is 1.5, the first output active position value at the corresponding pixel can be calculated as {1.5 + (first increment) - 1)}.
아울러 제3 영상 생성기(24)는, 제1 출력 활성 위치값을 이용하여 제3 영상을 생성하는 역할을 한다. In addition, the third image generator (24) plays a role of generating a third image using the first output active position value.
구체적으로 제3 영상 생성기(24)는, 제1 출력 활성 위치값의 소수 부분의 값인 증분 위치를 이용하여, 제3 영상을 구성하는 픽셀을 생성할 수 있다.Specifically, the third image generator (24) can generate pixels constituting the third image by using the incremental position, which is a decimal part of the first output active position value.
즉, 제3 영상 생성기(24)는 제3 영상을 구성하는 픽셀을 생성하기 위해, 제1 출력 활성화 위치의 픽셀의 값과 그 이전 픽셀의 값의 보간을 실시한다. 예를 들면, 제3 영상 생성기(24)는, 제1 출력 활성 위치값의 소수 부분의 값이 0인 경우에는, 제1 출력 활성화 위치의 픽셀을 그대로 출력하고, 제1 출력 활성 위치값의 소수 부분의 값이 0001인 경우 이전 픽셀의 값과 제1 출력 활성화 위치의 픽셀의 값을 15:1 비율로 합성하여, 제3 영상을 구성하는 픽셀을 생성한다.That is, the third image generator (24) interpolates the value of the pixel at the first output activation position and the value of the previous pixel in order to generate pixels constituting the third image. For example, if the value of the decimal part of the first output activation position value is 0, the third image generator (24) outputs the pixel at the first output activation position as is, and if the value of the decimal part of the first output activation position value is 0001, the value of the previous pixel and the value of the pixel at the first output activation position are synthesized at a ratio of 15:1 to generate pixels constituting the third image.
제1 출력 활성 위치값의 소수 부분의 값이 있는 경우에는 그 비율대로 두 픽셀을 합성하여 축소 영상의 계단 현상을 줄일 수 있다. 제1 출력 활성 위치값이 4비트의 소수점의 자릿수를 갖는 경우, 합성의 비율은 15:1 에서부터 0:16 가 된다.If there is a decimal part value of the first output active position value, the two pixels can be synthesized in that ratio to reduce the staircase phenomenon of the reduced image. If the first output active position value has a decimal point of 4 bits, the synthesis ratio is from 15:1 to 0:16.
제2 이미지 흐림부(30)는, 제3 영상을 입력받아 수평 방향 또는 수직 방향 중 다른 하나의 방향인 제2 방향으로 앤티 에일리어싱 처리에 의해, 흐리게 만들어 제4 영상을 출력한다.The second image blurring unit (30) receives a third image, blurs it in the second direction, which is the other direction among the horizontal and vertical directions, by anti-aliasing processing, and outputs a fourth image.
만약 제1 이미지 흐림부(10)의 제1 방향이 수평 방향이면, 제2 이미지 흐림부(30)의 제2 방향은 수직 방향이 된다. 제2 이미지 흐림부(30)의 동작은 그 방향만 상이할 뿐, 제1 이미지 흐림부(10)의 동작과 동일하므로, 별도의 상세한 설명은 생략하기로 한다. If the first direction of the first image blur (10) is a horizontal direction, the second direction of the second image blur (30) is a vertical direction. The operation of the second image blur (30) is the same as that of the first image blur (10) except that the direction is different, so a separate detailed description will be omitted.
제2 이미지 축소부(40)는, 제4 영상을 입력받아 수평 방향 또는 수직 방향 중 다른 하나의 방향인 제2 방향의 이미지 크기를 축소하여 제5 영상을 출력하는 역할을 한다. 제2 이미지 축소부(40)는, 이미지를 축소하는 방향은 제1 이미지 축소부(20)와 상이하지만, 그 동작은 제1 이미지 축소부(20)와 동일하므로, 별도의 상세한 설명은 생략하기로 한다. The second image reduction unit (40) receives the fourth image, reduces the image size in the second direction, which is the other direction among the horizontal and vertical directions, and outputs the fifth image. The second image reduction unit (40) reduces the image in a different direction from the first image reduction unit (20), but its operation is the same as that of the first image reduction unit (20), so a separate detailed description will be omitted.
출력 선택부(50)는, 제1 영상, 제3 영상 및 제5 영상 중 하나의 영상을 선택하여 출력하는 역할을 한다.The output selection unit (50) selects and outputs one image among the first image, the third image, and the fifth image.
하기에 일실시예에 따른 이미지 축소 방법에 대해 설명하기로 한다. 일실시예에 따른 이미지 축소 방법은, 상술한 이미지를 축소할 수 있는 전자 장치(100)에 의해 실시되므로 별도의 설명이 없더라도 이미지를 축소할 수 있는 전자 장치(100)의 모든 특징을 포함함은 물론이다. Hereinafter, an image reduction method according to an embodiment will be described. Since the image reduction method according to an embodiment is implemented by the electronic device (100) capable of reducing the image described above, it is obvious that it includes all the features of the electronic device (100) capable of reducing the image even without a separate description.
일실시예에 따른 이미지 축소 방법은, 제1 이미지 흐림 단계(S10), 제1 이미지 축소 단계(S20), 제2 이미지 흐림 단계(S30), 제2 이미지 축소 단계(S40) 및 출력 선택 단계(S50)를 포함하여 구성된다.An image reduction method according to an embodiment comprises a first image blurring step (S10), a first image reduction step (S20), a second image blurring step (S30), a second image reduction step (S40), and an output selection step (S50).
제1 이미지 흐림 단계(S10)에서는, 제1 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향으로 앤티 에일리어싱 처리에 의해, 흐리게 만들어 제2 영상을 출력한다.In the first image blurring step (S10), a first image is input and blurred in a first direction, either a horizontal or vertical direction, through anti-aliasing processing, to output a second image.
제1 이미지 축소 단계(S20)에서는, 제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 출력하는 역할을 한다. 여기서 수평 방향은 각각의 영상을 구성하는 픽셀의 열의 방향, 즉 x축 방향에 해당한다. 아울러, 수직 방향은 각각의 영상을 구성하는 픽셀의 행의 방향, 즉 y축 방향에 해당한다, In the first image reduction step (S20), the second image is input and the image size in the first direction, either the horizontal or vertical direction, is reduced to output the third image. Here, the horizontal direction corresponds to the direction of the column of pixels constituting each image, i.e., the x-axis direction. In addition, the vertical direction corresponds to the direction of the row of pixels constituting each image, i.e., the y-axis direction.
구체적으로 제1 이미지 축소 단계(S20)에서는, 제1 출력 활성 위치값을 산출하고, 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정한다. 아울러, 제1 이미지 축소 단계(S20)는, 제1 출력 활성 위치의 픽셀; 및 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 제1 출력 활성 위치값을 이용하여 제3 영상을 구성하는 픽셀을 생성한다. Specifically, in the first image reduction step (S20), the first output active position value is calculated, and the first output active position is determined using the first output active position value. In addition, the first image reduction step (S20) generates pixels constituting the third image using pixel information of at least one of a pixel of the first output active position; and a pixel before the pixel of the first output active position; and the first output active position value.
제1 출력 활성 위치는, 제3 영상을 구성하는 픽셀을 생성하기 위해 사용되는 제2 영상 중의 제1 방향의 픽셀의 위치 정보이다. 아울러, 제1 출력 활성 위치값은, 제1 출력 활성 위치 여부를 판단하는 정보; 및 제1 출력 활성 위치의 픽셀과 제1 출력 활성 위치의 픽셀 이전의 픽셀의 사이의 위치 정보인 증분 위치 정보;를 포함하는 값이다. The first output active position is position information of a pixel in the first direction among the second images used to generate pixels constituting the third image. In addition, the first output active position value is a value including: information for determining whether it is the first output active position; and incremental position information, which is position information between the pixel of the first output active position and the pixel preceding the pixel of the first output active position.
구체적으로, 제1 이미지 축소 단계(S20)는, 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제1 증분을 산출하는 단계(S21); 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제2 증분을 산출하는 단계(S22); 제2 영상의 제1 방향의 크기로부터, 제1 증분과 제3 영상의 제1 방향의 크기를 곱한 값을 뺀 값에 해당하는 값을 갖는 제1 차이값을 산출하는 단계(S23); 및 제2 증분과 제3 영상의 제1 방향의 크기를 곱한 값으로부터, 제2 영상의 제1 방향의 크기를 뺀 값에 해당하는 값을 갖는 제2 차이값을 산출하는 단계(S24);를 포함한다.Specifically, the first image reduction step (S20) includes a step (S21) of calculating a first increment which is a candidate for the interval between one increment position and another increment position; a step (S22) of calculating a second increment which is a candidate for the interval between one increment position and another increment position; a step (S23) of calculating a first difference value having a value corresponding to a value obtained by subtracting a value obtained by multiplying the first increment by the size in the first direction of the third image from a size in the first direction of the second image; and a step (S24) of calculating a second difference value having a value corresponding to a value obtained by subtracting a value obtained by multiplying the second increment by the size in the first direction of the third image.
제1 증분은, 제2 영상의 제1 방향의 크기를 제3 영상의 제1 방향의 크기로 나눈 값에 해당한다. The first increment is equal to the size of the second image in the first direction divided by the size of the third image in the first direction.
아울러, 제1 차이값은, 제2 영상 중의 제1 방향의 크기에 대해, 제2 증분의 간격으로 배치되는 증분 위치의 개수에 대응한다. 또한, 제2 차이값은, 제2 영상 중의 제1 방향의 크기에 대해, 제1 증분의 간격으로 배치되는 증분 위치의 개수에 대응한다.In addition, the first difference value corresponds to the number of incremental positions arranged at the interval of the second increment with respect to the size in the first direction of the second image. In addition, the second difference value corresponds to the number of incremental positions arranged at the interval of the first increment with respect to the size in the first direction of the second image.
제1 증분 및 제2 증분 각각은, N비트의 소수점의 자릿수를 갖는 숫자이다. N은 1 이상의 정수이다.The first increment and the second increment are each numbers with N decimal places, where N is an integer greater than or equal to 1.
또한, 제2 증분은, 제1 증분의 가장 낮은 소수점의 자리에 해당하는 비트에 이진수 1을 더한 값에 해당한다.Additionally, the second increment corresponds to the bit corresponding to the lowest decimal place of the first increment plus binary 1.
아울러, 제1 이미지 축소 단계(S20)는, 제1 증분 및 제2 증분 중 하나의 증분으로, 제2 영상의 제1 방향의 픽셀 각각이 속한 증분을 분류하기 위한 제1 증분 분류값을 산출하는 단계(S25); 제1 출력 활성 위치값을 산출하는 단계(S26); 및 해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값을 이용하여, 제1 출력 활성 위치를 결정하는 단계(S27); 및 제1 출력 활성 위치값의 소수 부분의 값을 이용하여, 제3 영상을 구성하는 픽셀을 생성하는 단계(S28);를 더 포함한다.In addition, the first image reduction step (S20) further includes a step (S25) of calculating a first increment classification value for classifying an increment to which each pixel in the first direction of the second image belongs, as one of the first increment and the second increment; a step (S26) of calculating a first output active position value; and a step (S27) of determining a first output active position using the value of the integer part of the first output active position value at the position of the corresponding pixel; and a step (S28) of generating pixels constituting a third image using the value of the decimal part of the first output active position value.
구체적으로, 제1 증분 분류값을 산출하는 단계(S25)에서는, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수인 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 제2 차이값을 더하고, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수가 아닌 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 제1 차이값을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 증분 분류값을 산출한다.Specifically, in the step (S25) of calculating the first incremental classification value, if the first incremental classification value at the position of the previous pixel in the first direction of the second image is negative, the second difference value is added to the first incremental classification value at the position of the previous pixel, and if the first incremental classification value at the position of the previous pixel in the first direction of the second image is not negative, the first difference value is subtracted from the first incremental classification value at the position of the previous pixel, thereby calculating the first incremental classification value at the position of the corresponding pixel.
아울러, 제1 출력 활성 위치값을 산출하는 단계(S26)에서는, 제2 영상의 제1 방향의 이전 픽셀의 위치에서의 제1 출력 활성 위치값에, 제2 영상의 제1 방향의 해당 픽셀의 위치가 제1 출력 활성 위치인 경우 제1 증분 분류값에 의해 분류된 증분의 값을 더하고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1보다 큰 경우 1을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출한다.In addition, in the step (S26) of calculating the first output active position value, if the position of the corresponding pixel in the first direction of the second image is the first output active position, the value of the increment classified by the first increment classification value is added to the first output active position value at the position of the previous pixel in the first direction of the second image, and if the first output active position value at the position of the previous pixel is greater than 1, 1 is subtracted, thereby calculating the first output active position value at the position of the corresponding pixel.
제1 출력 활성 위치를 결정하는 단계(S27)에서는, 해당 픽셀의 위치에서의 제1 출력 활성 위치값이 2 미만인 경우, 제2 영상 중의 다음 픽셀에서의 위치를 제1 출력 활성 위치로 결정한다.In the step (S27) of determining the first output active position, if the first output active position value at the position of the corresponding pixel is less than 2, the position at the next pixel in the second image is determined as the first output active position.
제2 이미지 흐림 단계(S30)에서는, 제3 영상을 입력받아 수평 방향 또는 수직 방향 중 다른 하나의 방향인 제2 방향으로 앤티 에일리어싱 처리에 의해, 흐리게 만들어 제4 영상을 출력한다. 아울러, 제2 이미지 축소 단계(S40)에서는, 제4 영상을 입력받아 수평 방향 또는 수직 방향 중 다른 하나의 방향인 제2 방향의 이미지 크기를 축소하여 제5 영상을 출력한다.In the second image blurring step (S30), a third image is input and blurred in a second direction, which is the other direction among the horizontal and vertical directions, by anti-aliasing processing, and a fourth image is output. In addition, in the second image reduction step (S40), a fourth image is input and the image size in the second direction, which is the other direction among the horizontal and vertical directions, is reduced to output a fifth image.
출력 선택 단계(S50)에는, 제1 영상, 제3 영상 및 제5 영상 중 하나의 영상을 선택하여 출력한다. In the output selection step (S50), one image among the first image, the third image, and the fifth image is selected and output.
상술한 바와 같이 이미지를 축소할 수 있는 전자 장치(100) 및 그 축소 방법에 따르면, 소수부 연산 시 소수점 비트의 자원 부족에 따른 증분 누적값 오차에 대한 보상을 실시하는 것에 의해 적은 자원으로 DDA 알고리즘을 적용 가능함을 알 수 있다.According to the electronic device (100) capable of reducing an image as described above and the reduction method thereof, it can be seen that the DDA algorithm can be applied with fewer resources by performing compensation for an incremental accumulation value error due to a lack of decimal point bit resources during decimal part calculation.
100 : 전자 장치
10 : 제1 이미지 흐림부
20 : 제1 이미지 축소부
30 : 제2 이미지 흐림부
40 : 제2 이미지 축소부
50 : 출력 선택부
21 : 증분 및 오차 산출기
22 : 제1 증분 분류값 산출기
23 : 제1 출력 활성 위치값 산출기
24 : 제3 영상 생성기100 : Electronic Devices
10: Blur of the first image
20: First image reduction section
30: Second image blur
40: Second image reduction section
50 : Output selection section
21: Increment and error calculator
22: First incremental classification value generator
23: 1st output active position value generator
24: Third Image Generator
Claims (16)
제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 생성하는 제1 이미지 축소부;를 포함하되,
상기 제1 이미지 축소부는, 제1 출력 활성 위치값을 산출하고, 상기 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정하고, 상기 제1 출력 활성 위치의 픽셀; 및 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 상기 제1 출력 활성 위치값을 이용하여 상기 제3 영상을 구성하는 픽셀을 생성하되,
상기 제1 출력 활성 위치는, 상기 제2 영상 중의 상기 제1 방향의 픽셀의 위치 정보이고,
상기 제1 출력 활성 위치값은, 상기 제1 출력 활성 위치 여부를 판단하는 정보; 및 상기 제1 출력 활성 위치의 픽셀과 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀의 사이의 위치 정보인 증분 위치 정보;를 포함하는 값이고,
상기 제1 이미지 축소부는, 상기 제2 영상의 제1 방향의 크기로부터, 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제1 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값을 뺀 값에 해당하는 값을 갖는 제1 차이값; 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제2 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값으로부터, 상기 제2 영상의 제1 방향의 크기를 뺀 값에 해당하는 값을 갖는 제2 차이값; 및 상기 제1 증분 및 상기 제2 증분 중 하나의 증분으로, 상기 제2 영상의 상기 제1 방향의 픽셀 각각이 속한 증분을 분류하기 위한 제1 증분 분류값;을 더 산출하되,
상기 제1 이미지 축소부는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수인 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제2 차이값을 더하고, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수가 아닌 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제1 차이값을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 증분 분류값을 산출하고,
상기 제1 이미지 축소부는, 상기 제1 증분 분류값에 의해 분류된 증분의 값을 이용하여, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출하고,
상기 제1 증분은, 상기 제2 영상의 제1 방향의 크기를 상기 제3 영상의 제1 방향의 크기로 나눈 값에 해당하고,
상기 제2 증분은, 상기 제1 증분의 가장 낮은 소수점의 자리에 해당하는 비트에 이진수 1을 더한 값에 해당하고,
상기 제1 증분 및 상기 제2 증분 각각은, N비트의 소수점의 자릿수를 갖는 숫자이고,
상기 제1 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제2 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응하고,
상기 제2 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제1 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응하고,
상기 N은, 1 이상의 정수인, 전자 장치. In an electronic device capable of reducing an image,
A first image reduction unit that receives a second image and reduces the image size in one of the horizontal and vertical directions to generate a third image;
The first image reduction unit calculates a first output active position value, determines a first output active position using the first output active position value, and generates pixels constituting the third image using pixel information of at least one of a pixel of the first output active position; and a pixel preceding the pixel of the first output active position; and the first output active position value.
The above first output active position is the position information of the pixel in the first direction among the second images,
The above first output active position value is a value including information for determining whether the first output active position is present; and incremental position information, which is position information between a pixel of the first output active position and a pixel preceding the pixel of the first output active position;
The first image reduction unit further calculates a first difference value having a value corresponding to a value obtained by subtracting a product of a first increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image from a size in the first direction of the second image; a second difference value having a value corresponding to a value obtained by subtracting a size in the first direction of the second image from a product of a second increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image; and a first increment classification value for classifying an increment to which each pixel in the first direction of the second image belongs, as one of the first increment and the second increment,
The first image reduction unit calculates the first incremental classification value at the position of the pixel by adding the second difference value to the first incremental classification value at the position of the previous pixel when the first incremental classification value at the position of the previous pixel in the first direction of the second image is negative, and by subtracting the first difference value from the first incremental classification value at the position of the previous pixel when the first incremental classification value at the position of the previous pixel in the first direction of the second image is not negative.
The first image reduction unit calculates a first output active position value at the position of the corresponding pixel by using the value of the increment classified by the first increment classification value,
The above first increment corresponds to a value obtained by dividing the size of the second image in the first direction by the size of the third image in the first direction.
The above second increment corresponds to the value obtained by adding binary 1 to the bit corresponding to the lowest decimal place of the above first increment,
Each of the above first increment and the above second increment is a number having a decimal point of N bits,
The above first difference value corresponds to the number of incremental positions arranged at the interval of the second increment with respect to the size of the first direction in the second image,
The second difference value corresponds to the number of incremental positions arranged at intervals of the first increment with respect to the size of the first direction in the second image,
An electronic device, wherein N is an integer greater than or equal to 1.
상기 제1 이미지 축소부는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 출력 활성 위치값에,
상기 제2 영상의 상기 제1 방향의 해당 픽셀의 위치가 상기 제1 출력 활성 위치인 경우 상기 제1 증분 분류값에 의해 분류된 증분의 값을 더하고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1보다 큰 경우 1을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출하는, 전자 장치. In the first paragraph,
The above first image reduction unit, at the position of the previous pixel in the first direction of the second image, the first output active position value,
An electronic device that calculates a first output active position value at a position of a corresponding pixel by adding a value of an increment classified by the first incremental classification value when the position of the corresponding pixel in the first direction of the second image is the first output active position, and subtracting 1 when the first output active position value at the position of the previous pixel is greater than 1.
상기 제1 이미지 축소부는,
해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값을 이용하여, 상기 제1 출력 활성 위치를 결정하는, 전자 장치. In the first paragraph,
The above first image reduction section,
An electronic device that determines the first output active position by using the integer part of the first output active position value at the position of the corresponding pixel.
상기 제1 이미지 축소부는,
상기 제1 출력 활성 위치값의 소수 부분의 값인 상기 증분 위치를 이용하여, 상기 제3 영상을 구성하는 픽셀을 생성하는, 전자 장치. In the first paragraph,
The first image reduction section above,
An electronic device that generates pixels constituting the third image by using the incremental position, which is a value of a decimal part of the first output active position value.
제2 영상을 입력받아 수평 방향 또는 수직 방향 중 하나의 방향인 제1 방향의 이미지 크기를 축소하여 제3 영상을 생성하는 제1 이미지 축소 단계;를 포함하되,
상기 제1 이미지 축소 단계에서는, 제1 출력 활성 위치값을 산출하고, 상기 제1 출력 활성 위치값을 이용하여 제1 출력 활성 위치를 결정하고, 상기 제1 출력 활성 위치의 픽셀; 및 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀; 중 적어도 하나의 픽셀 정보와 상기 제1 출력 활성 위치값을 이용하여 상기 제3 영상을 구성하는 픽셀을 생성하되,
상기 제1 출력 활성 위치는, 상기 제2 영상 중의 상기 제1 방향의 픽셀의 위치 정보이고,
상기 제1 출력 활성 위치값은, 상기 제1 출력 활성 위치 여부를 판단하는 정보; 및 상기 제1 출력 활성 위치의 픽셀과 상기 제1 출력 활성 위치의 픽셀 이전의 픽셀의 사이의 위치 정보인 증분 위치 정보;를 포함하는 값이고,
상기 제1 이미지 축소 단계는, 상기 제2 영상의 제1 방향의 크기로부터, 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제1 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값을 뺀 값에 해당하는 값을 갖는 제1 차이값을 산출하는 단계; 하나의 증분 위치와 다른 하나의 증분 위치 사이의 간격의 후보인 제2 증분과 상기 제3 영상의 제1 방향의 크기를 곱한 값으로부터, 상기 제2 영상의 제1 방향의 크기를 뺀 값에 해당하는 값을 갖는 제2 차이값을 산출하는 단계; 상기 제1 증분 및 상기 제2 증분 중 하나의 증분으로, 상기 제2 영상의 상기 제1 방향의 픽셀 각각이 속한 증분을 분류하기 위한 제1 증분 분류값을 산출하는 단계; 및 상기 제1 출력 활성 위치값을 산출하는 단계;를 포함하되,
상기 제1 증분 분류값을 산출하는 단계에서는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수인 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제2 차이값을 더하고, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 증분 분류값이 음수가 아닌 경우 이전 픽셀의 위치에서의 제1 증분 분류값에 상기 제1 차이값을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 증분 분류값을 산출하고,
상기 제1 출력 활성 위치값을 산출하는 단계에서는, 상기 제1 증분 분류값에 의해 분류된 증분의 값을 이용하여, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출하고,
상기 제1 증분은, 상기 제2 영상의 제1 방향의 크기를 상기 제3 영상의 제1 방향의 크기로 나눈 값에 해당하고,
상기 제2 증분은, 상기 제1 증분의 가장 낮은 소수점의 자리에 해당하는 비트에 이진수 1을 더한 값에 해당하고,
상기 제1 증분 및 상기 제2 증분 각각은, N비트의 소수점의 자릿수를 갖는 숫자이고,
상기 제1 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제2 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응하고,
상기 제2 차이값은, 상기 제2 영상 중의 상기 제1 방향의 크기에 대해, 상기 제1 증분의 간격으로 배치되는 상기 증분 위치의 개수에 대응하고,
상기 N은, 1 이상의 정수인, 이미지 축소 방법. In the image reduction method,
A first image reduction step for receiving a second image and reducing the size of the image in one of the horizontal and vertical directions to generate a third image; including:
In the first image reduction step, a first output active position value is calculated, a first output active position is determined using the first output active position value, and pixels constituting the third image are generated using pixel information of at least one of a pixel of the first output active position; and a pixel before the pixel of the first output active position; and the first output active position value.
The above first output active position is the position information of the pixel in the first direction among the second images,
The above first output active position value is a value including information for determining whether the first output active position is present; and incremental position information, which is position information between a pixel of the first output active position and a pixel preceding the pixel of the first output active position;
The first image reduction step comprises: a step of calculating a first difference value having a value corresponding to a value obtained by subtracting a product of a first increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image from a size in the first direction of the second image; a step of calculating a second difference value having a value corresponding to a value obtained by subtracting a size in the first direction of the second image from a product of a second increment, which is a candidate for an interval between one increment position and another increment position, and a size in the first direction of the third image; a step of calculating a first increment classification value for classifying an increment to which each pixel in the first direction of the second image belongs, as one of the first increment and the second increment; and a step of calculating the first output active position value;
In the step of calculating the first incremental classification value, if the first incremental classification value at the position of the previous pixel in the first direction of the second image is negative, the second difference value is added to the first incremental classification value at the position of the previous pixel, and if the first incremental classification value at the position of the previous pixel in the first direction of the second image is not negative, the first difference value is subtracted from the first incremental classification value at the position of the previous pixel, thereby calculating the first incremental classification value at the position of the corresponding pixel.
In the step of calculating the first output active position value, the first output active position value at the position of the corresponding pixel is calculated using the value of the increment classified by the first increment classification value,
The above first increment corresponds to a value obtained by dividing the size of the second image in the first direction by the size of the third image in the first direction.
The above second increment corresponds to the value obtained by adding binary 1 to the bit corresponding to the lowest decimal place of the above first increment,
Each of the above first increment and the above second increment is a number having a decimal point of N bits,
The above first difference value corresponds to the number of incremental positions arranged at the interval of the second increment with respect to the size of the first direction in the second image,
The second difference value corresponds to the number of incremental positions arranged at intervals of the first increment with respect to the size of the first direction in the second image,
An image reduction method, wherein N is an integer greater than or equal to 1.
상기 제1 출력 활성 위치값을 산출하는 단계에서는, 상기 제2 영상의 상기 제1 방향의 이전 픽셀의 위치에서의 제1 출력 활성 위치값에,
상기 제2 영상의 상기 제1 방향의 해당 픽셀의 위치가 상기 제1 출력 활성 위치인 경우 상기 제1 증분 분류값에 의해 분류된 증분의 값을 더하고, 이전 픽셀의 위치에서의 제1 출력 활성 위치값이 1보다 큰 경우 1을 빼는 것에 의해, 해당 픽셀의 위치에서의 제1 출력 활성 위치값을 산출하는, 이미지 축소 방법. In Article 9,
In the step of calculating the first output active position value, the first output active position value at the position of the previous pixel in the first direction of the second image,
An image reduction method, wherein the first output active position value at the position of the corresponding pixel in the first direction of the second image is calculated by adding the value of the increment classified by the first increment classification value if the position is the first output active position, and subtracting 1 if the first output active position value at the position of the previous pixel is greater than 1.
상기 제1 이미지 축소 단계는,
해당 픽셀의 위치에서의 제1 출력 활성 위치값의 정수 부분의 값을 이용하여, 상기 제1 출력 활성 위치를 결정하는 단계;를 포함하는, 이미지 축소 방법. In Article 9,
The above first image reduction step is,
An image reduction method, comprising: a step of determining the first output active position by using the integer part of the first output active position value at the position of the corresponding pixel.
상기 제1 이미지 축소 단계는,
상기 제1 출력 활성 위치값의 소수 부분의 값인 상기 증분 위치를 이용하여, 상기 제3 영상을 구성하는 픽셀을 생성하는 단계;를 포함하는, 이미지 축소 방법.
In Article 9,
The first image reduction step is as follows:
An image reduction method, comprising: a step of generating pixels constituting the third image by using the incremental position, which is a value of a decimal part of the first output active position value;
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230095762A KR102712092B1 (en) | 2023-07-24 | 2023-07-24 | Electronic device for image reduction and reduction method therefor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230095762A KR102712092B1 (en) | 2023-07-24 | 2023-07-24 | Electronic device for image reduction and reduction method therefor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| KR102712092B1 true KR102712092B1 (en) | 2024-09-30 |
Family
ID=92927690
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020230095762A Active KR102712092B1 (en) | 2023-07-24 | 2023-07-24 | Electronic device for image reduction and reduction method therefor |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102712092B1 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001268350A (en) * | 2000-03-15 | 2001-09-28 | Digital Electronics Corp | Method and device for reducing/enlarging image |
-
2023
- 2023-07-24 KR KR1020230095762A patent/KR102712092B1/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001268350A (en) * | 2000-03-15 | 2001-09-28 | Digital Electronics Corp | Method and device for reducing/enlarging image |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6943807B2 (en) | Image processing apparatus and method, recording medium, and program thereof | |
| EP2266095B1 (en) | Method and apparatus for super-resolution of images | |
| US6915026B2 (en) | Image processing method and apparatus | |
| US7043091B2 (en) | Method and apparatus for increasing spatial resolution of an image | |
| US8175417B2 (en) | Apparatus, method, and computer-readable recording medium for pixel interpolation | |
| US20100119176A1 (en) | Image processing apparatus, image processing method, and program | |
| CN106780336B (en) | Image reduction method and device | |
| US5801678A (en) | Fast bi-linear interpolation pipeline | |
| KR100416370B1 (en) | Method and apparatus for deinterlacing video fields into sequential scan video frames | |
| KR100860968B1 (en) | Image-resolution-improvement apparatus and method | |
| US8213736B2 (en) | Image processing device and image processing method | |
| US6539128B1 (en) | Method and apparatus for interpolation | |
| JP4728744B2 (en) | Image processing device | |
| KR20020015794A (en) | Cubic convolution interpolation factor producing method | |
| KR102712092B1 (en) | Electronic device for image reduction and reduction method therefor | |
| KR100423503B1 (en) | Apparatus for disposing digital image and a method using the same | |
| US20070121126A1 (en) | Image conversion apparatus and image conversion method | |
| US6806914B1 (en) | Method and apparatus for changing the size of image | |
| JP5387289B2 (en) | Image processing apparatus, image processing method and program thereof | |
| WO2010053102A1 (en) | Figure drawing device, anti-aliasing method, and storage medium | |
| JP5387288B2 (en) | Image processing apparatus, image processing method and program thereof | |
| JP5624701B2 (en) | Thinning filter and thinning program | |
| KR20070091124A (en) | Programmable processor | |
| JP4767568B2 (en) | Error diffusion circuit | |
| KR100343463B1 (en) | Format converting apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20230724 |
|
| PA0201 | Request for examination |
Patent event code: PA02011R01I Patent event date: 20230724 Comment text: Patent Application |
|
| PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20240621 Patent event code: PE09021S01D |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20240920 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20240925 Patent event code: PR07011E01D |
|
| PR1002 | Payment of registration fee |
Payment date: 20240925 End annual number: 3 Start annual number: 1 |
|
| PG1601 | Publication of registration |