xuncv / opencv_aardio Goto Github PK
View Code? Open in Web Editor NEWaardio的opencv库
License: Apache License 2.0
aardio的opencv库
License: Apache License 2.0
VideoCapture对象的set函数会内存错误,看了参数好像写错了
1、cv2.Mat 和 cv2.MatExpr 库 的库文件名,首字母未改为大写(mat.aardio matExpr.aardio),好像会造成传错参数后,无法弹出错误提示,直接退出的问题。
2、从 bitmap 创建 cv2.Mat 对象时,有些像素格式的图片显示不正常,我使用以下代码显示常见像素格式图片:
//bitmap传入
elseif(tArg == type.table && arg[["pBitmap"]]){
var data = arg.lockMemory(,0x26200A);
err,ret = dll.core_Mat_new8(arg.height,arg.width,0x18/*_CV_8UC4*/,data.Scan0,data.Stride,{ptr value});
this.handle = ret.value;
arg.unlockMemory(data);
}
3、cv2.Mat 对象 的toBitmap() 好像会造成内存泄漏(即使转换后,手动释放 cv2.Mat对象 和bitmap对象),我使用以下代码实现,暂时未发现内存大幅上涨的现象(转换后,手动释放 cv2.Mat对象 和bitmap对象)
toBitmap = function(){
if(this.empty() or this.depth() != 0/*_CV_8U*/) return null;
var pixelFormats = {
[1] = 0x30803;
[3] = 0x21808;
[4] = 0x26200A;
}
var pixelFormat = pixelFormats[this.channels()];
var stride = this.step1();
if(stride % 4 ){
stride = stride - (stride % 4 ) + 4;
}
return ..gdip.bitmap( this.width,this.height,pixelFormat,this.data,stride );
}
`bitwise_or = function(src1,src2,mask){
var dst = ..cv2.mat();
mask = mask ? (mask.cvPtr)
var err = dll.core_bitwise_or(src1.cvPtr,src2.cvPtr.dst.cvPtr,null); //这里是否应该为:src2.cvPtr,dst.cvPtr,null
return dst;
}
bitwise_xor = function(src1,src2,mask){
var dst = ..cv2.mat();
mask = mask ? (mask.cvPtr)
var err = dll.core_bitwise_xor(src.cvPtr,src2.cvPtr,dst.cvPtr,null) //这里是否应该为src1.cvPtr,src2.cvPtr,dst.cvPtr,null
return dst;
}`
改后调用正常,没改前总报错
自己尝试了一下,无奈只能放弃!
怎么把封面好姑娘又加上了,在办公室里打开很尴尬啊。 ;)
文件:[string "import cv2..."]
错误行号:#1
错误:import cv2 failed :
是不是因为DLL文件下载的不对?系统win10x64
你好,我最近用您的库做个照片换底色的工具,照着网上python例子写的,发现没有inRange方法,自己照你其他方法写了个方法出了点问题
我在/lib/cv2/下没找到.res文件夹,自己创建一个吧,也无法创建(win7系统),不知道是不是方法不对
最后创建了一个res文件夹,没有前面的点,然后把下载的DLL文件放进去。
运行demo提示错误,最后把_.aardio里面的“.res”替换称"res"解决的
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.