简体   繁体   English

如何使用python opencv从这些图片中去除阴影?

[英]How to remove the shadows from these pictures using python opencv?

How to remove the shadows of the seeds? 如何去除种子的阴影? Also I would like to know if there is a way to change the color of all the seeds to red colour? 我也想知道是否可以将所有种子的颜色更改为红色?

在此处输入图片说明
在此处输入图片说明
在此处输入图片说明

It seems rather easy to detect the seeds since your background is homogeneous. 由于背景是均匀的,因此似乎很容易检测到种子。 You can start by some simple image processing (contrast enhancement, thresholding, contour detection) to detect the seeds and then you can plot red blobs (with the same area as the detected regions) on the original image. 您可以通过一些简单的图像处理(对比度增强,阈值检测,轮廓检测)开始以检测种子,然后可以在原始图像上绘制红色斑点(与检测到的区域面积相同)。 As for the shadows, you can check this question ( How to remove the shadow in image by using openCV? ). 至于阴影,您可以检查此问题( 如何使用openCV去除图像中的阴影? )。

I think you can solve with this paper and it will make you interesting. 我认为您可以用本文解决,它将使您变得有趣。

The algorithm described there works quite well and this will be a good example for you in using opencv. 此处描述的算法效果很好,这将是您使用opencv的一个很好的例子。

And you can find the source code here 你可以在这里找到源代码

Regards. 问候。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM