我正在寻找一个直接的方式应用自动白平衡的图像。在
我找到了一些关于balanceWhite()
方法的官方文档:cv::xphoto::WhiteBalancer Class Reference
但是,当我尝试调用示例中所示的函数时,有一个模糊的错误。在
image = cv2.xphoto_WhiteBalancer.balanceWhite(image)
加薪:
^{pr2}$如果我尝试根据需要使用cv2.xphoto_WhiteBalancer
对象:
balancer = cv2.xphoto_WhiteBalancer()
cv2.xphoto_WhiteBalancer.balanceWhite(balancer, image)
它引发了:
Traceback (most recent call last):
File "C:\Users\Delgan\main.py", line 81, in load
cv2.xphoto_WhiteBalancer.balanceWhite(balancer, image)
TypeError: Incorrect type of self (must be 'xphoto_WhiteBalancer' or its derivative)
有人在python3.6和opencv3.4中成功地使用了这个特性吗?在
我也尝试过使用派生类GrayworldWB
、LearningBasedWB
和{
答案可以在^{} documentation 中找到。在
创建WB算法的合适方法是}。在
createSimpleWB()
、createLearningBasedWB()
和{示例:
下面是官方OpenCV存储库中的一个示例文件:^{}
相关问题 更多 >
编程相关推荐