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

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.
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
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 ?
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 Exchange에서 Introduction 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