标签: edge-detection

边缘检测和透明度

使用在一致背景下拍摄的服装图像,我想使图像中的所有像素都透明,除了衣服.最好的方法是什么?我研究了常见的算法和开源库opencv.除了滚动我自己或使用opencv有一个简单的方法来做到这一点?我对任何语言或平台都持开放态度.

谢谢

image image-processing computer-vision edge-detection background-subtraction

6
推荐指数
1
解决办法
3420
查看次数

在PHP中创建基于边缘检测的图像

我很好奇 - 有可能在PHP中使用:

1)将图像文件发送到服务器2)处理图像=检测边缘并基于边缘创建简单笔划3)将文件保存在服务器上/将其发送到用户的浏览器/无论如何

这是一些"样本"文件; P(你可以看到它不是使用任何边缘检测启用的程序,而是手工 - 只是作为一个例子):

http://i51.tinypic.com/5vzo0x.jpg 谢谢!

php imagemagick edge-detection

6
推荐指数
1
解决办法
7994
查看次数

openCV vs GIMP,openCV中的边缘检测失败

我正在使用以下参数在openCV中进行Sobel边缘检测:

cv.Sobel(mat, edgemat, 1, 1)
# mat -> source image
# edgemat -> taget output image 
# 1 -> xorder (int) – Order of the derivative x
# 1 -> yorder (int) – Order of the derivative y
# apertureSize (int) – Size of the extended Sobel kernel -> its by default set to 3
Run Code Online (Sandbox Code Playgroud)

我还使用GIMP对图像进行了Sobel边缘检测.

源图像是: 来源图片 openCV的输出是 openCV输出 GIMP的输出是 GIMP输出

为什么openCV和GIMP的输出之间有这么大的差异.GIMP的产量质量超过openCV光年.

python opencv gimp edge-detection

6
推荐指数
1
解决办法
2190
查看次数

一维边缘检测

我想要分别检测图像的每一行(ig一行)上的边缘而不是2D图像的边缘检测.即从输入1D向量检测边缘,其值为0到255的像素强度(下图): 在此输入图像描述

我想检测样本输入中出现的主要边缘(下图) 在此输入图像描述

2d image image-processing computer-vision edge-detection

6
推荐指数
1
解决办法
5787
查看次数

在我的Canny-Deriche的MATLAB实现中无法获得干净的输出

到目前为止我的代码是:

function imgg = derichefilter1(x, k, a, b, c)
osize = size(x);
x = double(x);
a = double(a);
b = double(b);
c = double(c);
k = double(k);
y1 = zeros(osize(1),osize(2));
y2 = zeros(osize(1),osize(2));
y1(:,1) = a(1)*x(:,1);
y1(:,2) = a(1)*x(:,2) + a(2)*x(:,1) + b(1)*y1(:,1);
for ii=3:osize(2)
    y1(:,ii) = a(1)*x(:,ii) + a(2)*x(:,ii-1) + b(1)*y1(:,ii-1) + b(2)*y1(:,ii-2);
end

y2(:,osize(2)-1) = a(3)*x(osize(2));
for ii=(osize(2)-2):-1:1
    y2(:,ii) = a(3)*x(:,ii+1) + a(4)*x(:,ii+2) + b(1)*y2(:,ii+1) + b(2)*y2(:,ii+2);
end
imgg = c*(y1+y2);

function imgg = derichefilter2(x, k, a, b, …
Run Code Online (Sandbox Code Playgroud)

algorithm matlab edge-detection feature-detection

6
推荐指数
1
解决办法
1193
查看次数

OpenCV:适合检测到的边缘

我通过使用canny边缘检测来检测水波的边缘.但是,我想为这条边拟合一条曲线.这可能在OpenCV中吗?

这是边缘检测前的图像: 边缘检测前的图像.

这是边缘检测操作的结果: 检测结果

代码是从OpenCV教程中的示例复制而来的:

import cv2
import numpy as np
from matplotlib import pyplot as plt

img = cv2.imread('BW.JPG',0)
edges = cv2.Canny(img,100,200)

plt.plot(1),plt.imshow(edges,cmap = 'gray')
plt.title('WAVE')
plt.show()
Run Code Online (Sandbox Code Playgroud)

python opencv curve-fitting edge-detection

6
推荐指数
1
解决办法
4195
查看次数

使用OpenCV在彩色背景上的边缘检测

我正在使用以下代码来检测给定文档的边缘.

private Mat edgeDetection(Mat src) {
    Mat edges = new Mat();
    Imgproc.cvtColor(src, edges, Imgproc.COLOR_BGR2GRAY);
    Imgproc.GaussianBlur(edges, edges, new Size(5, 5), 0);
    Imgproc.Canny(edges, edges, 10, 30);
    return edges;
}
Run Code Online (Sandbox Code Playgroud)

然后我可以edges通过从中找到最大轮廓来找到该文档.

我的问题是我可以从下面的图片中找到该文件:

在此输入图像描述

但不是来自以下图片:

在此输入图像描述

如何改进边缘检测?

android opencv edge-detection

6
推荐指数
1
解决办法
2429
查看次数

使用R中igraph对象的条件提取边列表

我正在使用由不同类型的节点组成的无向igraph对象(例如,黄色的男性M和橙色的女性F):

g <- graph.atlas(711)
V(g)$name <- 1:7
V(g)$gender <- c("M","F","M","M","M","F","F")
V(g)$color <- ifelse(V(g)$gender=="F", "orange","yellow")
g<-delete.edges(g, E(g, P=c(1,2,2,3,2,7,7,6,7,3,3,4,3,5,4,5,5,6,6,1))) 
g<-add.edges(g,c(1,4,4,5,5,1,4,7,7,3,3,5,5,7,2,7,7,6,6,2,6,4))
plot(g)
Run Code Online (Sandbox Code Playgroud)

我想提取一个由连接不同类型节点(男性和女性)的边组成的边列表:

edgelist <- rbind(c(3,7),
               c(4,6),
               c(4,7),
               c(5,7))
Run Code Online (Sandbox Code Playgroud)

assortativity 使用连接M和F类型的顶点的边缘部分,但我不知道这些边缘提取明显.

get.edgelist 仅返回整个边缘列表,不可能设置条件.

attributes r edge-detection igraph

6
推荐指数
1
解决办法
204
查看次数

如何通过几个图像/电影帧创建房间的2D地图?

我想通过获取所有方向的图片(天花板)(360° - 例如电影帧),通过边缘检测识别墙壁,删除其他不需要的物体,在正确的位置连接图像来创建房间的简单2D地图(参见墙,全景)并最终创建近似的2D地图(从上面看).获得比例将是另一个参数,这可能是有用的.

我现在有一些自己的想法,例如使用索贝尔算法,但如果有人知道某些项目或软件(GPL,免费软件首选)已经这样做会很有意思,因为我还在寻找一些例子,这对我有帮助.

谢谢.

camera 2d map edge-detection

5
推荐指数
1
解决办法
2161
查看次数

CIImage(IOS):在单色滤镜之后添加3x3卷积以某种方式恢复颜色

我正在将ciimage转换为单色,使用CICrop进行剪裁并运行sobel来检测边缘,底部的#if部分用于显示结果

CIImage *ci = [[CIImage alloc] initWithCGImage:uiImage.CGImage];

CIImage *gray = [CIFilter filterWithName:@"CIColorMonochrome" keysAndValues:
      @"inputImage", ci, @"inputColor", [[CIColor alloc] initWithColor:[UIColor whiteColor]],
      nil].outputImage;



CGRect rect = [ci extent];
rect.origin = CGPointZero;

CGRect cropRectLeft = CGRectMake(0, 0, rect.size.width * 0.2, rect.size.height);
CIVector *cropRect = [CIVector vectorWithX:rect.origin.x Y:rect.origin.y Z:rect.size.width* 0.2 W:rect.size.height];
CIImage *left = [gray imageByCroppingToRect:cropRectLeft];

CIFilter *cropFilter = [CIFilter filterWithName:@"CICrop"];

[cropFilter setValue:left forKey:@"inputImage"];
[cropFilter setValue:cropRect forKey:@"inputRectangle"];

// The sobel convoloution will produce an image that is 0.5,0.5,0.5,0.5 whereever the image is flat
// …
Run Code Online (Sandbox Code Playgroud)

edge-detection ios ciimage

5
推荐指数
1
解决办法
1497
查看次数