edge-detection

php - how to find coordinates of edges in an image using imagick or other library?

吃可爱长大的小学妹 提交于 2019-12-12 05:03:28
问题 given an image composed of a plain black field with a single white rectangle inside it somewhere, how can i extract the coordinates of the rectangle ? i've googled and googled and found numerous articles on edge detection using hough lines, convolution, morphology, etc., but all of these actually edge the image or convert it in some way. i don't want to change the image, all i want to do is find where the edges are. obviously, i could simply iterate over the entire width+height of the image

calculating the gradient of a 3D matrix

我怕爱的太早我们不能终老 提交于 2019-12-12 01:56:05
问题 I have a 3D matrix and want to calculate the gradient for this matrix. The only step which I did is defining image gradient for a 2D image as follow: sx = [-1 0 1; -2 0 2; -1 0 1]; sy = [1 2 1; 0 0 0; -1 -2 -1]; Gx = conv2(input, sx, 'same'); Gy = conv2(input, sy, 'same'); grdmg = sqrt(Gx.^2+Gy.^2); grddr = atan2(Gy,Gx); I am wondering that how I can extend this code to 3D? I know that in 3D matrix I should use convn, but do not know that how I should change the sx, sy and make sz. 回答1: If

Image matching using edge detection

一曲冷凌霜 提交于 2019-12-12 01:46:57
问题 I am doing my final year Mca and my topic is image matching using edge detection. I have an Image at hand where the subject is not smiling, and two other images. Bigger image containing the image at hand as a part of the image Same as the image at hand with (some modification like smiling) Now I want to check for presence in the first case, matching in the second case. My approach: I will find edges for all the given images-to reduce the amount of data to check. I'm stuck on how to proceed.

Conv2D CNN edge detection script returns blank images

早过忘川 提交于 2019-12-11 16:45:03
问题 I want to colour the oil, water and plastic in the images shown. Currently I split up the training image (only using the parts which are coloured properly). I then train a conv2D network and plot the predictions. When I run it, I get blank blue or black images in return. Please advise as to: -whether my network is appropriate, -what parameters I should be using -what training images I should be using. #IMPORT AND SPLIT from cam_img_split import cam_img_split import cv2 import numpy as np img

Remove white edges from image C#

喜欢而已 提交于 2019-12-11 16:16:32
问题 I am looking for a way to detect and crop a image in scan I am receiving. The picture is a form that gets scanned as a result it also contains the white background of scan cover. Any suggestions how I could do that automatically? 回答1: There is an algorithm (with examples) for use in just this scanning situation: https://github.com/rajbot/autocrop It is not c# but it should be simple to migrate much of it without significant difficulty. There is also a simpler algorithm which may fit your

Grid on Image to compute the average color

陌路散爱 提交于 2019-12-11 15:20:14
问题 Hi I have done edge detection on an image and now I want to compute the average color of the pixels in the image. For that first I need to convert the image into a 10x10 grid where each grid element represent individual block. For each block I need to compute the average color. Is there a way to do that? Any help appreciated. Currently I can draw a grid on the image but I cannot do computations from that. import cv2 import numpy as np from matplotlib import pyplot as plt img = cv2.imread(

My Sobel Edge Detection Operator Output is weird

喜你入骨 提交于 2019-12-11 14:48:24
问题 My output of Sobel edge detection operator is weird. Here's my code : BufferedImage temp = img; float kernelx[][] = {{-1, 0, 1},{-2, 0, 2},{-1, 0, 1}}; float kernely[][] = {{-1, -2, -1},{0, 0, 0},{1, 2, 1}}; float valx = 0; float valy = 0; float val = 0; for(int i=1;i<width-2;i++) { for(int j=1;j<height-2;j++) { valx = (kernelx[0][0]*new Color(img.getRGB(i-1, j-1)).getRed()) + (kernelx[0][2]*new Color(img.getRGB(i+1, j-1)).getRed()) + (kernelx[1][0]*new Color(img.getRGB(i-1, j)).getRed()) +

Detect correct number of CORNER coordinates from a Polygon image in MATLAB

社会主义新天地 提交于 2019-12-11 12:50:17
问题 I have a number of polygon images like a hexagon, a pentagon, any quadrilateral etc.. i need to generalize the detection technique to detect the RIGHT number of Corner coordinates.. no extra coordinates should be generated. for eg:- the code should detect only 4 for a quadrilateral, 3 for triangle, 5 for pentagon and so on.. I used HARRIS corner detection to detect right corners by specifying the number of corners value but i cant use the same code for an image with different number of edges.

edge detection in svg filter

前提是你 提交于 2019-12-11 07:33:40
问题 I am trying to find the edge points of the image by using the SVG filter.The problem is not getting succeed with this.Below is the code that what I have tried. <svg width="100%" height="495"> <defs> <filter id="blobby" color-interpolation-filters="sRGB"> <feColorMatrix type="saturate" values="0"/> <feComponentTransfer> <feFuncR type="discrete" tableValues="0 0 0 0 0 1"/> <feFuncG type="discrete" tableValues="0 0 0 0 0 1"/> <feFuncB type="discrete" tableValues="0 0 0 0 0 1"/> <

edge detection iphone opencv

馋奶兔 提交于 2019-12-11 06:16:39
问题 My application is to detect coins. I have done most of it using OpenCv . Am using CannyDetection and houghTransform to detect circles of image. But am not getting right circles of coins, I think it might be problem with ThresoldValues passing to cannyEdgeDetector. Can any one tell me how to choose thresold values for detecting circles of coins. 回答1: Unfortunately, there's no magic number for that. The circles detection depend a lot on the parameters you pass to cvHoughCircles() , and they are