WO2020251299A1 - 라인 검출 방법 - Google Patents

라인 검출 방법 Download PDF

Info

Publication number
WO2020251299A1
WO2020251299A1 PCT/KR2020/007639 KR2020007639W WO2020251299A1 WO 2020251299 A1 WO2020251299 A1 WO 2020251299A1 KR 2020007639 W KR2020007639 W KR 2020007639W WO 2020251299 A1 WO2020251299 A1 WO 2020251299A1
Authority
WO
WIPO (PCT)
Prior art keywords
line
pixel
line detection
detection method
pixels
Prior art date
Application number
PCT/KR2020/007639
Other languages
English (en)
French (fr)
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 US17/619,050 priority Critical patent/US20220383506A1/en
Publication of WO2020251299A1 publication Critical patent/WO2020251299A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/142Edging; Contouring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • the present invention relates to a method of detecting a line in an image or image. More specifically, the present invention relates to a method of detecting a line by using the sum of the difference in angle of the gradient.
  • an edge represents the boundary of an object where the general brightness value changes rapidly.
  • an indirect line detection method using edge detection and a line detection method based on a second order derivative were used.
  • the present invention has been proposed to solve the problems of the prior art as described above, and is to propose a method capable of accurately detecting a line even when the line is thicker.
  • a line is detected using the sum of the angular differences of gradients with respect to adjacent pixels around the center pixel.
  • a method of detecting a line in an image or image is disclosed.
  • the method includes smoothing an image; Selecting an area in which the line is to be detected; Determining a center pixel in the selected area; Mounting a window centered on the center pixel; And detecting a sum of differences in gradient angles of pixels surrounding the center pixel.
  • the line detection method may detect a sum of differences in gradient angles of pixels facing each other with respect to the center pixel.
  • a portion included in the area may be determined as a line.
  • the window may be a 3X3 window.
  • determining a portion included in the area as a line may include: selecting pixels having the specific value or greater as line candidates; Determining whether a value at each center pixel is a Ridge or a Valley; And selecting a line from the line candidates. It may further include.
  • Selecting a line from the line candidates may be determined by comparing the sum of the gradient angle differences of the adjacent pixels and the gradient angle differences of the center pixel.
  • the central pixel When the sum of the gradient angle differences of the central pixel is greater than the sum of the gradient angle differences of the adjacent pixels, the central pixel may be selected as a line.
  • a computer-readable recording medium in which a program for executing the line detection method as described above is recorded may be disclosed.
  • a line may be detected using the sum of the angular differences of gradients with respect to adjacent pixels around the center pixel.
  • the line can be accurately detected even when the line is thicker.
  • the signal-to-noise ratio is higher than that of the conventional line detection method, it is effective in terms of image processing.
  • FIG. 2 is an example of a result of performing a blurring process on the line detection model of FIG. 1.
  • 3(a) to 3(b) are graphs showing a standard deviation of noise divided into a case of a first derivative and a case of a second derivative.
  • 4(a) to 4(b) are graphs showing the signal strength of an edge signal divided into a case of a first derivative and a case of a second derivative.
  • 5(a) to 5(b) are graphs showing an SNR value for an edge signal divided into a case of a first derivative and a case of a second derivative.
  • 6(a) to 6(b) are diagrams showing SNRC and SNRPS for an edge detection method.
  • 7(a) to 7(b) are graphs showing the intensity of a line signal divided into a case of a first derivative and a case of a second derivative.
  • 8(a) to 8(b) are graphs showing the SNR value of a line signal divided into a case of a first derivative and a case of a second derivative.
  • 9(a) to 9(b) are diagrams showing SNRC and SNRPS for a line detection method based on a second derivative.
  • 10 is a graph comparing SNR according to an edge signal and SNR according to a line signal.
  • FIG. 11 is a diagram for explaining that a result graph varies according to a thickness of a line as a result of line detection using a conventional second-order differential method.
  • 12(a) to 12(b) are diagrams for explaining obtaining the sum of gradient angle differences in the line detection method according to the present invention.
  • 13(a) to 13(b) show a window for calculating a gradient angle.
  • 14(a) to 14(b) are diagrams showing the SNRPS of a pair of gradient angles according to FIG. 13.
  • 15(a) to 15(b) are diagrams illustrating SNRPS of differential values of gradient angle pairs according to FIG. 13.
  • 16 to 17 are diagrams comparing a line detection method according to the present invention, an existing edge detection method, and a line detection method according to a second derivative.
  • 18 is a diagram showing a gradient angle difference and its standard deviation.
  • 19 is a diagram for explaining finding an optimal critical point.
  • FIG. 20 is a graph showing the results according to FIG. 19.
  • 21 is an original image to be tested.
  • FIG. 22 is a diagram illustrating a result of second-order differentiation of a line detection result of an original image and a result of the line detection method according to the present invention, respectively.
  • a window is mounted on a pixel, and a corresponding value is determined as a line when the value is greater than or equal to a specific value by using the sum of gradient angle differences of adjacent pixels around the center pixel of the window.
  • a conventional line detection method based on edge detection and a line detection method based on second-order differentiation are briefly described, and performance determination according to each method is performed. After that, the line detection method according to the present invention will be described, and the line detection method according to the present invention is more effective than the conventional method by performing verification.
  • the image (I) includes blurring and noise due to the limitations of the lens of the camera.
  • Image I can be modeled by a signal convolved by a certain amount of blur b, to which noise n is added.
  • a line profile in the present invention can be modeled by two elements of a line width w and a constant k. If the one-dimensional line signal according to FIG. 1 is mathematically expressed, it can be expressed as follows.
  • L means the coordinates of the center point of the line model.
  • edges are variously blurred in an actual image.
  • most of the image blurring is caused by the movement or focus of the camera, and even in the stabilized camera, a certain amount of blurring occurs due to the resolution of the camera lens.
  • the blurring effect is mathematically expressed in the line model, it is as follows, and the drawing corresponds to FIG. 2.
  • Smoothing is performed to remove noise. Smoothing the image can generally be performed by a kernel defined by a two-dimensional Gaussian function.
  • the smoothing function is as follows.
  • transformation on the original line signal (FIG. 1) can be expressed as follows.
  • the strength of the edge signal can be measured at the boundary of the smoothing line model derived from the first and second derivative values.
  • the first derivative function represents the gradient of the smoothed edge profile, and can be obtained by substituting L-w/2 into the equation (9). This is represented by the following equation (11).
  • the absolute value of the gradient of the neighboring pixel must be sufficiently low compared to that at the edge position, and the absolute value of the second derivative of the adjacent pixel must be high.
  • an adjacent pixel separated by 1 pixel from the edge position is selected, a second derivative may be selected at the position of the pixel, and L-w/2-1 may be substituted to determine.
  • the first derivative value of the pixel adjacent to the line or the absolute value of the gradient must be high.
  • the noise in the smoothed image is calculated below.
  • the noise remaining after smoothing is quantified, and a correlation coefficient between pixels in the noise of the smoothed image is derived based on the error propagation method.
  • n the amount of noise at an arbitrary position (r,c) is denoted by n.
  • Noise n has a symmetric distribution with respect to 0, and therefore its expected value satisfies the following equation.
  • a vector including all noise can have an expected value and variance, which is expressed as follows.
  • Id is the identity matrix
  • the expected value of the smoothed noise vector is derived as follows.
  • the variance value of the vector of the smoothed noise is derived as follows.
  • d the distance between the two arbitrary positions
  • the covariance between two pixels is calculated as follows.
  • the variance value can be expressed as self-covariance, which is the remaining noise value in (r,c), and is expressed as an equation as follows.
  • the correlation coefficient between the remaining noise after convolution according to the smoothing function in two arbitrary pixels having the distance d between can be expressed as follows.
  • Calculation of the first and second derivatives of an image signal is generally implemented by applying convolution of a specific kernel to the image.
  • a kernel having a size of 3x3 is used for implementation. Therefore, in order to investigate the change of noise in the process of calculating the first and second derivatives, it is necessary to consider the smoothing noise in the vicinity of 3x3 in each pixel as follows.
  • association matrix In the association matrix, assuming that there are 1 to 9 pixels in a 3X3 matrix, (1,1), (1,2), (1,3), (1,4) ... . Each correlation coefficient up to (1,9) is shown. In the second row, (2,1), (2,2), (2,3)... Each correlation coefficient up to ..(2,9) is shown.
  • association matrix can be expressed as a symmetric matrix.
  • the present invention uses the scaled Sobel operator.
  • the kernel in the first derivative is vectorized Is expressed as
  • the variance which is a noise result, is quantitatively derived from the convolution of the smoothed noise covered with the kernel through the above equation. Its value is as follows.
  • the following kernel is defined and used in the present invention.
  • the kernel in the second derivative is vectorized It is expressed as
  • the variance which is a noise result, is quantitatively derived from the convolution of the smoothed noise covered with the kernel through the above equation. Its value is as follows.
  • the SNR of edge detection and line detection is derived using the quantified signal strength, and can be derived from the result of the amount of noise from smoothing and convolution of a specific kernel.
  • the SNR for the first-order differential in the column direction can be derived as follows.
  • edge SNR for the second order derivative in the column direction can be derived as follows.
  • edge detection is considered to be performed based on a combination of a first derivative and a second derivative, and a value obtained by combining the SNR of the first and second derivatives is expressed as SNRC (edge) as follows.
  • the SNR for edge detection in order to detect the line pixel at the center of the line, the SNR for the first-order differential in the column direction can be derived as follows.
  • the SNR of line detection for the second derivative in the column direction can be derived as follows.
  • SNRC(line) a value obtained by combining the SNRs of the first and second derivatives.
  • SNRPS edge detection
  • SNRPS line detection
  • the SNRPS of edge detection for line detection is calculated by dividing it in half.
  • performance is determined by comparing the value of the signal-to-noise ratio (SNR) calculated by each of the line detection methods.
  • SNR signal-to-noise ratio
  • a graphical survey set can be used for comparing the performance of edge detection for line detection and straight line detection.
  • Various smoothing factors and line width w can be applied for investigation. Testing can be performed.
  • the smoothing coefficient may be variously formed from 0.4 to 10.0 at 0.1 intervals, and the line width may be variously formed from 0.5 to 20 at 0.1 intervals.
  • the blurring coefficient may be set to 1.0.
  • the standard deviation of the noise present in a given image is calculated assuming 0.1 in the graphic survey.
  • the standard deviation of noise resulting from the first and second derivatives according to the setting of the factors described above is shown in FIG. 3.
  • the standard deviation of noise appearing from the first and second derivatives decreases rapidly in the range of the smoothing coefficient less than 1.0. It has a characteristic that gradually decreases in the range of the smoothing coefficient greater than 1.0.
  • FIG. 4 shows the strength of edge signals of the first and second derivatives. According to FIG. 4, the strength of the edge signal is high when the smoothing coefficient is small in the first derivative.
  • 5 shows the SNR of the edge signals of the first and second derivatives. According to this, the SNR of the edge signal according to the first and second derivatives is high when the smoothing coefficient is large.
  • 6(a) shows the SNRC in the edge detection method. In Fig. 6(a), when the smoothing coefficient is set to be large, the signal-to-noise ratio is very high, which is particularly different when the line width is large. However, as the smoothing coefficient increases, the accuracy of the result decreases because interference with other signals occurs. To improve this, a realistic SNR value is obtained by applying a penalty function to the SNRC (edge). The final result is shown in Fig. 6(b). It can be seen that this has an efficient performance compared to FIG. 6(a).
  • FIG. 7 shows the strength of the line signal of the first and second derivatives. According to FIG. 7, the strength of the line signal shows almost the same pattern in the first derivative and the second derivative. 8 shows the SNR of the line signal of the first and second derivatives. According to this, the SNR of the edge signal according to the first and second derivatives is high when the smoothing coefficient is large, but the smoothing coefficient tends to be smaller than that of the edge detection method.
  • Fig. 9(a) shows the SNRC in the line detection method. As in the case of edge detection, as the smoothing coefficient increases in Fig. 9(a), the SNR becomes very high. However, as the smoothing coefficient increases, the accuracy of the result decreases because interference with other signals occurs. Therefore, the actual measurement value of SNR is obtained by applying a penalty function to the SNRC (line), and the final result is shown in Fig. 9(b). appear. It can be seen that this also has an efficient performance compared to FIG. 9(a).
  • 10 is a graph comparing SNR according to an edge signal and SNR according to a line signal.
  • the edge for line is calculated by the above equation and is shown in FIG. 10(a).
  • 10(b) shows the difference between SNRPS (lineSD) and SNRPS (edge for line).
  • SNRPS lineSD
  • SNRPS edge for line
  • the line detection method based on the second derivative is superior to the indirect line detection method using edge detection, and shows a more efficient aspect for lines with a relatively small width.
  • constants k, L, And Is set to 1.0, 0.0, 1.0 and 1.0, respectively, and the line width w is set to vary from 2 to 12.
  • FIG. 11 shows a graph of the results of the second derivative.
  • the thickness of the line is 2
  • Fig. 11(b) is 4
  • Fig. 11(c) is 6
  • Fig. 11(d) is 8
  • Fig. 11(e) is 10
  • Fig. 11(f) was set to 12 and was tested.
  • the second derivative function has one extreme value at the center of the line when the line widths are 2 and 4.
  • the performance is verified using SNR.
  • the performance of line detection based on SGAD can be compared with the performance of line detection based on SD.
  • the line detection method according to the present invention may select an image for line detection or a region for line detection in an image.
  • the user can select an area to detect the line, but it can be processed for the image or all parts of the image by some mechanical processing.
  • region selection for line detection may be performed sequentially from one edge of the target image or image to the opposite edge.
  • the area in which the line is to be detected may be selected in a square shape.
  • a center pixel in the selected area can be set.
  • the area in which the line is to be detected is a square.
  • the center pixel in the selected area may be a square center point.
  • a line to be detected may be located in the center pixel.
  • Virtual windows can be provided in the form of 3X3. However, virtual windows can be provided in various forms.
  • 12(a) to 12(b) show a window for explaining the line detection method according to the present invention.
  • FIG. 12 a method of determining the sum of gradient angle differences between pixels adjacent to the center pixel in a virtual window state is described.
  • Virtual windows are numbered sequentially. In the case of a 3X3 window, it has a number of 1 to 8 sequentially excluding the center pixel.
  • a method of obtaining a difference in gradient angles of adjacent pixels from a center pixel determines the sum of the difference in gradient angles of pixels facing each other around the center pixel. Referring to FIG. 12(a), pixels facing each other around the center pixel may be determined as pairs of (1,8), (2,7), (3,6), and (4,5). The direction of the gradient is from dark to light.
  • the direction of the gradient corresponds from the dark direction to the bright direction, in each pixel in Fig. 12(b), 1->2, 4->5, 6->7, 3->2, 5->4, 8-
  • the gradient direction can be set in the direction of >7.
  • the center pixel corresponds to the center point, if the sum of the gradient angle differences for adjacent pixels from the center point is calculated, the gradient angle difference between 1 and 8 + the gradient angle difference between 4 and 5 + the gradient between 6 and 3 It can be expressed as the angle difference + the gradient angle difference between 2 and 7.
  • pixels 1 and 8 pixels 4 and 5, and pixels 3 and 6 have gradient angles with adjacent pixels
  • the difference between the gradient angles in all pixels is calculated by calculating the size and angle of the gradient direction at each pixel. It is possible to find the sum of.
  • a center pixel is formed on the virtual window, and there will be no difference in gradients between adjacent pixels based on the center pixel. It will appear as 0, and eventually it can be determined that there is no line in the area.
  • the corresponding area may be designated as a candidate pixel in which a line exists.
  • the gradient angle for any pixel is defined as follows.
  • i is a pixel, Represents the row direction gradient at pixel i, Denotes a gradient in the column direction at pixel i.
  • the difference between the gradient angles of two different pixels can be calculated from the minimum positive angle between the gradient vectors in the two pixels. This is expressed as follows.
  • line detection may be performed by obtaining a sum of gradient angle differences for adjacent pairs of pixels surrounding the center pixel. This can be expressed as an equation as follows.
  • a variance value between two pixels can be obtained through the above equation.
  • the variance of a single angular difference between the i-th pixel and the j-th pixel can be calculated as follows.
  • the gradient value in the column direction at the i-th pixel can be calculated by convolution of the smoothed image and the kernel, which is expressed as follows.
  • the kernel can be defined as follows:
  • the gradient value in the row direction at the i-th pixel can be calculated by convolution of the smoothed image and the kernel.
  • FIG. 13 shows examples of a window for calculating a gradient, where numbers included in a pixel indicate a pixel index used to indicate a pixel position in a Jacobian matrix.
  • the center pixel is located at 8, and the difference in gradient angle is calculated for the pixels located at pixel 5 and pixel 11. This is because, based on the center pixel 8, the pixels with the difference in the gradient angle are only 5 and 11.
  • the center pixel is located at 9, and the difference in gradient angle is calculated for pixels located at pixel 5 and pixel 13.
  • the line detection method according to the present invention is more effective than the conventional method by second-order derivative by obtaining the variance value of the gradient angle difference using the above equations, and finally determined as a line in the verification process.
  • a method of detecting a line from candidates and values that can be used as reference values will be described.
  • the variance of the gradient vector can be derived as follows by substituting the above values.
  • the variance of the gradient vector can be derived as follows by substituting the above values.
  • the SNR value is calculated using the value obtained above, and the performance is compared with a line detection method based on a second-order derivative, which is a conventional method.
  • the line has the following gradient values in pixels i and j located 1 pixel left and right respectively from the center of the line.
  • the standard deviation of the gradient angle difference in the column direction is derived as follows.
  • the strength of the line signal based on the angle difference is to be. Therefore, the SNR of the angular difference in the horizontal direction is derived as follows.
  • Performance verification in the line detection method according to the present invention is also measured based on the combination of the gradient angle difference of the first derivative and the SNR of the first derivative as described above.
  • the combined SNR for line detection using the gradients of the 4th and 5th pixels of FIG. 12 is modeled as follows.
  • the combined SNR for line detection using the gradients of the first and eighth pixels of FIG. 12 is modeled as follows.
  • the SNR value to which the penalty function is applied to the sum of all four pairs of gradient angle differences in FIG. 12 can be modeled as follows.
  • FIG. 14(a) to 14(b) are diagrams showing the SNRPS of a pair of gradient angles according to FIG. 13. According to this, it can be seen that the SNR of the pair of the gradient angle difference has a high value in a state where the smoothing coefficient is low and the line width is in a range of up to about 8.
  • 15(a) to 15(b) are diagrams illustrating SNRPS of differential values of gradient angle pairs according to FIG. 13.
  • values between pixels 1 and 8 appear slightly higher than values between pixels 4 and 5, because the gradient correlation between 1 and 8 is lower than the gradient correlation between 4 and 8.
  • the difference shown in FIG. 16 represents the difference between the SNRPS value of the line detection method according to the present invention and the line detection method by second-order differentiation.
  • line detection based on SGAD under various smoothing coefficients and line conditions has a higher SNR value than that based on SD.
  • the smoothing factor is 1.0, the advantage of line detection based on SGAD is evident in the range of the line thickness of 8 pixels or less.
  • FIG. 17 shows the difference between the SNRPS values of the line detection method and the indirect line detection method using edge detection according to the present invention. According to FIG. 17, it is disclosed that the line detection based on the SGAD can detect the line much more effectively when the line is not relatively wide.
  • the line detection method according to the present invention can effectively detect the line compared to the conventional method.
  • a process of determining as an actual line by using the sum of the gradient angle differences will be described.
  • the next step for implementing line detection based on the sum of the gradient angle differences is the threshold of the range that can be determined as a line using the minimum value of the gradient angle difference for the pixel so that the pixel can be classified as a line pixel. You can find the value.
  • the optimal threshold that can be applied to a line pixel with various combinations of gradient angles, the standard deviation of the difference in gradient angles under various angle combinations is investigated.
  • Fig. 18(a) shows all possible values of the gradient angle difference for a combination of varying gradient angles.
  • the standard deviation of the gradient angle difference is investigated for the case where the smoothing factor is 0.1 with an interval of 0.4 to 10, and w is with an interval of 0.5 to 20 with an interval of 0.1.
  • 18(b) and (c) are tested under conditions of a noise coefficient of 0.5, a blurring coefficient of 1.0, a smoothing coefficient of 1.0, and a width of 4.0.
  • an optimal threshold is found.
  • the search has a threshold It starts with and ends with 0.0.
  • the signal strength calculated by the gradient angle difference and the noise strength calculated by the standard deviation of the gradient angle difference Is accumulated for a threshold value from to a specific value.
  • the optimal threshold is determined by finding the peak of the difference between the accumulated signal strength and the accumulated noise strength.
  • the optimal threshold value is a value that can be changed according to the change of the smoothing coefficient and w. Variations in the optimal threshold values for various combinations of smoothing coefficients and w appear for the angular differences in the column and diagonal directions, respectively. As shown in the results in FIGS. 19 and 20, the optimal threshold values for the two angular distributions may appear very similar to each other.
  • the optimal value is It may correspond to a slightly larger value of 3.6766.
  • the sum of the maximum possible gradient angle differences The range of the sum of the difference in gradient angle is To In the case of, it can be detected as a line candidate.
  • Pixels classified as candidates where a line is located can be classified as a ridge or a valley.
  • Ridge refers to a pixel whose intensity at a corresponding pixel is greater than that of a neighboring pixel
  • valley refers to a pixel whose intensity at a corresponding pixel is less than that of a neighboring pixel.
  • the step of classifying pixels into ridges or valleys can be calculated based on the sum of the gradient and the convolution of the two kernels.
  • the first kernel and the second kernel may be defined as follows.
  • the suppression process is performed only for adjacent pixels having the same classification in the pixels for the center line. Further, the suppression process may be calculated using a maximum curvature direction determined from an eigenvector corresponding to a maximum eigenvalue of a Hessian matrix.
  • the central pixel is removed. That is, it is removed from the candidate of the detected line.
  • 21 is an original image to be tested.
  • a pixel according to the present invention is a ridge or a valley, and to determine pixels having the same characteristics as the same line.
  • FIG. 22 is a diagram illustrating a result of second-order differentiation of a line detection result of an original image and a result of the line detection method according to the present invention, respectively.
  • a first column represents an original image
  • a second column represents a line detection result by second-order differentiation
  • a third column represents a line detection result according to the present invention.
  • the present invention has an effect that can be used universally in fields related to image processing.
  • the present invention can be used in an industrial field using image processing or computer vision.
  • the line detection method may be performed by a device including at least one processor and a memory.
  • the steps constituting the line detection method may be executed by a processor.
  • a program for executing each step of the edge positioning method can be recorded.
  • the processor may be composed of a central processing unit (CPU), a graphic processing unit (GPU), a general purpose graphic processing unit (GPGPU), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

이미지 또는 영상에서 라인을 검출하는 방법이 개시된다. 상기 방법은, 영상을 스무딩하는 단계; 상기 라인을 검출하고자 하는 영역을 선택하는 단계; 상기 선택한 영역에서 중심 픽셀을 결정하는 단계; 상기 중심 픽셀을 중심으로 한 윈도우를 장착하는 단계; 상기 중심 픽셀을 둘러싸는 픽셀들의 그래디언트 각도 차이의 합을 검출하는 단계; 픽셀을 릿지(ridge)와 밸리(valley)로 분류하는 단계; 비최대값 픽셀을 제거하는 단계;를 포함할 수 있다.

Description

라인 검출 방법
본 발명은 이미지나 영상에서 라인을 검출하는 방법에 관한 발명이다. 보다 구체적으로는, 그래디언트의 각도 차이의 합을 이용하여 라인을 검출하는 방법에 관한 발명이다.
이미지 처리분야에서, 에지는 일반적인 밝기 값이 급격하게 변하는 물체의 경계를 나타낸다. 종래의 영상이나 이미지에서 라인을 검출하는 방법은 에지 검출을 이용하는 간접 라인 검출 방법과, 2차 미분을 기반으로 한 라인 검출 방법을 이용하였다.
그러나 2차 미분을 기반으로 한 라인 검출 방법의 경우에는 라인의 폭이 특정 폭 이상으로 넓어지는 경우에는 라인 검출 시에 라인이 끊어지거나, 위치가 정확하게 검출되지 않는 문제점이 존재하였다.
본 발명은 상기와 같은 종래 기술의 문제점을 해결하기 위해 제안된 것으로, 라인이 보다 두꺼운 경우에도 라인을 정확하게 검출할 수 있는 방법을 제안하고자 한다.
본 발명에서는 중심 픽셀 주변의 인접한 픽셀에 대한 그래디언트의 각도 차이의 합을 이용하여 라인을 검출하고자 한다.
본 발명이 해결하고자 하는 과제는 이상에서 언급된 과제로 제한되지 않는다. 언급되지 않은 다른 기술적 과제들은 이하의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
이미지 또는 영상에서 라인을 검출하는 방법이 개시된다.
상기 방법은, 영상을 스무딩하는 단계; 상기 라인을 검출하고자 하는 영역을 선택하는 단계; 상기 선택한 영역에서 중심 픽셀을 결정하는 단계; 상기 중심 픽셀을 중심으로 한 윈도우를 장착하는 단계; 상기 중심 픽셀을 둘러싸는 픽셀들의 그래디언트 각도 차이의 합을 검출하는 단계;를 포함할 수 있다.
상기 라인 검출 방법은 상기 중심 픽셀을 중심으로 서로 마주하는 픽셀들의 그래디언트 각도 차이의 합을 검출할 수 있다.
상기 검출된 합의 결과 값이 특정 값 이상인 경우 상기 영역이 포함하는 부분을 라인으로 판단할 수 있다.
상기 특정 값은
Figure PCTKR2020007639-appb-I000001
일 수 있다.
상기 윈도우는 3X3의 윈도우일 수 있다.
상기 합의 결과 값이 특정 값 이상인 경우 상기 영역이 포함하는 부분을 라인으로 판단하는 단계는, 상기 특정 값 이상인 픽셀들을 라인 후보로 선정하는 단계; 각각의 중심 픽셀에서의 값이 릿지(Ridge)인지 밸리(Valley)인지 판단하는 단계; 및 상기 라인 후보들로부터 라인을 선택하는 단계; 를 더 포함할 수 있다.
상기 라인 후보들로부터 라인을 선택하는 단계는, 상기 인접한 픽셀의 그래디언트 각도 차이의 합과, 중심 픽셀의 그래디언트 각도 차이의 합을 비교하여 판단할 수 있다.
상기 중심 픽셀의 그래디언트 각도 차이의 합이 상기 인접 픽셀들의 그래디언트 각도 차이의 합보다 큰 경우 중심 픽셀을 라인으로 선택할 수 있다.
상기와 같은 라인 검출 방법을 실행시키는 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체가 개시될 수 있다.
본 발명에서는 중심 픽셀 주변의 인접한 픽셀에 대한 그래디언트의 각도 차이의 합을 이용하여 라인을 검출할 수 있다.
본 발명에서는 라인이 보다 두꺼운 경우에도 라인을 정확하게 검출할 수 있다.
또한 본 발명에서는 신호 대 잡음비가 기존의 라인 검출 방법에 비해 높게 나타나므로 영상 처리 측면에서 효과적이다.
본 발명의 효과는 상술한 효과들로 제한되지 않는다. 언급되지 않은 효과들은 본 명세서 및 첨부된 도면으로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확히 이해될 수 있을 것이다.
도 1은 본 발명에 따른 라인 검출 모델의 일 예시이다.
도 2는 도 1의 라인 검출 모델에 대해 블러링 처리를 한 결과를 나타내는 예시이다.
도 3(a) 내지 도 3(b)는 노이즈에 대한 표준 편차를 1차 미분의 경우와 2차 미분의 경우로 나누어 그래프로 나타낸 도면이다.
도 4(a) 내지 도 4(b)는 에지 신호에 대한 신호 강도를 1차 미분의 경우와 2차 미분의 경우로 나누어 그래프로 나타낸 도면이다.
도 5(a) 내지 도 5(b)는 에지 신호에 대한 SNR값을 1차 미분의 경우와 2차 미분의 경우로 나누어 그래프로 나타낸 도면이다.
도 6(a) 내지 도 6(b)는 에지 검출 방법에 대한 SNRC 및 SNRPS를 나타내는 도면이다.
도 7(a) 내지 도 7(b)는 라인 신호에 대한 강도를 1차 미분의 경우와 2차 미분의 경우로 나누어 그래프로 나타낸 도면이다.
도 8(a) 내지 도 8(b)는 라인 신호에 대한 SNR값을 1차 미분의 경우와 2차 미분의 경우로 나누어 그래프로 나타낸 도면이다.
도 9(a) 내지 도 9(b)는 2차 미분값에 의한 라인 검출 방법에 대한 SNRC 및 SNRPS를 나타내는 도면이다.
도 10은 에지 신호에 따른 SNR과 라인 신호에 따른 SNR을 비교한 그래프이다.
도 11은 기존의 2차 미분 방식을 사용한 라인 검출 결과 라인의 두께에 따른 결과 그래프가 달라지는 것을 설명하기 위한 도면이다.
도 12(a) 내지 도 12(b)는 본 발명에 따른 라인 검출 방법의 그래디언트 각도 차이의 합을 구하는 것을 설명하기 위한 도면이다.
도 13(a) 내지 도 13(b)는 그래디언트 각도를 계산하기 위한 윈도우가 개시된다.
도 14(a) 내지 도 14(b)는 도 13에 따른 그래디언트 각도 쌍의 SNRPS를 나타내는 도면이다.
도 15(a) 내지 도 15(b)는 도 13에 따른 그래디언트 각도 쌍의 미분값의 SNRPS를 나타내는 도면이다.
도 16 내지 도 17은 본 발명에 따른 라인 검출 방법과 기존의 에지 검출 방법 및 2차 미분에 따른 라인 검출 방법을 비교하는 도면이다.
도 18은 그래디언트 각도 차이 및 그 표준편차를 나타내는 도면이다.
도 19는 최적의 임계점을 찾는 것을 설명하기 위한 도면이다.
도 20은 도 19에 따른 결과를 나타내는 그래프이다.
도 21은 실험 대상이 되는 원본 이미지이다.
도 22는 원본 이미지에 대한 라인 검출 결과를 2차 미분에 의한 결과와 본 발명에 따른 라인 검출 방법에 따른 결과를 각각 나타내는 도면이다.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 또한, 본 발명의 바람직한 실시예를 상세하게 설명함에 있어, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 또한, 유사한 기능 및 작용을 하는 부분에 대해서는 도면 전체에 걸쳐 동일한 부호를 사용한다.
본 발명에서는 라인의 검출을 위해, 어느 한 픽셀 상에 윈도우를 장착하여 해당 윈도우의 중심 화소 주변의 인접한 화소들의 그래디언트 각도차의 합을 이용하여 해당 값이 특정 값 이상인 경우 라인으로 판단한다. 이하에서는, 기존의 에지 검출에 의한 라인 검출 방법과, 2차 미분에 의한 라인 검출의 방법을 간단히 설명하고, 각 방법에 의한 성능 판단을 수행한다. 그 후에 본 발명에 따른 라인 검출 방법을 설명하고, 본 발명에 따른 라인 검출 방법에 대해 검증을 수행함으로써 기존의 방법보다 효과적임을 설명한다.
이미지로부터 라인 특성을 추출할 때는, 에지를 감지할 것인지; 혹은 라인을 감지할 것인지를 결정하여야 한다. 적절한 결정을 위해 다양한 조건 하에서 실험이 요구된다. 다양한 조건은 라인의 폭, 노이즈의 레벨, 노이즈를 최소화 하기 위한 스무딩 계수 등이 있을 수 있다. 이하에서는 다양한 조건에서 에지 감지 및 라인 감지에 대한 방법을 살펴본 뒤, SNR을 검출하는 것을 통해 각 방법에 대한 성능을 비교한다.
이미지(I)는 카메라의 렌즈의 한계에 의한 블러링 및 노이즈를 포함한다. 이미지 I는 일정한 양의 블러 b에 의해 컨볼루션 된 신호에 의해 모델링 될 수 있으며, 여기에는 노이즈 n이 추가된다.
이는 이하와 같이 표현된다.
Figure PCTKR2020007639-appb-I000002
본 발명의 도 1에 따르면, 본 발명에서의 라인 프로파일은 라인의 너비 w와 상수 k의 두 가지 요소에 의해 모델링 될 수 있다. 도 1에 따른 1차원적 라인 신호를 수학적으로 표현하면 이하와 같이 표현할 수 있다.
Figure PCTKR2020007639-appb-I000003
여기서 L은 라인 모델의 중심점에 대한 좌표를 의미한다.
한편, 실제 이미지에서 에지들은 다양하게 블러링(blurring)된다. 이때, 대부분의 이미지 블러링은 카메라의 움직임이나 초점에 의해 발생되며, 안정화된 카메라에 있어서도 카메라 렌즈의 분해능에 의해 일정 량의 블러링이 발생한다. 상기 라인 모델에서 블러링 효과를 수학적으로 표현하면 이하와 같으며, 이를 도면으로 나타낸 것이 도 2에 해당한다.
Figure PCTKR2020007639-appb-I000004
Figure PCTKR2020007639-appb-I000005
는 블러링 계수를 의미한다. 상기 블러링 효과를 라인 상의 임의의 위치 x에 적용하면 아래와 같은 수식으로 표현된다.
Figure PCTKR2020007639-appb-I000006
상기와 같이 이미지에 블러링이 적용된 후에는 노이즈를 제거하는 것이 필수적으로 요구된다. 노이즈를 제거하기 위해 스무딩을 수행한다. 이미지를 스무딩하는 것은 일반적으로 2차원의 가우시안 함수에 의해 정의된 커널에 의해 수행될 수 있다. 스무딩 함수는 이하와 같다.
Figure PCTKR2020007639-appb-I000007
Figure PCTKR2020007639-appb-I000008
는 스무딩 계수를 의미한다. 따라서 대응하는 1차원의 스무딩 함수는 다음과 같다.
Figure PCTKR2020007639-appb-I000009
이러한 스무딩 함수 S를 컨벌루션 하여 원본 이미지에 적용하면 스무딩이 적용된 이미지가 형성된다. 이를 수식으로 나타내면 이하와 같다.
Figure PCTKR2020007639-appb-I000010
상기와 같은 수식들을 통해 블러링과 스무딩 컨벌루션(convolution)을 수행하여 원본 라인 신호(도 1)에 대한 변환을 수행하면 아래와 같이 표현될 수 있다.
Figure PCTKR2020007639-appb-I000011
상기 스무딩 된 라인에 대한 1차 미분을 수행하면 아래와 같이 표현된다.
Figure PCTKR2020007639-appb-I000012
상기 스무딩 된 라인에 대한 2차 미분을 수행하면 아래와 같이 표현된다.
Figure PCTKR2020007639-appb-I000013
이하에서는, 상기에서 구한 수식을 통해 에지 신호와 라인 신호의 강도를 측정하는 방법에 대해 서술한다.
에지 신호의 강도는 1차 미분 및 2차 미분 값에서 파생된 스무딩 라인 모델의 경계에서 측정될 수 있다. 1차 미분 함수는 스무딩 된 에지 프로파일의 그래디언트를 나타내며, (9)의 수식에 L-w/2를 대입하여 구할 수 있다. 이는 이하의 수식 (11)로 나타난다.
Figure PCTKR2020007639-appb-I000014
에지 픽셀이 이미지의 로컬 영역에서 잘 검출될 수 있도록 하기 위해, 이웃하는 픽셀의 그래디언트의 절대값은 에지 위치에서의 것과 비교하였을 때 충분히 낮아야 하며, 인접 픽셀에서의 2차 미분의 절대값이 높아야 한다.
따라서 에지 위치로부터 1픽셀 만큼이 떨어져있는 인접 픽셀이 선택되고, 해당 픽셀의 위치에서 2차 미분이 선택될 수 있으며, L-w/2-1을 대입하여 판단할 수 있다.
Figure PCTKR2020007639-appb-I000015
반면, 라인 신호의 강도와 관련하여, 라인 픽셀이 구별되어 검출되기 위해서는, 라인 근처의 근방 픽셀의 1차 미분값 또는 그래디언트의 절대값이 높아야 한다.
이웃 픽셀들 중 하나로써, x=L-1에 위치한 픽셀이 선택되고, 라인 신호의 강도의 척도로써 이를 1차 미분 값에 대입하여 판단할 수 있다.
Figure PCTKR2020007639-appb-I000016
또한, 라인 픽셀을 검출하기 위해, 라인 위치에서의 2차 미분 값, 즉 x=L에서의 값은 높아야 한다.
Figure PCTKR2020007639-appb-I000017
상기에서 구한 값을 이용하여, 스무딩 된 이미지에서의 노이즈를 이하에서 계산한다. 스무딩 이미지에서의 에지 검출 및 라인 검출을 위한 SNR 값을 측정하기 위해서, 신호의 강도를 정량화 하여야 할 뿐 아니라, 스무딩 후의 노이즈의 양을 정량화 하여야 한다. 이하에서는 스무딩 후에 잔류하는 노이즈를 정량화하고, 스무딩 된 이미지의 노이즈에서의 픽셀 사이 상관 계수를 오류 전파 방식에 기초하여 유도한다.
이하에서는, 임의의 위치 (r,c)에서의 노이즈의 양을 n으로 표시한다.
Figure PCTKR2020007639-appb-I000018
노이즈 n은 0에 대해 대칭 분포를 가지며, 따라서 그 기대값은 다음과 같은 방정식을 만족한다.
Figure PCTKR2020007639-appb-I000019
그 다음, 단일 픽셀에서의 노이즈의 분산 또는 편차는 다음과 같이 표시된다.
Figure PCTKR2020007639-appb-I000020
이미지의 모든 픽셀에서의 노이즈에 대한 노이즈의 기대치와 분산을 확장시킴으로써 모든 노이즈를 포함하는 벡터는 기대값과 분산을 가질 수 있으며, 이는 다음과 같이 표시된다.
Figure PCTKR2020007639-appb-I000021
Id는 단위 행렬이다.
임의의 위치 (r,c)에서의 스무딩 후 남은 노이즈의 양은 이하와 같이 표현된다.
Figure PCTKR2020007639-appb-I000022
스무딩 된 노이즈의 백터의 기대값은 아래와 같이 도출된다.
Figure PCTKR2020007639-appb-I000023
추가적으로, 스무딩 된 노이즈의 백터의 분산값은 아래와 같이 도출된다.
Figure PCTKR2020007639-appb-I000024
스무딩 된 후의 남은 노이즈 간의 연관 계수를 정량화 하기 위해, 2개의 임의의 위치 (r,c) 및 (r-a, r-b)에서의 공분산이 이하와 같이 유도된다.
Figure PCTKR2020007639-appb-I000025
상기 2개의 임의의 위치 사이의 거리가 d라고 가정하면, d는 다음과 같이 표현할 수 있다.
Figure PCTKR2020007639-appb-I000026
공분산에 상기 d 값을 대입하면, 두 픽셀 사이의 공분산은 아래와 같이 계산된다.
Figure PCTKR2020007639-appb-I000027
즉 분산값은 (r,c)에서의 남은 노이즈 값인 자기 공분산으로 표현될 수 있고, 다음과 같이 수식으로 나타난다.
Figure PCTKR2020007639-appb-I000028
따라서, 사이 거리 d를 가지는 2개의 임의의 픽셀에서의 스무딩 함수에 따른 컨벌루션 후의 남은 노이즈 간의 상관 계수는 결과적으로 이하와 같이 나타낼 수 있다.
Figure PCTKR2020007639-appb-I000029
전술한 바와 같이, 에지나 라인을 검출하기 위해서는 스무딩 후에 제1 미분 및 2차 미분 값을 사용하여 계산이 수행된다. 그러나 계산 중에 스무딩 이후 남아 있는 노이즈가 변화될 수 있는 문제가 있으므로, 에지 감지 및 라인 감지를 통해 SNR을 계산하기 위해 정량화가 필요하다.
이미지를 처리하게 되면 노이즈가 발생하게 된다. 이러한 노이즈는 필연적으로 나타나게 된다. 이러한 노이즈를 없애기 위한 스무딩 작업을 수행할 수 있다. 그러나 스무딩 작업을 수행하더라도 노이즈는 일부가 남아있게 된다. 또한 노이즈가 사라지더라도, 인접한 픽셀 간에 correlation, 즉 연관 계수가 발생하게 된다. 즉 노이즈 간 상관관계가 발생하게 되고, 이를 오차 전파를 통해 계산할 수 있다. 이러한 연관 계수는 픽셀간 거리가 가까우면 더 크고, 픽셀 간 거리가 멀면 더 작게 표현될 수 있다.
이미지 신호의 1차 및 2차 미분의 계산은 일반적으로 특정 커널의 컨벌루션을 이미지에 적용하여 구현된다. 본 발명에서는 구현을 위해 크기가 3x3인 커널을 사용한다. 따라서 1차 미분과 2차 미분의 계산 과정에서 노이즈의 변화를 조사하기 위해서는 각 픽셀에서 3x3 근방의 스무딩 노이즈를 다음과 같이 고려할 필요성이 있다.
Figure PCTKR2020007639-appb-I000030
상기 수식에서의
Figure PCTKR2020007639-appb-I000031
에서의 i는 3x3 커널 내의 각 픽셀에 할당된 순차적인 숫자를 의미한다.
픽셀을 순차적 번호에 의해 정렬된 벡터로 재배치 한 후, 그들의 연관 계수는 각 픽셀 사이의 거리를 고려하여 노이즈 간 상관 계수를 통해 계산되고, 이는 행렬의 형태로 변환되어 이하와 같이 나타난다.
Figure PCTKR2020007639-appb-I000032
Figure PCTKR2020007639-appb-I000033
은 연관 행렬로 칭한다.
상기 연관 행렬에서는, 3X3의 행렬에 1 내지 9의 픽셀이 존재한다고 가정했을 때, 제1행에는 (1,1), (1,2), (1,3), (1,4) …. (1,9)까지의 각각의 상관계수를 나타낸다. 제2행에는 (2,1), (2,2), (2,3)…..(2,9) 까지의 각각의 상관계수를 나타낸다.
즉 연관 행렬은 대칭 행렬로 나타날 수 있다.
열 방향(column)으로 1차 미분을 계산하기 위해 본 발명에서는 스케일 된 소벨 연산자를 사용한다.
Figure PCTKR2020007639-appb-I000034
1차 미분에서의 커널은 벡터화 하여
Figure PCTKR2020007639-appb-I000035
로 표현된다.
상기와 같은 수식을 통해 상기 커널을 씌운 스무딩 된 노이즈의 컨벌루션으로부터 노이즈 결과인 분산이 양적으로 도출된다. 그 값은 이하와 같다.
Figure PCTKR2020007639-appb-I000036
추가적으로, 열 방향의 2차 미분을 계산하기 위해, 본 발명에서는 다음과 같은 커널을 정의하여 사용한다.
Figure PCTKR2020007639-appb-I000037
2차 미분에서의 커널은 벡터화 하여
Figure PCTKR2020007639-appb-I000038
와 같이 표현된다.
상기와 같은 수식을 통해 상기 커널을 씌운 스무딩 된 노이즈의 컨벌루션으로부터 노이즈 결과인 분산이 양적으로 도출된다. 그 값은 이하와 같다.
Figure PCTKR2020007639-appb-I000039
상기와 같은 도출 값들을 통해, 에지 검출과 라인 검출의 SNR은 정량화된 신호 강도를 이용하여 유도되며, 특정한 커널의 스무딩 및 컨벌루션으로부터의 노이즈의 양의 결과로부터 도출될 수 있다.
라인의 경계에서 에지 픽셀을 검출하기 위해, 열 방향의 1차 미분을 위한 SNR은 다음과 같이 도출될 수 있다.
Figure PCTKR2020007639-appb-I000040
유사하게, 열 방향에서 2차 미분을 위한 에지 SNR은 다음과 같이 도출될 수 있다.
Figure PCTKR2020007639-appb-I000041
본 발명에서 에지 검출은 1차 미분과 2차 미분의 조합을 기반으로 수행된 것으로 간주되어, 1차 미분 및 2차 미분의 SNR을 조합한 값을 SNRC(edge)로 표현하면 다음과 같다.
Figure PCTKR2020007639-appb-I000042
에지 검출을 위한 SNR로서, 라인의 중심에서 라인 픽셀을 검출하기 위해, 열 방향의 1차 미분을 위한 SNR은 다음과 같이 도출될 수 있다.
Figure PCTKR2020007639-appb-I000043
열 방향에서의 2차 미분에 대한 라인 검출의 SNR은 다음과 같이 도출될 수 있다.
Figure PCTKR2020007639-appb-I000044
본 발명에서의 라인 검출은 제1 미분 및 2차 미분의 조합을 기반으로 수행된 것으로 간주되므로, 1차 미분 및 2차 미분의 SNR을 조합한 값을 SNRC(line)으로 표현하면 다음과 같다.
Figure PCTKR2020007639-appb-I000045
그러나, 이미지의 검출에 있어서, 블러링 및 스무딩의 크기가 커짐에 따라 신호는 인접한 신호와 혼합되어 퇴화되는 경향이 있다. 본 발명에서의 페널티 함수 기능은 블러링과 스무딩의 성장에 의해 발생하는 신호의 퇴화를 계산하기 위해 도입되었다.
Figure PCTKR2020007639-appb-I000046
블러링 및 스무딩에 따른 페널티를 적용한 에지 검출의 SNR은 SNRPS(edge)로 표시한다.
Figure PCTKR2020007639-appb-I000047
블러링 및 스무딩에 따른 페널티를 적용한 라인 검출의 SNR은 SNRPS(line)으로 표시한다.
Figure PCTKR2020007639-appb-I000048
라인 픽셀을 찾기 위해 라인의 양쪽에서 에지 픽셀의 검출이 필요하기 때문에, 라인 검출을 위한 에지 검출의 SNRPS는 반으로 나눈 값으로 계산된다.
Figure PCTKR2020007639-appb-I000049
이하에서는 상기 각 라인 검출 방법에 의해 계산된 신호 대 잡음비(SNR)의 값을 비교하여 성능을 판단한다. 라인 검출 및 직선 검출을 위한 에지 검출의 성능 비교를 위해, 그래픽 조사 세트가 사용될 수 있다. 조사를 위해 다양한 스무딩 계수 및 라인의 폭 w가 적용될 수 있다. 테스트가 수행될 수 있다. 스무딩 계수는 0.1 간격으로 0.4에서 10.0까지 다양하게 형성될 수 있으며, 선폭은 0.1 간격으로 0.5에서 20까지 다양하게 형성될 수 있다.
또한 블러링 계수는 1.0으로 설정될 수 있다. 주어진 이미지에 존재하는 노이즈의 표준 편차는 그래픽 조사에서 0.1로 가정하여 계산된다.
상기에서 설명한 요소의 설정에 따라 1차 미분 및 2차 미분으로부터 나타나는 노이즈의 표준 편차는 도 3에 표시된다. 도 3과 같이 1차 미분 및 2차 미분으로부터 나타나는 노이즈의 표준 편차는 1.0보다 작은 스무딩 계수의 범위에서 급격하게 감소하나. 1.0보다 큰 스무딩 계수의 범위에서는 서서히 감소하는 특징을 가진다.
도 4는 1차 미분과 2차 미분의 에지 신호의 강도를 나타낸다. 도 4에 따르면 에지 신호의 강도는 1차 미분에서, 스무딩 계수가 작을 때 높게 나타난다. 도 5는 1차 및 2차 미분의 에지 신호의 SNR을 보여준다. 이에 따르면 1차 미분과 2차 미분에 따른 에지 신호의 SNR은 스무딩 계수가 클 때 높게 나타난다. 도 6(a)는 에지 검출 방법에서의 SNRC를 나타낸다. 도 6(a)에서 스무딩 계수를 크게 설정하면 신호 대 잡음비가 매우 높아지는데, 이는 선폭이 큰 경우 특히 다르게 나타난다. 그러나 스무딩 계수가 커짐에 따라 다른 신호와 간섭이 발생하기 때문에 결과의 정확도는 감소한다. 이를 개선하기 위해 SNRC(edge)에 페널티 함수를 적용하여 현실적인 SNR 값이 얻어진다. 최종적인 결과는 도 6(b)에 나타난다. 이는 도 6(a)에 비해 효율적인 성능을 가짐을 확인할 수 있다.
도 7은 1차 및 2차 미분의 라인 신호의 강도를 나타낸다. 도 7에 따르면 라인 신호의 강도는 1차 미분 및 2차 미분에서 거의 동일한 양상을 보인다. 도 8은 1차 미분 및 2차 미분의 라인 신호의 SNR을 도시한다. 이에 따르면 1차 미분과 2차 미분에 따른 에지 신호의 SNR은 스무딩 계수가 클 때 높게 나타나나, 에지 검출에 의한 방법보다는 스무딩 계수가 작은 경향을 보인다. 도 9(a)는 라인 검출 방법에서의 SNRC를 도시한다. 에지 검출의 경우와 같이, 도 9(a)에서 스무딩 계수가 커지면 SNR은 매우 높아진다. 그러나 스무딩 계수가 커짐에 따라 다른 신호와 간섭이 발생하기 때문에 결과의 정확도는 감소하기 때문에 SNRC(line)에 페널티 함수를 적용하여 SNR의 실제 측정 값을 얻고, 최종적인 결과는 도 9(b)에 나타난다. 이는 역시 도 9(a)에 비해 효율적인 성능을 가짐을 확인할 수 있다.
도 10은 에지 신호에 따른 SNR과 라인 신호에 따른 SNR을 비교한 그래프이다.
SNRPS(edge for line)은 전술한 수식에 의해 계산되어 도 10(a)에 도시된다. 도 10(b)는 SNRPS(lineSD)-SNRPS(edge for line)의 차이를 나타낸다. 도 10(b)에 따르면 라인의 너비가 상대적으로 작은 경우, SNR의 측면에서 에지 검출을 통한 라인 검출보다 2차 미분값에 의한 직접적인 라인 검출이 보다 효과적이다. 예를 들어 이미지에 스무딩 계수 3.0이 적용될 때 11픽셀 미만 및 이미지에 스무딩 계수 1.0이 적용될 때 5 픽셀 미만인 경우이다. 또한 5픽셀 이내의 선 폭에 대해 이미지에 1.0의 스무딩 계수가 적용될 때 SNRPS(lineSD)- SNRPS(edge for line)가 선폭의 변화에 대해 가장 높은 값으로 나타나는 것을 확인할 수 있다.
2차 미분을 기반으로 한 라인 검출 방법은 에지 검출을 이용하는 간접 라인 검출 방법보다 우수하며, 비교적 작은 폭의 라인에 대해 더 효율적인 양상을 보인다. 그러나 2차 미분을 기반으로 한 경우에도, 선폭이 상대적으로 클 때는 문제점이 발생한다. 도 11에 따른 테스트에서, 상수 k, L,
Figure PCTKR2020007639-appb-I000050
Figure PCTKR2020007639-appb-I000051
는 각각 1.0, 0.0, 1.0 및 1.0으로 설정되고, 선폭 w는 2에서 12까지 변화하도록 설정된다.
도 11은 2차 미분의 결과 그래프를 도시한다. 도 11(a)의 경우 라인의 두께가 2이며, 도 11(b)는 4, 도 11(c)는 6, 도 11(d)는 8, 도 11(e)는 10, 도 11(f)는 12로 설정되어 실험되었다. 도 11(a) 내지 (b)에 도시 된 바와 같이, 제 2 미분 함수는 선폭이 2 및 4 일 때 라인의 중심에서 하나의 극한값을 가진다.
그러나 도 11의 (c)에 따르면 극한값이 두 개로 발생하게 되고, 도 11의 (d) 내지 (f)에 따르면 라인의 폭이 커질수록 점점 극한값의 거리가 멀어지며, 라인 폭이 커짐에 따라 중앙의 2차 미분값이 0에 접근한다. 즉, 2차 미분 방식을 이용한 라인 검출 방법은 검출하고자 하는 라인의 두께에 영향을 받는 단점이 존재하였다.
이하에서는 기존의 방법과 상이한 라인 검출 방법에 대해서 개시한다.
본 발명에 따른 라인 검출 방법을 정의한 후, 성능을 SNR을 이용하여 검증한다. 또한 SGAD를 기반으로 한 라인 검출의 성능은 SD를 기반으로 한 라인 검출 성능과 비교될 수 있다.
본 발명에 따른 라인 검출 방법은 라인 검출을 하고자 하는 이미지나 영상에서 라인을 검출하고자 하는 영역을 선택할 수 있다.
라인을 검출하고자 하는 영역은 사용자가 선택할 수 있으나, 어떠한 기계적 처리에 의해 이미지나 영상의 모든 부분에 대해 처리될 수 있다. 일 예시에 따르면, 대상이 되는 이미지나 영상의 일 모서리부터 시작하여 반대쪽 모서리까지 순차적으로 라인 검출을 위한 영역 선택이 수행될 수 있다. 라인을 검출하고자 하는 영역은 정사각형의 형태로 선택될 수 있다.
라인을 검출하고자 하는 영역이 선택되면, 선택한 해당 영역에서의 중심 픽셀을 설정할 수 있다. 이하에서는 라인을 검출하고자 하는 영역이 정사각형인 경우로 가정하고 설명한다.
선택한 영역에서의 중심 픽셀은 정사각형의 정 중앙 지점일 수 있다. 중심 픽셀에는 검출하고자 하는 라인이 위치할 수 있다. 중심 픽셀을 설정한 후에는, 선택한 영역에 대한 가상의 윈도우를 장착할 수 있다. 가상의 윈도우는 3X3의 형태로 제공될 수 있다. 그러나 가상의 윈도우는 다양한 형태로 제공될 수 있다.
도 12(a) 내지 도 12(b)는 본 발명에 따른 라인 검출 방법을 설명하기 위한 윈도우를 장착한 것을 나타낸다.
도 12에서는 가상의 윈도우 상태에서 중심 픽셀로부터 인접한 픽셀들의 그래디언트 각도 차이의 합을 결정하는 방법을 설명한다.
가상의 윈도우는 순차적으로 넘버링을 가진다. 3X3의 윈도우의 경우 중심 픽셀을 제외하고 순차적으로 1 내지 8의 숫자를 가진다. 중심 픽셀로부터 인접한 픽셀들의 그래디언트 각도 차이를 구하는 방법은, 중심 픽셀을 중심으로 서로 마주하는 픽셀들의 그래디언트 각도 차이의 합을 결정한다. 도 12(a)에 따르면, 중심 픽셀을 중심으로 서로 마주하는 픽셀들은 (1,8), (2,7), (3,6), (4,5)의 쌍으로 결정될 수 있다. 그래디언트의 방향은 어두운 방향에서 밝은 방향이다.
도 12(b)를 이용하여 그래디언트 각도의 차이를 구하는 예시를 설명한다.
도 12(b)의 경우, 검출하고자 하는 라인의 영역에 3X3의 윈도우를 장착하였고, 해당 픽셀의 번호 중 2, 7을 제외한 나머지 부분이 어두운 부분인 경우를 가정한다.
그래디언트의 방향은 어두운 방향에서 밝은 방향에 해당하므로, 도 12(b)에서의 각 픽셀에서는 1->2, 4->5, 6->7, 3->2, 5->4, 8->7의 방향으로 그래디언트 방향이 설정될 수 있다. 이 때 중심 픽셀은 중심점에 해당하므로, 중심점을 기준으로 인접한 픽셀들에 대한 그래디언트 각도 차이의 합을 구하면 1과 8 사이의 그래디언트 각도 차이 + 4와 5 사이의 그래디언트 각도 차이 + 6와 3 사이의 그래디언트 각도 차이 + 2와 7 사이의 그래디언트 각도 차이로 나타낼 수 있다.
픽셀 2와 7 사이는 그래디언트가 0이므로, 각도 차이도 0으로 나타난다.
그러나 픽셀 1과 8, 픽셀 4와 5, 픽셀 3과 6의 경우에는 인접한 픽셀과 그래디언트 각도를 가지고 있으므로, 각각의 픽셀에서의 그래디언트 방향이 가지는 크기와 각도를 계산함으로써 모든 픽셀에서의 그래디언트 각도의 차이의 합을 구하는 것이 가능하다.
만일 라인 검출을 위해 선택한 영역에 라인이 존재하지 않을 경우, 가상의 윈도우 상에서 중심 픽셀을 형성하고, 해당 중심 픽셀을 기준으로 한 인접 픽셀들 간의 그래디언트 차이가 없을 것이므로, 마주하는 그래디언트 각도 차이의 합은 0으로 나타날 것이며, 결국 해당 영역은 라인이 없는 것으로 판단할 수 있다.
그러나 도 12(b)와 같은 경우 음영이 있게 되어 그래디언트 각도 차이의 합이 0이 아닌 값으로 나타나게 되는 바, 해당 영역을 라인이 존재하는 후보 픽셀로 지정할 수 있다.
이를 변수를 포함하는 수식을 통해 설명하면 이하와 같다.
임의의 픽셀에 대한 그래디언트 각도는 다음과 같이 정의된다.
Figure PCTKR2020007639-appb-I000052
i는 픽셀이며,
Figure PCTKR2020007639-appb-I000053
는 픽셀 i에서의 행(row) 방향 그래디언트를 나타내며,
Figure PCTKR2020007639-appb-I000054
는 픽셀 i에서의 열(column) 방향 그래디언트를 나타낸다.
두 개의 서로 다른 픽셀의 그래디언트 각도의 차이는 두 개의 픽셀에서의 그래디언트 벡터 사이의 최소 양의 각도로부터 계산될 수 있다. 이는 이하와 같이 표시된다.
Figure PCTKR2020007639-appb-I000055
전술한 바와 같이, 중심 픽셀을 둘러싸는 인접한 쌍의 픽셀들에 대해 그래디언트 각도 차이의 합을 구함으로써, 라인 검출을 수행할 수 있다. 이를 수식으로 나타내면 다음과 같다.
Figure PCTKR2020007639-appb-I000056
상기와 같은 수식을 통해 두 개의 픽셀 사이의 분산값을 구할 수 있다.
i번째 픽셀과 j번째 픽셀 사이의 단일 각도 차이의 분산은 다음과 같이 계산될 수 있다.
Figure PCTKR2020007639-appb-I000057
상기 수식에서의 각도의 백터의 분산은 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000058
이 때, 자코비안 행렬은 다음과 같이 적용된다.
Figure PCTKR2020007639-appb-I000059
상기 수식들을 이용한 그래디언트 벡터의 분산은 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000060
i번째 픽셀에서 열 방향의 그래디언트 값은 스무딩 된 이미지와 커널의 컨벌루션에 의해 계산될 수 있고, 이는 이하와 같이 표현된다.
Figure PCTKR2020007639-appb-I000061
행 방향의 그래디언트를 계산하기 위해 커널은 다음과 같이 정의될 수 있다.
Figure PCTKR2020007639-appb-I000062
i번째 픽셀에서 행 방향의 그래디언트 값은 스무딩 된 이미지와 커널의 컨벌루션에 의해 계산될 수 있다.
Figure PCTKR2020007639-appb-I000063
도 13은 그래디언트의 계산을 위한 윈도우의 일 예시들을 도시하고, 여기서 픽셀 내에 포함된 숫자들은 자코비안 행렬에서의 픽셀 위치를 나타내는 데 사용되는 픽셀 인덱스를 나타낸다. 도 13(a)에서, 중심 픽셀은 8에 위치되고, 그래디언트 각도의 차이는 픽셀 5 및 픽셀 11에 위치하는 픽셀에 대해 계산된다. 그 이유는 중심 픽셀 8을 기준으로, 그래디언트 각도의 차이를 가지는 픽셀은 5와 11에만 해당하기 때문이다. 마찬가지로, 도 13 (b)에서, 중심 픽셀은 9에 위치하고, 그래디언트 각도의 차이는 픽셀 5 및 픽셀 13에 위치한 픽셀들에 대해 계산된다.
이하에서는, 상기 수식들을 이용하여 상기 그래디언트 각도 차이의 분산값을 구함으로써, 본 발명에 따른 라인 검출 방법이 기존의 2차 미분에 의한 방식보다 효과적임을 증명하며, 그 증명 과정에서 라인으로 최종적으로 판단하는 기준값이 될 수 있는 값들 및 후보들로부터 라인을 검출하는 방법을 설명한다.
자코비안 행렬은 i=4, j=5일 때 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000064
자코비안 행렬은 i=1, j=8일 때 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000065
연관 행렬은 i=4, j=5일 때 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000066
연관 행렬은 i=1, j=8일 때 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000067
픽셀 i=4, j=5일때 그래디언트의 벡터의 분산은 상기 값을 대입하여 다음과 같이 도출 가능하다.
Figure PCTKR2020007639-appb-I000068
픽셀 i=1, j=8일때 그래디언트의 벡터의 분산은 상기 값들을 대입하여 다음과 같이 도출 가능하다.
Figure PCTKR2020007639-appb-I000069
Figure PCTKR2020007639-appb-I000070
즉, i=4, j=5일 때의 단일 각도 차이의 분산은 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000071
i=1, j=8일 때 단일 각도 차이의 분산은 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000072
이하에서는 상기에서 구한 값을 통해 SNR 값을 구하여, 기존의 방법인 2차 미분에 기반한 라인 검출 방법과 성능을 비교한다.
본 발명에 따른 라인 검출 방법에서의 성능 비교와 2차 미분 방식을 기반으로 한 라인 검출의 단순화를 위해, 수직 방향을 따라 폭 w로 정렬 된 라인이 사용된다.
그 다음, 라인은 라인의 중심으로부터 각각 1 픽셀 좌측 및 우측에 위치하는 픽셀 i 및 j에서 다음의 그래디언트 값을 갖는 것으로 가정한다.
Figure PCTKR2020007639-appb-I000073
그 후, 라인의 중심에서, 열 방향의 그래디언트 각도 차이의 표준 편차는 다음과 같이 유도된다.
Figure PCTKR2020007639-appb-I000074
그 후, 라인의 중심에서, 오른쪽 아래 대각선 방향의 그래디언트 각도 차이의 표준 편차는 (61) 및 (62)를 통해 다음과 같이 유도된다.
Figure PCTKR2020007639-appb-I000075
본 발명에서의 첫 번째 문단에서 가정된 라인 모델의 경우, 각도 차이에 기반한 라인 신호의 강도는
Figure PCTKR2020007639-appb-I000076
이다. 따라서 수평 방향의 각도 차이의 SNR은 다음과 같이 유도된다.
Figure PCTKR2020007639-appb-I000077
또한, 오른쪽 아래 대각선 방향의 각도 차이의 SNR은 다음과 같이 유도된다.
Figure PCTKR2020007639-appb-I000078
본 발명에 따른 라인 검출 방법에서의 성능 검증 역시 전술한 바와 같이 1차 미분의 그래디언트 각도 차와 1차 미분의 SNR의 조합을 기반으로 하여 측정된다.
따라서 도 12의 4번째 및 5번째 픽셀의 그래디언트를 사용하는 라인 검출을 위해 조합된 SNR은 다음과 같이 모델링 된다.
Figure PCTKR2020007639-appb-I000079
추가적으로, 도 12의 1번째 및 8번째 픽셀의 그래디언트를 사용하는 라인 검출을 위해 조합된 SNR은 다음과 같이 모델링 된다.
Figure PCTKR2020007639-appb-I000080
또한 상기 수식들에 페널티 함수를 적용하면 각각 이하와 같이 나타낼 수 있다.
Figure PCTKR2020007639-appb-I000081
Figure PCTKR2020007639-appb-I000082
따라서 도 12에서의 모든 네 쌍의 그래디언트 각도 차이의 합에 대해 페널티 함수를 적용한 SNR 값은 다음과 같이 모델링 될 수 있다.
Figure PCTKR2020007639-appb-I000083
도 12에서의 픽셀 1 및 픽셀 8에서의 그래디언트 쌍과, 픽셀 3 및 픽셀 6에서의 그래디언트 쌍 사이의 대칭 때문에
Figure PCTKR2020007639-appb-I000084
가 성립되며, 도 12에서의 픽셀 2와 픽셀 7에서의 그래디언트는 가정된 라인 모델에 대해 0이기 때문에
Figure PCTKR2020007639-appb-I000085
이 성립된다.
따라서 최종적으로 가정된 라인 모델을 검출하기 위한 검출 방법에서의 SNR 값은 다음과 같이 나타난다.
Figure PCTKR2020007639-appb-I000086
SGAD에 기초한 라인 검출의 성능을 조사하기 위해, SNR의 그래픽 플롯이 다음과 같이 사용된다. 다음의 SNR 값은 노이즈 계수 0.1, 블러링 계수 1.0으로 적용된다.
도 14(a) 내지 도 14(b)는 도 13에 따른 그래디언트 각도 쌍의 SNRPS를 나타내는 도면이다. 이에 따르면 그래디언트 각도 차이의 쌍의 SNR은 스무딩 계수가 낮은 상태 및 라인 폭이 8 정도까지의 범위에서 높은 값을 가지는 것을 알 수 있다.
도 15(a) 내지 도 15(b)는 도 13에 따른 그래디언트 각도 쌍의 미분값의 SNRPS를 나타내는 도면이다. 도 15(a)에 따르면 픽셀 4, 5 사이의 값보다 픽셀 1, 8 사이의 값이 약간 높게 나타나며, 이는 1, 8 사이의 그래디언트 상관 관계가 4, 8 사이의 그래디언트 상관 관계보다 낮기 때문이다.
도 16에 나타난 차이는, 본 발명에 따른 라인 검출 방법과 2차 미분에 의한 라인 검출 방법의 SNRPS 값의 차이를 나타낸다. 도 16에 따르면 다양한 스무딩 계수와 라인 조건 하에서 SGAD를 기준으로 한 라인 검출은 SD를 기반으로 한 라인 검출보다 높은 SNR 값을 가진다. 스무딩 계수가 1.0일 때, SGAD를 기반으로 한 라인 검출의 장점은 라인의 두께가 8 픽셀 이하의 범위에서 명확하게 나타난다.
도 17은 본 발명에 따른 라인 검출 방법과 에지 검출을 이용한 간접 라인 검출 방법의 SNRPS 값의 차이를 나타낸다. 도 17에 따르면 SGAD를 기반으로 한 라인 검출은 라인이 상대적으로 넓지 않은 경우 훨씬 효과적으로 라인을 검출할 수 있음이 개시된다.
상기에서는, 본 발명에 따른 라인 검출 방법이 기존의 방법에 비해 효과적으로 라인 검출이 가능함을 증명하였다. 이하에서는 전술한 바에 따라 그래디언트 각도 차이의 합을 이용하여 실제 라인으로 판단하는 과정에 대해 설명한다.
본 발명에서 그래디언트 각도 차이의 합을 기반으로 한 라인 검출을 구현하기 위한 다음 단계는 픽셀이 라인 픽셀로 분류될 수 있도록 픽셀에 대한 그래디언트 각도 차이의 최소값을 이용하여 라인으로 판단할 수 있는 범위의 임계값을 찾을 수 있다. 다양한 그래디언트 각도의 조합으로 라인 픽셀에 적용할 수 있는 최적의 임계값을 찾기 위해 다양한 각도 조합 하에서 그래디언트 각도 차이의 표준 편차를 조사한다.
도 18(a)는 변화하는 그래디언트 각도의 조합에 대한 그래디언트 각도 차이의 가능한 모든 값을 도시한다. 그래디언트 각도의 조합에 대해, 그래디언트 각도 차이의 표준 편차는 스무딩 계수가 간격이 0.1로 0.4에서 10까지이고, w가 0.5에서 20 사이의 간격으로 간격이 0.1인 경우에 대해 조사된다. 도 18(b) 및 (c)는 노이즈 계수가 0.5, 블러링 계수가 1.0, 스무딩 계수가 1.0, 폭이 4.0인 조건 하에서 테스트된다.
스무딩 계수와 선폭 w의 각 조합에 대해 최적의 임계값이 검색된다. 각각의 조합에 대해 검색은 임계값이
Figure PCTKR2020007639-appb-I000087
로 시작하여 0.0으로 끝난다. 이러한 과정에서 그래디언트 각도 차이에 의해 계산된 신호 강도와 그래디언트 각도 차이의 표준 편차에 의해 계산된 노이즈 강도가
Figure PCTKR2020007639-appb-I000088
에서 특정 값까지의 임계 값에 대해 누적된다. 그런 다음, 스무딩 계수와 선폭 w의 특정 조합에 대해, 최적의 임계값은 누적된 신호 강도와 누적된 노이즈 강도 사이의 차이의 피크를 발견함으로써 결정된다.
도 19는 스무딩 계수와 w의 조합의 몇 가지 경우를 도시한다. 도 19에 도시된 바와 같이 최적의 임계값은 스무딩 계수와 w의 변화에 따라 변화될 수 있는 값이다. 스무딩 계수와 w의 다양한 조합에 대한 최적 임계 값의 변화는 각각 열 방향과 대각선 방향의 각도 차이에 대해 나타난다. 도 19 및 도 20에서의 결과에 나타난 바와 같이, 두 가지 각도 분포에 대한 최적의 임계값은 서로 매우 유사하게 나타날 수 있다.
그래디언트 각도 차이의 합의 최적의 임계값은 최종적으로 스무딩 계수와 w의 모든 조합에서 라인 검출을 불가능하게 하는 조합인
Figure PCTKR2020007639-appb-I000089
를 생성하는 경우를 제외하고
Figure PCTKR2020007639-appb-I000090
에 대한 최적 임계값의 평균과
Figure PCTKR2020007639-appb-I000091
에 대한 최적 임계값의 2배를 더한 값을 통해 계산된다. 일 예시에 따르면 k = 1, 블러링 계수는 1.0, 노이즈 계수는 0.05의 경우, SGAD의 최적의 임계값은 3.6766 (rad) 인 것으로 나타난다.
즉 본 발명에 따른 그래디언트 각도 차이의 합의 임계값에 있어서, 최적의 값은
Figure PCTKR2020007639-appb-I000092
보다 조금 더 큰 값인 3.6766에 해당할 수 있다. 그러나 최대로 나타날 수 있는 그래디언트 각도 차이의 합은
Figure PCTKR2020007639-appb-I000093
에 해당하는 바, 그래디언트 각도 차이의 합의 범위는
Figure PCTKR2020007639-appb-I000094
내지
Figure PCTKR2020007639-appb-I000095
인 경우일 때, 라인 후보로 검출할 수 있다.
본 발명에 따른 라인 검출 방법의 마지막 단계는, 라인의 후보로 검출된 픽셀들 중 실제로 라인으로 판단할 수 있는 픽셀을 선택하는 방법에 대해 설명한다.
라인이 위치하는 후보로 분류 된 픽셀은 릿지(Ridge) 혹은 밸리(valley)로 구분할 수 있다.
릿지(Ridge)는 해당 픽셀에서의 강도가 이웃한 픽셀의 강도보다 큰 픽셀을 의미하며, 밸리(valley)는 해당 픽셀에서의 강도가 이웃한 픽셀의 강도보다 작은 픽셀을 의미한다. 픽셀을 릿지 혹은 밸리로 분류하는 단계는 그래디언트와 두 커널의 컨볼루션의 합을 기준으로 하여 계산될 수 있다.
제1 커널 및 제2 커널은 다음과 같이 정의될 수 있다.
Figure PCTKR2020007639-appb-I000096
즉 임의의 위치인 (r,c)에서의 라인 픽셀이 릿지인지 혹은 밸리인지를 판단하는 수식은 다음과 같이 도출된다.
Figure PCTKR2020007639-appb-I000097
여기서,
Figure PCTKR2020007639-appb-I000098
Figure PCTKR2020007639-appb-I000099
는 각각 행 방향 및 열 방향의 그래디언트를 포함하는 이미지를 의미한다. 해당 라인 픽셀에서의
Figure PCTKR2020007639-appb-I000100
가 양수이면 릿지로 분류하며, 해당 라인 픽셀에서의
Figure PCTKR2020007639-appb-I000101
가 음수이면 밸리로 분류한다.
상기와 같이 라인 후보로 정해진 픽셀들에 대한 분류가 끝나면, 이전에 구한 그래디언트 각도 차이의 합의 절대값이 인접한 픽셀의 절대값과 비교하여 최대값이 아닌 라인 픽셀을 제거하기 위한 처리가 수행될 수 있다.
즉, 억제 처리는 중심 라인에 대한 픽셀에서 같은 분류를 가지는 인접 픽셀에 대해서만 수행된다. 또한, 억제 처리는 헤시안 행렬(Hessian matrix)의 최대 고유치에 해당하는 고유 벡터로부터 결정되는 최대 곡률 방향을 사용하여 계산될 수 있다.
최대 곡률 방향으로부터 45도 이내의 인접 픽셀의 그래디언트 각도 차이의 합이 중심 픽셀의 그래디언트 각도 차이의 합보다 큰 경우, 중심 픽셀은 제거된다. 즉 검출된 라인의 후보에서 제거된다.
이와 같이 같은 분류를 가지는 픽셀에 대해서만 억제 처리를 수행하여 라인 후보 여부를 판단함으로써, 같은 경향성을 가지는 라인에 대한 검출을 효과적으로 수행하는 것이 가능하다.
도 21은 실험 대상이 되는 원본 이미지이다.
본 발명에 따른 픽셀에 대해서 릿지인지 밸리인지 여부를 판단하고, 같은 특성을 가지는 픽셀들에 대해 같은 라인으로 판단할 수 있다.
도 22는 원본 이미지에 대한 라인 검출 결과를 2차 미분에 의한 결과와 본 발명에 따른 라인 검출 방법에 따른 결과를 각각 나타내는 도면이다.
도 22에 따르면 제1 열은 원본 이미지, 제2 열은 2차 미분에 의한 라인 검출 결과, 제3 열은 본 발명에 의한 라인 검출 결과를 나타낸다.
즉 기존의 2차 미분에 의한 결과에 비해 깔끔하고, 선폭이 넓은 경우에도 보다 선명하게 라인이 검출될 수 있음을 확인할 수 있다.
본 발명은 영상처리와 관련된 분야에 범용적으로 사용이 가능한 효과가 있다. 본 발명은 영상처리 혹은 컴퓨터 비전을 사용하는 산업분야에서 활용될 수 있다.
본 발명의 실시예에 따른 라인 검출 방법은 적어도 하나의 프로세서(Processor)와, 메모리(memory)를 포함하는 장치에 의해 수행될 수 있다. 라인 검출 방법을 구성하는 단계들은 프로세서에 의해 실행될 수 있다. 메모리에는 에지 위치결정 방법의 각 단계를 실행하기 위한 프로그램이 기록될 수 있다. 프로세서는 중앙처리장치(CPU; Central Processing Unit), 그래픽처리장치(GPU; Graphic Processing Unit), 범용그래픽처리장치(GPGPU; General Purpose Graphic Processing Unit) 등으로 구성될 수 있다.
이상의 실시예들은 본 발명의 이해를 돕기 위하여 제시된 것으로, 본 발명의 범위를 제한하지 않으며, 이로부터 다양한 변형 가능한 실시예들도 본 발명의 범위에 속하는 것임을 이해하여야 한다. 본 발명의 기술적 보호범위는 특허청구범위의 기술적 사상에 의해 정해져야 할 것이며, 본 발명의 기술적 보호범위는 특허청구범위의 문언적 기재 그 자체로 한정되는 것이 아니라 실질적으로는 기술적 가치가 균등한 범주의 발명까지 미치는 것임을 이해하여야 한다.

Claims (11)

  1. 이미지 또는 영상에서 라인을 검출하는 방법에 있어서,
    영상을 스무딩하는 단계;
    상기 라인을 검출하고자 하는 영역을 선택하는 단계;
    상기 선택한 영역에서 중심 픽셀을 결정하는 단계;
    상기 중심 픽셀을 중심으로 한 윈도우를 장착하는 단계;
    상기 중심 픽셀을 둘러싸는 픽셀들의 그래디언트 각도 차이의 합을 검출하는 단계;
    를 포함하는 라인 검출 방법.
  2. 제1항에 있어서,
    상기 라인 검출 방법은
    상기 중심 픽셀을 중심으로 서로 마주하는 픽셀들의 그래디언트 각도 차이의 합을 검출하는 라인 검출 방법.
  3. 제2항에 있어서,
    상기 검출된 합의 결과 값이 특정 값 이상인 경우 상기 영역이 포함하는 부분을 라인 후보로 판단하는 단계; 를 포함하는 라인 검출 방법.
  4. 제3항에 있어서,
    상기 특정 값은
    Figure PCTKR2020007639-appb-I000102
    내지
    Figure PCTKR2020007639-appb-I000103
    인 라인 검출 방법.
  5. 제3항에 있어서,
    상기 윈도우는 3X3의 윈도우인 라인 검출 방법.
  6. 제3항에 있어서,
    상기 라인 검출 방법은
    상기 라인 후보로 판단된 중심 픽셀을 릿지(ridge) 또는 밸리(valley)로 분류하는 단계; 및
    비최대값 픽셀을 제거하는 단계;를 더 포함하는 라인 검출 방법.
  7. 제6항에 있어서,
    동일한 분류에 해당하는 픽셀들에 대해 라인을 선택하는 단계;를 포함하는 라인 검출 방법.
  8. 제7항에 있어서,
    상기 비최대값 픽셀을 제거하는 단계는,
    상기 중심 픽셀의 분류가 동일한 분류에 해당되는 인접한 픽셀들에 대해 그래디언트 각도 차이의 합을 계산하는 단계; 를 포함하는 라인 검출 방법.
  9. 제8항에 있어서,
    상기 비최대값 픽셀을 제거하는 단계는,
    상기 인접한 픽셀의 그래디언트 각도 차이의 합과, 중심 픽셀의 그래디언트 각도 차이의 합을 비교하여 판단하는 라인 검출 방법.
  10. 제9항에 있어서,
    상기 중심 픽셀의 그래디언트 각도 차이의 합이 인접 픽셀들의 그래디언트 각도 차이의 합보다 큰 경우 상기 중심 픽셀을 라인으로 선택하는 라인 검출 방법.
  11. 제1항 내지 제10항 중 어느 한 항에 있어서,
    어느 한 항의 라인 검출 방법을 실행시키는 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체.
PCT/KR2020/007639 2019-06-14 2020-06-12 라인 검출 방법 WO2020251299A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/619,050 US20220383506A1 (en) 2019-06-14 2020-06-12 Line detection method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190070671A KR102205325B1 (ko) 2019-06-14 2019-06-14 라인 검출 방법
KR10-2019-0070671 2019-06-14

Publications (1)

Publication Number Publication Date
WO2020251299A1 true WO2020251299A1 (ko) 2020-12-17

Family

ID=73781825

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/007639 WO2020251299A1 (ko) 2019-06-14 2020-06-12 라인 검출 방법

Country Status (3)

Country Link
US (1) US20220383506A1 (ko)
KR (1) KR102205325B1 (ko)
WO (1) WO2020251299A1 (ko)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030055B (zh) * 2023-03-29 2023-07-11 凯尔菱电(山东)电梯有限公司 一种电梯相关配件质量检测方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010032809A (ko) * 1997-12-08 2001-04-25 피터 엔. 데트킨 신규한 에지-검출 기초 노이즈 제거 알고리듬
KR100736356B1 (ko) * 2006-08-25 2007-07-06 엠텍비젼 주식회사 이미지의 에지 검출 장치 및 그 방법, 선명도 강조 장치 및그 방법, 이를 수행하는 프로그램이 기록된 기록 매체
KR20110042781A (ko) * 2009-10-20 2011-04-27 삼성전자주식회사 영상처리장치 및 영상처리방법
KR20150108303A (ko) * 2014-02-22 2015-09-25 시아오미 아이엔씨. 직선검출방법, 장치, 프로그램 및 저장매체
JP2017224110A (ja) * 2016-06-14 2017-12-21 トヨタ自動車株式会社 物体判別装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10152780B2 (en) * 2015-11-02 2018-12-11 Cognex Corporation System and method for finding lines in an image with a vision system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010032809A (ko) * 1997-12-08 2001-04-25 피터 엔. 데트킨 신규한 에지-검출 기초 노이즈 제거 알고리듬
KR100736356B1 (ko) * 2006-08-25 2007-07-06 엠텍비젼 주식회사 이미지의 에지 검출 장치 및 그 방법, 선명도 강조 장치 및그 방법, 이를 수행하는 프로그램이 기록된 기록 매체
KR20110042781A (ko) * 2009-10-20 2011-04-27 삼성전자주식회사 영상처리장치 및 영상처리방법
KR20150108303A (ko) * 2014-02-22 2015-09-25 시아오미 아이엔씨. 직선검출방법, 장치, 프로그램 및 저장매체
JP2017224110A (ja) * 2016-06-14 2017-12-21 トヨタ自動車株式会社 物体判別装置

Also Published As

Publication number Publication date
US20220383506A1 (en) 2022-12-01
KR102205325B1 (ko) 2021-01-21
KR20200143597A (ko) 2020-12-24

Similar Documents

Publication Publication Date Title
WO2020050499A1 (ko) 객체 정보 획득 방법 및 이를 수행하는 장치
WO2015152692A1 (ko) 차량 주변 이미지 생성 장치 및 방법
WO2017188706A1 (ko) 이동 로봇 및 이동 로봇의 제어방법
WO2020141657A1 (ko) 신체 측정 디바이스 및 그 제어 방법
WO2018062647A1 (ko) 정규화된 메타데이터 생성 장치, 객체 가려짐 검출 장치 및 그 방법
WO2012064106A2 (en) Method and apparatus for video stabilization by compensating for view direction of camera
WO2015030343A1 (en) Optical element rotation type mueller-matrix ellipsometer and method for measuring mueller-matrix of sample using the same
WO2016122042A9 (ko) 인공위성 영상과 랜덤포레스트 분류기 결합을 이용한 자동 하천 검출 시스템 및 방법
WO2015102391A1 (ko) 뎁스 영상 분석을 통한 사용자의 골프 스윙 자세 분석을 위한 영상 생성 방법과 이를 이용한 골프 스윙 자세 분석 방법 및 장치
WO2019117453A1 (ko) 측정 대상 물체의 3차원 형상 정보를 생성하는 방법, 결함 검출 방법 및 결함 검출 장치
WO2016145602A1 (en) Apparatus and method for focal length adjustment and depth map determination
WO2019047378A1 (zh) 星体快速识别方法、装置及望远镜
WO2022055194A1 (ko) 스캔 거울과 트랜슬레이션 스테이지를 사용한 플라잉 오버 빔 패턴 스캐닝 홀로그램 현미경 장치
WO2015183050A1 (ko) 옵티컬 트래킹 시스템 및 옵티컬 트래킹 시스템의 마커부 자세 및 위치 산출방법
WO2020004837A1 (ko) 자동 편광 조절 장치 및 방법
WO2016088960A1 (ko) 야간 환경에서의 운전자 보조 시스템을 위한 위험 보행자 검출 방법 및 시스템
WO2020116680A1 (ko) 차량 번호판 검출 및 인식 시스템 및 방법
WO2020251299A1 (ko) 라인 검출 방법
WO2016206107A1 (en) System and method for selecting an operation mode of a mobile platform
EP4320472A1 (en) Device and method for predicted autofocus on an object
WO2021125903A1 (en) Wearable device including eye tracking apparatus and operation method of the wearable device
WO2018070844A1 (ko) 에지 모델링을 위한 에지 블러 설정 방법
WO2015199354A1 (ko) 인접 합산 이진화를 이용한 동공 추출 방법 및 이를 이용한 동공 추출 제어장치
WO2021040156A1 (ko) 신체 측정 디바이스 및 그 제어 방법
WO2014178610A1 (ko) 옵티컬 트랙킹 시스템 및 이를 이용한 트랙킹 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20823514

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20823514

Country of ref document: EP

Kind code of ref document: A1