Edge detecting method
Abstract
There is provided an edge detecting method, which is capable of preventing a noise influence caused by imaging device and a color interpolation. The edge detecting method includes the steps of: setting a first kernel based on a center pixel in pixel data arranged in a mosaic structure; setting a second kernel based on the center pixel within the first kernel; detecting whether a pixel having a green value in the second kernel is a defective pixel, and correcting the pixel; converting all pixels of the second kernel into pixels having green value; calculating a slope value by using a mask for detecting an edge in the second kernel; and detecting an edge by adding the slope value to a luminance value obtained by a color space conversion.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. An edge detecting method comprising the steps of:
a) setting a first kernel based on a center pixel in pixel data arranged in a mosaic structure;
b) setting a second kernel based on the center pixel within the first kernel;
c) detecting whether a pixel having a green value in the second kernel is a defective pixel, and, if defective, correcting the pixel;
d) converting all pixels of the second kernel into pixels having green value values;
e) calculating a slope value by using a mask for detecting an edge in the second kernel; and
f) detecting an edge by adding the slope value to a luminance value obtained by a color space conversion.
2. The edge detecting method as recited in claim 1 , wherein the first kernel is a 5×5 kernel and the second kernel is a 3×3 kernel.
3. The edge detecting method as recited in claim 1 , further comprising the step of:
prior to the step d), determining whether all pixels of the second kernel have the G value green values.
4. The edge detecting method as recited in claim 3 , further comprising the steps of:
checking whether the pixel having the G value among the pixels a pixel of the second kernel having the green values is a defective pixel or a noise; and
correcting a luminance value of the corresponding a defective or noise pixel.
5. The edge detecting method as recited in claim 4 , wherein the step of correcting the luminance value of the corresponding defective or noise pixel includes the steps of:
setting first and second threshold values according to a luminance value of the center pixel so as to determine whether the center pixel having the G green value in the second kernel is distorted or not;
calculating a difference in luminance values of the center pixel and a pixel having the same G green value;
comparing the difference with the first threshold value;
if the difference is smaller than the first threshold value, increasing a count value representing the number of pixels having the same color characteristic as the center pixel;
determining whether there exists a pixel having the same color characteristic in a position adjacent to the center pixel;
if there is no pixel having the same color characteristic, determining whether a count value representing the number of adjacent pixels whose difference in the luminance value from the center pixel is larger than the first threshold value is zero; and
if the count value is zero, making an edge zero and setting a next 3×3 kernel.
6. The edge detecting method as recited in claim 5 , further comprising the steps of:
if the difference in the luminance value is larger than the first threshold value, increasing the count value representing the number of adjacent pixels whose difference in the luminance value from the center pixel is larger than the first threshold value.
7. The edge detecting method as recited in claim 5 , further comprising the steps of:
if the count value representing the number of the adjacent pixels whose difference in the luminance value from the center pixel is larger than the first threshold value is not zero, determining whether the count number value representing the number of the adjacent pixels larger than the first threshold value is equal to the count value representing the number of the pixel having the same color characteristic as the center pixel and whether the differences in the luminance values of the center pixel and the pixel having the same G green value; and
if the condition is satisfied, multiplying a weight value by the luminance value of the center pixel according to the distortion of using distorted luminance values of derived from pixels arranged in a previous row.
8. The edge detecting method as recited in claim 7 , further comprising the step of:
if the condition is not satisfied, setting the edge to 1 and setting a next second kernel.
9. The edge detecting method as recited in claim 1 , wherein the slope value is calculated using a Laplacian filter.
10. The edge detecting method as recited in claim 1 , wherein a median filter or an average value is used in the step d).
11. A method for operating an image sensor comprising:
setting a first kernel about a target pixel of an image; setting a second kernel within the first kernel, wherein the second kernel is configured about the target pixel; determining whether the target pixel is a green pixel; correcting the target pixel if it is green and defective; interpolating an effective green value for all non-green pixels of the second kernel using green values of green pixels adjacent each respective non-green pixel; and using the green values and the effective green values of the second kernel to detect an edge of the image.
12. The method of claim 11, wherein the first kernel is configured so that the target pixel is centrally disposed within the first kernel.
13. The method of claim 11, wherein the second kernel is configured so that the target pixel is centrally disposed within the second kernel.
14. The method of claim 11, wherein said correcting the target pixel comprises correcting the target pixel if it is green and defective or green and noise.
15. The method of claim 11, wherein said step of using the green values and the effective green values of the second kernel to detect the edge of the image comprises calculating a slope value using a mask for detecting an edge in the second kernel using the green values and the effective green values of the second kernel.
16. The method of claim 15, wherein the step of using the green values and effective green values of the second kernel to detect the edge of the image comprises detecting the edge by adding the slope value to a luminance value obtained by a color space conversion operation.
17. A method comprising:
setting a first kernel and a second kernel, wherein a green pixel is located in the first and second kernels, and wherein the second kernel is configured within the first kernel; setting first and second threshold values based on a luminance value of the green pixel; determining whether the luminance value of the green pixel exceeds the second threshold value; adjusting the first threshold value if the luminance value of the green pixel does not exceed the second threshold value; determining a first luminance difference value between the green pixel and one or more green pixels of the second kernel; increasing a first count value if the first luminance difference is greater than the first threshold value; increasing a second count value; and using the first count value and the second count value to determine whether the green pixel needs correction.
18. The method of claim 17, wherein the first kernel is configured so that the target pixel is centrally disposed within the first kernel.
19. The method of claim 17, wherein the second kernel is configured so that the target pixel is centrally disposed within the second kernel.
20. The method of claim 17, further comprising:
correcting the target pixel if it is green and needs correction; interpolating an effective green value for all non-green pixels of the second kernel using green values of green pixels adjacent each respective non-green pixel; and using the green values and the effective green values of the second kernel to detect the edge of an image.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.