2014-09-30 49 views
0

我能够通过将波束宽度调整为2D占用网格地图的大小,将波束宽度与2D占用网格地图线性混合,根据相机姿态变换波束宽度并混合两个图像,因为功能的要求是使两个图像的大小相同。如何将图像线性混合到图像的一部分?

然而,模糊整个地图甚至具有0.9

的α是否有可能应用线性共混物的波束宽度(三角形)覆盖地图的仅部分?怎么样?

enter image description here

回答

1
Find Region of Interest ofg the triangle: 

    Mat image = imread(""); 
    Rect region_of_interest = Rect(x, y, w, h); 
    Mat image_roi = image(region_of_interest); 

Apply bluring to image_roi 

place the image_roi back into the original image 
+0

有没有办法为三角形将只混合?而不是矩形矩阵? – Xegara 2014-09-30 11:26:06

+0

http://stackoverflow.com/questions/15104780/get-all-the-points-in-triangular-roi-in-a-xy-plane – GPPK 2014-09-30 12:26:58

+0

我只是为三角形ROI内的每个像素做了线性混合。不过,谢谢你的回答:) – Xegara 2014-10-01 03:19:21