[英]Extract single object from (noisy) solid background
I'm in the process of scanning old photographs, and I would like to automate the process of extracting the photograph from the (noisy) solid white background of the scanner so that I have a transparent photograph. 我正在扫描旧照片,我想自动化从扫描仪的(嘈杂的)纯白色背景中提取照片的过程,以便获得透明的照片。
I've tried to use OpenCV in Python, with techniques as edge/contour detection, but it would pick up the little specs of dust in the background and not generate a complete and correct transparency map. 我曾尝试在Python中使用OpenCV,并将其用作边缘/轮廓检测技术,但它会在后台拾取少量灰尘,而不会生成完整且正确的透明度贴图。
I have a sample: 我有一个样本:
and the desired result: 和预期的结果:
there are the steps necessary to achieve your desired result (I implement them in C++ so I don't attach the code): 有一些步骤可以实现所需的结果(我用C ++实现了这些步骤,所以我不附加代码):
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.