从境地图像中删除阴影 [英] Remove shadow from landsat image

查看:73
本文介绍了从境地图像中删除阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

引用:

最近大家好我试图通过openCV检测图像中的阴影。所以为了做到这一点,我使用BackgroundSubtractorMOG2类,但它给我错误,并使用opencv-3.1.0版本。请帮我讲解如何使用这个课程。

Hello everyone recently i am trying to detect the shadow from a image by openCV. So in order to do this i am using the BackgroundSubtractorMOG2 class but it gives me error and am using opencv-3.1.0 version. Please help me how to use this class.




Mat image = imread( "Cloud.bmp", 1 );
	Mat back;
		
	Ptr< BackgroundSubtractorMOG2 > bg = createBackgroundSubtractorMOG2( 1, 16, true );
	
	bg->apply( image, back ); //Problem is here!
	imshow( "Shadow", back );





我尝试过:



我正在尝试检测云并删除云的阴影



What I have tried:

I am trying to detect the cloud and remove the shadow of cloud

推荐答案

我猜你的垫子没有正确初始化,但是当我读到它是另一个问题。对于这类问题,您最好在OpenCV论坛中搜索和询问。



以下是使用BackgroundSubtractorMOG2获取图片,这对你有帮助。
I would guess that your Mat back isnt proper initialized, but as I read it is another problem. For that kind of question you better search and ask in the OpenCV forum.

Here is some example code for Using BackgroundSubtractorMOG2 for images which should help you.


这篇关于从境地图像中删除阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆