Make library, use it on vb6, video processing.

Hi. i want to build a software , it can traking car using optical flow estimation. i have been success with "m file" in matlab 2010b and using deploytool to make com component, setup MCR. When i add reference in vb6, it's ok, but vb6 can'n know some code in "m file",ex : video.ImageDataTypeConverter. I dont know how to fix this problem. help me please.

4 件のコメント

Kaustubha Govind
Kaustubha Govind 2011 年 7 月 25 日
What is the exact error message that you receive? Since you have MATLAB Compiler, it might be worth testing your code by compiling it into an executable.
Walter Roberson
Walter Roberson 2011 年 7 月 25 日
Probably needs a %include
Jason Tran
Jason Tran 2011 年 7 月 25 日
Thanks for comment.
Error is "undefined function or variable....at line..."
Vb6 can't know function "type=video.ImageDataTypeConverter".
I think we must add some libarry to vb6. I have been add "MWcomutill7.14.dll ", it is matlab compiler runtime.
Why the vb6 did'n work with this funtions ?.
Jason Tran
Jason Tran 2011 年 7 月 25 日
Thanks. but "include" not define in vb6.

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2011 年 7 月 25 日

0 投票

One possible way:
Instead of attempting to access the video class directly, call MATLAB functions that do the necessary work for you.

5 件のコメント

Jason Tran
Jason Tran 2011 年 7 月 25 日
Vb6 can access function of matlab by library add in or com component. I have do that.
Sorry but i can not understand your solution, please give me detail ?
Thanks
Walter Roberson
Walter Roberson 2011 年 7 月 25 日
For example, instead of calling on video.ImageDataTypeConverter from vb6, call a MATLAB function that calls video.ImageDataTypeConverter and returns the result.
If you try this and you still get the same problem, then the difficulty would likely be in the MATLAB Compiler not noticing that you need the code for that routine; you may need to use the %#function construct (I mistakenly referred to %include earlier).
I always have trouble finding the documentation for %#function . There is a brief example of its use in this solution: http://www.mathworks.com/support/solutions/en/data/1-9R93XH/index.html?solution=1-9R93XH
Jason Tran
Jason Tran 2011 年 7 月 25 日
Thanks.
I have some question :
1.%Mbuild -setup : this comment to choose the compiler. My computer have been setup vb2008 and vb6 but i just find vb2008 in this case.
Some thing wrong ?. ( i use vb6 to make programing).
2. If the compiler is not support video class, How to replace this code ?
%OpticalFlow = video.OpticalFlow('ReferenceFrameDelay', 1);
I use matlab buider NE and it does not have error, may be it is support video class ?
Walter Roberson
Walter Roberson 2011 年 7 月 25 日
vb6 does not appear to be a supported compiler for R2010b -- and that might be why you are having the difficulty. See http://www.mathworks.com/support/compilers/R2010b/index.html for the list of supported compilers for the 32 bit version (there is a link on that page for 64 bit compilers: note that 64 bit compilers require that one install additional software.)
Jason Tran
Jason Tran 2011 年 7 月 26 日
Following the information in "help" option, i see com component support on vb ( may be not vb6 version)
Conclusion : vb6 does not support for compiling.
I will try use vb2008 to rebuild software. if i have difficult I hope i will recieve your help.
Thank you very much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by