edge-detection

Edge detection on C#

假装没事ソ 提交于 2019-12-10 20:40:03
问题 I have a black and white image like this (color overlays are mine, and can be removed): I need to figure out the edge of the hand shown, how can I do that? My current algorithm: List<Point> edgePoints = new List<Point>(); for (int x = 0; x < largest.Rectangle.Width && edgePoints.Count == 0; x++) { //top for (int y = 0; y < largest.Rectangle.Height - 3 && edgePoints.Count == 0; y++) { if (colorGrid[x, y].ToArgb() == Color.White.ToArgb() && colorGrid[x, y + 1].ToArgb() == Color.White.ToArgb() &

python laplace filter returns wrong values

拈花ヽ惹草 提交于 2019-12-10 18:21:47
问题 As I need to implement a sort of image processing program in python I also wanted to implement the laplace filter. I used the matrix -1 -1 -1 -1 8 -1 -1 -1 -1 and implemented the following code: for row in range(1, (len(self._dataIn) - 1)): for col in range(1, (len(self._dataIn[row])- 1)): value = (- int(self._dataIn[row - 1][col -1][0]) - int(self._dataIn[row - 1][col][0]) - int(self._dataIn[row - 1][col + 1][0]) - int(self._dataIn[row][col -1][0]) + (8 * int(self._dataIn[row][col][0])) -

Sobel operator & Convolution with WriteableBitmapEx

倾然丶 夕夏残阳落幕 提交于 2019-12-10 18:06:40
问题 So I'm using WriteableBitmapEx for an app on Windows RT. I'm trying to implement edge detection on an image using the sobel operator. I have successfully applied both kernels for x and y detection onto the image using .Convolute(), but now I'm stuck adding both images to one. The problem is, that all the pixels of both images seem to have the value 0 for transparency (so the A in ARGB). I can display both images on their own without a Problem, but adding them gives me just a black picture. So

Sub-Pixel Edge Detector Algorithm

自作多情 提交于 2019-12-10 11:48:16
问题 I am working on edge detection, i tried the method of canny(matlab function). but it only detect edge in the pixel level, I'm looking for a subpixel edge detection algorithm/code with high accuracy. 回答1: AFAIK state-of-the-art edge detection algorithms operate at a pixel-level accuracy (e.g., gPb). If you want to get sub-pixel accuracy, you may apply a post-processing stage to the pixel-level results obtained by canny or gPb. You can fit a parametric curve to small neighborhoods of detected

Simple shape detection in a 1bpp image

做~自己de王妃 提交于 2019-12-10 11:33:26
问题 I am trying to learn about simple shape detection for a project I'm working on. I have an image that is made of only black and white pixels and I need to detect shapes within the image, such as squares and ellipses. I also need to find the bounding boxes of the shapes. I have been searching online and reading articles but I can't find any good explanations of where to start. I am also looking for some partial/complete code examples preferably in Java or C++. Thanks! 回答1: There's a few

Get angle from OpenCV Canny edge detector

南楼画角 提交于 2019-12-10 10:07:13
问题 I want to use OpenCV's Canny edge detector, such as is outlined in this question. For example: cv::Canny(image,contours,10,350); However, I wish to not only get the final thresholded image out, but I also wish to get the detected edge angle at each pixel. Is this possible in OpenCV? 回答1: canny doesn't give you this directly. However, you can calculate the angle from the Sobel transform, which is used internally in canny() . Pseudo code: cv::Canny(image,contours,10,350); cv::Sobel(image, dx,

How to detect document from a picture in opencv?

…衆ロ難τιáo~ 提交于 2019-12-09 23:41:34
问题 I am trying to design an app similar to camscanner. For that, I have to take an image and then find the document in that. I started off with the code described here - http://opencvpython.blogspot.in/2012/06/sudoku-solver-part-2.html I found the contours and the rectangular contour with max area should be the required document. For every contour, I am finding an approximate closed PolyDP. Of all the polyDP of size 4, the one with max area should be the required document. However, this method

Line detection in image

杀马特。学长 韩版系。学妹 提交于 2019-12-09 10:51:09
问题 I am new to image processing and I was trying to detect vertical lines using this code- image=imread('benzene.jpg'); BW = im2bw(image); w1=[-1 2 -1 ; -1 2 -1 ; -1 2 -1]; g=(imfilter(double(BW),w1)); g=abs(g); T=max(g(:)); g=g>=T; imshow(g); This was my image- And this is what I got after performming the operations- So my question is why am I getting this output?There are 10 vertical lines if vertical double bonds are counted as 2 distinct vertical lines.Also what if I want to get horizontal

Markerless AR lib for iPhone

瘦欲@ 提交于 2019-12-09 00:23:36
问题 I'm searching a functional AR Markerless library for the iPhone (from 3GS and supporting iOS 4.3 at least). I've already tested a large amount of SDKs including Qualcomm AR, Layar, ARToolkit, but none of them was satisfying my needs. To be more precise, I need neither a localization-based AR technology (Layar), nor a marker technology (ARToolkit). If possible, the library has to be free, as I don't have much financial resources. 回答1: Qualcomm ( QCAR ) has recently released an iOS version into

Sub-Pixel Edge Detector Algorithm

[亡魂溺海] 提交于 2019-12-08 19:46:30
I am working on edge detection, i tried the method of canny(matlab function). but it only detect edge in the pixel level, I'm looking for a subpixel edge detection algorithm/code with high accuracy. AFAIK state-of-the-art edge detection algorithms operate at a pixel-level accuracy (e.g., gPb ). If you want to get sub-pixel accuracy, you may apply a post-processing stage to the pixel-level results obtained by canny or gPb. You can fit a parametric curve to small neighborhoods of detected edges thus obtaining sub-pixel accuracy. The problem with running edge() on your original image is that the