edge-detection

Corner detection algorithm gives very high value for slanted edges?

故事扮演 提交于 2021-02-10 07:44:51
问题 I have tried implementing a basic version of shi-tomasi corner detection algorithm. The algorithm works fine for corners but I came across a strange issue that the algorithm also gives high values for slanted(titled) edges. Here's what i did Took gray scale image computer dx, and dy of the image by convolving it with sobel_x and sobel_y Took a 3 size window and moved it across the image to compute the sum of the elements in the window. computed sum of the window elements from the dy image and

Blurry edge detection

可紊 提交于 2021-02-08 15:10:56
问题 I have little background knowledge of image processing and recognition. I am trying to detect principal edges/grayscale transitions on a grayscale image such as a portrait. The problem is that on some parts, the edge is blurred (because of focus). I am using Canny edge detector with multiple thresholds, but I can never detect those edges (chin, clothes, ears, side of the face, ...) Original image: This is the result I am getting: beard, sharp edges This is what features I'm interested in:

Blurry edge detection

泪湿孤枕 提交于 2021-02-08 15:10:46
问题 I have little background knowledge of image processing and recognition. I am trying to detect principal edges/grayscale transitions on a grayscale image such as a portrait. The problem is that on some parts, the edge is blurred (because of focus). I am using Canny edge detector with multiple thresholds, but I can never detect those edges (chin, clothes, ears, side of the face, ...) Original image: This is the result I am getting: beard, sharp edges This is what features I'm interested in:

How to segment blood vessels python opencv

大城市里の小女人 提交于 2021-02-06 10:54:51
问题 I am trying to segment the blood vessels in retinal images using Python and OpenCV. Here is the original image: Ideally I want all the blood vessels to be very visible like this (different image): Here is what I have tried so far. I took the green color channel of the image. img = cv2.imread('images/HealthyEyeFundus.jpg') b,g,r = cv2.split(img) Then I tried to create a matched filter by following this article and this is what the output image is: Then I tried doing max entropy thresholding:

How to segment blood vessels python opencv

ぐ巨炮叔叔 提交于 2021-02-06 10:53:18
问题 I am trying to segment the blood vessels in retinal images using Python and OpenCV. Here is the original image: Ideally I want all the blood vessels to be very visible like this (different image): Here is what I have tried so far. I took the green color channel of the image. img = cv2.imread('images/HealthyEyeFundus.jpg') b,g,r = cv2.split(img) Then I tried to create a matched filter by following this article and this is what the output image is: Then I tried doing max entropy thresholding:

finding edge in tilted image with Canny

我们两清 提交于 2021-01-29 13:25:02
问题 I'm trying to find the tilt angle in a series of images which look like the created example data below. There should be a clear edge which is visible by eye. However I'm struggling in extracting the edges so far. Is Canny the right way of finding the edge here or is there a better way of finding the edge? import cv2 as cv import numpy as np import matplotlib.pyplot as plt from scipy.ndimage.filters import gaussian_filter # create data xvals = np.arange(0,2000) yvals = 10000 * np.exp((xvals -

Edge Detection with Lockbits C#

a 夏天 提交于 2021-01-29 03:48:50
问题 I made a program that implements an edge detection algorithm, but it takes a long time to process. I've read about using lockbits, and unsafe state instead of getpixel and setpixel, but I still don't understand how to use it. This is my example code: private Bitmap SobelEdgeDetect(Bitmap original) { Bitmap b = original; Bitmap bb = original; int width = b.Width; int height = b.Height; int[,] gx = new int[,] { { -1, 0, 1 }, { -2, 0, 2 }, { -1, 0, 1 } }; int[,] gy = new int[,] { { 1, 2, 1 }, {

Can Canny in OpenCV deal with both grayscale and color images?

假装没事ソ 提交于 2021-01-26 04:21:20
问题 I have some questions about the Canny edge detector in OpenCV . Here is the code I tried. def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged = cv2.Canny(image, lower, upper) then, ##### first situation ##### img = cv2.imread('mango.jpg') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) auto = auto_canny(gray) cv2.imwrite('mango_gray_edge.jpg', auto) In this situation, I got an image like this: ##### second

Can Canny in OpenCV deal with both grayscale and color images?

断了今生、忘了曾经 提交于 2021-01-26 04:17:17
问题 I have some questions about the Canny edge detector in OpenCV . Here is the code I tried. def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged = cv2.Canny(image, lower, upper) then, ##### first situation ##### img = cv2.imread('mango.jpg') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) auto = auto_canny(gray) cv2.imwrite('mango_gray_edge.jpg', auto) In this situation, I got an image like this: ##### second

Can Canny in OpenCV deal with both grayscale and color images?

回眸只為那壹抹淺笑 提交于 2021-01-26 04:17:12
问题 I have some questions about the Canny edge detector in OpenCV . Here is the code I tried. def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged = cv2.Canny(image, lower, upper) then, ##### first situation ##### img = cv2.imread('mango.jpg') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) auto = auto_canny(gray) cv2.imwrite('mango_gray_edge.jpg', auto) In this situation, I got an image like this: ##### second