edge-detection

Applying the Sobel filter using scipy

╄→гoц情女王★ 提交于 2019-12-03 02:46:53
I'm trying to apply the Sobel filter on an image to detect edges using scipy. I'm using Python 3.2 (64 bit) and scipy 0.9.0 on Windows 7 Ultimate (64 bit). Currently my code is as follows: import scipy from scipy import ndimage im = scipy.misc.imread('bike.jpg') processed = ndimage.sobel(im, 0) scipy.misc.imsave('sobel.jpg', processed) I don't know what I'm doing wrong, but the processed image does not look anything like what it should. The image, 'bike.jpg' is a greyscale (mode 'L' not 'RGB') image so each pixel has only one value associated with it. Unfortunately I can't post the images here

Robust card detection/persecutive correction OpenCV

血红的双手。 提交于 2019-12-03 02:28:53
问题 I currently have a method for detecting a card in an image and for the most part it works when the lighting is fairly consistent and the background is very calm. Here is the code I am using to preform this operation: Mat img = inImg.clone(); outImg = Mat(inImg.size(), CV_8UC1); inImg.copyTo(outImg); Mat img_fullRes = img.clone(); pyrDown(img, img); Mat imgGray; cvtColor(img, imgGray, CV_RGB2GRAY); outImg_gray = imgGray.clone(); // Find Edges // Mat detectedEdges = imgGray.clone();

A good approach for detecting lines in an image?

旧巷老猫 提交于 2019-12-03 01:58:20
问题 I've written some code that uses OpenCV libraries to detect white lines painted on grass. I need someone's opinion on the approach I used (as I'm sure there's a much better way than mine). Also, the results I'm getting are not as good as I expected because slight variations in the image require tweaking the parameters (and I need to operate on fixed parameters). My approach so far: Grab image from webcam (and turn into grayscale obviously) Run it through a threshold filter (using THRESH_TO

How to control node placement in graphviz (i.e. avoid edge crossings)

帅比萌擦擦* 提交于 2019-12-03 01:37:53
问题 I'm using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjacent node. Is there a way to restrain node placement to a certain area? 回答1: I'm not aware of any means by which to control the placement of individual nodes. It doesn't really make sense, because in order to do that you'd need to know what the final graph will look like, yet placing one node manually would then change

Best articles to start learning about edge detection/image recognition

拈花ヽ惹草 提交于 2019-12-03 00:58:23
问题 I am involved in a personal project which will require pretty extensive knowledge of edge detection and image segmentation/object recognition. I know the importance of planning/understanding before writing code and with this in mind, what is the best place to start, to learn about these areas of computing? I am ideally looking for online articles/papers. Thanks 回答1: I found the series by Christian Graus on Code Project to be useful: Image Processing for Dummies with C# and GDI+ Part 1 - Per

How to determine edges in an image optimally?

雨燕双飞 提交于 2019-12-02 21:55:55
问题 I recently was put in front of the problem of cropping and resizing images. I needed to crop the 'main content' of an image for example if i had an image similar to this: (source: msn.com) the result should be an image with the msn content without the white margins(left& right). I search on the X axis for the first and last color change and on the Y axis the same thing. The problem is that traversing the image line by line takes a while..for an image that is 2000x1600px it takes up to 2

extract lines from canny edge detection

此生再无相见时 提交于 2019-12-02 19:45:24
In openCV after applying canny edge detection I'd like to further process the result (show only horizontal lines, remove short lines, etc..). But the result of canny is just another image. I'd like to get an array of lines describing the detected edges I'm aware of the famous Hough Line Transform , but the result is not always good, that's why I'd like to manually process canny result. input: output canny only: output canny then Hough line transform This is Hough line transform result(red lines) for detecting edges of stairs. 4th line from below is not detected correctly, although canny edge

Sobel Edge Detection in Android

邮差的信 提交于 2019-12-02 19:42:48
As part of an application that I'm developing for Android I'd like to show the user an edge-detected version of an image they have taken (something similar to the example below). To achieve this I've been looking at the Sobel operator and how to implement it in Java. However, many of the examples that I've found make use of objects and methods found in AWT ( like this example ) that isn't part of Android. My question is then really, does Android provide any alternatives to the features of AWT that have been used in the above example? If we were to rewrite that example just using the libraries

How to control node placement in graphviz (i.e. avoid edge crossings)

空扰寡人 提交于 2019-12-02 16:53:16
I'm using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjacent node. Is there a way to restrain node placement to a certain area? I'm not aware of any means by which to control the placement of individual nodes. It doesn't really make sense, because in order to do that you'd need to know what the final graph will look like, yet placing one node manually would then change how the rest of the graph is rendered. I solved this problem by changing the order in which my nodes are

How to classify blurry numbers with openCV

邮差的信 提交于 2019-12-02 16:44:57
I would like to capture the number from this kind of picture. I tried multi-scale matching from the following link. http://www.pyimagesearch.com/2015/01/26/multi-scale-template-matching-using-python-opencv/ All I want to know is the red number. But the problem is, the red number is blurry for openCV recognize/match template. Would there be other possible way to detect this red number on the black background? Classifying Digits You clarified in comments that you've already isolated the number part of the image pre-detection, so I'll start under that assumption. Perhaps you can approximate the