gpt4 book ai didi

objective-c - cvNot 在 Objective c 中导致异常

转载 作者:太空宇宙 更新时间:2023-11-03 22:01:12 24 4
gpt4 key购买 nike

为什么我使用cvNot会出现异常?这是 objective-c 代码

cv::Mat gray= //Get source image, Gray Image
cv::Mat bw=gray>128;
cv::Mat des;
cvNot(&bw,&des); // Exception happen here !

最佳答案

cvNot 来自可怕的 c-api,要避免它!

坚持使用 c++、cv::Mat 等,!

使用其中之一:

bitwise_not(src,dst);

或:

des = ~src;

关于objective-c - cvNot 在 Objective c 中导致异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21253807/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com