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 comentarios

Kaustubha Govind
Kaustubha Govind el 25 de Jul. de 2011
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 el 25 de Jul. de 2011
Probably needs a %include
Jason Tran
Jason Tran el 25 de Jul. de 2011
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 el 25 de Jul. de 2011
Thanks. but "include" not define in vb6.

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Jul. de 2011

0 votos

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

5 comentarios

Jason Tran
Jason Tran el 25 de Jul. de 2011
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 el 25 de Jul. de 2011
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 el 25 de Jul. de 2011
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 el 25 de Jul. de 2011
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 el 26 de Jul. de 2011
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Community Treasure Hunt

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

Start Hunting!

Translated by