edge-detection

How to use Chamfer Matching algorithm for finding 'Similar Images'

泄露秘密 提交于 2019-11-30 09:10:36
I would like to ask for more information on how Chamfer Matching algorithm (an edge matching algorithm) can be used to find 'similar' images. I would like to know if it is possible to place a 'score' for the matched results. Rudi The Chamfer Matching Algorithm basically calculates the distance (dis-similarity) between two images. The basic idea is to: Extract the edge/contours of a query image as well as target image. Take one point/pixel of contour in query image and find the distance of a closest point/pixel of contour in target image. Sum the distances for all edge points/pixels of query

How to connect broken lines in a binary image using Python/Opencv

两盒软妹~` 提交于 2019-11-30 07:17:38
How can I make these lines connect at the target points? The image is a result of a skeletonization process. I'm trying to segment each line as a region using Watershed Transform. MikeE 's answer is quite good: using dilation and erosion morphological operations can help a lot in this context. I want to suggest a little improvement, taking advantage of the specific structure of the image at hand. Instead of using dilation/erosion with a general kernel, I suggest using a horizontal kernel that will connect the endpoints of the horizontal lines, but will not connect adjacent lines to one another

Prepare complex image for OCR

寵の児 提交于 2019-11-30 06:58:39
I want to recognize digits from a credit card. To make things worse, the source image is not guaranteed to be of high quality. The OCR is to be realized through a neural network, but that shouldn't be the topic here. The current issue is the image preprocessing. As credit cards can have backgrounds and other complex graphics, the text is not as clear as with scanning a document. I made experiments with edge detection (Canny Edge, Sobel), but it wasn't that successful. Also calculating the difference between the greyscale image and a blurred one (as stated at Remove background color in image

Contour detection in MATLAB

痞子三分冷 提交于 2019-11-30 05:24:29
问题 I am trying to understand this code: d=edge(d,'canny',.6); figure, imshow(d,[]) ds = bwareaopen(d,40); figure, imshow(ds,[]) iout = d1; BW=ds; iout(:,:,1) = iout; iout(:,:,2) = iout(:,:,1); iout(:,:,3) = iout(:,:,1); iout(:,:,2) = min(iout(:,:,2) + BW, 1.0); iout(:,:,3) = min(iout(:,:,3) + BW, 1.0); I understand that d is the image and canny detector is applied and 40 pixels are neglected. The image is gray scale and contour is added to the image. Can you please explain the next lines? What

Creation of edge detection based image in PHP

久未见 提交于 2019-11-30 04:04:34
I'm curious - is it possible to ahieve in PHP: 1) Send image file to server 2) Process image = detect edges and create simple strokes basing on the edges 3) Save file on server / send it to user's browser / whatever Here is some "sample" file ;P (as You can see it wasn't made using any edge detection enabled program, but by hand - just as an example): http://i51.tinypic.com/5vzo0x.jpg Thanks! If you can use ImageMagick , there is the --charcoal filter : The charcoal effect is meant to simulate artist's charcoal sketch of the given image. The "-charcoal" operator is in some respects similar to

Detecting edges of a card with rounded corners

我们两清 提交于 2019-11-30 00:40:51
Hi currently i am working on an OCR reading app where i have successfully able to capture the card image by using AVFoundation framework. For next step, i need to find out edges of the card , so that i can crop the card image from main captured image & later i can sent it to OCR engine for processing. The main problem is now to find the edges of the card & i am using below code(taken from another open source project) which uses OpenCV for this purpose.It is working fine if the card is pure rectangular Card or Paper. But when i use a card with rounded corner (e.g Driving License), it is failed

opencv - counting non directional edges from canny

荒凉一梦 提交于 2019-11-29 23:24:15
can anyone help me how to count the number of non directional edge using opencv cannyedge detection? I have a cannyEdge image from opencv and I would like to have an histogram based on edge directions and there by i can count he number of directional and non directional edges. I think you are confusing edge detection with gradient detection. Canny provides an edge map based on the gradient magnitude (normally using a Sobel operator, but it can use others) because Canny only returns the thresholded gradient magnitude information it cannot provide you with the orientation information. EDIT : I

Canny Edge detector threshold values gives different result

人盡茶涼 提交于 2019-11-29 15:52:16
问题 I am trying to find contour of a image, before that I am applying Canny's edge detector. It's giving different result for different images.For one image it's giving perfect contours at threshold value - min-40 max-240 and for other image its 30-120. I want to make it generic. 回答1: In laymen terms, edge detection needs a threshold to tell what difference/change should be counted as edge. For details read here. So, the edges depend on the the content of image ie the level of brightness/darkness

detecting object in Homogeneous Intensity image

隐身守侯 提交于 2019-11-29 14:19:52
问题 I have image of Tiger's Pugmark (footprint impression) in mud. I want to detect the boundary of the pugmark but the image is uniform in intensity that is foreground and background cannot be distinguished based on intensity variations. What can i do to distinguish between the pugmark and the background.! 回答1: In segmentation tasks if you have both Good markers; and Strong edges around the object of interest then it is directly solved by a Watershed Transform. The problem, of course, is

Closing a contour curve in OpenCV

余生长醉 提交于 2019-11-29 13:30:00
问题 I'm using OpenCV (Canny + findCountours) to find external contours of objects. The curve drawn is typically almost, but not entirely, closed. I'd like to close it - to find the region it bounds. How do I do this? Things considered: Dilation - the examples I've seen show this after Canny, although it would seem to me it makes more sense to do this after findContours Convex hull - might work, though I'm really trying to complete a curve Shape simplification - related, but not exactly what I