quangdien
Newbie level 3
Hi everybody,
Let me introduce myself. My name is Quang Dien, a Vietnamese students. This term, I have to do a project about the fingerprint detecting.
About my profect, I had a source code on MATLAB, it can run on MATLAB perfectly. But, my program is written by VC++ 6.0, so, I have to use MATLAB COM Builder to build a component to use in VC++. I use MATLAB 6.5 R13 comtool to build it. "Standalone built completed !" , no problems. But, when I call it in VC++, no thing happen ! No error but no reaction. The input parameter is the same with itself when initializing. About my function, I can summarize for you as below :
Function score = cubs_match(input_file1, input_file2)
where :
input_file1 : the string holds the path to the fingerprint image1
input_file2 : the string holds the path to the fingerprint image2
score : a number between 0 to 100, show how much do 2 fingerprint images look like rach others.
When I built it, I use VC++ 6.0 call it as below :
// --> Set the input arguments to the COM method
VARIANT f1_Variant, f2_Variant;
VariantInit(&f1_Variant);
f1_Variant.vt = VT_BSTR;
f1_Variant.bstrVal = SysAllocString(L"C:/MATLAB6p5/work/Fingerprint/1_1.fp");
VariantInit(&f2_Variant);
f2_Variant.vt = VT_BSTR;
f2_Variant.bstrVal = SysAllocString(L"C:/MATLAB6p5/work/Fingerprint/1_2.fp");
// --> Set the output arguments to the COM method
VARIANT result;
// --> Create an instance of the COM object
IFingerprintClass *pImyclass;
hr=CoCreateInstance(CLSID_FingerprintClass,NULL, CLSCTX_INPROC_SERVER, IID_IFingerprintClass, (void **)&pImyclass);
// --> Access the method with arguments and receive the output out1
hr = (pImyclass -> cubs_match(1, &result, f1_Variant, f2_Variant));
// --> Print the result
CString Show_Screen;
Show_Screen.Format("Matching score : %g",result.dblVal );
MessageBox(Show_Screen);
Note : + My component has the name as "Fingerprint" and the Class name is "FingerprintClass"
+ The *.fp format is my own format.
But when run it, the result doesn't change. It return : -9.25596e+061
What is my problem ? How to solve it ? Please kindly answer for me if you know about my problems ...
Thanks a lot.
Best regards,
Quang Dien
____________________
PS : + Please reply your ans to me to : quangdien12jan@yahoo.com
+ About the Fingerprint Toolbox, you can download it form mathworks.com, search for "fingerprint recognition toolbox"
Let me introduce myself. My name is Quang Dien, a Vietnamese students. This term, I have to do a project about the fingerprint detecting.
About my profect, I had a source code on MATLAB, it can run on MATLAB perfectly. But, my program is written by VC++ 6.0, so, I have to use MATLAB COM Builder to build a component to use in VC++. I use MATLAB 6.5 R13 comtool to build it. "Standalone built completed !" , no problems. But, when I call it in VC++, no thing happen ! No error but no reaction. The input parameter is the same with itself when initializing. About my function, I can summarize for you as below :
Function score = cubs_match(input_file1, input_file2)
where :
input_file1 : the string holds the path to the fingerprint image1
input_file2 : the string holds the path to the fingerprint image2
score : a number between 0 to 100, show how much do 2 fingerprint images look like rach others.
When I built it, I use VC++ 6.0 call it as below :
// --> Set the input arguments to the COM method
VARIANT f1_Variant, f2_Variant;
VariantInit(&f1_Variant);
f1_Variant.vt = VT_BSTR;
f1_Variant.bstrVal = SysAllocString(L"C:/MATLAB6p5/work/Fingerprint/1_1.fp");
VariantInit(&f2_Variant);
f2_Variant.vt = VT_BSTR;
f2_Variant.bstrVal = SysAllocString(L"C:/MATLAB6p5/work/Fingerprint/1_2.fp");
// --> Set the output arguments to the COM method
VARIANT result;
// --> Create an instance of the COM object
IFingerprintClass *pImyclass;
hr=CoCreateInstance(CLSID_FingerprintClass,NULL, CLSCTX_INPROC_SERVER, IID_IFingerprintClass, (void **)&pImyclass);
// --> Access the method with arguments and receive the output out1
hr = (pImyclass -> cubs_match(1, &result, f1_Variant, f2_Variant));
// --> Print the result
CString Show_Screen;
Show_Screen.Format("Matching score : %g",result.dblVal );
MessageBox(Show_Screen);
Note : + My component has the name as "Fingerprint" and the Class name is "FingerprintClass"
+ The *.fp format is my own format.
But when run it, the result doesn't change. It return : -9.25596e+061
What is my problem ? How to solve it ? Please kindly answer for me if you know about my problems ...
Thanks a lot.
Best regards,
Quang Dien
____________________
PS : + Please reply your ans to me to : quangdien12jan@yahoo.com
+ About the Fingerprint Toolbox, you can download it form mathworks.com, search for "fingerprint recognition toolbox"